Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Kura 3.1.0, Raspi3, Sensortag connectivity Problem(Error when trying to connect sensortag)
Kura 3.1.0, Raspi3, Sensortag connectivity Problem [message #1779535] Tue, 09 January 2018 11:30 Go to next message
Adrian Lim is currently offline Adrian LimFriend
Messages: 5
Registered: January 2018
Junior Member
Hi, thanks in advance for any help.
I am trying to connect the sensortag 2650 to my raspberry Pi3.
Environment is:
Kura 3.1.0
bluetoothctl --version 5.43
org.eclipse.kura.driver.ble.sensortag driver installed
org.eclipse.kura.example.ble.tisensortag.tinyb Kura interface installed

getting the following errors in /var/log/kura.log

2018-01-09 19:15:06,312 [pool-18-thread-1] ERROR o.e.k.e.b.t.t.BluetoothLe - Scan for devices failed
2018-01-09 19:15:12,027 [pool-24-thread-1] ERROR o.e.k.e.b.t.t.TiSensorTag - Connection failed
2018-01-09 19:15:17,047 [pool-24-thread-1] ERROR o.e.k.e.b.t.t.TiSensorTag - Failed to get GATT service

When i check the bluetooth interface using sudo hcitool lescan, it is UP

Would appreciate any pointers TQ.
Re: Kura 3.1.0, Raspi3, Sensortag connectivity Problem [message #1779646 is a reply to message #1779535] Wed, 10 January 2018 17:41 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi,
do you see any error in the kura-console.log file?

Best regards,
Matteo
Re: Kura 3.1.0, Raspi3, Sensortag connectivity Problem [message #1779669 is a reply to message #1779646] Thu, 11 January 2018 02:34 Go to previous messageGo to next message
Adrian Lim is currently offline Adrian LimFriend
Messages: 5
Registered: January 2018
Junior Member
Hi Matteo,
no errors in kura-console.log. Below are more details on the connection failed......

ERROR o.e.k.e.b.t.t.TiSensorTag - Connection failed
org.eclipse.kura.KuraBluetoothConnectionException: Error during BLE connection.
at org.eclipse.kura.internal.ble.BluetoothLeDeviceImpl.connect(BluetoothLeDeviceImpl.java:78)
at org.eclipse.kura.example.ble.tisensortag.tinyb.TiSensorTag.connect(TiSensorTag.java:89)
at org.eclipse.kura.example.ble.tisensortag.tinyb.BluetoothLe.readSensorTags(BluetoothLe.java:254)
at org.eclipse.kura.example.ble.tisensortag.tinyb.BluetoothLe.performScan(BluetoothLe.java:192)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: tinyb.BluetoothException: GDBus.Error:org.bluez.Error.Failed: Operation already in progress
at tinyb.BluetoothDevice.connect(Native Method)

thx and rgds adrian
Re: Kura 3.1.0, Raspi3, Sensortag connectivity Problem [message #1779696 is a reply to message #1779669] Thu, 11 January 2018 09:50 Go to previous messageGo to next message
Adrian Lim is currently offline Adrian LimFriend
Messages: 5
Registered: January 2018
Junior Member
Hi Matteo,

i used a second SDcard running Kura 3.1.1 and getting a different error which seems to point towards bluetooth as per below log file snippet from kura.log. Running sudo hcitool lescan does discover the sensortag though.

2018-01-11 01:44:53,776 [pool-24-thread-1] INFO o.e.k.e.b.t.t.BluetoothLe - Connecting to TiSensorTag 24:71:89:07:36:85...
2018-01-11 01:44:59,833 [pool-24-thread-1] ERROR o.e.k.e.b.t.t.TiSensorTag - Failed to get GATT service
org.eclipse.kura.KuraBluetoothResourceNotFoundException: BLE resource not found.
at org.eclipse.kura.internal.ble.BluetoothLeDeviceImpl.findService(BluetoothLeDeviceImpl.java:46)
at org.eclipse.kura.example.ble.tisensortag.tinyb.TiSensorTag.getGattServices(TiSensorTag.java:1475)
at org.eclipse.kura.example.ble.tisensortag.tinyb.TiSensorTag.connect(TiSensorTag.java:95)
at org.eclipse.kura.example.ble.tisensortag.tinyb.BluetoothLe.readSensorTags(BluetoothLe.java:254)

rgds adrian
Re: Kura 3.1.0, Raspi3, Sensortag connectivity Problem [message #1779860 is a reply to message #1779696] Mon, 15 January 2018 01:23 Go to previous messageGo to next message
Adrian Lim is currently offline Adrian LimFriend
Messages: 5
Registered: January 2018
Junior Member
Hi,

any pointers on the above connectivity problem? I followed the instructions at
http://eclipse.github.io/kura/intro/raspberry-pi-quick-start.html

added the sensortag driver packages as well as the sensortag example package from
https://marketplace.eclipse.org/category/categories/eclipse-kura

added the driver and asset in the kura web interface.

maybe i am setting something up wrongly......

rgds adrian
Re: Kura 3.1.0, Raspi3, Sensortag connectivity Problem [message #1779965 is a reply to message #1779860] Tue, 16 January 2018 09:14 Go to previous messageGo to next message
Pierantonio Merlino is currently offline Pierantonio MerlinoFriend
Messages: 39
Registered: March 2016
Member
Hi,

when Kura tries to connect to the device, the green led on the SensorTag is blinking?
In my experience, sometimes Kura performs a connection to the BLE device (and the green led on the SensorTag switches off), but it is unable to communicate and reports such exception. If so, try to reset the BLE device pressing the left button or removing the battery. Then insert the battery and wait until Kura tries to connect again.

Best,
Pier

Re: Kura 3.1.0, Raspi3, Sensortag connectivity Problem [message #1780068 is a reply to message #1779965] Wed, 17 January 2018 04:28 Go to previous message
Adrian Lim is currently offline Adrian LimFriend
Messages: 5
Registered: January 2018
Junior Member
Hi Pier,

thanks for your help as now it is partially working!
the sensortag green led is blinking when kura was trying to connect to the device. I removed the battery on the sensortag and reinserted and now it works in that kura.log reports the values are being read from the sensortag.

However, in the "Drivers and Assets" section of the Kura web page, when i try to read the device Data I get an "org.eclipse.kura.web.client.ui.EntryClassUi: A generic unrecoverable error happened. Please refer to the device log"

kura.log has the below
org.eclipse.kura.KuraBluetoothDiscoveryException: Error during discovery procedure.
at org.eclipse.kura.internal.ble.BluetoothLeAdapterImpl$BluetoothFuture.run(BluetoothLeAdapterImpl.java:232)
... 1 more
2018-01-16 20:22:05,862 [qtp23450296-108] WARN o.e.k.i.d.b.s.SensorTagDriver - SensortTag Read Operation Failed
2018-01-16 20:22:10,831 [Thread-489] ERROR o.e.k.i.b.BluetoothLeAdapterImpl - Stop discovery failed
tinyb.BluetoothException: GDBus.Error:org.bluez.Error.Failed: No discovery started
at tinyb.BluetoothAdapter.stopDiscovery(Native Method)
at org.eclipse.kura.internal.ble.BluetoothLeAdapterImpl$BluetoothFuture.run(BluetoothLeAdapterImpl.java:249)
at java.lang.Thread.run(Thread.java:745)
2018-01-16 20:22:10,834 [Thread-490] ERROR o.e.k.i.b.BluetoothLeAdapterImpl - Stop discovery failed
tinyb.BluetoothException: GDBus.Error:org.bluez.Error.Failed: No discovery started
at tinyb.BluetoothAdapter.stopDiscovery(Native Method)

the sensortag data like temperature etc is being written to the log so the problem is now on the "UI" level data discovery.
So almost there!....any pointers on this?

rgds adrian

[Updated on: Wed, 17 January 2018 05:30]

Report message to a moderator

Previous Topic:Kura Modbus
Next Topic:REST Services
Goto Forum:
  


Current Time: Thu Apr 25 21:07:57 GMT 2024

Powered by FUDForum. Page generated in 0.03722 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top