Using the Photon as a BLE / Wifi Gateway / Bridge


I have a BLE sensor board (Thunderboard Sense : host of sensor data published frequently) which I would like to connect to the cloud (without the need for a mobile phone / computer).

Does anyone know how to use the Photon (with suitable BLE attachment / part) to receive the BLE packets (perhaps once per minute) and then to publish this data to the cloud (for later analysis and viewing). I see one could use a Bluz Gateway, or even a Redbear Duo. Has anyone done this before or have some sample code? I’m no expert in BLE work but can see my way through general coding.

Any advice here? Perhaps not even using BLE, and trying to tap directly into the I2C bus on the sensor board?

Thanks! :+1:

It is certainly possible to use bluz hardware in this case, but it may require some lower level coding. Bluz follows a specific protocol for communication, so either our gateway would have to be changed to match the thunderboard, or it would have to be made to follow our protocol.

I am not too familiar with these, but if you look at their SDK it can give you an idea. What you want to look for is the ability to set your own Services and Characteristics, this is the BLE term for how the device sends data. If you can do that on this board, it is likely you could get it to follow the Bluz protocol and therefore have it connect to our gateway.

That being said, it would need to operate in local communication mode. That is, it would send data to the gateway, and the gateway would send it to the cloud. The thunderboard wouldn’t directly talk to the Particle cloud like bluz or a Photon would. That should be fine though, th gateway would just act as a proxy for your data.

Let me know if you’d like to try this, I can help answer any questions you may have

@eely22 - thanks for the details, and almost exactly what I have been thinking, so good to have it confirmed.

I am yet to play around with some of the finer details of the board, and so I imagine I will know more in the coming days / weeks. I do understand that the Particle / Redbear / Bluz would only be a tunnel through which the necessary sensor data would flow to the cloud. I need to get my head around the low level coding (if it is this easy).

The other option is to try and tap into the Thunderboard Sense board’s I2C line, and eliminate the BLE step altogether (as I am planning on having the sensor board and Particle in the same package anyway!).

I’ll certainly be in touch if there are some hurdles I struggle over. Thanks again.