HM-10 BLE Module - not working #795
Replies: 8 comments
-
Posted at 2014-08-08 by @gfwilliams HM-05 page? Do you mean HC-05 (http://www.espruino.com/Bluetooth) I don't have a HM-10 here to test with, but as far as I know (in answer to your questions)
Having said that, HM-10 is different because it's BLE, so I don't believe it'll directly emulate a serial port.
Pin 24 is optional, but as it's a status LED, it might help you find out what's going on.
Next I'd probably try and put the status LED on so you can see the state of the module. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-08-09 by lavamantis OK, I just ordered a volt meter. Probably should have had one of those before now. :| |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-09-13 by lavamantis I never could get that HM-10 module working, so I replaced it with a new one which worked great on the first try. Oh well. I've gotten a few parts now that are just simply DOA. Anyway, next question. When Espruino is plugged in and powered by the computer's USB, I can successfully connect to and communicate back and forth between the Espruino and my iPhone across bluetooth. Based on the tutorial I used (http://www.espruino.com/Bluetooth+BLE), I've been reading from and writing to Serial1. The problem is when I disconnect from the computer and power Espruino from the wall. I can successfully connect to it from the iPhone over bluetooth (I know this because the blinking status LED on pin 24 goes to solid on), but there's no communication going back and forth. What is happening? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-09-14 by DrAzzy In that case, the console will be moved to serial1 - could that be causing the problem you describe? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-09-14 by @gfwilliams Ahh. That's likely... Try That'll make it hard to program the board a second time after you have saved the code (you need the reset + btn1 trick), so you could try checking process.env and only changing the console if it is not set to 'USB'. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-09-17 by lavamantis OK, that worked. I check the magical "process.env" on onInit, and if CONSOLE === USB then then I move the console to LoopbackA. All works well. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-13 by paul_tanner well done @lavamantis ;-) It would be extremely helpful if you could post a simple app sample to help people test the espruino when the HC-10 is attached. Thanks in advance. (If you wondering what this could be, a beacon is one obvious simple app) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-09-14 by @gfwilliams Yes, that'd be great - I don't actually have an HM-10 to test with so I can't do this. Just a simple bit of code that I could stick on the BLE page would be extremely handy. However it looks like there's a good PDF on HM-10 iBeacons here - it looks like just sending the magic sequence of commands from the
Ideally we could come up with an |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-08-08 by lavamantis
I soldered the HM-10 module to the Espruino according to this page: http://www.espruino.com/Bluetooth+BLE
Actually I was switching back and forth between that page and the HM-05 page, and ended up accidentally soldering pin 34 as well. Then, trying to get the solder off, I soldered 33 too. I gave up at that point so those 2 pins are also currently soldered.
I do NOT have pin 24 soldered (yet). That seems to be optional?
Anyway, I plugged the Espruino in to my Mac via the USB cable and... I'm not sure what to do next. The AT commands:
"Serial1.on('data', function (data) {console.log(data);});
Serial1.print("AT")"
Just return "Undefined". No other output.
Questions:
Where does power for the HM-10 come from? Is it just taken for granted that the user knows to hook some power up somewhere?
Assuming there's power going to the HM-10 board from Espruino somehow: the HC-05 tutorial says "Simply pair with this module and enter the pairing code 1234.". Does that mean connect with my Mac's bluetooth capability? It's not appearing in the bluetooth list. I also tried with my iPhone 4s, it's not in that list either.
Also on the HC-05 page, it says "Note: If you power the board from your PC's USB port, it will move the console to USB and you will get no response from the Bluetooth connection." So I tried just using a USB wall plug, but still the bluetooth connection isn't showing up on Mac or iPhone.
I have pin 23 just soldered down to Espruino. I'm not sure what is happening in the picture on the HM-10 page with pin 23, it looks like a big blob of solder. And this makes it seem like it's optional, just for configuration: "In order to use pin 23, connect this pin via a switch to ground (defaul position of the switch is open). Also connect this pin via a resistor of 1k to 3.3V." If I do need to do something with this pin, do I really add the stuff to BOTH the ground and 3.3V?
What are my next steps for troubleshooting this?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions