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

dist/tools/zep_dispatch: Topogen updated #348

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

CW-75
Copy link
Collaborator

@CW-75 CW-75 commented Sep 17, 2022

Contribution description

Topgen and its makefiles are updated to generate automatically a random mac address to each node. Also was added a Makefile variable to redefine a number of nodes to generate in new topology file. The process consist in use TOPOLOGY=[name_of_file_to_generate] to use the topology generator (topogen). note: the file doesn't exist to the topogen works correctly, so, if you want to use again the topogen and replace the generated topology file, you have to remove it. About mac address generation, this feature allows to use foren6 layouts. to place in correct position each node (In case that you are create an node distribution model). Topologies are parsing correctly if the mac address of some node is assigned previously the build process.

Testing procedure

  • Open foren6
  • go to the zep_dispatch tool
cd dist/tools/zep_dispatch

Run the dispatch to generate a random topology file.

make run TOPOLOGY=file.topo NODES=5

the NODESmakefile variable specify the number of nodes to be generated. each node should be received the respect and unique random mac_address.

The expected output file should see.

# MAC Addresses
A := D8:04:D1:B1:D2:8A:0C:DE
B := 2C:DE:A1:D2:6A:E6:A4:EA
C := C7:D3:67:C4:56:67:8F:71
D := 4D:FA:2F:49:22:28:C6:7A
E := 2C:98:2C:FE:23:B7:5D:CE

# seed = 1663382312
# Connections
A	D	0.82	0.80


# Node	X	Y	range	color
# A	75	80	44	0x43e7c9a1
# B	31	13	40	0x0
# C	77	25	29	0x0
# D	76	88	40	0x43e7c9a1
# E	26	80	25	0x0

New feature added

The new script launch.sh allows you load all nodes in file.topo automatically and run them in foren6 sniffer from zep_dispatcher tool.
Only you need to type

make launch

Note: this script only run in ubuntu. preferred using gnome-terminalsetting its own options parameters.

Recommendation: You could run this auto-launcher in a terminal (gnome-terminal). This will look better than running under VScode_shell or antoher kind of terminal.

Issues/PRs references

@CW-75 CW-75 added this to the 0.22.12-RC2 milestone Sep 17, 2022
@CW-75 CW-75 added this to In Progress in Firmware via automation Sep 17, 2022
@CW-75 CW-75 added the Status: WIP This PR is a work in progress label Sep 17, 2022
@CW-75 CW-75 changed the title dist/tools/zep_dispatch: Topogen updated [WIP] dist/tools/zep_dispatch: Topogen updated Sep 17, 2022
@CW-75 CW-75 requested a review from luisan00 September 19, 2022 06:51
@CW-75 CW-75 removed the Status: WIP This PR is a work in progress label Sep 19, 2022
@CW-75 CW-75 changed the title [WIP] dist/tools/zep_dispatch: Topogen updated dist/tools/zep_dispatch: Topogen updated Sep 19, 2022
Copy link
Contributor

@luisan00 luisan00 left a comment

Choose a reason for hiding this comment

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

ready for round 2, remember do a squash too!

dist/tools/zep_dispatch/Makefile Outdated Show resolved Hide resolved
dist/tools/zep_dispatch/launch.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@luisan00 luisan00 left a comment

Choose a reason for hiding this comment

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

Let's go ahead ⚡️

@CW-75 CW-75 merged commit f425506 into Mesh4all:main Sep 19, 2022
Firmware automation moved this from In Progress to Done Sep 19, 2022
@CW-75 CW-75 deleted the feature/zep_dispatch branch September 19, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Firmware
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants