i’d like to read/send data to a bluetooth device. I’m wondering if anyone has connected a particle photon with an HC-05 bluetooth board? It looks theoretically possible, has anyone tried it?
The Project
What i’m trying to do is read/write data to a bluetooth obdII dongle. I’d like to read RPM, speed, fuel levels, etc. The piece I’m missing right now is how to communicate from the photon to the bluetooth dongle.
By the way, I have tried using a bluz gateway, but it’s not possible to communicate with a non-bluz device without some low level reprogramming of the gateway.
It doesn’t directly answer you question, but have you heard of https://www.carloop.io? It’s an OBDII adapter for the Particle devices, made by, @jvanier, one of the Particle Engineers Figured that might be interesting as well.
Also not answering your question, I haven’t used the HC-05, but I have used the Adafruit Bluefruit LE nRF51 devices with the Photon and Electron, both the SPI and Serial versions, and they work fine. Here’s my Particle port of the library:
Thanks for the plug @Moors7. If you’d like to talk about your connected car project more @elhajj33, you can also join the community at community.carloop.io
@jvanier & @Moors7, We have already had some conversations on the carloopl.io forums.about the suitability of Carloop. Unfortunately, you were not in the loop (pun not really intended, but too good to not …) over in that forum.
I think it is safe to assume that a K-Line transceiver is what is needed. An ELM327 will do that, but limited to the ELM command set … Carloop can do so much more, except there is no version yet for K-Line (yes, I am well aware of who is working on CarloopRetro, but very very slowly).
As for an alternate solution to the question here, how about the RedbearDuo? It is essentially a Photon with Bluetooth LE added on and some of the firmware to make the BLE work. Not having worked with it myself, but I don’t think it has restrictions as you describe for the Bluz.
I’m not sure how solid the BLE functionality had come since then. I’m willing to try it. Would prefer to have one board rather than wiring up a breakout board.
@ScruffR, I do not have a RedbearDuo myself. The RedbearDuo system firmware has evolved since the referenced post was made over a year ago. Maybe you can help … do you have a response to @elhajj33 in the post above?
Hi @elhajj33, i successfully connected a bluzDK device (as Peripheral) with a Red Bear Duo (as Central) in order to transfer data between them via BLE. It is possible without requiring any Bluz Gateway. Anyway, have you think about using a red bear Duo directly conected to a ELM327 BT OBDII device in order to transfer the car info?
@cyclin_al, as @fbt said things have improved quite a bit since then, but I also lost track of the current stand of the system FW on the Duo compared to the most recent Particle version.
A lot has beed added and would be a must have on a Duo for me to dig it up again.
it’s encouraging to hear you were successful with the Duo. The reviews on amazon were not very kind to it. How reliable is it? Do you find that the connections stay up without dropping? I plan on using it to send data for 4-8 hours. Do you think it’s up to the task?
By the way, I emailed redbear a few days back and got a response yesterday. They pointed me to this git repo showing how to use redbear as a central.
I’m open to giving it a whirl as one board is preferable to setting up a breakout board.
@Bobzilla
Hello. I am still new to the use of a HC 05 bluetooth module and new to the world of the particle photon. I am currently working on a project which involves bluetooth communication: I am trying to send information from my photon via bluetooth, using the HC 05 bluetooth module, to a blynk application. i have been searching the net for coded examples showing the code needed to send data via the HC 05 but have come up empty. How do i tell the particle to send information via the bluetooth module ? You say that the module needs to be paired with the photon first, can you direct me to a few sites that will be of help to me?
@Alli, the Photon is designed to use WiFi so any bluetooth module would be treated as a peripheral. I suspect you would need to connect the HC05 module to the Photon via a serial port like Serial1 on the TX/RX pins of the Photon. All HC05 commands and data would be passed to the module that way.
However, Blynk for the Photon is not designed to interface with a bluetooth module, only WiFi, which is native to the Photon. You will need to post on the Blynk forum to see if anyone there has any suggestions.
@peekay123
I have been having some trouble connecting my photon to the Blynk app via BLE. I strongly suspect the problem lies on Blynk’s side and have already started a discussion there since i had a working program and after the an Blynk update the program did not work properly anymore. I would like to verify something here though. Does the particle photon’s Tx and Rx pins require pull up/down resistors ? I did not see any mention of this in the particle docs under uart serial and would just like to make sure.
@Alli, what is the operating voltage of the HC-05 TX/RX pins? The serial protocol is a non-return-zero protocol meaning it is always HIGH except when data is being sent. There should be no need for pull-up or down resistors. You can run a simple serial pass-through app on your photon to manually send commands to the HC-05 module for testing.
UPDATE: Quick research shows the HC-05 has 3.3v TX/RX levels. Make sure you have the lines correctly connected between the HC-05 and the Photon. They may need to be reversed.
Thanks @peekay123. The module i am using now is BLE jdy-08 not the bluetooth classic HC 05 (i did start prototyping with it earlier on in my project). Sorry for not clearing that up. I and joined the beta test for Blynk version 2.27.2 which has resolved the issue i had with BLE.
Thank you for the advice and response.