开发者

Encoding issue with ansi text received through bluetooth in Android

开发者 https://www.devze.com 2023-02-23 05:11 出处:网络
I am trying to read data 开发者_运维技巧from a Bluetooth GPS device on Android. I have modified the BluetoothChat sample from the Android SDK to create RFComm socket using reflection.

I am trying to read data 开发者_运维技巧from a Bluetooth GPS device on Android. I have modified the BluetoothChat sample from the Android SDK to create RFComm socket using reflection.

Looks like the values i receive are not encoded correctly. I get some unprintable characters as a result.

But the GetBlue app from the Android market is able to correctly display the NMEA strings.

Please help!


This got solved after specifying an appropriate UUID for connection.
Please see BlueGPS4Droid(http://sourceforge.net/p/bluegps4droid/home) for an example.

0

精彩评论

暂无评论...
验证码 换一张
取 消