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

Linux central and 52840 Blinky App

Hello,  I am using Linux as a central and I created python app (bluez, pygatt) which simulates the Android Blinky app. It  communicates with the board and writes on the led characteristic and I subscribe to notifications on the button characteristic. This all works on the 52832.

When I use the same Linux and python code to communicate with Blinky app on the 52840 the led communication works, however the button notifications are not received by the app and Bluetooth logging on Linux shows no notifications. If I use the 52840 with the Android Blinky app the button notification is received.

I use the Blinky app from nRF5_SDK_14.2.0_17b948a/examples/ble_peripheral/ble_app_blinky

Is there something different I need to do when connecting to the 52840 or configuring on the Linux side?

Thanks in advance,

Eric

Parents Reply Children
  • Aha, so by the comment " the 52840 the console shows "button press received" or similar and there is no other output" you mean that this is printed when you push the button on the nRF52840 and not on the Linux side. 

    Its hard to say whats going on. Could you capture a sniffer trace with the nRF Sniffer  and attach it to the case when your back in office? Then we should be able to see if the nRF52840 is actually sending the notification or not. 

    And also check that ble_lbs_on_button_change in the button_event_handler() is not returning NRF_ERROR_INVALID_STATE or any other error as mentioned previously. 

    Best regards

    Bjørn 

  • Hi   I am back in the office and thanks for the update.

    Firstly I think it is useful to review what I am trying to do. I have a Linux based central which mimics the Android Blinky app. I implemented it using pygatt which uses gatttool as the BLE interface layer. The Linux based app receives button press notifications from the 52832 but not from the 52840 whereas the Android Blinky app works with both. I want to understand what goodness the Android app does so the Linux app can do the same. Hope this makes sense so far and let me know if you have any questions.

    I logged the return code from ble_lbs_on_button_change and it is 0x3401 which is “system attribute missing”. There is discussion on this on the forum  and my current understanding is this could be related to timing issues so I have added delays throughout the test client and that has not fixed the issue.

    With regards to sniffing, a trace on the central shows no notifications are received. I download the nRF Sniffer software for the Mac. For installation instructions I found some here https://devzone.nordicsemi.com/f/nordic-q-a/32128/sniffer-on-osx---revisited - are these the ones you recommend?

    thanks again and I look forward to getting to bottom of this!

    Eric

  • So,  as people were saying this is due to the client not updating the CCCD. I changed the client to do so and things are good.

  • Hi Eric,

    sorry for the late reply.

    I am glad to hear that its working as it should.

    Bjørn

Related