Hello,
I am looking for the cellular command source codes (linked below) in electron firmware. Can you please point me to the correct location in the firmware?
https://docs.particle.io/reference/firmware/electron/#cellular
Basically, I am trying to my photon to keep sending data to my server even when there is no wifi, hence I have connected the same ublox modem to it.
Thanks a lot for your help
rifo
yep, I think this is where I should be
thank you very much @ScruffR
Ideally, I believe that I should delve into the firmware and find the corresponding compile switches so that both Electron and Photon functions exist in the firmware. However I am not sure if I’ll be able to succeed in doing that
so I thought of modifying and adding the functions in the firmware to my application code for a quick hack.
I would be happy if you can comment on my approach
thanks one more time
rifo
What do you mean?
If you want to have one application code base that you can flash to Electron or Photon without adaption then conditional compiling would be the way.
Like this
#if (PLATFORM_ID == PLATFORM_ELECTRON_PRODUCTION)
Cellular.on();
Cellular.connect();
#else
WiFi.on();
WiFi.connect();
#endif
Or do you intend to create a device that has cellular and WiFi on board?
1 Like
Hello,
Sorry for not being able to explain my use case clear enough.
Yes I am working on creating a device that has cellular and Wifi on board. I have connected the same ublox modem (that electron uses) to my photon. When there is no available Wifi, I switch to cellular communication.
I planned to delve into firmware and make some changes to it so that I can use both wifi and modem classes in my design. Regarding this changes, I wanted to ask you opinion whether it would make sense to do this or not.
thanks a lot
rifo
In that case I’d rather refere you to the Particle Gurus @mdma & @jvanier
Hello @ScruffR
Thanks a lot for your help again
1 Like