Shop OBEX P1 Docs P2 Docs Learn Events
eb500 lst visible command — Parallax Forums

eb500 lst visible command

Aaron WallAaron Wall Posts: 31
edited 2009-02-15 03:52 in BASIC Stamp
The following code was modified from the sample program for get address. All I need the device to do is list the addresses of local blue tooth devices. I understand that this structure would only display the first address, but I can't get it to do even that. Any suggestions?

I have a mac and a cell phone both visible. they can see each other and the eb500


'{$STAMP BS2}
szData VAR Byte(20)
'Wait for the eb500 radio to be ready
PAUSE 1000

'Get addresses of local devices
SEROUT 1,84,[noparse][[/noparse]"lst visible",CR]
SERIN 0,84,[noparse][[/noparse]WAIT("ACK",CR)]

'Read the local address from the lst command
SERIN 0,84,[noparse][[/noparse]STR szData\17]
SERIN 0,84,[noparse][[/noparse]WAIT(CR,">")]
szData(17) = 0
DEBUG "Address of local device: ",STR szData\17,CR
Sign In or Register to comment.