Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CLI options to change CAN ID and IP address #776

Merged
merged 17 commits into from
Nov 26, 2021
Merged

Added CLI options to change CAN ID and IP address #776

merged 17 commits into from
Nov 26, 2021

Conversation

davidetome
Copy link
Contributor

New FirmwareUpdater CLI options

This PR introduces the FirmwareUpdater CLI capability to change :

  • CAN board ID via SOCKETCAN device
  • CAN board ID via ETH device
  • IP address of an ETH board

Change CAN ID via SOCKETCAN

In this example, we change the CAN ID on an mtb board connected via SOCKETCAN from 1 to 2.
The syntax of the command is the following :

FirmwareUpdater -g -e SOCKETCAN -i 0 -c 0 -n 1 -k 2

where :

  • -g -e SOCKETCAN -i 0 -c 0 is need to use a SOCKETCAN device (i.e. ESD CAN/USB) with ID=0 and canline=0
  • -n 1 -k 2 changes old id 1 (-n 1) to 2 (-k 2)
1.mp4

Change CAN ID via ETH

In this example, we change the CAN ID on an mtb board connected via ETH through an ems4 board w/ IP address = 10.0.1.1 from 1 to 2.
The syntax of the command is the following :

FirmwareUpdater -g -e ETH -i eth1 -t 10.0.1.1 -c 1 -n 1 -k 2

where :

  • -g -e ETH -i eth1 -t 10.0.1.1 -c 1 is need to use a ETH device (i.e. ems4) with ip address = 10.0.1.1 and canline=1
  • -n 1 -k 2 changes old id 1 (-n 1) to 2 (-k 2)
2.mp4

Change IP address of an ETH board

In this example, we change the IP address on an ems4board from10.0.1.1` to 110.0.1.21.
The syntax of the command is the following :

 FirmwareUpdater -g -e ETH -i eth1 -t 10.0.1.1 -2 10.0.1.2

where :

  • -g -e ETH -i eth1 is need to use a ETH device (i.e. ems4)
  • -t 10.0.1.1 -2 10.0.1.2 changes old iIP address 10.0.1.1 to 10.0.1.2
3.mp4

cc @pattacini @maggia80 @emilianob80 @Uboldi80 @gsisinna @marcoaccame

Copy link
Member

@pattacini pattacini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awaiting the CI and the merge!
Thanks heaps @davidetome 👍🏻

@traversaro
Copy link
Member

Not blocking at all, but it would be nice to have that the examples contained in the body of the PR could copied somewhere (even just https://github.com/robotology/icub-firmware-build/tree/master/docs, or in the README of firmwareupdater directory), otherwise we risk that they will be lost with the sands of time.

@davidetome
Copy link
Contributor Author

Good idea @traversaro , just for completion, we may consider adding also the content of these PRs :

If you and @pattacini agree, I'll open an issue about that 👍🏻

@pattacini
Copy link
Member

Yep, agreed @davidetome 👍🏻
Let's use our internal workflow for this.

@pattacini pattacini merged commit 343727d into robotology:devel Nov 26, 2021
@pattacini pattacini changed the title Added CLI options for change CAN ID and IP address Added CLI options to change CAN ID and IP address Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants