
Chapter 18. Bluetooth
503
SNAME$ entries, the interface stops when the arrays are full.
If the service name is longer than the string length of SNAME$, the
interface discards the excess bytes.
Note: The function should be executed after execution of OPEN
"COM4:M,SDAP" statement.
Run-time errors:
Error code Meaning
34h
Bad file name or number. (The Bluetooth communications device
file is not opened)
F0h Mismatch parameter number
F1h Mismatch parameter type
105h
Power-off detected.
Example:
Query and browse for service and display the results.
DIM SCLASS%(4) ' Allocate space for 5 entries
DIM SNAME$(4) ' Allocate space for 5 entries
OPEN "COM4:M,SDAP,112233AABBCC" AS #4 ' Service discovery
CALL "BT.FN3" .fcBTGetSvc NUM%, SCLASS%(), SNAME$()
' Read search results
FOR I%=0 TO NUM%-1
PRINT SCLASS%(I%);SNAME$(I%) ' Display services found
NEXT
CLOSE #4 ' Close Bluetooth communications
' device file
Comentarios a estos manuales