Limited Functionality on Electron connected to Gateway Shield?



I am a super newbie to the bluz world ( 0.5 hours old :stuck_out_tongue_winking_eye:) so I apologize in advance if this seems dumb!

I am working towards adding bluetooth functionality to my Electron such that it gets information from upto 4 local devices over bluetooth, processes and finally, publishes the information onto the Particle cloud via its cellular network. After a lot of research I decided that Bluz would be perfect for this application since it essentially does exactly that.

BUT then i read this…

Gateway Shield Programming Limitations
The gateway shield requires more resources to run then bluz DK. Therefore, some peripherals or resources may not be available or may be limited. The following is a list of differences from bluz DK to the gateway shield: - SPI and I2C are not available on the gateway shield to the user app - Only 1K of RAM is available to the user app - The System.sleep(SLEEP_MODE_CPU) is not available or necessary in the user app - There is no RGB LED for the nrf51822 on the gateway shield

Further, it is advised that no code be placed in the loop() function. This can block the gateway shield from working properly.

Now, my system uses SPI, I2C, UART and Serial1 communication for various sensors and I’m pretty sure my firmware is >1KB with most of the code, including publishes, inside the loop(). Will the bluz and gateway shield not work for me in that case?

Can someone please help me understand this section of the docs…? Thank you :slight_smile:



Those limitations are ONLY for the gateway shield, not individual bluz DK’s. So the gateway shield only gets data from connected bluz DK’s, then forwards it to the Electron. It cannot perform user code or access peripherals.

Each bluz DK has access to SPI, I2C, UART, and many other peripherals. This is, I imagine, what you would hook to your sensors. If you are familiar with the Photon, you can see the difference between bluz DK and the Photon here:

One note that isn’t listed here, I2C and SPI cannot be used simultaneously. You can switch between them, but will need to call start/stop each peripheral when you want to switch. It is most likely not a big problem for you.

Something else you may want to read up on is local communication. You would most likely want to use this if you are using an Electron or you will eat through your data plan quickly. The section at the bottom explains this:

Let me know if you have any more questions.


Does this means that the Electron ON the Gateway shield will not be able to interface with sensors over SPI, UART, etc???


Sorry, no, those limitations are for the BLE module on the gateway shield. The Electron can still use its own peripherals and pins to interface with other devices, as I explained in the other thread. We do use some pins/peripherals, so you need to check that we aren’t using up something you need. But if we aren’t, it will work.