AirconsoleMgr cannot scanForDevices twice

Questions, FAQ, Feature Requests and Troubleshooting for Airconsole

Moderator: sergey

granoff
Posts: 5
Joined: Wed Apr 08, 2015 6:44 am

AirconsoleMgr cannot scanForDevices twice

Postby granoff » Wed Apr 08, 2015 7:01 am

Hi,

We're using Airconsole SDK v1.43 for iOS. We have it working pretty well, but have a couple issues/questions.

We select an available device (from perhaps many available, each connected to its own Airconsole2) from a table view whose controller instantiates an AirconsoleMgr. When devices are detected, their names are used to populate the table. When a device is selected from the table, we create an AirconsoleSession from the associated device, call -stopScanning on the AirconsoleMgr, and pop the controller.

The AirconsoleMgr object is kept around, in the controller, as the controller is re-used if need be. However, when we call -stopScanning, we get a -deviceRemoved callback for each device previously detected. Is that supposed to happen, and what does it mean?

Interesting, the device selected, to which we have an AirconsoleSession object attached, is still able to be communicated with.

Now, if we go back to the table view, and call -scanForDevices again, no devices are detected. Is that a bug?

Or, is there no need to keep the AirconsoleMgr around for the lifetime of any AirconsoleSession objects created? Put another way, each time we present our table of available devices to select, should we be creating a new AirconsoleMgr?

Thanks!
-Mark

BillFulton
Posts: 12
Joined: Fri Mar 27, 2015 10:00 am

Re: AirconsoleMgr cannot scanForDevices twice

Postby BillFulton » Wed Apr 08, 2015 3:51 pm

I have the same question exactly.

daniel
Posts: 127
Joined: Wed Jul 27, 2011 9:33 am

Re: AirconsoleMgr cannot scanForDevices twice

Postby daniel » Sun Apr 12, 2015 10:36 pm

The deviceAdded and deviceRemoved are probably misnomers - in reality they indicate that a device is "discovered" or not. When stopScanning is called, the available device list is emptied as we cannot be sure if the device is still present. I think this is probably a bug and will be fixed in an upcoming SDK release.

The latest SDK version is 1.51 but for some reason this is not showing up on the website at the moment - we will get this fixed shortly. It contains several updates which fix some crashes in edge cases and adds multi-port support

You are right to keep the AirconsoleMgr class around - you should only ever have one copy of this class around as it encapsulates the CBCentral class for communicating with BT devices


Return to “Airconsole”

Who is online

Users browsing this forum: No registered users and 41 guests