Bluetooth connection issue from a Newbie
SteveWoodrough
Posts: 190
This is my first post so please forgive me if I do something I shouldn't.
I'm having trouble getting my lap top usb bluetooth adapter to connect to the Basic Stamp. Below is the code I copied from the eb500 manual (P.46) connect.bs2 .· I changed the comment lines to debug lines so that I could see what was going on.
When I run I get stuck in a loop and no connection is made. Below is the code (it's very short)
What am I missing or doing wrong? I'm pretty sure it has to do with either the addresses or com port, but I've double checked everything.
Thanks, Steve Woodrough
My BT adapter address is 00:0d:18:01:1a:d8
the eb500 address is 00:0c:84:00:48:84
Incoming port Name:eb500 and is on COM11
Outgoing port Name:eb500'A7 Serial Port' and is on COM 12
pass key is enabled
' {$STAMP BS2}
' {$PBASIC 2.5}
' Blue tooth USB adapter address:· 00:0d:18:01:1a:d8
' eb500 address:·············· 00:0c:84:00:48:84
' Incomming port· Name:eb500···················· COM11
' Outgoing port·· Name:eb500'A7 Serial Port' COM 12
' pass key is enabled
DEBUG "wait for eb500 To be ready"
PAUSE 1000
DEBUG"connect To the remote device "
SEROUT 1,84,[noparse][[/noparse]"con 00:0d:18:01:1a:d8",CR]
SERIN 0,84,[noparse][[/noparse]WAIT("ACK",CR)]
DEBUG"WAIT FOR CONNECTION TO BE ESTABLISHED and switch To DATA mode"
WaitForConnection:
DEBUG "waiting for connection"
'debugger goes into loop here repeatedly printing the·· waiting for connection· message I added above
····· IF IN5 = 0 THEN WaitForConnection
HIGH 6
PAUSE 300
DEBUG"wait FOr 20 seconds"
PAUSE 20000
DEBUG"switch To command mode "
LOW 6
SERIN 0,84, [noparse][[/noparse]WAIT(CR,">")]
DEBUG"disconnect from remote device"
SEROUT 1,84,[noparse][[/noparse]"dis",CR]
SERIN 0,84,[noparse][[/noparse]WAIT(CR,">")]
Comments
Do you have the Rec C version of the eb500?
If so, have you made the modification to allow it to work with the BS2 Application header?
Just a thought.
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send someone to save the world, you·better make sure that they like it the way it is!
Thanks
my own experiences have shown me that bluetooth is a great application, just kind of finiky.