-
• #2
The HC-05 creates 2 COM ports.
You need the second one (probably COM5).Also, you must have the USB cable unplugged from the espruino, otherwise it won't respond on bluetooth.
I've also on several occasions gotten that behavior persistently and had to reboot the computer (and sometimes unpair the HC-05 and re-pair to it).
-
• #3
Connecting power via USB should be fine though right (ie, using a micro-usb wall charger).
-
• #4
:( Just doesn't seem to want to work at all. When I hit connect, I see windows connect the bluetooth device but the IDE just hangs. Does the IDE have a log file anywhere that I might be able to see if something is going on?
Matt
-
• #5
No, connecting power via USB will prevent it from working over bluetooth (or it did when I was playing with it).
In fact, I think it prevents it from working if it's plugged in at all, even if the other end is dangling - not sure about this last part, but I'm like 80% sure that I wasn't able to get it to connect until I unplugged the USB from the Espruino - call it 60%, because at the time, the HC-05 had a dodgy solder joint on the RX pin, and unplugging the cable might have caused a different amount of pressure to be applied to that dodgy connection, making it work. But the dodgy connection was almost always working at that point.
Also, check the solder joints to the HC-05, it's really easy to get a bad connection there.
-
• #6
Hmm, I think it just doesn't want to work.
Tried it with a 9v battery connected to GND and VBAT and still the same. Tried booting into the Mac partition of my machine and trying it there, but still the same. I've removed and re-attached the bluetooth module, and still the same.
I thought I might have messed up the soldering, as I made a mess of the GND + 3.3v connections (got a crossed connection and took a while to get it to separate) so wasn't sure if I damaged the board, but as it powers up and connects to the PC, I imagine these must be ok. The rest of the connections look fine so I really don't know what it could be.
Any other ideas?
-
• #7
Maybe there is an issue with the configurable bitrate of the HC-05. Some modules have
38400 bit/s as default and the Espruino expects 9600 bit/s at Serial1 for using it as console interface at startup. The bitrate of the HC-05 module could be changed by AT commands. -
• #8
@mattbrailsford - do you have an oscilloscope? Maybe you could check and see if anything appears on the rx pin when you send data over bluetooth?
Also, is this one of the boards that was sent out as a KickStarter reward, or another one?
@DrAzzy - Espruino Bluetooth will work fine off USB power - it's just when it's actually communicating with the host computer that it switches the console over to USB.
@Kalus - it could be - I've never come across a 38400 baud one (unless the 'key' pin is pulled high?). However you can change the baud rate by writing
function onInit() { Serial1.setup(38400);} save();
To try and debug it, maybe connect to your PC's USB and connect the Web IDE normally, then type the following:
Serial1.onData(function (e) { print("--->"+e.data); }); setInterval(function() { Serial1.println("Hello"); }, 1000);
Leave the terminal open, then start something like putty (or
screen
if you're on a Mac - see the Quick Start) and connect to bluetooth - and see if you see 'Hello' and/or if typing on that terminal causes something to appear in the Web IDE... -
• #9
Cheers guys.
@Kalus I've tried setting it into command mode (using instructions from the bluetooth page) and checked what the current settings are by sending AT commands, but I don't seem to be getting any data back. All calls to println return undefined. (I tried renaming the device to see if that takes hold but it didn't, on restart, it was still set to HC-05).
@Gordon just tried your debug suggestion and I seem to be getting nothing. When I connect putty, the terminal window opens, but it just sits there with the green cursor top left. I don't see anything printed nor do I see anything in the web IDE. I don't see the device connect in windows either so I don't think putty is actually connecting.
I think there is something odd going on though. I'm unable to connect to the board, but running the test code above, when I physically touch the board between 2 fingers (holding it on the sides like you would), I see the web IDE terminal outputting blank lines. Would this suggest there is a short somewhere?
Matt
-
• #10
Hmm. It could be a short, but I guess it's more likely that there's some sort of bad connection for bluetooth's ground and rx/tx wires. Are you absolutely sure you've soldered the correct ones?
Maybe you could use a multimeter and check the connection between pins A9/A10 and RX/TX on the bluetooth board:
http://mcuoneclipse.files.wordpress.com/2013/06/hc-06-and-hc-05-source-wavesen-data-sheet.png
-
• #11
I'm positive I've soldered the correct connections. It is possible though that I might have screwed the ground terminal (as mentioned in the first post, I had a problem connection with crossed solder I couldn't get apart, so I might have damaged the board).
I'll get the multimeter on it and see what I can find.
Matt
-
• #12
Ok, I've checked all the connections and my multimeter says they are all ok. Anyone able to suggest anything else?
-
• #13
Hmm. I'm not sure I'm afraid. Where did the bluetooth module come from? Perhaps the module itself has some kind of intermittent connection...
Or could it be an intermittent connection on the Espruino board? maybe try pressing down on the chip's legs near where it says 'ARM'.
From Espruino's side it's really simple - no components, just Gnd, 3.3v , RX and TX wires - so if they are all connected properly I guess that only leaves the module.
-
• #15
Not sure if it's the pins on the ARM chip, or whether it's the same thing that was just happening earlier (see 6 posts back), but pressing in intermittent places on the board, whilst running the setInterval test code from earlier, gives me output in the IDE like
--> --> --> --> -->
With the occasional character after the arrow. Again, if I try to connect putty, I just get nothing though.
Really not sure. I think I might have to give up on bluetooth on this board and maybe look to get another and try that.
Thanks again for the help.
Matt
-
• #16
No problem. Sorry it's not going - it really shouldn't be that much trouble to get working :(
-
• #17
No worries. I don't have an over-whelming need for it. I just wanted to try it out really. I'll see how I get on with the board for my gamer project and see if anything else pops up that would suggest it might be the board is at fault.
Debugging is always the hard side of tech.
Cheers
Matt
Hi Guys,
I've just installed my HC-05 bluetooth module and was able to pair it with my computer (MBP running Windows 8 via bootcamp) however when I see it in the device list, it shows up as offline. Strangely, when I launch the Web IDE, the com ports show up, but when I try to connect, it says connected, but I can't do anything else (I can't type into the console or anything).
Anyone got any ideas?
Matt
1 Attachment