Giter Club home page Giter Club logo

Comments (5)

rafal-gorecki avatar rafal-gorecki commented on August 14, 2024

Hi @PhilShaw852,
Thank you for the information. We made a typo, because we run this command via ros2 run.
Let me know if it helped.

from rosbot_ros.

PhilShaw852 avatar PhilShaw852 commented on August 14, 2024

Thanks Rafal, I now get:
ros2 run rosbot_utils flash_firmware

Flashing /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin over /dev/ttyUSB0
System architecture: aarch64
Device: RPi

Traceback (most recent call last):
File "/home/husarion/ros2_ws/install/rosbot_utils/lib/python3.10/site-packages/rosbot_utils/flash-firmware.py", line 136, in
main()
File "/home/husarion/ros2_ws/install/rosbot_utils/lib/python3.10/site-packages/rosbot_utils/flash-firmware.py", line 131, in main
flasher.flash_firmware()
File "/home/husarion/ros2_ws/install/rosbot_utils/lib/python3.10/site-packages/rosbot_utils/flash-firmware.py", line 102, in flash_firmware
self.try_flash_operation("Write-UnProtection", sh.stm32flash, ["-u"])
File "/usr/lib/python3/dist-packages/sh.py", line 3518, in getattr
return self.__env[name]
File "/usr/lib/python3/dist-packages/sh.py", line 3316, in getitem
raise CommandNotFound(k)
sh.CommandNotFound: stm32flash
Firmware flashing failed with return code 1

from rosbot_ros.

rafal-gorecki avatar rafal-gorecki commented on August 14, 2024

You need also install stm32flash, use sudo apt install stm32flash.

from rosbot_ros.

PhilShaw852 avatar PhilShaw852 commented on August 14, 2024

Unfortunately I think there is still an issue. I have also now lost the ability to teleop the robot.

husarion@my-robot:~/ros2_ws$ ros2 run rosbot_utils flash_firmware
Flashing /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin over /dev/ttyUSB0
System architecture: aarch64
Device: RPi

stm32flash 0.5

http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0413 (STM32F40xxx/41xxx)

  • RAM : Up to 128KiB (12288b reserved by bootloader)
  • Flash : Up to 1024KiB (size first sector: 1x16384)
  • Option RAM : 16b
  • System RAM : 30KiB
    Write-unprotecting flash

Write-UnProtection error! Trying again.
Error:

RAN: /usr/bin/stm32flash /dev/ttyAMA0 -u

STDOUT:

STDERR:
Failed to read ACK byte
Failed to write-unprotect flash


stm32flash 0.5

http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1

Write-UnProtection error! Trying again.
Error:

RAN: /usr/bin/stm32flash /dev/ttyAMA0 -u

STDOUT:

STDERR:
Failed to read ACK byte


stm32flash 0.5

http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1

Write-UnProtection error! Trying again.
Error:

RAN: /usr/bin/stm32flash /dev/ttyAMA0 -u

STDOUT:

STDERR:


WARNING! Write-UnProtection went wrong.
stm32flash 0.5

http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1

Read-UnProtection error! Trying again.
Error:

RAN: /usr/bin/stm32flash /dev/ttyAMA0 -k

STDOUT:

STDERR:
Failed to read ACK byte
Unexpected reply from device on command 0x01


stm32flash 0.5

http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0413 (STM32F40xxx/41xxx)

  • RAM : Up to 128KiB (12288b reserved by bootloader)
  • Flash : Up to 1024KiB (size first sector: 1x16384)
  • Option RAM : 16b
  • System RAM : 30KiB
    Read-UnProtecting flash
    Done.

stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1

Flashing error! Trying again.
Error:

RAN: /usr/bin/stm32flash /dev/ttyAMA0 -v -w /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin -b 115200

STDOUT:

STDERR:
Failed to init device.


stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0413 (STM32F40xxx/41xxx)

  • RAM : Up to 128KiB (12288b reserved by bootloader)
  • Flash : Up to 1024KiB (size first sector: 1x16384)
  • Option RAM : 16b
  • System RAM : 30KiB
    Write to memory
    Erasing memory

Flashing error! Trying again.
Error:

RAN: /usr/bin/stm32flash /dev/ttyAMA0 -v -w /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin -b 115200

STDOUT:

STDERR:
Failed to read memory at address 0x08000000


stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1

Flashing error! Trying again.
Error:

RAN: /usr/bin/stm32flash /dev/ttyAMA0 -v -w /home/husarion/ros2_ws/install/rosbot_utils/share/rosbot_utils/firmware/firmware-0.11.0.bin -b 115200

STDOUT:

STDERR:
Failed to read ACK byte


WARNING! Flashing went wrong.
Done!
Firmware flashing completed successfully.

from rosbot_ros.

rafal-gorecki avatar rafal-gorecki commented on August 14, 2024

Please make sure that no programs using the firmware are running in the background, as it is not possible to use the port when it is already occupied.

  1. Check with the docker ps -a command whether there are any running processes. If there are any, please remove them.
  2. Disable all ros2 processes. You can check them via ros2 node list

If this doesn't work, try using the ~/flash_firmware.sh script. If this script does not exist, I recommend updating the system to the latest Husarion OS
https://husarion.com/software/os/installation/.

from rosbot_ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.