본문 바로가기

반응형

Python

(3)
Protocol Buffers - Python (2/3) Protocol Buffer Basics: Python | Protocol Buffers | Google Developers This tutorial provides a basic Python programmer's introduction to working with protocol buffers. By walking through creating a simple example application, it shows you how to Define message formats in a .proto file. Use the protocol buffer compiler. Use t developers.google.com 위 링크의 내용을 기반으로 작성했습니다. 이 문서는 proto2 버전을 사용합니다. pr..
Android<->Mac Bluetooth 연결하기 Mac 을 Server로 하고 Android를 Client로 하여 서로 데이터를 주고 받도록 하는 것이 1차 목표였다.둘의 통신은 BLE가 아닌 기본 Bluetooth 이다.Mac은 IOBluetooth를 사용하지 않고 Python LightBlue library를 사용하여 작성하였다.아래는 기본 테스트이므로 접속이 완료되면 데이터를 주고 받고 끝난다. Android Codepackage com.yhg.bluetoothclient; import android.annotation.TargetApi; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.Bluetoo..
Install Lightblue Cross Platform 이 가능한 Bluetooth library를 찾다가 Mac, Linux, Nokia Series 60 을 지원하는 LightBlue를 발견했습니다.LightBlue는 Python bluetooth library입니다.공식사이트를 보면 몇년 전부터 지원을 중단했지만.. 개발자들이 새로 Github에 올려서 최신 OS에서도 빌드되도록 수정했습니다.여러 Github repository가 있지만 그중에서 pebble/lightblue-0.4 가 OSX 64bit 에서 오류 없이 빌드됩니다.설치과정은 간단합니다. 우선 lightblue library를 빌드하고 설치합니다. 명령어 하나로 끝납니다. 위와 같이 ** INSTALL SUCCEEDED ** 가 출력되면서 설치가 끝납니다.이제 ..

반응형