Carloop.begin makes photon crashes

I was able to get my first project working using a combination of Carloop + Electron + Particle.io SIM + Blynk.cc. I had to downgrade to the 0.64 Particle Electron firmware and also had to remove the following line from the application:

SYSTEM_MODE(SEMI_AUTOMATIC);

Once I removed the above statement, my Electron successfully booted, acquired a cellular signal, and began sending data. With the above line still in place, the Electron would perpetually stay in “booting” with a pulsing white LED.

That is the expected behaviour, cause when you use the semi automatic mode, the electron doesn’t connect automatically to the network, and that white blinking led means “cellular off” (https://docs.particle.io/guide/getting-started/modes/electron/) . You have to connect by code with something like this:

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
   Cellular.on();
   Particle.connect();
}

When you remove that line, the electron goes in automatic mode, so the device handle by it self the connection life cycle to the network and to the particle’s cloud.

1 Like

@maleficarum & @Jamie,

There never was a system firmware 0.6.3 for the Electron.
0.6.3 was a specific release for WiFi devices. The Electron is cellular.

I would recommend 0.6.4 for all devices until the issue with 0.7.0 can be worked out.

Yes, I know, I just wanted to point exactly how I was doing the test cases.

Thanks for the support and clarification.

Hi, is there somebody in charge of updating the carloop library for 0.7.0 firmware?

I have a Programmer Shield, an Electron and a Carloop so I can help in this matter.

@itsmedavid,

The Carloop library was covered by code review; it appears to not be the issue. See the earlier post here:[quote=“cyclin_al1, post:12, topic:584”]
carloop.begin() is pretty simple code within that function; the only call of significance is can.begin().
[/quote]

can.begin() is part of the Particle HAL. In the example code given, the next call was a Particle.process().
At the moment, the focus is on the can object in the system firmware along with how it might interact with the process function in the system thread, given the RTOS is multithreaded (application thread & system thread).

If you can setup a complete debugging environment and rebuild the complete firmware with debugging enabled, then we would welcome digging into the 0.7.0 system firmware.

The Carloop people are aware. However, I do not know if they have determined any cause yet for the SOS behaviour.

Hi folks, sorry it took me a while to look into this crash. I’ll create a new thread in the community and document how I go about fixing this issue. Stay tuned!

The issue is fixed in the Carloop library 2.1.0. See [Resolved] Fixing the crash on Particle 0.7.0 firmware - Troubleshooting - Carloop Community for details

Thanks @jvanier !!!

I’m going to test it and post any feedback.