简体   繁体   中英

Scaning for bluetooth device with MIT App Inventor 2

I am trying to connect an arduino has bluetooh(HC-06) with an android phone. I found and applied below block but I can only connect to paired devices without scanning.

How can I scan for available bluetooth devices and connect them using MIT App Inventor 2? What should be the block for scan operation?

在此处输入图片说明

See the documentation of the bluetooth component

As you can see, there is no block available to scan for devices, you only can get a list of paired Bluetooth devices ....

AddressesAndNames
The addresses and names of paired Bluetooth devices

However you can create your own extension and create your own blocks, for more information, see the announcement here .

Btw... see the following screenshot for how to connect correctly在此处输入图片说明

EDIT: to scan for devices you can use the classic bluetooth extension .
Note: I'm the author of that extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM