简体   繁体   中英

Is it possible to have an Bluetooth SPP connection and BLE GATT connection in an android phone at the same time?

I am making application to connect an android based tablet to BLE GATT based temperature sensor and an Bluetooth SPP based printing device at the same time. Is this possible in android devices? My purpose is to read the temperature sensor to my device and print the temperature with user data using the printing device.

Yes this should be possible. Classic Bluetooth and BLE are almost two different technologies so using them in parallel through the same app shouldn't be an issue. The only restriction you have when working with both is that you cannot scan for both classic and LE devices at the same time. This is mentioned in the Android BLE Developer Guide:-

You can only scan for Bluetooth LE devices or scan for Classic Bluetooth devices, as described in Bluetooth. You cannot scan for both Bluetooth LE and classic devices at the same time.

You can find more information about this here:-

Yes, spp and ble are two different protocols. Spp adopts Bluetooth socket, ble adopts GATT protocol, so it is OK, and I have practiced this technology this year

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