2017-11-14 6 views
0

私はWiPy 2.0 Pycom Boardを使用しています。Bluetoothデバイス名がPycomで解決できない

使用可能なデバイスの名前を解決しようとすると、名前が正しく解決されません。

bluetooth.resolve_adv_data(adv.data,Bluetooth.ADV_NAME_CMPL) 

この行は、次のデータを出力します。

None 
HE<�@?�'�? 

場合は、印刷短い名前

bluetooth.resolve_adv_data(adv.data,Bluetooth.ADV_NAME_SHORT) 

それは「なし」にスキャンデバイスの適切な名前を取得する方法

を出力しません。私はこの初めてです

ありがとう!

答えて

0

メーカーデータを使用して、センサから適切なデータを取得できます。

mfg_data = bluetooth.resolve_adv_data(adv.data, Bluetooth.ADV_MANUFACTURER_DATA) 
advData = binascii.hexlify(mfg_data) 
関連する問題