BTListen channel {,UUID$} |
|
This command opens a Bluetooth channel and begins to listen for devices that want to connect. The channel number is chosen by the programmer. It is a lot like a file number and may be 1 to 10. So theoretically you could have up to 10 Bluetooth connections open at the same time, but you may find your Android device is limited to 5 or 6 connections before one of the existing connections is dropped. Some online references say up to 60 Bluetooth devices can be connected at once. If anyone succeeds in connecting 10 devices and wants to try more, post a topic on the forum and I will increase the limit. The UUID$ is an optional string which will override the default unique application identifier. This field should always be omitted unless you have a good reason for using a particular unique identifier. If used, the unique identifier will only be used for the specified channel. Example: ' First make your device discoverable by other Bluetooth devices for say 200 seconds. ' Then start to listen.
BTDiscoverable 200
'Now wait for a connection. |
Screenshot from above code