I’m planning on using the PIO remote agent to update a Adafruit M0 or M4 Feather Express connected to a Raspberry Pi 4 B running Buster. I’m running into an issue when running multiple agents at the same time on different Raspberry Pi 4s. When one agent is running, the agent authenticates to PIO Cloud. I’m able to upload firmware using the ‘pio remote run --target upload’ command. Next when I start two or more agents the connection to PIO Cloud is intermittent. It appears that as one agent authenticates the other agents are kicked off. Another agent re-authenticates and the other two are kicked off.
Has anyone encountered this situation before?
I’m not sure what the next troubleshooting step should be.
Here are some more details of my setup:
- pio v 4.0.3
- Agent running on Raspberry Pi 4B running Buster
- Adafruit M0 or M4 Feather Express connected to USB port
- 3 RPIs with connected Feather Expresses running on same wifi network
- Platform IO Authentication Token setup as an environment variable and is visible using
printenv
command - When
pio run --target upload
is run separately on each RPI firmware uploads are successful - pio agent is running in foreground, since I’m still testing the configuration out. I later plan to run pio agent as a systemd service.
Below are the logs from the agents running in the foreground with synchronized timestamps. First I start the agent on and the connection is stable. Next I start the agent on and the connection on both agents starts an authentication loop. Next I start the agent on and the connection on all three agents loop. Then I stop the agent on and the connection on and loop. Then I stop the agent on and the connection on is stable again.
: pio remote agent start
PIO Plus v2.5.5
2019-10-11 10:26:34 [info] Name:
2019-10-11 10:26:34 [info] Connecting to PIO Remote Cloud
2019-10-11 10:26:35 [info] Successfully connected
2019-10-11 10:26:35 [info] Authenticating
2019-10-11 10:26:35 [info] Successfully authorized
2019-10-11 10:26:55 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:26:58 [info] Successfully connected
2019-10-11 10:26:58 [info] Authenticating
2019-10-11 10:26:59 [info] Successfully authorized
2019-10-11 10:27:10 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:13 [info] Successfully connected
2019-10-11 10:27:13 [info] Authenticating
2019-10-11 10:27:13 [info] Successfully authorized
2019-10-11 10:27:15 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:18 [info] Successfully connected
2019-10-11 10:27:18 [info] Authenticating
2019-10-11 10:27:19 [info] Successfully authorized
2019-10-11 10:27:23 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:26 [info] Successfully connected
2019-10-11 10:27:26 [info] Authenticating
2019-10-11 10:27:27 [info] Successfully authorized
2019-10-11 10:27:31 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:34 [info] Successfully connected
2019-10-11 10:27:34 [info] Authenticating
2019-10-11 10:27:35 [info] Successfully authorized
: pio remote agent start
PIO Plus v2.5.5
2019-10-11 10:26:49 [info] Name:
2019-10-11 10:26:49 [info] Connecting to PIO Remote Cloud
2019-10-11 10:26:54 [info] Successfully connected
2019-10-11 10:26:54 [info] Authenticating
2019-10-11 10:26:55 [info] Successfully authorized
2019-10-11 10:26:59 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:03 [info] Successfully connected
2019-10-11 10:27:03 [info] Authenticating
2019-10-11 10:27:09 [info] Successfully authorized
2019-10-11 10:27:13 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:22 [info] Successfully connected
2019-10-11 10:27:22 [info] Authenticating
2019-10-11 10:27:23 [info] Successfully authorized
2019-10-11 10:27:23 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:36 [warn] Could not connect to PIO Remote Cloud. Reconnecting…
^C
Aborted!
: pio remote agent start
PIO Plus v2.5.5
2019-10-11 10:27:14 [info] Name:
2019-10-11 10:27:14 [info] Connecting to PIO Remote Cloud
2019-10-11 10:27:14 [info] Successfully connected
2019-10-11 10:27:14 [info] Authenticating
2019-10-11 10:27:15 [info] Successfully authorized
2019-10-11 10:27:19 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:23 [info] Successfully connected
2019-10-11 10:27:23 [info] Authenticating
2019-10-11 10:27:23 [info] Successfully authorized
2019-10-11 10:27:27 [warn] Connection is lost to PIO Remote Cloud. Reconnecting
2019-10-11 10:27:30 [info] Successfully connected
2019-10-11 10:27:30 [info] Authenticating
2019-10-11 10:27:31 [info] Successfully authorized
^C2019-10-11 10:27:35 [info] Successfully disconnectedAborted!