Shop OBEX P1 Docs P2 Docs Learn Events
Bluetooth connection issue from a Newbie — Parallax Forums

Bluetooth connection issue from a Newbie

SteveWoodroughSteveWoodrough Posts: 190
edited 2007-04-26 13:56 in BASIC Stamp

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

  • Tom CTom C Posts: 461
    edited 2007-04-26 08:03
    SteveWoodrough,

    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!
  • SteveWoodroughSteveWoodrough Posts: 190
    edited 2007-04-26 11:43
    No, REV D
    Thanks
  • r3b0r3b0 Posts: 8
    edited 2007-04-26 13:56
    you could try making sure that the eb500 is set to visible, and also while it's tryoing to connect, search for local bluetooth adapters on your pc. once you find it and establish a trusted connection, they should find each other and connect problem free.

    my own experiences have shown me that bluetooth is a great application, just kind of finiky.
Sign In or Register to comment.