React Native BLE Serial with HM-10

한글 버전 : https://goo.gl/IHwMCJ

Let’s summarize the connection between Android and iOS Bluetooth.

Currently, the hardware part is complete, but the bluetooth module is not recognized by iOS devices.

Bluetooth is currently up to version 5, but iOS only supports BLE version (version 4). Current module (product) that converts serial signal to Bluetooth supports only V2.

Since the serial signal (TX / RX) comes out from the product, you can simply change it to the BLE signal, but the problem becomes complicated because the serial protocol has been expelled since version 4 (BLE).

About Bluetooth : https://en.wikipedia.org/wiki/Bluetooth

In summary, every chip maker has to create a workaround to support SPP(Serial Port Service) and a corresponding implementation on each mobile platform. And mobile developer need to implement according to the guideline provided by the chip manufacturer, or the makers of the module using the chip implement and provide to the developers. Anyway the implementation seems to require knowledge of the firmware.

BLE chip etc

Eventually, we searched for the BLE-UART module and narrowed it down to the provider which supports mobile source code (or library), some of which only provided Android.

So, I wanted the most used modules, and eventually I found a cheap, heavily used module called HM-10. There was one in the office. I will test it with the module next week, both iOS and Android sources.

iOS sourcecode : https://github.com/hoiberg/HM10-BluetoothSerial-iOS

One disappointing thing is that I thought it would be easy to link with the react-native-bluetooth-serial module, but I have to connect directly with the native.

2017. 2. 4

I replaced current V2 version with the HM-10 module, no problem with connection and packet receiving on iOS. The above source code was used and tested without any problems.

Next, we need to test Android, which is not urgent.

The source code link : https://github.com/danasf/hm10-android-arduino

2017. 2. 13 추가.

__ to be continued

Advertisements

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Twitter 사진

Twitter의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Google+ photo

Google+의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

%s에 연결하는 중