Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
835 stars 451 forks source link

Timeout while connecting to beacon. #228

Closed leonardojpr closed 7 years ago

leonardojpr commented 7 years ago

EDIT : Nfc gives the mac address of the device inverted because? nfc macAddress=[9A:30:CE:4D:90:CE], BeaconManager macAddress=[CE:90:4D:CE:30:9A]


Hi, I have the following problem, I am using the NFC module to get the deviceID and the MacAddress, which I use when instantiating the DeviceConfigurable class, being as follows

 ConfigurableDevice configurableDevice = new ConfigurableDevice (DeviceType.LOCATION_BEACON, beaconId, macAddress, "", ""); The class is instantiated correctly, but when performing the following operation

DeviceConnection = deviceConnectionProvider.getConnection (configurableDevice);
 DeviceConnection.connect

I get

 DeviceConnectionListener: onConnectedFailed: [476923b48d9087f93dbea2e4e830av67] com.estimote.mgmtsdk.common.exceptions.DeviceConnectionException: Timeout while connecting to beacon.

It is worth mentioning that by this method I can connect to the device correctly.

BeaconManager.setConfigurableDevicesListener (new BeaconManager.ConfigurableDevicesListener () {
            @Override
            Public void onConfigurableDevicesFound (final List <ConfigurableDevice> list) {
                TransferDeviceInformation (list);
            }
        });

Will I need to add these variables

String appVersion

,

String bootloaderVersion

? When instantiating the DeviceConfigurable class? If so, where do I get them?

I followed this guide (http://developer.estimote.com/android/nfc/)

pawelDylag commented 7 years ago

Hey @leonardojpr

I hope you managed to deal with this problem. The only way to connect to a ConfigurableDevice is to scan it via our BeaconManager scanner. Instantiating this object by yourself won't work.

So - you should use the second method you posted above :)