简体   繁体   中英

Connect to BLE device and send/read data via NSNetService on iOS 7

I have an iPhone app which communicates with external device via NSNetService . Now I want to add support for bluetooth. So I would like to discover and connect to device via bluetooth (BLE) and when connected I would like to send/receive data via NSNetService , so I reuse existing code...

Is this possible on iOS7+? Any example/hint would be much appreciated.

NSNetService uses TCP/IP and multicast DNS. Bluetooth Low Energy does not implement a TCP/IP network and so NSNetService cannot be applied to BLE connections.

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