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

pc-ble-driver-py failure with Queue.Empty

I'm trying to set up the heart_rate_collector.py example app for pc-ble-driver-py, but gotten pretty confused about the process to run it.

What's gotten me furthest so far is:

  • Erasing and flashing the board with the 115k baud hex file:
$ nrfjprog --family nRF52 -e
$ nrfjprog --family nRF52 --program ./sd_api_v5/connectivity_2.0.1_115k2_with_s132_5.0.hex
$ nrfjprog --family nRF52 -r`
  • Running the collector script:
$ python /.../pc_ble_driver_py/examples/heart_rate_collector.py NRF52
  • From here, I just have to select my device and the script tries to run - but it fails pretty quickly with Queue.Empty:
    0 : /dev/ttyACM0: 000682154983
 
Enter your choice: 0
Serial port used: /dev/ttyACM0
Enabling larger ATT MTUs
Received advertisment report, address: 0xE2A6B5FE7403, device_name: Charge 2
Received advertisment report, address: 0xE2A6B5FE7403, device_name: Charge 2
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/examples/heart_rate_collector.py", line 187, in <module>
    main(serial_port)
  File "/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/examples/heart_rate_collector.py", line 151, in main
    conn_handle = collector.connect_and_discover()
  File "/usr/local/lib/python2.7/dist-packages/pc_ble_driver_py/examples/heart_rate_collector.py", line 87, in connect_and_discover
    new_conn = self.conn_q.get(timeout = 60)
  File "/usr/lib/python2.7/Queue.py", line 176, in get
    raise Empty
Queue.Empty

I'm confused on several points here:

  1. The immediate issue (why it's failing with Queue.Empty)
  2. Why does the DK have to be connected over USB for this? I thought the purpose of the example apps were to show BLE communication between PC and DK?
  3. How do I build the hex file mentioned at the top (provided in pc-ble-driver) myself, or change values in it? What are all of the serial options in the SDK for (ser_s132_hci, ser_s132_spi, ser_s132_spi_5W, ser_s132_uart) - I don't see those for many of the other example apps?

Configuration:

  • Ubuntu 17.04
  • SDK v14.2
  • pca10040, v1.2.1
  • nrf52832
Parents
  • Hi,

    1. Have you tried with the 1M baudrate connectivity HEX-file? This is the default baudrate used by the driver.

    2. The purpose of the pc-ble-driver is to provide a softdevice serialization library for use on the computer. The devkit will be used as a "BLE adapter" for the PC, that allows you to connect to external devices. The BLE API in PC's have only recently allowed you to create native PC applications that can talk to BLE devices.

    3. You can find instructions for how to build the connectivity fimware on this page. Only HCI is supported as transport layer.

    Best regards,

    Jørgen

Reply
  • Hi,

    1. Have you tried with the 1M baudrate connectivity HEX-file? This is the default baudrate used by the driver.

    2. The purpose of the pc-ble-driver is to provide a softdevice serialization library for use on the computer. The devkit will be used as a "BLE adapter" for the PC, that allows you to connect to external devices. The BLE API in PC's have only recently allowed you to create native PC applications that can talk to BLE devices.

    3. You can find instructions for how to build the connectivity fimware on this page. Only HCI is supported as transport layer.

    Best regards,

    Jørgen

Children
Related