eclipse-kura / kura

Eclipse Kura™ is a versatile framework to supercharge your edge devices, streamlining the process of configuring your gateway, connecting sensors, and IoT devices to seamlessly collect, process, and send data to the cloud.
https://eclipse.dev/kura/
Eclipse Public License 2.0
500 stars 309 forks source link

I can't see Eddystone UID in Goolge Beacon Tools #1748

Closed Amar82 closed 6 years ago

Amar82 commented 6 years ago

I deployed the eddy stone package in my Kura 3.1.0 installed in RPi3. package location: http://download.eclipse.org/kura/releases/3.1.0/org.eclipse.kura.example.eddystone.advertiser_1.0.0.dp

While the Eddystone URL is working fine, the UID part is not working. Google Beacon Tools is not able to detect the beacon. I guess the beacon is not working when in UID option.

parameters: Minimum time interval between beacons (milliseconds) : 1000 Max Interval :1000 Tx Power: 16 dbm Namespace: 6ffecdfec9b34b8064af instance: 18df68aa4ee4

adapter : hci0

PLease help me on this.

regards Amar

pierantoniomerlino commented 6 years ago

Please refer to #308 for the logs.

@Amar82 The logs are fine and they don't report any error. Could you please enable the debug messages for the BeaconManager package and take a look on the kura.log file? From the osgi console type:

setkuraloglevel org.eclipse.kura.internal.ble.beacon.BluetoothLeBeaconManagerImpl debug

It will show the command used to enable the advertising.

If all is fine, stop the advertiser from the webUI and try to enable it manually. From a terminal on the RPi type:

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 03 03 AA FE 17 16 AA FE 00 10 6F FE CD FE C9 B3 4B 80 64 AF 18 DF 68 AA 4E E4 00 00

and

sudo hcitool -i hci0 cmd 0x08 0x000a 01

You should be able to scan the Eddystones.

Amar82 commented 6 years ago

Thanks Pier,

I ll try it and will report if anything happens.

regards Amar

On Tue, Oct 24, 2017 at 1:51 PM, Pierantonio Merlino < notifications@github.com> wrote:

Please refer to #308 https://github.com/eclipse/kura/issues/308 for the logs.

@Amar82 https://github.com/amar82 The logs are fine and they don't report any error. Could you please enable the debug messages for the BeaconManager package and take a look on the kura.log file? From the osgi console type:

setkuraloglevel org.eclipse.kura.internal.ble.beacon.BluetoothLeBeaconManagerImpl debug

It will show the command used to enable the advertising.

If all is fine, stop the advertiser from the webUI and try to enable it manually. From a terminal on the RPi type:

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 03 03 AA FE 17 16 AA FE 00 10 6F FE CD FE C9 B3 4B 80 64 AF 18 DF 68 AA 4E E4 00 00

and

sudo hcitool -i hci0 cmd 0x08 0x000a 01

You should be able to scan the Eddystones.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eclipse/kura/issues/1748#issuecomment-338912455, or mute the thread https://github.com/notifications/unsubscribe-auth/AVT5cl05nTPZop3Nof_Hx3YXM8uDZvDyks5svZ32gaJpZM4QBqty .

-- --amar

MMaiero commented 6 years ago

@Amar82 Any update on this issue?

Amar82 commented 6 years ago

Hi Pier,

Sorry for my late input, was out on a vacation :)

I tried it today and got this Kura.log below :

2017-11-07 22:43:15,875 [qtp28286371-30] INFO o.e.k.c.c.ConfigurationServiceImpl - Writing snapshot - Saving /opt/eclipse/kura/data/snapshots/snapshot_1510076595724.xml... Done. 2017-11-07 22:44:41,706 [qtp28286371-35] INFO o.e.k.c.c.ConfigurationServiceImpl - Loading init configurations from: 1510076595724... 2017-11-07 22:44:41,792 [qtp28286371-35] INFO o.e.k.c.c.ConfigurationServiceImpl - Merging configuration for pid: org.eclipse.kura.example.eddystone.advertiser.EddystoneAdvertiser 2017-11-07 22:44:41,812 [qtp28286371-35] INFO o.e.k.c.c.ConfigurationServiceImpl - Updating Configuration of ConfigurableComponent org.eclipse.kura.example.eddystone.advertiser.EddystoneAdvertiser ... Done. 2017-11-07 22:44:41,818 [Component Resolve Thread (Bundle 7)] INFO o.e.k.e.e.a.EddystoneAdvertiser - Updating Bluetooth Eddystone example... 2017-11-07 22:44:41,818 [Component Resolve Thread (Bundle 7)] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Stop Advertising : hcitool -i hci0 cmd 0x08 0x000a 00 2017-11-07 22:44:41,818 [Component Resolve Thread (Bundle 7)] INFO o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Stop Advertising on interface hci0 2017-11-07 22:44:41,825 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command response : < HCI Command: ogf 0x08, ocf 0x000a, plen 1 00

HCI Event: 0x0e plen 4 01 0A 20 0C

2017-11-07 22:44:41,829 [Component Resolve Thread (Bundle 7)] INFO o.e.k.e.e.a.EddystoneAdvertiser - Bluetooth adapter interface => hci0 2017-11-07 22:44:41,830 [Component Resolve Thread (Bundle 7)] INFO o.e.k.e.e.a.EddystoneAdvertiser - Bluetooth adapter address => B8:27:EB:F8:97:5C 2017-11-07 22:44:41,833 [Component Resolve Thread (Bundle 7)] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Set Advertising Data : hcitool -i hci0 cmd 0x08 0x0008 [1E, 02, 01, 1A, 03, 03, AA, FE, 17, 16, AA, FE, 00, 10, 6F, FE, CD, FE, C9, B3, 4B, 80, 64, AF, 18, DF, 68, AA, 4E, E4, 00, 00] 2017-11-07 22:44:41,834 [Component Resolve Thread (Bundle 7)] INFO o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Set Advertising Data on interface hci0 2017-11-07 22:44:41,834 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command ogf 0x08, ocf 0x000a failed. Error: Command Disallowed (0C) 2017-11-07 22:44:41,846 [Component Resolve Thread (Bundle 7)] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Set Advertising Parameters : hcitool -i hci0 cmd 0x08 0x0006 40 06 40 06 03 00 00 00 00 00 00 00 00 07 00 2017-11-07 22:44:41,846 [Component Resolve Thread (Bundle 7)] INFO o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Set Advertising Parameters on interface hci0 2017-11-07 22:44:41,852 [Component Resolve Thread (Bundle 7)] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Start Advertising : hcitool -i hci0 cmd 0x08 0x000a 01 2017-11-07 22:44:41,854 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command response : < HCI Command: ogf 0x08, ocf 0x0006, plen 15 40 06 40 06 03 00 00 00 00 00 00 00 00 07 00

HCI Event: 0x0e plen 4 01 06 20 00

2017-11-07 22:44:41,854 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command response : < HCI Command: ogf 0x08, ocf 0x0008, plen 32 1E 02 01 1A 03 03 AA FE 17 16 AA FE 00 10 6F FE CD FE C9 B3 4B 80 64 AF 18 DF 68 AA 4E E4 00 00

HCI Event: 0x0e plen 4 01 08 20 00

2017-11-07 22:44:41,860 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command ogf 0x08, ocf 0x0008 Succeeded. 2017-11-07 22:44:41,854 [Component Resolve Thread (Bundle 7)] INFO o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Start Advertising on interface hci0 2017-11-07 22:44:41,860 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command ogf 0x08, ocf 0x0006 Succeeded. 2017-11-07 22:44:41,866 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command response : < HCI Command: ogf 0x08, ocf 0x000a, plen 1 01

HCI Event: 0x0e plen 4 01 0A 20 00

2017-11-07 22:44:41,866 [BluetoothProcess Input Stream Gobbler] DEBUG o.e.k.i.b.b.BluetoothLeBeaconManagerImpl - Command ogf 0x08, ocf 0x000a Succeeded. 2017-11-07 22:44:41,889 [qtp28286371-35] INFO o.e.k.c.c.ConfigurationServiceImpl - Writing snapshot - Saving /opt/eclipse/kura/data/snapshots/snapshot_1510076681813.xml... 2017-11-07 22:44:41,920 [qtp28286371-35] INFO o.e.k.c.c.ConfigurationServiceImpl - Writing snapshot - Saving /opt/eclipse/kura/data/snapshots/snapshot_1510076681813.xml... Done. 2017-11-07 22:44:41,921 [qtp28286371-35] INFO o.e.k.c.c.ConfigurationServiceImpl - Snapshots Garbage Collector. Deleting /opt/eclipse/kura/data/snapshots/snapshot_1508903956610.xml

==== only problem I could find was : Command ogf 0x08, ocf 0x000a failed. Error: Command Disallowed (0C)

Still I cant find the UID in beacon tools.

Amar82 commented 6 years ago

Even I tried the command line options, still UID is not visible in Beacon tools. Seems some problem with my Pi3 B+ itself ...

pi@raspberrypi:/var/log $ sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 03 03 AA FE 17 16 AA FE 00 10 6F FE CD FE C9 B3 4B 80 64 AF 18 DF 68 AA 4E E4 00 00 < HCI Command: ogf 0x08, ocf 0x0008, plen 32 1E 02 01 1A 03 03 AA FE 17 16 AA FE 00 10 6F FE CD FE C9 B3 4B 80 64 AF 18 DF 68 AA 4E E4 00 00

HCI Event: 0x0e plen 4 01 08 20 00 pi@raspberrypi:/var/log $ sudo hcitool -i hci0 cmd 0x08 0x000a 01 < HCI Command: ogf 0x08, ocf 0x000a, plen 1 01 HCI Event: 0x0e plen 4 01 0A 20 00 pi@raspberrypi:/var/log $

But I am not getting how come Eddy URL is working in my Pi .

Any clue ?

regards Amar

pierantoniomerlino commented 6 years ago

Hi,

the Command ogf 0x08, ocf 0x000a failed. Error: Command Disallowed (0C) occurs when Kura tries to switch off the advertising when it is already switched off.

The commands you type on the terminal are correct and the outputs don't show any problem. I checked them on my RPi and I'm able to detect the Eddystone with nRFConnect app. So, I think that there is a problem with your system. Can you try with a different device?

MMaiero commented 6 years ago

I think we can close for now. @Amar82 feel free to reopen it, if needed.

Amar82 commented 6 years ago

Yes ..Please close this . Thank you for your help and support .. I really appreciate your effort. I will buy a new Pi and try it. regards Amar