Error while trying to setup the RPi

I have a RPi 2, running OSMC.
I tried setting up the agent, but I keep getting the error “Error claiming the device. Could not claim the device to your account” after I successfully login and provide the name.
Running “particle-agent logs” shows the following error:

Starting agent
No firmware to run.
Signaling firmware to shut down cleanly
Quitting agent gracefully
Starting agent
/usr/lib/ruby/vendor_ruby/particle_agent/firmware_runner.rb:70:in `spawn': No such file or directory - /var/lib/particle/devices/DEVICE_ID/firmware.bin (Errno::ENOENT)
	from /usr/lib/ruby/vendor_ruby/particle_agent/firmware_runner.rb:70:in `run_firmware'
	from /usr/lib/ruby/vendor_ruby/particle_agent/firmware_runner.rb:25:in `run!'
	from /usr/lib/ruby/vendor_ruby/particle_agent/agent.rb:37:in `block (2 levels) in start_firmware_runners'

The folder “/var/lib/particle/devices/DEVICE_ID” exists, but it’s owned by root and only readable/writable/execute by it (chmoded 700).
This folder has the file “firmware.bin” and it’s a non-empty file.
Same thing for device_id.txt, device_key.der, device_key.pub.pem, and server_key.der.
There are also two empty files - stdin and stdout.

Rebooting didn’t help, running again the initial curl line that installs the agent didn’t work, calling “particle-agent setup” didn’t work.
Any idea what’s going on and how can I successfully set it up ?

Thanks.

So far I’ve only tested the agent setup on Raspbian. Maybe some prerequisite is missing on OSMC? Can you paste the lines printed when you run the curl install command?

1 Like
osmc@rpi1:~$ bash <( curl -sL https://particle.io/install-pi )
Installing the Particle Agent

Downloading packages

######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%
######################################################################## 100.0%

Installing packages

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssl-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  dnsmasq-base fontconfig-config fonts-dejavu-core libasn1-8-heimdal libass5 libenca0 libfontconfig1 libgraphite2-3 libgssapi3-heimdal libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal
  libjasper1 libkrb5-26-heimdal libmnl0 libnetfilter-conntrack3 libroken18-heimdal libwind0-heimdal rbp2-image-4.4.27-5-osmc
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(Reading database ... 29528 files and directories currently installed.)
Preparing to unpack .../particle-agent_0.2.3-1_all.deb ...
Unpacking particle-agent (0.2.3-1) over (0.2.3-1) ...
Preparing to unpack .../ruby-unicode-display-width_1.1.1-1_all.deb ...
Unpacking ruby-unicode-display-width (1.1.1-1) over (1.1.1-1) ...
Preparing to unpack .../ruby-whirly_0.2.3-1_all.deb ...
Unpacking ruby-whirly (0.2.3-1) over (0.2.3-1) ...
Preparing to unpack .../ruby-particlerb_1.3.1-1_all.deb ...
Unpacking ruby-particlerb (1.3.1-1) over (1.3.1-1) ...
Setting up ruby-unicode-display-width (1.1.1-1) ...
Setting up ruby-whirly (0.2.3-1) ...
Setting up ruby-particlerb (1.3.1-1) ...
Setting up particle-agent (0.2.3-1) ...
Processing triggers for systemd (215-17+deb8u6) ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dnsmasq-base fontconfig-config fonts-dejavu-core libasn1-8-heimdal libass5 libenca0 libfontconfig1 libgraphite2-3 libgssapi3-heimdal libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal
  libjasper1 libkrb5-26-heimdal libmnl0 libnetfilter-conntrack3 libroken18-heimdal libwind0-heimdal rbp2-image-4.4.27-5-osmc
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Running sudo particle-agent setup

Let's connect your Raspberry Pi to the Particle Cloud!

You are already logged in as MY_EMIL_ADDRESS.
Do you want to stay logged in as this user? |yes| 
How do you want your device to be labeled in the Particle tools?
Name: |rpi1| 
Generating RSA private key, 1024 bit long modulus
........++++++
....................................++++++
e is 65537 (0x10001)
writing RSA key
writing RSA key
⠋  Claiming the device to your Particle account 
Error claiming the device. Could not claim the device to your account
osmc@rpi1:~$