Question

I want to connect a robot, via Bluetooth, with an iPhone (4S or more) via Bluetooth low energy (BLE) 4.0. This robots require to send all the notifications of the iPhone to the device.

For example: If the iPhone gets a new email, I must send the event to the robot, and it will blink an LED. Stop.

I want to know if the iOS Bluetooth APIs of the Bluetooth framework can do this, or better, can share the Internet connection or whatever that can do this work.

I'm asking this, because I have heard that the APIs have some restrictions.

PS: ANY solution that can do this is very accepted (no Wi-Fi connection solution).

Was it helpful?

Solution

Bluetooth LE would be the way you want to go here, because standard Bluetooth requires your device to be MFi-compliant. Standard Wi-Fi could also work, if you're able to require the presence of the supporting network.

As of iOS 6.0, you can set up your iPhone as a Bluetooth LE peripheral, which would allow it to send notifications to your device, if it is configured in a central role. That would be a pretty power-efficient way of updating your device with new data.

However, there's one large hurdle to doing what you want here. iOS applications have no access to system-wide notifications, so you won't be able to listen for incoming emails or other notifications like that. You'll be able to send data to your device via Bluetooth LE, but you're not going to know when emails come in so that you could send that to your device.

OTHER TIPS

With bluetooth 4, you could control a robot, as well as create a "notification" bot. It could be done quite easily. However as mentioned, you can't access system wide notifications in iOS.

However, you could use an external solution to listen for system notifications and then an API to listen a singular encoded notification and have your app listen to that.

One such system is https://ifttt.com (no affiliation)

There are also some great plug and play BLE options for rapid prototyping.

You can do it. A simple solution would be let a phone check your email periodically. Don't rely or try to use external Apple applications to do that, but use services provided by your mail.

In the case of Gmail, try to go to https://mail.google.com/mail/feed/atom. If you are logged in your Gmail, you will see the unread mail in XML format. The way you would login using a URL is: https://username:password@mail.google.com/mail/feed/atom

So what you can do is periodically parse the output and when <fullcount>0</fullcount> value changes call your robot service via BLE which should act as a callback for this specific event.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top