Unable to Register Raspberry Pi 3 B+ to Cumulocity Platform

Hello,

I followed the available guidelines to register Raspberry PI to c8y platform
https://cumulocity.com/guides/devices/raspberry-pi/
But couldn’t successfully register it. On C8Y platform the device status shows as “WAITING FOR CONNECTION”.
Followed some forums on stackoverflow which suggested that until Raspberry Pi has some sensors attached to it the connectivity won’t activate.

Therefore, attached PIR HC-SR501 sensor to RPI and tested if the GPIO pins are working and I could get the readings successfully through a simple python program.

But to my dismay still the Cumulocity platform didn’t buzz and status stuck to “WAITING FOR CONNECTION”.

Checking system logs on RPI i could see some logs for agent trying to connect but complaining about missing properties file:

Aug 31 21:22:16 raspberrypi root: 21:22:16.540 [main] WARN c8y.lx.agent.PropUtils - Configuration file ./cfg/device.properties cannot be read, assuming empty configuration
Aug 31 21:22:17 raspberrypi root: Unable to open SPI device: No such file or directory
Aug 31 21:22:18 raspberrypi root: Running the Cumulocity Linux Agent…

Need help here, if i am missing any configuration or doing something wrong.

Regards,
Manoj

Hi Manoj,

sorry to hear that you have issues. Can you let me know on which tenant you try to connect the device? Also can you provide me the device log?

Cheers
Michael

Hello Michael,
Tenant I am trying to connect to is: https://ctssagcoedev1.cumulocity.com
As for device logs, I am not sure how to get it. I could find system logs which i can provide again:
Aug 31 21:22:16 raspberrypi root: 21:22:16.540 [main] WARN c8y.lx.agent.PropUtils - Configuration file ./cfg/device.properties cannot be read, assuming empty configuration
Aug 31 21:22:17 raspberrypi root: Unable to open SPI device: No such file or directory
Aug 31 21:22:18 raspberrypi root: Running the Cumulocity Linux Agent.

Please let me know if there exists some other logs, where i can find them, then i can share them.

Regards,
Manoj

Hi Manoj,
I got it working on an RPi 4 recently. Including getting Apama to monitor data from Sensehat into Cumulocity.
I had to look at logs and fix one error at a time. Create the properties file, enable SPI etc. Eventually it works.
Cheers,
Prithvi

Thanks Prithvi for sharing it!
I too got it working a couple of days ago. Steps I did:

  1. Re-installed Raspian Buster with Desktop (Might be not relevant for all).
  2. Set the JAVA_HOME
  3. Enabled SPI: https://www.raspberrypi-spy.co.uk/2014/08/enabling-the-spi-interface-on-the-raspberry-pi/
  4. Restarted device.

Then it worked fine!

One question about SenseHeat, are you using simulator present in RPI or actual SenseHeat device.
Please share some details around it.

Regards,
Manoj

Hi Manoj, i’m using the actual sensehat, the simulator in the OS did not work.
Cheers,
Prithvi

Hi Manoj,
I am still having problems to create a connection between my raspberry pi and c8m platform.
I tried to set JAVA_HOME but somehow it just mentioned in the syslog that c8m said that JAVA_HOME is not set.

How did you do it in particular?

Also for the configuration of device.properties and cumulocity.properties,…
does the host have following format: https://.cumulocity.com in cumulocity.properties?
Also does user means the , which is also the or does it mean the registration name of the device?
I am new to c8m and though I am a bit confused.

Looking forward for some support :slight_smile:

Hello Linh,
You have to go to the logged in user profile home directory ~/
Create a .profile file if it doesn’t exist.
Then paste below command:
export JAVA_HOME=/location/to/java
Save the file and then check if variable is set correctly using echo $JAVA_HOME

Now restart your RPI and then log-in again to check if JAVA_HOME still exist.

If all works fine then RPI should be able to connect to Cumulocity platform.

Regards,
Manoj

Hi Linh,

did Manoj tipps help?

best regards
Michael

Hi,

Unfortunately it didn’t work for me.
What worked for my was to delete the whole folder where I saved the c8y.
Redownload everything and follow all the steps from scratch. I couldn’t figure out the problem but it worked for me that way.

Kind regards
Linh