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

Bluetooth Mesh example: Interactive PyACI timeout

Hi,

I'm having problems to run the Loopback example in the Bluetooth Mesh SDK:

infocenter.nordicsemi.com/index.jsp

I'm receiving a timeout.

My setup is as follows:

  • Ubuntu Bionic (18.04 LTS) 64-bit
  • My user is added to the dialout group (for permissions to /dev/ttyACM0 etc)
  • Python 3.6.5 (changed default /usr/bin/python symlink to not point to python 2) due to ninja's call to /usr/bin/python
  • Using virtualenv with python 3 when calling interactive_pyaci
  • nrf52832 dev kits
  • Mesh SDK 2.0.1
  • nRF5 SDK 15.0.0
  • SEGGER JLink_V632c

It has worked on some occasions (after resetting/reprogramming), but often not.

However, nrfjprog seems to always recognize my dev board(s) (including indirectly, when programming using ninja), please see below:

(mesh) ...:~/projects/nrf5_sdk_for_mesh/build$ ninja flash_serial_nrf52832_xxAA_s132_6.0.0
[0/1] cd /home/daniel/projects/nrf5_sdk_for_mesh/build/examples/serial && /usr..._sdk_for_mesh/build/examples/serial/serial_nrf52832_xxAA_s132_6.0.0_merged.hex
Connected devices:
0: 682833172

Select one ('0'), several ('0, 1, 2') or all ('a') devices.
To quit, enter 'q': 0
# 682833172: Erasing device...
# 682833172: Programming /home/daniel/projects/nrf5_sdk_for_mesh/build/examples/serial/serial_nrf52832_xxAA_s132_6.0.0_merged.hex
# 682833172: Resetting...
(mesh) ...:~/projects/nrf5_sdk_for_mesh/build$ cd ../scripts/interactive_pyaci/
(mesh) ...:~/projects/nrf5_sdk_for_mesh/scripts/interactive_pyaci$ nrfjprog -i
682833172
(mesh) ...:~/projects/nrf5_sdk_for_mesh/scripts/interactive_pyaci$ nrfjprog -f NRF52 --reset
Applying system reset.
Run.
(mesh) ...:~/projects/nrf5_sdk_for_mesh/scripts/interactive_pyaci$ python interactive_pyaci.py -d /dev/ttyACM0 --no-logfile

    To control your device, use d[x], where x is the device index.
    Devices are indexed based on the order of the COM ports specified by the -d option.
    The first device, d[0], can also be accessed using device.

    Type d[x]. and hit tab to see the available methods.

Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: d[0].send(cmd.Echo("hello world"))

In [2]: 2018-05-15 16:17:07,547 - INFO - ttyACM0: cmd Echo, timeout waiting for event


Thank you!

Parents
  • Hi,

    Are you using 32-bit python? If not, I would suggest you to do so and see if that help fix the issue.

  • This is a virtual com port issue. We don't have a specific fix for this unfortunately. You can try installing a different SEGGER J-LINK version, Jlink v6.16c, and give access to the COM port by adding the user to the dialout group: sudo adduser $USER dialout.

    Also try plugging your board in and out or reflashing, see if that helps.

    Another tip is to use a virtual environment when working with Python. It allows you to use multiple Python installations on one machine quite effortlessly. A guide for it is found here.

  • Thank you for the information. I've tried what you mentioned except for using the earlier SEGGER version. One thing to note is that ninja is calling /usr/bin/python which makes it harder to use a virtual python environment. i.e. it doesn't just call 'python' and hence bypasses the python selected by virtualenv (prepended to PATH).
    I don't know if this is per default by ninja or due to your configuration of the build.

    Please let me know if the situation improves.

Reply
  • Thank you for the information. I've tried what you mentioned except for using the earlier SEGGER version. One thing to note is that ninja is calling /usr/bin/python which makes it harder to use a virtual python environment. i.e. it doesn't just call 'python' and hence bypasses the python selected by virtualenv (prepended to PATH).
    I don't know if this is per default by ninja or due to your configuration of the build.

    Please let me know if the situation improves.

Children
No Data
Related