On 9 Oct 2015, at 20:28, Longway Shortname < email@hidden> wrote:
Hello, I am currently developing a BLE application which advertising customer specific data with the company identifier 0x024D. The advertising packet only consists of the flags and the mentioned manufacturer specific data. I’ve noticed that the latest version of OS X sends a scan request to these devices which I answer with an empty response. Afterwards it will connect to my devices and will write some data to them. I do not answer this data and OS X stays connected to this device for a very long time. I haven’t noticed any disconnect yet. Is this a new behaviour introduced in the latest version of the OS? If yes, I think that this behaviour should be reconsidered because I think that only advertsiing packets of interest should be ansered and not every device should be connected. Otherwise, this will lead to serious troubles. Marius
Is your device supposed to be connectable at all? If not, then change the advertising type to non-connectable. It’s legitimate for the device to be sent a scan request to find out if there’s more advertising data and legitimate for you to return no data, so that bit’s ok.
if it is supposed to be connectable then what is the data which is being written to it, the data you’re not answering? I would expect if OSX connects to the device then the first and possibly only thing it’s going to do is find out what services it’s exporting. You have to answer those requests, that’s a requirement for being a GAP server. If you’re doing all that and OSX is then trying to use the services or stay connected to the device, then that looks wrong. Would be helpful to see more of the data dump.
It does seem a little aggressive, connecting to everything, and it may well be something new in El Capitan, perhaps an attempt to find devices it cares about even if they aren’t advertising services in the advertising packet, by connecting to them once and reading the attribute table.
And lastly you don’t have any user-mode software running on your machine which might be doing this? I’ve left things running before now and made myself very confused. |