I notice on my setup that when I reboot my pi (sudo reboot -r now) the device remains offline as indicated in the console until I do a particle-agent restart command. Is there a way for the pi to come up with the device online after a reboot?
The particle agent service starts at boot on Raspbian 8 on the Raspberry Pi 3. Can you do cat /etc/os-release
and uname -a
to check your OS info.
I downloaded the new version of Raspbian jesse and did a fresh install on my Raspberry Pi 2 model B. Here is the info you requested:
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL=“http://www.raspbian.org/RaspbianBugs”
Linux raspberrypi 4.4.32-v7+ #924 SMP Tue Nov 15 18:11:28 GMT 2016 armv7l GNU/Linux
Here is the output of particle-agent status after a reboot:
● particle-agent.service - LSB: Manages Particle firmware
Loaded: loaded (/etc/init.d/particle-agent)
Active: active (exited) since Wed 2016-11-23 18:07:32 CST; 1min 53s ago
Process: 435 ExecStart=/etc/init.d/particle-agent start (code=exited, status=0/SUCCESS)
Nov 23 18:07:32 raspberrypi particle-agent[435]: Starting Particle Agent: particle-agent.
Nov 23 18:07:32 raspberrypi systemd[1]: Started LSB: Manages Particle firmware.
And here is the output of particle-agent status after doing a particle-agent restart:
● particle-agent.service - LSB: Manages Particle firmware
Loaded: loaded (/etc/init.d/particle-agent)
Active: active (running) since Wed 2016-11-23 18:10:30 CST; 8s ago
Process: 997 ExecStop=/etc/init.d/particle-agent stop (code=exited, status=0/SUCCESS)
Process: 1005 ExecStart=/etc/init.d/particle-agent start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/particle-agent.service
├─1014 /usr/bin/ruby /usr/bin/particle-agent-service --daemon --pidfile /var/run/particle…
└─1018 /var/lib/particle/devices/7ab7a9c870b68ca200ae4730/firmware.bin -v 70
Nov 23 18:10:30 raspberrypi particle-agent[1005]: Starting Particle Agent: particle-agent.
Nov 23 18:10:30 raspberrypi systemd[1]: Started LSB: Manages Particle firmware.
A bit more info and clues - if I look at the particle-agent log file after a reboot I see the following:
0000000005 system: INFO: Cloud: connecting
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::system::system_error >'
what(): resolve: Host not found (non-authoritative), try again later
Firmware exited with status pid 682 SIGABRT (signal 6)
If I then do a particle-agent start I get the same, it isn’t until I do a particle-agent stop and particle-agent start or a particle agent restart I get then following:
0000000005 system: INFO: Cloud: connecting
0000000121 system: INFO: Resolved host xxxxxxxxxxxxxxxxxx.agent.particle.io to 52.91.48.237
0000000239 system: INFO: connected to cloud 52.91.48.237:5683
0000000239 system: INFO: Cloud socket connected
0000000546 comm: INFO: Handshake: completed
0000000547 system: INFO: Cloud connected
After updating to 0.2 my pi3 app won’t run after power down/up. Was working.