1

Alljoyn BLE setup (btle-transport branch)

asked 2015-02-19 22:10:08 -0700

TheHindenburg gravatar image

updated 2015-02-19 22:15:18 -0700

I am currently trying to port certain BLE platforms onto Alljoyn, though before I begin with the process I would like to see the available code (btle-transport branch) work for myself and as such would like to know what is the setup that I would require to test the BLE functionality of that code.

Here's what I know/believe(I could be wrong):

  1. The AJTCL code under the feature branch has BLE support for Arduino using the nRF8001 Nordic semiconductor for BLE (ajtcl/target/arduino/aj_target_serial.c).

  2. The AJTCL code uses the serial interface to transport messages to the Arduino Board which is then used a radio.

  3. The Standard Core source form the feature branch only works for linux (Link for that thread)

The questions that I have are:

What would the setup for this look like?

Is there any tutorial for what I would need to do to setup Arduino with BLE?

If I am running the Standard Core app on a Linux PC, can I use a BLE dongle to give it the required functionality?

And finally, what is the size of the messages that are being transported through BLE (and where in the Source code can I look to reference this)?

edit retag flag offensive close merge delete

Comments

the webex recording here may have more pointers: https://lists.allseenalliance.org/pipermail/allseen-core/2015-January/000926.html

ry.jones ( 2015-02-20 13:07:47 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-02-20 15:31:01 -0700

bgix gravatar image

updated 2015-02-23 10:09:55 -0700

Regarding bullet "2" of the question: The AJTCL baseline code supports a single Transport at a time (unlike Standard Core) that falls into two catagories:

  • TCP/UDP/IP based transports such as Ethernet and WiFi
  • Serial byte stream based transports.

The BTLE feature branch uses the 2nd of these. The file aj_target_serial.c file, as you could probably tell, is mostly just "glue" between the AllJoyn SDK and the Nordic SDK. Any project being built with this transport will require both of them. When this work was done, we were using a beta version of the Nordic SDK v0.9.3. Some massaging of the code was necessary, particularly to get the Nordic code Arduino-DUE friendly.... the Nordic code looks like it was intended to be used with Arduino-YUN, or something similar. The most glaring problem is the SPI handling, which is how Arduino communicates and controls the Shields (arduino daughter boards).

To specific questions though:

  • What would the setup for this look like?

On the TCL Leaf-Node side, the setup includes

  1. a stacked Arduino-DUE + "RedBearLab Bluetooth Low Energy Shield v2.0"
  2. A PC with the Arduino 1.5.7 or better IDE
  3. the AJTCL SDK & the Nordic SDK 0.9.3 or better installed (same PC)
  4. A Micro-USB cable from the Programmer port of the Arduino to the PC

On the Core side:

  1. Linux workstation running Ubuntu 12.04 (haven't tried any other version)
  2. Kernel built from sources at git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
  3. BlueZ from git.kernel.org/pub/scm/bluetooth/bluez.git (last tested with v5.27)
  4. BlueZ requires a patch https://www.codeaurora.org/patches/quic/la/PATCH_77668_BlueZ_patch_to_enable_BTLE_UART_functionality_for_AllJoyn_20101024.tar.gz
  5. Any commercially available Bluetooth USB dongle that conforms to BT Core Spec v4.0 or better

  • Is there any tutorial for what I would need to do to setup Arduino with BLE?

I think there is one somewhere on the allseen site... I'll try to find it. It sort of says what I wrote above though...

  • If I am running the Standard Core app on a Linux PC, can I use a BLE dongle to give it the required functionality?

No, you need a pretty modern kernel, and BlueZ. And the dongle must be a v4.0 dongle.

  • And finally, what is the size of the messages that are being transported through BLE (and where in the Source code can I look to reference this)?

The AllJoyn datagram is a variable size that can be a few bytes to several thousand. The OTA fragmentation is 20 bytes of payload, taking a total of 23 bytes per GATT/ATT datagram (using non-acknowledged "NOTIFY" packets from Arduino --> Linux, and unacknowledged WRITE_CMD packets for data from Linux --> Arduino). The Arduino advertises a vendor specific 128 bit UUID GATT Service, with 2 GATT Characteristics (one for incoming, one for outgoing data).

edit flag offensive delete publish link more

Comments

Thank you for the answer. I have a feeling it will help me a lot.

TheHindenburg ( 2015-02-20 21:26:48 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-02-19 22:10:08 -0700

Seen: 750 times

Last updated: Feb 23 '15