nRF52840: Need some help getting Bluetooth notification messages to communicate with Python App using Bluegiga Bluetooth Low Energy dongle

I have simple Bluetooth commination working. I can connect to nRF52840 with your nRF Toolbox on my Android. I can send a string from the nRF52840 to the Android app and have it display and also send a string from the Android App to the nRF52840 and see it display in J-Link RTT Viewer. So sending data back and forth with the nRF Toolbox on Android works.

Our device creates log info about it's operation and I want to send this data to a Python app I'm developing. On a PC, I have a Bluegiga Bluetooth Low Energy dongle that shows as an entry in the COM Ports. With our device advertising, I can connect to it and get it's Services and Characteristics.

In Python, I'm using the bgapi package to connect to the nRF52840. With the below command, I can send data from the Python App to the nRF52840.

    ble_dongle.connection.write_by_handle(21, b'test')

Problem is I can't seem to figure out how to get data from the nRF52840 to the Python App. I'm sending a simple string from the nRF52840 when connected but bt_nus_send returns an error. One thing I also noticed is that the Bluegiga Bluetooth Low Energy dongle won't connect in the nRF Connect Bluetooth Low Energy app. Any thoughts?

Parents
  • Hello Howard!

    I think the issue simply is that the python library we have only works for our own dongle, and not the Bluegiga. Are you using our python library?

    Best regards,

    Elfving

  • Not using your Python library, using bgapi Python package. Could you point me to your Python library and the Bluetooth dongle you suggest I should use?

  • Hello Howard!

    Ah okey, I think I misunderstood what your issue was for a second. Sorry about that.

    One thing I also noticed is that the Bluegiga Bluetooth Low Energy dongle won't connect in the nRF Connect Bluetooth Low Energy app.

    Yes that is unfortunately not possible. Our nRF Connect applications unfortunately only work on our products, as they interface using our own protocol.

    Problem is I can't seem to figure out how to get data from the nRF52840 to the Python App. I'm sending a simple string from the nRF52840 when connected but bt_nus_send returns an error.

    That should be possible. What error message are you getting?

    GameCodingNinja said:
    Hard to make sense of it since it does way too much.

    Yeah, the pc_ble_driver_py might be a bit hard to get up to speed with, and unfortunately there aren't any tutorials for it yet as far as I know. You do have the examples though. If you'd prefer to use the Bluegiga one then that should work as well.

    Best regards,

    Elfving

Reply
  • Hello Howard!

    Ah okey, I think I misunderstood what your issue was for a second. Sorry about that.

    One thing I also noticed is that the Bluegiga Bluetooth Low Energy dongle won't connect in the nRF Connect Bluetooth Low Energy app.

    Yes that is unfortunately not possible. Our nRF Connect applications unfortunately only work on our products, as they interface using our own protocol.

    Problem is I can't seem to figure out how to get data from the nRF52840 to the Python App. I'm sending a simple string from the nRF52840 when connected but bt_nus_send returns an error.

    That should be possible. What error message are you getting?

    GameCodingNinja said:
    Hard to make sense of it since it does way too much.

    Yeah, the pc_ble_driver_py might be a bit hard to get up to speed with, and unfortunately there aren't any tutorials for it yet as far as I know. You do have the examples though. If you'd prefer to use the Bluegiga one then that should work as well.

    Best regards,

    Elfving

Children
No Data
Related