• 0 Votes
    9 Posts
    1k Views
    A
    Dear @jcaron, Bringing 0x2901 CUD support to the Pycom BLE stack You would need to modify the code you pointed out in [3] to add another descriptor for the description (it currently adds a 0x2902 CCC and you want to also add a 0x2901 CUD).   For each descriptor, you need to use esp_ble_gatts_add_char_descr then wait for xQueueReceive, apparently.   You would also have to add the user description as an allowed argument (line 1192) and process that like the other optional parameters.   [3] https://github.com/pycom/pycom-micropython-sigfox/blob/4d3322a60501cac1a06558a0c5c816e198570888/esp32/mods/modbt.c#L1276-L1290 Thanks for outlining the procedure in detail how to go forward on this. While I might feel like I could eventually accept this challenge while receiving further guidelines from folks more fluent with C++ as well as FreeRTOS, the ESP-IDF and the Bluetooth Softwarestack incorporated into the Firmware, we are currently a bit swamped between different other things. Saying this, we are humbly asking members from the Pycom core team here if adding this feature could be worth the effort? We can assure you we will kindly be the first betatesters of added functionality in this regard. Maybe @semireg (@caylanlarson) and @husigeza who worked together [1] on the important improvement re. processing the Bluetooth.CHAR_SUBSCRIBE_EVENT might add their thoughts here? Thanks already and with kind regards, Andreas. [1] https://github.com/pycom/pycom-micropython-sigfox/pull/121
  • What is this Value!?

    LoPy pytrack lopy characteristic characteristics ble
    4
    1
    0 Votes
    4 Posts
    928 Views
    S
    @jmarcelino [image: 1524488362634-e78568e9-9adb-4679-b068-205fbf18cf47-image-resized.png]
  • 0 Votes
    1 Posts
    658 Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    T
    @jmarcelino SOLVED Thanks for the help. Was able to adapt the example to connect to my Lopy and get a specific service with no issues. Some tips for anybody else trying to do access a GATT service. If you use the Pycom example it will print out a services.uuid like this b'\xdet-\xf0p\x13\x12\xb5DK\xb1\xc5 \xff\x95\xa4' . But if you are trying to access the service using the UUID as it appears it will not work. So what I did (as suggested by jmarcelino) was use binascii.hexlify to get a hex value. Which in this case was -----de742df0701312b5444bb1c520ff95a4' ,then use that as the value with binascci.unhexlify as the uuid input like this service.uuid()==binascii.unhexlify(b'de742df0701312b5444bb1c520ff95a4'): Another way to get the uuid is to use the Android Nordic Semiconductor nRF Connect app (or similar) to get the hex value for the UUID and then use unhexlify as above.