Bluetooth Card10 Service¶
The specification is still work in progress
The Card10 Service implemented a direct Hardware access of the card10.
The current draft uses following service specification:
Time update characteristic:
42230201-2342-2342-2342-234223422342read and write no response
4223020f-2342-2342-2342-234223422342write no response
42230210-2342-2342-2342-234223422342read and write no response
Background LED Bottom Left characteristic:
42230211-2342-2342-2342-234223422342read and write no response
Background LED Bottom Right characteristic:
42230212-2342-2342-2342-234223422342read and write no response
Background LED Top Right characteristic:
42230213-2342-2342-2342-234223422342read and write no response
Background LED Top Left characteristic:
42230214-2342-2342-2342-234223422342read and write no reponse
LEDS dim bottom characteristic:
42230215-2342-2342-2342-234223422342write with response
LEDs dim top characteristic:
42230216-2342-2342-2342-234223422342write with response
LEDs powersafe characteristic:
42230217-2342-2342-2342-234223422342write no response
42230218-2342-2342-2342-234223422342write no response
Personal State characteristic:
42230219-2342-2342-2342-234223422342read and write with response
LEDs above characteristic:
42230220-2342-2342-2342-234223422342read and write no reponse
Light sensor characteristic:
422302f0-2342-2342-2342-234223422342read no response
Time update characteristic¶
The time update characteristic makes it possible to set and get the current time given in milliseconds after 1.1.1970 in the UTC timezone. The value is represented as a big endian
Thu Aug 15 19:40:45 UTC 2019 :
0x0 0x0 0x1 0x6c 0x96 0xcb 0xf8 0xcc
The vibra characteristic makes it possible to let the card10 for given millisecound in a
The Rockets characteristic makes it possible to address every three rockets.
Just write there three byte array, one for evey rocket.
On read you get the current value of all three rockets.
Range is between 0 and 31 (
0x1f) if send higher value it will set to max of 31.
Enable only Rocket0:
Enable all rockets with 50% brightness:
Background LED <Position> characteristic¶
The Background LEDs <Position> characteristic makes it possible to address the bottom LEDs by position.
Just write there three
uint8 for the rgb color or read the current value.
set led blue:
LEDs dim <Position> characteristic¶
The LEDs dim <Position> characteristic makes it possible to dim LEDs by position.
Just write a
LEDs powersafe characteristic¶
This characteristic makes it possible to set the LEDs in powersafe mode. Even when set to zero, the RGB LEDs still individually consume ~1mA. Powersave intelligently switches the supply power in groups. This introduces delays in the magnitude of ~10µs, so it can be disabled for high speed applications such as POV
This characteristic makes it possible to activate the flashlight.
Personal state characteristic¶
This characteristic makes it possible to read and write the personal state. It writes always as persistant and it gives feedback if the value is in range and your firmware support it.
LEDs above characteristic¶
This characteristic set or read the current value of every 11 leds on the top module at once. By defining 11x rgb from left to right. You need also to set exchange a bigger MTU to use this feature.
set a rainbow beginnig with red on the right edge:
Light sensor characteristic¶
The light sensor characteristic makes it possible to read the current value of the light sensor by receiving a
The range of this sensor is between 0 (
0x0) and 400 (
Access via btgatt-client¶
Accessing services from a linux system is possible via
btgatt-client. The inbuilt gatt client of
bluetoothctl as well as
libgatt were tested, but struggled with the card10’s BLE stack.
# pairing the card10: $ bluetoothctl [bluetooth]# power on [bluetooth]# scan on [bluetooth]# pair CA:4D:10:xx:xx:xx #replace xx:xx:xx with scan result # if this query doesn't appear, remove and re-pair: [agent] Confirm passkey ###### (yes/no): [CHG] Device CA:4D:10:xx:xx:xx Name: card10 [card10-xxxxxx]# disconnect CA:4D:10:xx:xx:xx # using a service: $ btgatt-client -d CA:4D:10:xx:xx:xx # wait until services have been discovered, may take a minute [GATT client]# write-value 0x0926 31 31 31 # if this error appears remove and re-pair: [GATT client]# Device disconnected: Software caused connection abort
ARM Cordio Sources¶
The BLE stack is based on the ARM Cordio stack. This stack has been developed by a 3rd party and was bought by ARM and open-sourced.
- There are many copies of it floating around on the Internet and some are more up to date than others. To keep track here is a list:
mbed has a reasonably up to date version of the stack in their GitHub repository.
It is scattered below the CORDIO directories in https://github.com/ARMmbed/mbed-os/tree/master/features/FEATURE_BLE/targets
ble-profiles are not included. mbed has written their own adaptation layer to interface with the stack and implements profiles in C++
- Ambiq Suite SDK
Can be found here: https://github.com/sparkfun/AmbiqSuiteSDK/tree/master/third_party/exactle
Patches on top might be here: https://support.ambiqmicro.com/hc/en-us/categories/115000239012-Software
Reasonably up to date
Intersting part: has their own FreeRTOS integration (but apparently on older WSF)
BLE 5.1 (?)
Apparently tasked with maintaining the stack in general
Most up to date version
Apparently developing (security) fixes, distributing them to customers, but not applying them to master: https://github.com/ARMmbed/mbed-os/commit/c92777311578eb003b4546c4e5e6f2c1f8ba3c84
Distributed via Maxim Toolchain Installation tool, no repository available
Contains software implementation of the base band
ble-host and ble-profiles might be compatible with the one directly from Packetcraft
Developing their own low-power enhancements