This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

iOS BLE and CC2540 SimpleBLE

Other Parts Discussed in Thread: CC2540

Hi all,

I'm try to develop my own iOS app, role is to connect to CC2540 and read/write to characteristic.

I know that there is sample iOS source code which works with keyfob, but I have not tested this because I only have the SmartRF05 dev board.

So I try to modify this iOS source code to work with SimpleBLEPeripheral instead. Now my iPhone can scan and connect to CC2540, but when I try to read characteristic value, it needs to findServiceFromUUID, I modify the service uuid to 0xFFF0 (SIMPLEPROFILE_SERV_UUID), but iPhone cannot found this service.

Question is: Can I use any service uuid, or I need to follow some standard service uuid somewhere?

Is there any way to get iOS app read/write characteristic without discover services?

Could you please help, thank you.

  • Yes, you have to discover the service and characteristic before you can use them. Use discoverServices: and discoverCharactersistics:forService: from the CBPeripheral class to initiate the scans. 

  • Thank you, Hermann,

    I did it but it got fail to discover the service with uuid=0xFFF0 (Simple BLE service)

  • Try to use nil as a parameter to find all services not just the one you are looking for. You should find atleast the standard gap and gatt service.

  • Hi, let me pick up this thread for 1 more question.

    In my system, my app on iOS device connect to simpleBLEperipheral, discovery SIMPLE_BLE_SERVICE, and read/write to characteristics, then disconnect.

    Problem is I want the transaction is as fast as possible, but I see the iOS app takes about 700~800ms to discover service and characteristics (I set connection interval to 20ms). Is there any way to omit the step to discover service, or how make it as fast as possible? Because we are developing applications on these 2 devices, so we know exact service uuid and characteristic uuids, so why we need to discover them at every connection.

    With 2 CC2540 boards, I can connect, read/write characteristics without discovering service uuid and characteristic uuid, because I know these value. Is there any way to do the same on iOS app?

  • Hi,

    What is your problem solved? I met the same problem now.

    Do you have the iOS DEMO?