iOS and Android bluetooth connection differences - sphero-api

Just curious to understand why iOS devices connect to sphero directly but an app needs to do it in Android?
Well that's what I guess is happening because sphero will keep flashing in identity colours in Android until an app completes a connection.
To add: to use the option that keeps the sphero alive on the charger while connected to the client, then IOS would not need an app running but Android would. Well the Android app could have a service running to keep a connection open with sphero.
But ideally a consistent behaviour would be better.

Kasuku, you're correct in your post, but you also need to consider that the operating systems that you are comparing are completely different. For example, in Android it is possible to directly access the bluetooth adapter and "manually" connect to a bonded device. In iOS, this functionality is abstracted out from the developer.
To address BTLE:
No, as of right now Sphero currently does not support BTLE hardware.

OK ... as usual this tag seems to be dead so I post my finding anyway:
Bluetooth hardware that wanted to connect to IOS, but were not following one of the standard profiles (e.g. headsets), need to conform to Apple's proprietary MFI (Made for IOS) protocol. So the connection is established by the IOS system and then it allows apps to access this connection.
But now newer IOS devices support Bluetooth LE so the MFI restriction no longer applies. I think Sphero2B is going to use this. Current Sphero hardware probably doesn't support BT LE. My next question is ... does sphero hardware support BT LE? ... but I'm not going to ask on this forum:)
Android on the other hand allows apps to negotiate the connections to paired devices.
Here's a link with more info:
Some blog

Related

Windows 10 Connect to Bluetooth Classic Device without Pairing

According to Microsoft's latest docs:
Do I have to pair Bluetooth devices before using them? You don't have
to for Bluetooth RFCOMM (classic) devices. Starting with Windows 10
release 1607, you can simply query for nearby devices and connect to
them. The updated RFCOMM Chat Sample shows this functionality.
However, when I try to connect to my devices using this chat sample, I get a notification that asks me to "set up the device", like I was going through a normal pairing process.
Am I missing something?
The snippet of code that I changed from the sample:
var rfcommServices = await bluetoothDevice.GetRfcommServicesAsync(BluetoothCacheMode.Uncached);
Taken from msdn resources:
Windows 10 Mobile is currently limited to connections with only paired
devices. In Windows 10, you can programmatically pair/unpair. See
scenarios 8 and 9:
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
Here’s is the related MSDN documentation on pairing and the relevant
device selectors for enumeration.
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.enumeration.deviceinformationpairing.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.bluetooth.bluetoothdevice.aspx
But I also know that you can use direct bluetooth connections on lower level and this way windows won't suggest you pairing. For example, that's how things work with 32feet.net library, discussed in this answer (I worked with it and it was fine, however it is currently unsupported so please beware of it).
First thing to test is the bluetooth protocol used to be RFCOMM in both client and server. Link
Check that both client and server hardware support the RFCOMM
Check the bluetooth versions in both client and server link
based on wikipedia bluetooth has many protocols.
Second is to check windows version

Does Android Wear work with geofencing without paired handheld?

According to the documentation, geofencing uses cellular network and wifi signal for detecting a location, but it seems like it doesn't work without a connected companion device.
Does Android Wear work with geofencing without paired handheld?
Update:
Just had a quick play with this, doesn't seem to work yet when BT disconnected and wifi connected.
Original reply:
Not all wear devices have the hardware to support this, though the LG urbane 2 has LTE and quite a few Wear devices support wifi.
I would think this works considering other services work that use location with wifi/gps.
Can you check these items?
Verify your Wear device supports wifi, i.e., it has a wifi chip
When disconnected, check wifi is enabled under settings (this should happen automatically)
Wait some time (even 5 mins) for a signal
More details:
If your wear device has wifi, it should actually turn on if the Wear device becomes disconnected from the phone via bluetooth. You can verify this by looking in the settings as noted above.
I have noticed with the FusedLocationProviderApi it can sometimes take quite a bit of time to switch to the on-board chip when the phone becomes disconnect, so it may be the case with the Geofencing as well. FYI, Google Play Services always uses the phone's hardware first to save battery. It only uses Wear hardware when the phone disconnects.

Windows 8.1 Bluetooth Low Energy Behavior

I'm looking into programming Bluetooh Low Energy on Windows 8.1 and have a few questions about its behavior on auto-reconnecting to BLE devices after the connection is termiated:
How long will this auto-reconnect feature timed out? Or is it as long as you subscribe to BLE notifications and attempt to read/write data to it?
Will it reconnect if I restart Windows and my application?
How many devices can Windows remember to reconnect? Is it as many as the number of devices my app can connect to?
Where did you read about auto-connecting algorithm for Bluetooth devices in Windows 8.1. As far as I know, it is not possible to perform any kind of auto-connection, so all connection establishment has to be done manually in Windows 8.1 Bluetooth settings.
If your device is in connected state and you restart your PC for some reason, it will still show your device in the list but as "Not Connected" state. So you manually have to remove the device, and then pair it again.
I made a test, where I connected to two devices and read notifications from them both at the same time. What do you mean by app ?. A Smartphone application or ?.
All in all there is a lack of efficiency using Windows 8.1 for BLE applications, since all scanning and connection establishment functionalities have to be done in Windows 8.1 settings rather than in your Windows application, which restricts some important algorithms like auto-connection based on RSSI values and so on.

Network Sharing Win 8 mobile

I found Network Sharing on Win8 mobile. (nokia Lumia)...I am trying to write similar application for Win8. But could not find any support on windows website. On Nokia website also, all I could find is how to turn on, but nothing else.
So, I have a lot of questions in my mind:
Is Network sharing is even supported by Windows or is it Nokia that has their own app to do this?
How this network sharing works? Are we tethering WLAN or something else?
Is it possible to write a similar app with the existing Win8 mobile APIs provided?
Does it use DNSMasq? ( I am assuming it is)
Is there any possible way to find the installed apps and the app structures in Win8 phone, like we have in android phones.
Network sharing is fully implemented by WP8 OS but it is under tight control from your cellular operator. You need to pay extra to enable "tethering" (here in USA). The cellular connection (4G, LTE) is then shared and your phone turns into Wi-Fi access point for other devices. When I try to enable network sharing on my HTC 8X (I am not paying for tethering), the screen flics with Wi-Fi details - tells me Wi-Fi broadcast name, password and number of guests connected - and then one second later I get a dialog from T-Mobile to go online and add tethering to my phone plan.
See above.
No, I don't think it is possible. As an app you don't have any control over network configuration.
I'd assume it provides NAT, DHCP and DNS forwarding. I don't think it uses DNSMasq code directly though. :-)
For privacy reasons you can't get a list of installed apps. Only when you are writing apps for enterprises (that don't go through Microsoft Store), you can list other apps signed with the same enterprise key. See http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207245.aspx.

WiFi: what does OS X call a "device"?

Where I work, we are building a GUI to run on iOS or Android; the GUI is intended to control an embedded board. The embedded board does not have WiFi, an Ethernet port, or a USB port, but it does have an RS-232 serial port; so we are using a product called a WiSnap.
http://serialio.com/products/mobile/wifi/WiSnapKit2.php
We have been able to connect to the WiSnap using OS X, or using iOS (an iPad 2). But none of our Android tablets recognize the device at all. The WiSnap acts as a WiFi access point, and broadcasts an SSID; the Android tablets do not list this SSID in the list of available WiFi access points. Under Linux Mint 12, my Laptop can see the WiSnap, but attempts to connect to it fail. Interestingly, my cell phone (a Droid 2) is able to see the WiSnap, but I don't have telnet on my phone so I haven't tested to see if it actually works.
Under OS X, I noticed something. In the drop-down list of WiFi access points, there are two distinct groups: the top group, which contains most of the listed WiFi access points, then a lower group, that has a sub-heading that says "Devices" and contains just the WiSnap and something called "hpsetup". (I don't know what "hpsetup" is or where it might be; there are lots of WiFi users in this neighborhood.)
The WiSnap is operating in "ad-hoc" mode with no security at all.
So, my question is: what is the significance of OS X calling the WiSnap a "device"? It is frustrating to try to search Google for "WiFi devices"; you get a giant haystack of results that are not related to this.
Also, is there anything we can do to make an Android tablet see the WiSnap and connect to it?
Can anyone recommend a good resource where I can read up on WiFi? Again Google hasn't helped much; there are so many introductions to WiFi out there, most of them at a very simple level.
Thanks for any help you can give me.
EDIT: The vendor does claim Android compatibility for some models of WiSnap, but not for others.
This lists Android as supported: http://serialio.com/products/mobile/wifi/WiSnapKit2.php
This does not: http://serialio.com/products/mobile/wifi/WiSnapAAA.php
I guess I should contact the vendor, but I do want to understand what is going on, so I was hoping to get advice from the StackOverflow community about this.
EDIT: We did contact the vendor. What we found out is that the WiSnap can be a stand-alone device only in ad-hoc mode. If you set up a WiFi router or access point, the WiSnap will join the network in infrastructure mode. But the WiSnap will not act as an infrastructure mode access point.
Android OS at the moment only supports infrastructure mode. So, if we want to use an Android tablet with a WiSnap we would have to set up some sort of WiFi router or access point. We are looking into other solutions now.
I'm relatively sure that hpsetup is the ad hoc wifi for an HP wireless printer. So perhaps the ad-hoc/peer-to-peer qualifier is what causes OS X to classify it as a device.

Resources