Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BTLE 4.0 - ConnectBlue Low Energy Serial Port Service

I am looking for a way to load data from an embedded device via a serial port (RS232) to an iPhone. The app needs to be on the AppStore and our company is not part of the MFI program.

Before you say, it can't be done, we are looking into Bluetooth Low Energy 4.0 as a possible solution. We can create a device that can turn ConnectBlue's OBS421 module into a serial port adapter (with the speed bursts limitation). To that effect, connectBlue provides their own protocol called Serial Port Service, but it is documented only on a very high level.

  1. Does anyone have any experience in using this protocol? If so, can you provide an example(objective C) code that establishes communication in this way?
  2. Has anyone submitted an app to Apple that does this without getting rejected for infringing MFI rules?

One more question.. The device I am trying to connect only supports serial commands in the EZII Escape Computer Command Set standard (PROG ID of "EZ2 2.0" and higher). They look different than the common ATT-Commands. Example: <ESC>Gc100<EOT>. Any idea if I can send such commands via ConnectBlue's LE-SPS?

Your help is much appreciated. Thank you!

like image 862
Fervus Avatar asked Dec 11 '25 19:12

Fervus


1 Answers

I haven't used this protocol but from the documentation it seems quite straight-forward. You should be able to take any of the core-bluetooth examples and adapt it fairly quickly.

You need to look for a peripheral that is offering service 0x2456e1b926e28f83e744f34f01e9d701

This service exposes two characteristics -

  • 0x2456e1b926e28f83e744f34f01e9d703 to read & write to the serial port
  • 0x2456e1b926e28f83e744f34f01e9d704 for "credits" if you need flow control. Essentially it seems that this value indicates the number of bytes you can send to the device and you can write a value to indicate the number of bytes you are prepared to receive from the device

The device should support a full 8-bit data path, so I don't see why you would have a problem sending the serial commands.

Bluetooth Low Energy is specifically excluded from the MFI program, so you won't get rejected on that basis -

I want to develop an accessory that communicates with an Apple device using only Bluetooth Low Energy. Do I need to join the MFi Program?

No. Accessories which connect to an Apple device using only Bluetooth Low Energy/BTLE/Bluetooth 4.0 or standard Bluetooth profiles supported by iOS are not part of the MFi Program.

like image 79
Paulw11 Avatar answered Dec 14 '25 12:12

Paulw11



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!