Bluetooth presence (via HC05 and Jeenode)
Thanks Brett for clarifying,
i've added the line
sendBluetoothCommand("AT", SYNC);
sendBluetoothCommand("AT+NAME=blueNode", SYNC);
// AT+ROLE=p1
// p1 - 0 Slave Role, 1 Master Role, 2 Slave-Loop role.
sendBluetoothCommand("AT+ROLE=1", SYNC);
sendBluetoothCommand("AT+CMODE=1", SYNC);
sendBluetoothCommand("AT+INIT", SYNC);
// AT+INQM=p1,p2,p3
// p1 - 0 inquire_mode_standad, 1 inquire_mode_rssi
// p2 - maximum number of bluetooth devices response
// p3 - the maximum of limited inquiring time. 1~48 (1.28s ~ 61.44s)
// 15*1.28 = 19sec
sendBluetoothCommand("AT+INQM=0,5,15", SYNC);
Same output alas...
[BlueNode.1]18 g212 @ 868Mhz
SYNC> AT
OK
SYNC> AT+NAME=blueNode
OK
SYNC> AT+ROLE=1
OK
SYNC> AT+CMODE=1
OK
SYNC> AT+INIT
ERROR:(17)
SYNC> AT+INQM=0,5,15
OK
ASYNC> AT+INQ
OK
OK
OK
OK
ASYNC> AT+INQ
OK
OK
OK
OK
OK
ASYNC> AT+INQ
OK
ASYNC> AT+INQ
Andrew
Andrew that's a bummer. I don't know what could be wrong with your BT device its almost as if the antenna isn't connected!? You ordered from a different supplier this time?
You have set everything just like Gary and I have so all things being equal lets blame the hardware.
Brett
Brett
Sure is, as long as im not doing something stupid i dont mind blaming the hardware.
not much else i can think other than provide a 5v supply prehaps
original order was from the UK (more expensive but same week postage)
Thanks
Andrew
Andrew
I have surrendered after fighting with 2 of these devices. Same response as you. Interestingly the second module I ordered was slightly different from the first, but behaved exactly the same.
John
Hi John,
Thats a real shame, and i was thinking i was doing something very wrong....well my 2nd modeule is on its way over from a different supplier heres hoping!!
Thanks,
Andrew
Its got to be how its being initialized but if everybody has the same unit how can this be so?
That make 3 units between Andrew and John that just don't function with my code, ok I missed out the AT+INIT and when I retested my code I got error(16) "SSP not initalized" but onced Iadded AT+INIT got error(17) "already initialized" and the unit worked, as per my wiki page.
I find that hard to believe the defect rate is this high. Maybe I should buy another and hope I get a dud so I can investigate. This is surreal. Gary are you using my code or some other variant? What is your AT sequence?
Yours work right?
Brett
Andrew
Have you noticed that the module starts to flash fast ie it drops out of command mode. I have tried every combination of commands, including delays between them, on 2 modules. I give up! On to the next project.
John
John,
Yes i get two slow flashes, then it drops into fast flashing.
i dont want to give up just yet :)
Andrew
New HC-05 arrived today, the comms board it sits on is a different design with different pinouts so thats something positive as it ensures its a different batch
Im stuggling to get any serial debug out of the latest sketch, can somebody verify this works ok for them?
http://livebox-hah.googlecode.com/svn/trunk/userapps/arduino/Bluetooth/B...
thanks
Andrew
Did you enable debug - it is turned off by default. You should get something!?
Brett
Brett,
So it is, I missed that i will remove the comments from //#define SERIAL 1
Thanks
Andrew
After enabling Debug this is the current output
Sadly no OK from the first AT command
[BlueNode.1]18 g212 @ 868Mhz
SYNC> AT
Thanks for the info,
I need to check the FTDI levels for the new board, the new adaptor board suggests the comms needs to be at 3.3v
its also possible it requires a 5v + supply and not 3v
no switch as far as i can see....
Old on Left, new on Right
Andrew I updated the wiki page on the blue node with some sample output. I'll paste again here.
I flash this onto my arduno and reattached my bluetooth device to make sure I wasn't going mad.