micro-ROS / micro-ROS_sensors_demo

Provides a demo of micro-ROS based on ST Disco L475 IOT01 board.
Apache License 2.0
12 stars 3 forks source link

Clarification for the stiot usb ports #7

Open altineller opened 3 years ago

altineller commented 3 years ago

In the README.md of https://github.com/micro-ROS/micro-ROS_sensors_demo:

Connect host USB to your computer. You can disconnect the STLink USB port and modify the board supply jumper on the bottom layer to 5V_USB_FS.

What I understand is:

  1. Connect the USB to stlink_usb port.
  2. Connect the 5V_USB_FS jumper. (on)
  3. Flash the device
  4. Connect USB to the other usb port. (labeled USB_OTG on the board)
  5. Remove the 5V USB jumper. (off)
  6. Use device.

One port is for programming/debugging the device. The other usb port is the devices own USB connection.

Are these correct, or am I missing something?

altineller commented 3 years ago

I connected both usb cables. One powers up the device, the other is the usb connection to host. The jumper is also on. Only after I was able to see:

/dev/serial/by-id/usb-ZEPHYR_Zephyr_micro-ROS_203335594E485016-if00

I also noticed that the DEV variable on dockerfile/agent/entrypoint.sh was different then my devices value. I changed that and run docker-compose up

Starting micro-ros_sensors_demo_stiot_builder_1 ... done Starting micro-ros_sensors_demo_stiot_rqt_1 ... done Starting micro-ros_sensors_demo_stiot_agent_1 ... done Attaching to micro-ros_sensors_demo_stiot_rqt_1, micro-ros_sensors_demo_stiot_agent_1, micro-ros_sensors_demo_stiot_builder_1 stiot_agent_1 | Serial detected. Running agent. stiot_agent_1 | Error while starting serial agent! stiot_agent_1 | [1614713627.046031] error | TermiosAgentLinux.cpp | init | open device error | device: /dev/serial/by-id/usb-ZEPHYR_Zephyr_micro-ROS_203335594E485016-if00, errno: 1 micro-ros_sensors_demo_stiot_builder_1 exited with code 0

altineller commented 3 years ago

I added privileged: true for the stiot_agent in the docker-compose.yml file.

It works now :)

ravi-nanjaiah commented 2 years ago

I have tried setting the jumper JP4 to 5V_ST_LINK and also to 5V_USB_FS. Both the USB ports were connected to PC. But I'm seeing only the following device ID /dev/serial/by-id/usb-STMicroelectronics_STM32_STLink_066FFF575654888367181131-if02 There is no response from the device post flashing (no topics published). Hence I used minicom to check the serial data. The serial device is visible only when connected to STLINK USB port. And the message pushed out from the board (verified also on windows PC using Hercules hyperterminal) is Booting Zephyr OS build zephyr-v2.6.0
Failed to enable USB Can you tell me where I'm failing? I could not run the docker file hence I did separately installed microROS and Zephyr SDK. Create, configure, build and flash steps were successfully completed.