iOS Question UART data comms using BM78 dual mode BLE module

PhilN

Member
Licensed User
I am trying to write an iOS app which can communicate to my hardware through a Microchip BM78 dual mode BLE module. I need to be able to send raw data (4~8 bytes) to the hardware via the BM78 from an iOS device, an iPhone 6. The hardware will then respond with a few (4~8) bytes of data to acknowledge. The hardware will also send small packets (4~8 bytes) of data through the BM78 to the iOS device once every second.

I have managed to connect to the BM78 with one of the BLE examples. Here is a screenshot of the app showing the information read from the BM78 module...

IMG_2116.PNG


Here is the result from the Manager_DeviceFound sub...

Found: Dual-SPP, 3E2806CF-A163-16F6-B5ED-1539EF40168C, RSSI = -67, (read only map) {
kCBAdvDataIsConnectable = 1;
kCBAdvDataLocalName = "Dual-SPP";
kCBAdvDataTxPowerLevel = 2;
}


I can't seem to understand what Service Characteristic ID I should use to read data from or write data to the BM78. I have gone through the documentation with no success. Any help will be much appreciated. Thank you in advance.
 

PhilN

Member
Licensed User
After spending much time looking through the BM77 and 78 datasheets as well as the IS1678 (the SoC used in the module) datasheet , I could not find any reference to the service IDs or the characteristic UUIDs. The only Service and characteristic IDs which come up are in fact the ones listed in the screenshot above which really look quite random.

I got my hands onto an iOS app from Microchip called Bluetooth Smart Discover. With this app I was able to get more clarity with regards to the above characteristic UUIDs. Here is a screenshot showing the Service and characteristic UUIDs...

BM78 Service IDs.png


So from that I could see a description of each of the UUIDs. This did help me a lot. I was able to establish data transmission to and from my iPhone 6 to the target hardware. I finally got it to work! I used the following UUIDs which are very random in my opinion...
B4X:
ServiceId = "49535343-FE7D-4AE5-8FA9-9FAFD205E455"
ReadChar = "49535343-1E4D-4BD9-BA61-23C647249616" 'Notify
WriteChar = "49535343-8841-43F4-A8D4-ECBE34729BB3" 'Write Without Response
 

PhilN

Member
Licensed User
The link latency of the BM78 was quite high, almost 1 sec between transmission and reception between the target hardware and the iPhone6 both ways. I was able to improve the link data throughput rate significantly by changing the parameters on the BM78 UI Tool PC program.
On the LE Mode Setup tab set:
--Min LE Connection Interval = 10 ms
--Max LE Connection Interval = 20 ms
--LE Slave latency = 0
The rest of the settings on all the tabs were left at the default settings. I hope that this helps someone.

upload_2016-6-27_10-31-22.png
 
Top