
Chapter 18. Bluetooth
459
(a) Using the system settings
OPEN "COM4:M,SDAP" as #4
(b) Specifying parameters in the OPEN statement
OPEN "COM4:M,SDAP,112233AABBCC,BHT,60" as #4
' Address for remote device:
' 11:22:33:AA:BB:CC"
' Bluetooth passkey: BHT
' Service discovery timeout: 60 seconds
For further details on the OPEN "COM4:" statement and BT.FN3 extended function, refer to
Sections 18.3 "Bluetooth Statements and Functions" and 18.4 "Bluetooth Extended Functions
(BT.FN3)," respectively.
(Example)
Query and browse for services offered by Bluetooth device at address "11:22:33:AA:BB:CC."
DIM sclass%(8)
DIM sname$(8)
' Open Bluetooth communications device file
' Query and browse for services offered by another Bluetooth device
' at address"11:22:33:AA:BB:CC"
OPEN "COM4:M,SDAP,112233AABBCC" as #4 ' Address for remote device:
' "11:22:33:AA:BB:CC"
CALL "BT.FN3" .fcBTGetSvc num%, sclass%(), sname$()
' Acquire service discovery results
' Close Bluetooth communications device file
CLOSE #4
Komentarze do niniejszej Instrukcji