I'm currently trying to make an app that allows my phone to send commands to a raspberry pi and then the pi sends back data. This two way communication needs to be through bluetooth. All string data is fine. On Android this has been very simple so far. I use rfcomm0 and a python script on the pi to communicate to my Cordova app back and forth. I can also easily test communication with a bluetooth terminal on Android. Hardly any setup using bluez on the pi.
An example of what my app would do is simple things like sending an ifconfig command. On Android this is simple, I send "ifconfig" on my phone, python on the pi receives it over rfcomm0, and sends back the ifconfig data to the phone. Very easy.
Now I go to make an iOS app and I can barely get it to connect.
Using
sudo hciconfig hci0 leadv 0
on the pi allows the iOS device to see the pi and connect, but only if I connect through an app called BluetoothLE. The native bluetooth screen on iOS won't ever see the pi unless I connect first through that app. That is kinda beside the point since it does finally say connected after I connect with the BluetoothLE app.
Since iOS doesn't use rfcomm, I have no idea how to send data back and forth from iOS to the pi.
All my google searches have led me to believe it is impossible and I would have to do some weird ble advertising sending tiny little data packets.
I guess my main question is, is there an easy way to do this on iOS like on Android? If so is there a tutorial I'm not seeing? If not, is there a work around?
Thanks for any help.