2017년 7월 23일 일요일

Help - BLE (Bluetooh Low Energy) - receiving string


I am working with a app in an android phone that will receive a string from a development kit ( BC118-diskit-001  from Sierra Wireless /Blue creation) using Bluetooth Low Energy (BLE).

I am using the new BLE extension and worked very well to send a string, but receive a string is the problem now.

Do anyboby can publish the diagram blocks for receive a string, using BLE extension ?

--
Just to make sure we are on the same page, you are using the BLE extension published on the new IOT site?

You should use ReadStrings (if you just want to read the current value of the characteristic) or RegisterForStrings (if you want to be notified when new content is received). Note that the maximum transmission unit of a BLE packet is 23 bytes, so any string you send will need to fit into that size or you will otherwise need to send multiple messages.

--
I downloaded the new extension for BLE. 

Attached  are the example that I am trying to do.  In this app, I got success to send a message (This message appears at the Bluettoth Board COM ), but it is not receiving any string. I don't know  if it is correct. Could you take a look ?


--
Those are the blocks from the old BLE extension. Here's a rough sketch of what you would do with the new version:

With the new BLE extension, you would use the ReadStrings block with the same UUIDs. You also need to specify whether the string data are encoded as UTF-16 (true) or UTF-8 (false). Most strings will be UTF-8, so start testing with false for the utf16 parameter. In the When BluetoothLE1.StringsReceived event, there is a stringValues parameter that is a list of all of the (null-terminated) strings parsed from the BLE packet. If you only have 1 string, it will be at index 1 of the list.

--
Hi Evan as far as I can see it's not very easy to find new BLE extension, is it?

here " BLE extension published on the new IOT site" I can find the BLE documentation, but there is no link to download the extension itself?
after looking around for a while I found a link to the new extension hidden in the tutorial http://iot.appinventor.mit.edu/assets/howtos/MIT_App_Inventor_Basic_Connection.pdf 

you might want to adjust this on the webpage...

--

댓글 없음:

댓글 쓰기