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

gpio reset script issue - stdn mode #186

Open
StevenResiot opened this issue Aug 10, 2023 · 2 comments
Open

gpio reset script issue - stdn mode #186

StevenResiot opened this issue Aug 10, 2023 · 2 comments

Comments

@StevenResiot
Copy link

Hi,

we compiled the basicstation stdn variant (v1.5 with multiple 1301 boards).
it looks to be working fine

we're now trying to implement the reset script using the station_conf.radio_init field in station.conf

the issue we're having is we have N different scripts ( 1 per board ), so we joined them in a single startup script .
However, it seems the script is being called N times ( 1 per slave-X.conf file ) in parallel, which basically messes up the entire gpio reset procedure.

After noticing this, we tried moving the station_conf.radio_init field inside the slave-X.conf files, at different heights as well, but they're being ignored.

Is there a clean way to do this? One script per slave, or one script only being called only once?
Or should we just give up and call the script before starting basicstation?

Thank you!

@beitler
Copy link
Contributor

beitler commented Aug 10, 2023

Hi @StevenResiot ,

the intended way to initialize multiple radios with a single initiatlization script in the master/slave configuration of basics station is the following: station calls the configured script, passing the path of the radio device as an argument, e.g.:

2023-08-10 13:40:51.148 [SYS:VERB] rinit.sh: Forked, waiting...
2023-08-10 13:40:51.148 [SYS:DEBU] execvp argv[0]: </bin/bash>
2023-08-10 13:40:51.149 [SYS:DEBU]        argv[1]: <rinit.sh>
2023-08-10 13:40:51.149 [SYS:DEBU]        argv[2]: <rinit.sh>
2023-08-10 13:40:51.149 [SYS:DEBU]        argv[3]: </dev/ttyACM0>

Hence, you should have a single script which takes the radio device path as input (SPI or serial) and applies the necessary GPIO operations based on the radio device path.
Is this possible in your case?

@StevenResiot
Copy link
Author

StevenResiot commented Aug 10, 2023

hi @beitler
it's totally possible, however, how is arg 3 passed/configured?

edit: my bad, just saw it's automatically passed. Thank you!

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

No branches or pull requests

2 participants