0

Discovery and Messaging (btle-transport branch)

asked 2015-03-02 20:16:44 -0700

TheHindenburg gravatar image

updated 2015-03-15 21:10:43 -0700

Going off of the answer given here, I would like to futher know a few things about the communications as established in the btle-transport branch.

Here's what I know:

  1. The BLE transport is pretty much used as a serial byte stream based transport

  2. The messages are transmitted as 23 byte GATT datagrams and the fragmentation of messages is done in the runTx() function of the aj_target_serial.c file

What I would like to know:

  1. What is the mechanism of discovery/advertisement on BLE? What are the UUIDs being used to facilitate this and are they specific to the Nordic chips or can other BLE platforms read/process the signalling?

  2. What is the actual content of the data being sent over BLE? Is it the same as the Alljoyn Messages being sent over Wifi or are the messages altered for the configuration before being fragmented into 23 byte GATT datagrams?

  3. On the TC and Router side when the 23 byte datagrams are received, the reassembly is done when and on which platform?

    1. For TC is it done on the Nordic chip itself or is the data first serially transported to the Arduino board?
    2. For Router is it done on the Linux PC or is it done on the BTLE dongle itself.

It would also be really helpful if you could point to where in the Source code all of this would be happening.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-16 14:55:25 -0700

bgix gravatar image

updated 2015-03-16 15:03:44 -0700

Hello and thanks for your questions:

1 - What is the mechanism of discovery/advertisement on BLE? What are the UUIDs being used to facilitate this and are they specific to the Nordic chips or can other BLE platforms read/process the signalling?

  • This is an "Experimental" feature, and as such nothing is yet "set in stone". We currently use the following UUIDs:
    AllJoyn BTLE Transport Service: 414a0000-1c25-481f-9dfb-59193d238280
    AllJoyn Rx Characterisitc: 414a0001-1c25-481f-9dfb-59193d238280
    AllJoyn Tx Characterisitc: 414a0002-1c25-481f-9dfb-59193d238280

Ideally, this we can at least get a UUID16 assigned by the Bluetooth SIG, which will enable us to be discovered along with other BTLE GATT services (so that the device isn't locked into an "AllJoyn or Nothing" mode of operation). In it's current state, the UUID used can be modified on both sides (Linux, Arduino) probably until the feature is adopted into the master branch of AllJoyn. The discovery mechanism is that the Arduino (LN/TC) side advertises the Service UUID, and the Linux (RN) side discovers it. This only provides the information that the device is an AJ Leaf Node... Actual AllJoyn Service discover takes place after the BTLE connection is established.

2 - What is the actual content of the data being sent over BLE? Is it the same as the Alljoyn Messages being sent over Wifi or are the messages altered for the configuration before being fragmented into 23 byte GATT datagrams?

  • Yes, the contents of the BLE datagrams are nearly identical to the datagrams sent by any other transport. There is a SLAP layer that provides a simple SLIP based reliability packaging (with framing, sequence number, and crc) that add about 6 bytes + typically <1% overhead to the full packet, and after the SLAP encoding, the resulting data blob is sent in chunks of 20 byes (23 bytes of data == 3 byte ATT header + 20 bytes payload).

3 - On the TC and Router side when the 23 byte datagrams are received, the reassembly is done when and on which platform?

  • In both the Routing Node and Thin Client, Reassembly is handled in the SLAP engine.

3.1 - For TC is it done on the Nordic chip itself or is the data first serially transported to the Arduino board?

  • The fragmentation on the TC side is handled in aj_target_serial.c This is before it is handed off to the Nordic baseband.

3.2 - For Router is it done on the Linux PC or is it done on the BTLE dongle itself.

  • on the Linux side, fragmentation is performed in BlueZ in the plugin alljoyn.c, in the function rx_data_send(). This is also prior to hand-off to the BTLE dongle.

    One Last Note: In the code, Rx means Towards the Leaf Node/Arduino, and Tx means Towards the Routing Node/Linux.
edit flag offensive delete publish link more

Comments

Thanks for the answer.

TheHindenburg ( 2015-03-17 04:45:33 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-03-02 20:16:44 -0700

Seen: 349 times

Last updated: Mar 16 '15