Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.


0
Avatar

Juergen Kienhoefer

--Juergen Kienhoefer--

2534
| 4 1 2
Santa Cruz, United States
--Juergen Kienhoefer--
Juergen Kienhoefer
On 12/29/15, 11:37 PM

Generic Firmware for AIRcable BLE

The AIRcable SmartBeacon is configurable through an easy to use command line interface. The interface is accessible through the serial port at 115200 baud. For products without serial connections, the command line interface can be used through a wireless connection. The AIRcable SmartBeacon is password protected for reading and writing characteristics.


Central

The AIRcable SmartBeacon allows to find other BLE devices and make connections. In a very generic way you can read and write any characteristics and control the performance and timing of a BLE link. First, it gives you a way to scan for devices in range and provides the Bluetooth address of those devices. Then after a successful connection it can list available services and characteristics as well as their configuration. You can read and write characteristics in a generic way as well as set characteristics into notification mode for data transfer.

In addition you have control over the connection timing, allowing for a very high speed data transfer as well as low power long lasting connections.

Scanning for BLE Devices

OK> @b

check broadcast configuration:
broadcast=1000ms, type=connect

OK> @bn0

while in broadcast mode, you cannot make connections
disable broadcasting

OK> i1

scan for 1 second. A number > 60 seconds will not terminate, switch scanning off with "i0"
addr=40446ce289c5 name=CAir 2.0 uuid=12342345-3456-4567-5678-67897890890a rssi=-34 
addr=70c3fa33b24e manuf=c37000001a00080003000000

Make Connections

OK> @c4044 6ce2 89c5

check broadcast configuration:

connected

 

OK> s

list all services

srv start=0x1 end=0x3 uuid=1800
srv start=0x4 end=0x4 uuid=1801
srv start=0x5 end=0xffff uuid=1815
OK> k

list all characteristics

char=2a04 hnd=3 attr=r
char=fee1 hnd=7 attr=rp
char=fee2 hnd=9 attr=rp
char=2a56 hnd=b attr=rwpn
char=2a58 hnd=e attr=r
char=2a5e hnd=10 attr=wpn
char=2a5f hnd=13 attr=wp
char=2a60 hnd=15 attr=pn
char=ffff hnd=18 attr=wp

 

OK> h6set the minimum and maximum interval timing parameter to the fastest level at 7.5ms. Range is 6-3200 time slots.

The connection timing can be changed to allow high speed transmission of data. E.g.

Read and Write Characteristics

Before it is allowed to read or write characteristics on the SmartBeacon, you need to provide a password.

OK> @w18 30 30 30 30

write the password "0000" to the characteristic with handle 18

OK> r3read handle 3 (preferred conneciton parameter)
data=48.60.00.00.2c.01

Enable Notifications

OK> @n10

allow the UART characteristic 0x10to send notifications

Example: Heart Rate Monitor

A heart rate monitor has a notifiable characteristic, the heart rate. After discovering the services, find the characteristic handle for the notifiable characteristic.

OK> s

list all services

srv start=0x1 end=0x7 uuid=1800
srv start=0x8 end=0x8 uuid=1801
srv start=0x9 end=0x10 uuid=180d    // this is heart rate service
srv start=0x11 end=0x14 uuid=180f
srv start=0x15 end=0xffff uuid=180a

 

 

OK> k9 10

list the characteristics for the heart rate service

char=2a37 hnd=b attr=n   // this is heart rate data characteristic
char=2a38 hnd=e attr=r
char=2a39 hnd=10 attr=p

 

OK> nb

Set the heart rate characteristic 0x0b to notify

 

After that, the the heart rate monitor will send heart rates and energy updates.

OK>

receive heart rate data

note hnd=0xb data=16.65.f3.01
note hnd=0xb data=16.6b.f9.01
note hnd=0xb data=16.60.fe.01
note hnd=0xb data=1e.66.14.00.f2.01 // this contains energy levels
note hnd=0xb data=16.6c.fa.01

Connect to a SPP over GATT port

SPP over GATT is implemented using a characteristic for streaming data communicaton in both directions and a characteristic for serial port configuration.

OK> c6e7d 263b d014>connect to the peripheral connected
OK> w18 30 30 30 30write password to the SmartBeacon to enable access to characteristics
OK> w13 8Write to the characteristic that configures the serial port to 115200 baud, 8N1 (will vary between SPP over GATT devices)
OK> n10enable notifications for characteristic 0x10
OK> a10enable raw mode for characteristic 0x10
in raw mode, the command line interface is switched off, and all data is sent in raw mode to the characteristic. All data that is received from the characteristic is not interpreted, but received raw.
At this moment this connection represents a transparent serial communication with the other end.
~.to disconnect send a ~. sequence, similar to telnet

 


Keep Informed

About This Community

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/29/15, 11:33 PM
Seen: 4371 times
Last updated: 12/30/15, 12:53 AM