12
User Manual
Copyright ©2003 A7 Engineering, Inc.
'Get the eb500 Bluetooth Address
SEROUT 1,84,["get addr",CR]
SERIN 0,84,[WAIT("ACK",CR)]
'Read the local address from the get command
SERIN 0,84,[STR szData\17]
SERIN 0,84,[WAIT(CR,">")]
szData(17) = 0
DEBUG STR szData\17,CR
'Return to Data Mode
HIGH 6
PAUSE 50
DEBUG "In Data Mode",CR
SEROUT 1,84,["My Bluetooth address is ",STR szData,CR]
'Switch to Command Mode
LOW 6
SERIN 0,84,[WAIT(CR,">")]
DEBUG "In Command Mode",CR
'Disconnect from remote device
SEROUT 1,84,["dis",CR]
SERIN 0,84,[WAIT(CR,">")]
DEBUG "Disconnected",CR