This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Writing to Vendor Specific BLE characteristics

I  am developing an IoT Gateway having BLE chip nRF 52840. The BLE of the gateway will connect to and transfer data to a BLE device having Vendor Specific GATT service and characteristics. It has a 128 bit unique UUID and one write/read characteristic.   

Entire application development is done using Python and currently, I am using python bindings from pc-ble-driver-py. I could connect to the targeted BLE device using NRF52 supported development kit using the example code given for heart rate collector at heart_rate_collector.py. However, my target is to send specific data to vendor-specific characteristics.

Using the example code function write_req() failed saying that "Characteristic value handler not found". I found that the given python example is not able to detect the vendor specific service with exact UUID, but detect it as UNKNOWN service (UUID==0000). Due to this issue, I cannot write/transfer data to targeted BLE device. 

Looking at the C and JAVA script examples of heart rate Monitor, I could figure out I may need to add service and characteristics using function ble_gatts_service_add(), and ble_gatts_characteristic_add(). I tried adding the service by giving UUID in multiple formats to ble_gatts_characteristic_add() but code fails every time.

Is this the right Idea for Python as well. Can someone help how to manage the write to a vendor specific service/characteristic?

Parents Reply
  • I can connect to the BLE device using nrfConnect and also can write to the 128 bit custom characteristics. 

    However, when using python pc-ble-driver example code, I can connect to device, but pc-ble-driver code does not detect or give the list of 128 bit custom services and characteristics. 

    What changes are needed in the example code so that I can get all the services including 128 bit services and their characteristics?

Children
Related