Comments (11)
Hi @gerrik84, thank you for looking at our project. That error is an indication that the path in the JSON does not point to the library file.
The two most likely reason I can think of are:
- file is missing (build error), or
gateway_sample.json
has an error in it.
Based on your output, the module path in the gateway_sample.json should look like this:
"module name": "IoTHub",
"module path": "/home/root/azure-iot-gateway-sdk/build/modules/iothub/libiothub_hl.so",
Please check to make sure the file exists at /home/root/azure-iot-gateway-sdk/build/modules/iothub/libiothub_hl.so
Otherwise, please edit ./samples/ble_gateway_hl/src/gateway_sample.json
and confirm it is set to the text above. Note that the gateway_sample.json
as saved in the repository has placeholders for the module paths, and not the actual file paths.
If those actions don't solve the problem, please post here again, and we'll continue to debug the problem.
Thanks,
Dave (@darobs)
from iot-edge-v1.
Thanks for your quick answear,
i looked up the module path there is no libiothub_hl.so even the directory /home/root/azure-iot-gateway-sdk/build/modules/iothub dont exists. In my case the only directory where i can find a libiothub file is in azure-iot-gateway-sdk/build/modules/iothubhttp/libiothubhttp_hl.so
so i changed my gateway_sample.json to
{
"module name": "IoTHub",
"module path": "/home/root/azure-iot-gateway-sdk/build/modules/iothubhttp/libiothubhttp_hl.so",
"args": {
"IoTHubName": "XXXXXX",
"IoTHubSuffix": "azure-devices.net",
"Transport": "HTTP"
}
if i run the sample again i get the following
hl ./samples/ble_gateway_hl/src/gateway_sample.jsons/ble_gateway_hl/ble_gateway
Gateway is running.
Error: Time:Fri Sep 30 07:47:10 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble_gatt_io_linux_read.c Func:BLEIO_gatt_read_char_by_uuid Line:155 g_tree_lookup() failed.
Error: Time:Fri Sep 30 07:47:10 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux_schedule_read.c Func:schedule_read Line:119 BLEIO_gatt_read_char_by_uuid failed with 153.
Error: Time:Fri Sep 30 07:47:10 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux.c Func:BLEIO_Seq_Run Line:329 An error occurred while scheduling an instruction of type 0 for characteristic 00002A24-0000-1000-8000-00805F9B34FB
Error: Time:Fri Sep 30 07:47:10 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble.c Func:on_connect_complete Line:370 BLEIO_Seq_Run failed
i checked the connection to my ble device and it is connected and the mac adress is correct.
i dont use any build flags so why do i have a diffrent directory for my libiothub_hl.so ? Maybe because of the "Transport": "HTTP" in my json ?
from iot-edge-v1.
the uuid is from https://azure.microsoft.com/en-us/documentation/articles/iot-hub-gateway-sdk-physical-device/ and i use the same device like in the documentation.
from iot-edge-v1.
Some of the problems I've run into:
- If you're using a SensorTag, it will power down if it's inactive for a while, and I've seen a similar error.
- I connected to the SensorTag to another device, and it needs to be reconnected to the gateway device.
There are probably more ways for this setup to fail, but those are the problems I've had, barring the ones you've already confirmed aren't a problem (like incorrect MAC Address).
One thing I noticed is that there was a new commit on the main branch since you cloned the repository, and the documents you're looking at were also updated with that push to main - that's the reason why it didn't find the iothub module when you followed the instructions. As far as I know, the BLE module has not had any bug fixes to the BLE module in recent weeks, so it's unlikely that a slightly older commit is causing Bluetooth problems.
That's all I have for now. If that doesn't help resolve your problem, I'll contact the module author for more advice.
from iot-edge-v1.
i have double checked the output with the bluetoothctl console.
when i start the ble_gateway_hl and the bluetooth device is not connected i get this
Gateway is running.
Error: Time:Sat Oct 1 08:17:21 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble_gatt_io_linux_connect.c Func:on_sequence_error Line:447 Connect failed with - Timeout was reached
Error: Time:Sat Oct 1 08:17:21 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble.c Func:on_connect_complete Line:361 BLEIO_gatt_connect asynchronously failed
Info: Caught ctrl+c - quitting...
Gateway is quitting
Error: Time:Sat Oct 1 08:18:49 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble_gatt_io_linux_write.c Func:BLEIO_gatt_write_char_by_uuid Line:189 Invalid args or the state of the object is unexpected.
Error: Time:Sat Oct 1 08:18:49 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux_schedule_write.c Func:schedule_write Line:125 BLEIO_gatt_write_char_by_uuid failed with 188.
Error: Time:Sat Oct 1 08:18:49 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux.c Func:BLEIO_Seq_Destroy Line:224 Scheduling WRITE_AT_EXIT instruction at index 8 failed.
Info: Waiting for sequence to be destroyed...
Info: Done waiting for sequence to be destroyed.
When i activate the ble device and run the ble_gateway_hl i get this on the bluetoothctl console
[CHG] Device B0:B4:48:EE:01:84 Connected: yes
[CHG] Device B0:B4:48:EE:01:84 Connected: no
[bluetooth]# ble_gateway_hl
And the ble_gateway_hl output is
Gateway is running.
Error: Time:Sat Oct 1 08:28:39 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble_gatt_io_linux_read.c Func:BLEIO_gatt_read_char_by_uuid Line:155 g_tree_lookup() failed.
Error: Time:Sat Oct 1 08:28:39 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux_schedule_read.c Func:schedule_read Line:119 BLEIO_gatt_read_char_by_uuid failed with 153.
Error: Time:Sat Oct 1 08:28:39 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux.c Func:BLEIO_Seq_Run Line:329 An error occurred while scheduling an instruction of type 0 for characteristic 00002A24-0000-1000-8000-00805F9B34FB
Error: Time:Sat Oct 1 08:28:39 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble.c Func:on_connect_complete Line:370 BLEIO_Seq_Run failed
^CInfo: Caught ctrl+c - quitting...
Gateway is quitting
Error: Time:Sat Oct 1 08:28:48 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble_gatt_io_linux_write.c Func:BLEIO_gatt_write_char_by_uuid Line:176 g_tree_lookup() failed.
Error: Time:Sat Oct 1 08:28:48 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux_schedule_write.c Func:schedule_write Line:125 BLEIO_gatt_write_char_by_uuid failed with 174.
Error: Time:Sat Oct 1 08:28:48 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/bleio_seq_linux.c Func:BLEIO_Seq_Destroy Line:224 Scheduling WRITE_AT_EXIT instruction at index 8 failed.
Info: Waiting for sequence to be destroyed...
Info: Done waiting for sequence to be destroyed.
so it seems the dive is connected but the uuids cant be passed to the device ?
from iot-edge-v1.
We have a reproduction here, so we will be continuing to investigate this. I've also reached out to the module writer to see if he has steps to find the problem.
Thanks,
Dave
from iot-edge-v1.
Hello again @gerrik84, we're still looking into this. I did have some questions, if you don't mind:
What platform are you using? Which BLE device? We reproduced the problem, but we want to make sure what we find applies to your problem.
Also, something worth trying might be to run bluetoothctl
and then run the list-attributes
to cause the Bluetooth engine to cache the characteristics, i.e., there should be some output from list-attributes. After that g_tree_lookup() should be able to find the characteristics.
from iot-edge-v1.
Hello,
as gateway i use a Intel Edison with a custom yocto image and bluez 5.34. On the sensor side i use TI CC2650 with FW Version 1.20.
When i connect to my sensor on the bluetooth shell i can execute the list-attribute command but nothing is returned. When i try the same via gattool i get :
handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, char properties: 0x02, char value handle: 0x0005, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0006, char properties: 0x02, char value handle: 0x0007, uuid: 00002a04-0000-1000-8000-00805f9b34fb
handle: 0x0009, char properties: 0x20, char value handle: 0x000a, uuid: 00002a05-0000-1000-8000-00805f9b34fb
handle: 0x000d, char properties: 0x02, char value handle: 0x000e, uuid: 00002a23-0000-1000-8000-00805f9b34fb
handle: 0x000f, char properties: 0x02, char value handle: 0x0010, uuid: 00002a24-0000-1000-8000-00805f9b34fb
handle: 0x0011, char properties: 0x02, char value handle: 0x0012, uuid: 00002a25-0000-1000-8000-00805f9b34fb
handle: 0x0013, char properties: 0x02, char value handle: 0x0014, uuid: 00002a26-0000-1000-8000-00805f9b34fb
handle: 0x0015, char properties: 0x02, char value handle: 0x0016, uuid: 00002a27-0000-1000-8000-00805f9b34fb
handle: 0x0017, char properties: 0x02, char value handle: 0x0018, uuid: 00002a28-0000-1000-8000-00805f9b34fb
handle: 0x0019, char properties: 0x02, char value handle: 0x001a, uuid: 00002a29-0000-1000-8000-00805f9b34fb
handle: 0x001b, char properties: 0x02, char value handle: 0x001c, uuid: 00002a2a-0000-1000-8000-00805f9b34fb
handle: 0x001d, char properties: 0x02, char value handle: 0x001e, uuid: 00002a50-0000-1000-8000-00805f9b34fb
handle: 0x0020, char properties: 0x12, char value handle: 0x0021, uuid: f000aa01-0451-4000-b000-000000000000
handle: 0x0023, char properties: 0x0a, char value handle: 0x0024, uuid: f000aa02-0451-4000-b000-000000000000
handle: 0x0025, char properties: 0x0a, char value handle: 0x0026, uuid: f000aa03-0451-4000-b000-000000000000
handle: 0x0028, char properties: 0x12, char value handle: 0x0029, uuid: f000aa21-0451-4000-b000-000000000000
handle: 0x002b, char properties: 0x0a, char value handle: 0x002c, uuid: f000aa22-0451-4000-b000-000000000000
handle: 0x002d, char properties: 0x0a, char value handle: 0x002e, uuid: f000aa23-0451-4000-b000-000000000000
handle: 0x0030, char properties: 0x12, char value handle: 0x0031, uuid: f000aa41-0451-4000-b000-000000000000
handle: 0x0033, char properties: 0x0a, char value handle: 0x0034, uuid: f000aa42-0451-4000-b000-000000000000
handle: 0x0035, char properties: 0x0a, char value handle: 0x0036, uuid: f000aa44-0451-4000-b000-000000000000
handle: 0x0038, char properties: 0x12, char value handle: 0x0039, uuid: f000aa81-0451-4000-b000-000000000000
handle: 0x003b, char properties: 0x0a, char value handle: 0x003c, uuid: f000aa82-0451-4000-b000-000000000000
handle: 0x003d, char properties: 0x0a, char value handle: 0x003e, uuid: f000aa83-0451-4000-b000-000000000000
handle: 0x0040, char properties: 0x12, char value handle: 0x0041, uuid: f000aa71-0451-4000-b000-000000000000
handle: 0x0043, char properties: 0x0a, char value handle: 0x0044, uuid: f000aa72-0451-4000-b000-000000000000
handle: 0x0045, char properties: 0x0a, char value handle: 0x0046, uuid: f000aa73-0451-4000-b000-000000000000
handle: 0x0048, char properties: 0x10, char value handle: 0x0049, uuid: 0000ffe1-0000-1000-8000-00805f9b34fb
handle: 0x004d, char properties: 0x0a, char value handle: 0x004e, uuid: f000aa65-0451-4000-b000-000000000000
handle: 0x004f, char properties: 0x0a, char value handle: 0x0050, uuid: f000aa66-0451-4000-b000-000000000000
handle: 0x0052, char properties: 0x1a, char value handle: 0x0053, uuid: f000ac01-0451-4000-b000-000000000000
handle: 0x0055, char properties: 0x0a, char value handle: 0x0056, uuid: f000ac02-0451-4000-b000-000000000000
handle: 0x0057, char properties: 0x0a, char value handle: 0x0058, uuid: f000ac03-0451-4000-b000-000000000000
handle: 0x005a, char properties: 0x12, char value handle: 0x005b, uuid: f000ccc1-0451-4000-b000-000000000000
handle: 0x005d, char properties: 0x08, char value handle: 0x005e, uuid: f000ccc2-0451-4000-b000-000000000000
handle: 0x005f, char properties: 0x08, char value handle: 0x0060, uuid: f000ccc3-0451-4000-b000-000000000000
handle: 0x0062, char properties: 0x1c, char value handle: 0x0063, uuid: f000ffc1-0451-4000-b000-000000000000
handle: 0x0066, char properties: 0x1c, char value handle: 0x0067, uuid: f000ffc2-0451-4000-b000-000000000000
After that i have the same behaviour....
from iot-edge-v1.
Thank you, @gerrik84 - I've got our board reproducing something similar, although we have a slightly newer version of bluez.
from iot-edge-v1.
Hi @gerrik84 - The problem is our code is reliant on the DBus-Bluez interface as defined in release 5.37. That interface has changed such that 5.34 isn't compatibly with our BLE module. We have tested and support BlueZ version 5.37, is it possible for you to update to 5.37?
I've also discovered we have a similar issue with 5.42. I've created a PBI in our backlog to do better discovery and find a better way to handle different versions of BlueZ.
As of this time, I don't have a better solution for you than to upgrade BlueZ to 5.37, and to tell you we've added the work to support other versions to our task queue.
from iot-edge-v1.
Hi, sorry that it took me so long to replay...
at first thanks for your efforts. I changed the bluez version to 5.37 and unfortunately nothing changed, i get the same error again:
[NEW] Controller 58:A8:39:00:43:DB TransAM [default]
[NEW] Device B0:B4:48:EE:01:84 CC2650 SensorTag
[bluetooth]# exit
{
"module name": "SensorTag",
"module path": "/home/root/azure-iot-gateway-sdk/build/modules/ble/libble_hl.so",
"args": {
"controller_index": 0,
"device_mac_address": "B0:B4:48:EE:01:84",
"instructions": [
{
"type": "read_once",
"characteristic_uuid": "00002A24-0000-1000-8000-00805F9B34FB"
},
{
"type": "read_once",
"characteristic_uuid": "00002A25-0000-1000-8000-00805F9B34FB"
},
{
"type": "read_once",
"characteristic_uuid": "00002A26-0000-1000-8000-00805F9B34FB"
}, .......
:~/azure-iot-gateway-sdk# ./build/samples/ble_gateway_hl/ble_gateway_hl ./samples/ble_gateway_hl/src/gateway_sample.json
Gateway is running.
Error: Time:Fri Nov 11 13:32:32 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble_gatt_io_linux_connect.c Func:on_sequence_error Line:447 Connect failed with - Timeout was reached
Error: Time:Fri Nov 11 13:32:32 2016 File:/home/root/azure-iot-gateway-sdk/modules/ble/src/ble.c Func:on_connect_complete Line:361 BLEIO_gatt_connect asynchronously failed
from iot-edge-v1.
Related Issues (20)
- iotedge deployment issues with ML module HOT 4
- Cannot Send or receive messages after deploying IoT Edge HOT 1
- EdgeHub module was not able to start HOT 2
- IOT-Edge Hub back-off state HOT 2
- [V1] Gateway not starting after adding 511+ modules HOT 2
- edgeHub not getting started : Container Not Found HOT 3
- Failed to enable prov client and custom HSM module on IoT Edge SDK HOT 2
- running simulated_device_cloud_upload_sample gets run-time errors
- IoT Edge docker failure on Windows IoT Core Build Version- 10.0.17763.17 HOT 1
- It seems that Desired Properties doesn't work HOT 3
- SimulatedTemperatureSensor fails while following QuickStart guide HOT 1
- azure-c-shared-utility changed constbuffer from CLONE to INC_REF/DEC_REF HOT 1
- Feather m0 mqtt_client timed out waiting for CONNACK HOT 1
- When the edge module is configured to host mode, edgehub cannot be used for communication
- java custom module occur faild on raspberry pi
- Azure marketplace source link not work for Simulated Temperature Sensor
- edge c-sample module will appear fail
- Invalid or corrupt jarfile gateway.jar
- Azure iot edge not running on raspberry pi when MQTT dependency is added in pom.xml
- Azure IoT Module with iotedgehubdev throws an error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iot-edge-v1.