Open taha633 opened 4 years ago
Hi. Lately, I didn't update the installation steps. I help you, we can figure it out together. Please contact me directly on my email address.
Hi Again! and thank you for your kindly response I face a lot of error in cloning ble_gateway step in your setup.sh for rpi raspbian stretch
for example, one and maybe last error relative to os, in output print like this: no compatible with your operating system and in parentheses print (os=darwin ...)
can you send me complete steps or setup for install on raspbian stretch?
thanks in advanced.
On Tue, Jan 28, 2020 at 7:25 PM Bogdan Oniga notifications@github.com wrote:
Hi. Lately, I didn't update the installation steps. I help you, we can figure it out together. Please contact me directly on my email address.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7UC6KHR4B3ADOSNIF3RABIO3A5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKD22JA#issuecomment-579317028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHNA7QEUX57DXWQ5F2V45LRABIO3ANCNFSM4KMUWEHA .
-- Best Regards,
Zoheir Morshedi.
hi, the output of npm install command is:
usb@1.6.2 install /usr/share/ble_gateway/node_modules/usb prebuild-install --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install info looking for cached prebuild @
/home/pi/.npm/_prebuilds/4e449c-usb-v1.6.2-node-v79-linux-arm.tar.gz
prebuild-install http request GET
https://github.com/tessel/node-usb/releases/download/v1.6.2/usb-v1.6.2-node-v79-linux-arm.tar.gz
prebuild-install http 404
https://github.com/tessel/node-usb/releases/download/v1.6.2/usb-v1.6.2-node-v79-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=13.7.0
runtime=node arch=arm libc= platform=linux)
make: Entering directory '/usr/share/ble_gateway/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function 'void
handleHotplug(std::pair<libusb_device, libusb_hotplug_event>)':
../src/node_usb.cc:151:58: warning: 'v8::Local~~~
CXX(target) Release/obj.target/usb_bindings/src/device.o
../src/device.cc: In static member function 'static void
Req::default_after(uv_work_t~~~
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
../src/transfer.cc: In function 'void handleCompletion(Transfer~~~
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
make: Leaving directory '/usr/share/ble_gateway/node_modules/usb/build'
bluetooth-hci-socket@0.5.1 install /usr/share/ble_gateway/node_modules/bluetooth-hci-socket node-gyp rebuild
make: Entering directory '/usr/share/ble_gateway/node_modules/bluetooth-hci-socket/build' CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o ../src/BluetoothHciSocket.cpp: In static member function 'static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)': ../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to 'v8::FunctionTemplate::GetFunction()' target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
^
In file included from
/home/pi/.cache/node-gyp/13.7.0/include/node/node.h:63:0,
from
/home/pi/.cache/node-gyp/13.7.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/13.7.0/include/node/v8.h:6283:46: note: candidate:
v8::MaybeLocal~~
/home/pi/.cache/node-gyp/13.7.0/include/node/v8.h:6283:46: note:
candidate expects 1 argument, 0 provided
../src/BluetoothHciSocket.cpp: In member function 'void
BluetoothHciSocket::poll()':
../src/BluetoothHciSocket.cpp:251:95: warning: 'v8::Local
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Local~~~
../src/BluetoothHciSocket.cpp: In member function 'void
BluetoothHciSocket::emitErrnoError()':
../src/BluetoothHciSocket.cpp:269:109: error: no matching function for call
to 'v8::Object::Get(v8::Local
^
In file included from
/home/pi/.cache/node-gyp/13.7.0/include/node/node.h:63:0,
from
/home/pi/.cache/node-gyp/13.7.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/13.7.0/include/node/v8.h:3594:43: note: candidate:
v8::MaybeLocal
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Local~~~
../src/BluetoothHciSocket.cpp: In static member function 'static
Nan::NAN_METHOD_RETURN_TYPE
BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)':
../src/BluetoothHciSocket.cpp:395:34: error: no matching function for call
to 'v8::Value::IntegerValue()'
devId = arg0->IntegerValue();
^
In file included from
/home/pi/.cache/node-gyp/13.7.0/include/node/node.h:63:0,
from
/home/pi/.cache/node-gyp/13.7.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/13.7.0/include/node/v8.h:2774:40: note: candidate:
v8::Maybe~~~
/home/pi/.cache/node-gyp/13.7.0/include/node/v8.h:2774:40: note:
candidate expects 1 argument, 0 provided
../src/BluetoothHciSocket.cpp: In static member function 'static
Nan::NAN_METHOD_RETURN_TYPE
BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)':
../src/BluetoothHciSocket.cpp:417:34: error: no matching function for call
to 'v8::Value::IntegerValue()'
devId = arg0->IntegerValue();
^
In file included from
/home/pi/.cache/node-gyp/13.7.0/include/node/node.h:63:0,
from
/home/pi/.cache/node-gyp/13.7.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/13.7.0/include/node/v8.h:2774:40: note: candidate:
v8::Maybe~~~
/home/pi/.cache/node-gyp/13.7.0/include/node/v8.h:2774:40: note:
candidate expects 1 argument, 0 provided
binding.target.mk:109: recipe for target
'Release/obj.target/binding/src/BluetoothHciSocket.o' failed
make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
make: Leaving directory
'/usr/share/ble_gateway/node_modules/bluetooth-hci-socket/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/opt/nodejs/bin/node"
"/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd /usr/share/ble_gateway/node_modules/bluetooth-hci-socket
gyp ERR! node -v v13.7.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
sqlite3@4.1.1 install /usr/share/ble_gateway/node_modules/sqlite3 node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.1/node-v79-linux-arm.tar.gz node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.1.1 and node@13.7.0 (node-v79 ABI, glibc) (falling back to source compile with node-gyp) make: Entering directory '/usr/share/ble_gateway/node_modules/sqlite3/build' ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c TOUCH Release/obj.target/deps/action_before_build.stamp CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3300100/sqlite3.o ^Cdeps/sqlite3.target.mk:139: recipe for target 'Release/obj.target/sqlite3/gen/sqlite-autoconf-3300100/sqlite3.o' failed make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3300100/sqlite3.o] Interrupt
On Sat, Feb 1, 2020 at 9:52 AM zey zo z.morshedi@gmail.com wrote:
Hi Again! and thank you for your kindly response I face a lot of error in cloning ble_gateway step in your setup.sh for rpi raspbian stretch
for example, one and maybe last error relative to os, in output print like this: no compatible with your operating system and in parentheses print (os=darwin ...)
can you send me complete steps or setup for install on raspbian stretch?
thanks in advanced.
On Tue, Jan 28, 2020 at 7:25 PM Bogdan Oniga notifications@github.com wrote:
Hi. Lately, I didn't update the installation steps. I help you, we can figure it out together. Please contact me directly on my email address.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7UC6KHR4B3ADOSNIF3RABIO3A5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKD22JA#issuecomment-579317028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHNA7QEUX57DXWQ5F2V45LRABIO3ANCNFSM4KMUWEHA .
-- Best Regards,
Zoheir Morshedi.
-- Best Regards,
Zoheir Morshedi.
hi, make sure you are using node.js 8.
I will try to debug the commands from setup.sh and let you know my results.
Thank you Bagdan
On Sat, Feb 1, 2020 at 10:58 AM Bogdan Oniga notifications@github.com wrote:
I will try to debug the commands from setup.sh and let you know my results.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7RSKRYDXS7WRDHPHO3RAUQAHA5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQWTLQ#issuecomment-581003694, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHNA7U3D3W7DXPLD5IXHKDRAUQAHANCNFSM4KMUWEHA .
-- Best Regards,
Zoheir Morshedi.
Unfortunately, the code wasn't maintained to run on newer versions of Node.js, so we have to run it on the deprecated v8.x.
I updated the package.json, make sure you have the new version.
Hi again finally I can install it with deprecated v8.x, but when I publish a message to ble gateway for one connected device, ble_gateway Service crashed in rpi
I used mosquitto broker on rpi and publish with this command : #mosquitto_pub -t gateway/b827ebfffeb46407/tx -m '{"device":"UUID","payload":"hello"}' -h 127.0.0.1 -p 1883
if you think I should used this new version for resolve this issue please let me know.
Thanks in advanced.
On Sat, Feb 1, 2020 at 11:32 AM Bogdan Oniga notifications@github.com wrote:
I updated the package.json, make sure you have the new version.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7VZJHWFQVC24SMBN2TRAUUDHA5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQXF2Y#issuecomment-581006059, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHNA7TQ4ZHUMZS3J7TH5NLRAUUDHANCNFSM4KMUWEHA .
-- Best Regards,
Zoheir Morshedi.
Hi Bogdan, Please help me, Your given link not working. Also, when I published to mosquitto broker, ble_gateway service crashed! I used command below:
#mosquitto_pub -t gateway/b827ebfffeb46407/tx -m '{"uuid":"UUID","payload":"hello"}' -h 127.0.0.1 -p 1883 I have an Esp32 with ble server sketch and I connected it to ble gateway successfully but when I published a message for this esp32 with that command , ble gateway service crashed
On Sun, Feb 2, 2020 at 9:05 AM zey zo z.morshedi@gmail.com wrote:
unfortunately this link not working...
On Sat, Feb 1, 2020 at 7:54 PM Bogdan Oniga notifications@github.com wrote:
Before sending a message, the BLE device has to be connected with the BLE gateway. You can use this snippet to test the connection using an ESP32 https://github.com/bogdanoniga/IoT/blob/master/code_snippets/ble/esp32/BLE_write_read/BLE_write_read.ino .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7XUKNTYQKA6XGV6U3TRAWO5PA5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRA2LY#issuecomment-581045551, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHNA7UU4N3DAM54VIQM35TRAWO5PANCNFSM4KMUWEHA .
-- Best Regards,
Zoheir Morshedi.
-- Best Regards,
Zoheir Morshedi.
Indeed, the link is not working. I've put it in another place :). https://gitlab.com/openiot/iot-nodes/blob/master/bluetooth/BLE_Server_Write_Notify.ino
Can you add the error logs?
Hi Bogdan, Please help me, Your given link not working. Also, when I published to mosquitto broker, ble_gateway service crashed! I used command below: #mosquitto_pub -t gateway/b827ebfffeb46407/tx -m '{"uuid":"UUID","payload":"hello"}' -h 127.0.0.1 -p 1883 I have an Esp32 with ble server sketch and I connected it to ble gateway successfully but when I published a message for this esp32 with that command , ble gateway service crashed … On Sun, Feb 2, 2020 at 9:05 AM zey zo @.> wrote: unfortunately this link not working... On Sat, Feb 1, 2020 at 7:54 PM Bogdan Oniga @.> wrote: > Before sending a message, the BLE device has to be connected with the BLE > gateway. You can use this snippet to test the connection using an ESP32 > https://github.com/bogdanoniga/IoT/blob/master/code_snippets/ble/esp32/BLE_write_read/BLE_write_read.ino > . > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <#1?email_source=notifications&email_token=ADHNA7XUKNTYQKA6XGV6U3TRAWO5PA5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRA2LY#issuecomment-581045551>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ADHNA7UU4N3DAM54VIQM35TRAWO5PANCNFSM4KMUWEHA > . > -- Best Regards, Zoheir Morshedi. -- Best Regards, Zoheir Morshedi.
The message should be _'{"device":
Hi, excuse me for late reply, I was sick. As I said, when I published a command to the broker for one connected device, ble_gateway service crashed. I captured screenshot from each steps, you can see all of them with meaningful file name in attachment.
On Sun, Feb 2, 2020 at 7:53 PM Bogdan Oniga notifications@github.com wrote:
Hi Bogdan, Please help me, Your given link not working. Also, when I published to mosquitto broker, ble_gateway service crashed! I used command below: #mosquitto_pub -t gateway/b827ebfffeb46407/tx -m '{"uuid":"UUID","payload":"hello"}' -h 127.0.0.1 -p 1883 I have an Esp32 with ble server sketch and I connected it to ble gateway successfully but when I published a message for this esp32 with that command , ble gateway service crashed … <#m-2993996605460698756> On Sun, Feb 2, 2020 at 9:05 AM zey zo @.> wrote: unfortunately this link not working... On Sat, Feb 1, 2020 at 7:54 PM Bogdan Oniga @.> wrote: > Before sending a message, the BLE device has to be connected with the BLE > gateway. You can use this snippet to test the connection using an ESP32 > https://github.com/bogdanoniga/IoT/blob/master/code_snippets/ble/esp32/BLE_write_read/BLE_write_read.ino
. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <#1 https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7XUKNTYQKA6XGV6U3TRAWO5PA5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRA2LY#issuecomment-581045551>, or unsubscribe > https://github.com/notifications/unsubscribe-auth/ADHNA7UU4N3DAM54VIQM35TRAWO5PANCNFSM4KMUWEHA . > -- Best Regards, Zoheir Morshedi. -- Best Regards, Zoheir Morshedi.
The message should be '{"device":
,"payload":"hello"}' (seeL331-L334
https://github.com/bogdanoniga/ble_gateway/blob/master/routes/api.js#L331-L334 )
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7WVUEWUBX2CRRW5N7TRA3XP5A5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKR2TRI#issuecomment-581151173, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHNA7SP5HWFWWTU6F55DUDRA3XP5ANCNFSM4KMUWEHA .
-- Best Regards,
Zoheir Morshedi.
Hi, I found reason of ble_gateway crashed. in below code(part of api.js) when send payload to sendMessage(uuid,payload) function buffer don't recognised type of payload . I changed it and send msg[payload] directly to sendMessage(uuid,payload) function like this sendMessage(msg[uuid],msg[payload]).
function receiveMQTTData() { mqtt_client.on('message', function(topic, message) { var msg = JSON.parse(message.toString('utf-8'));
if (end_to_end_encryption = true) {
var payload = msg['phyPayload'];
sendBroadcast(msg['phyPayload']);
}
else {
var uuid = msg['device'];
var payload = msg['payload'];
sendMessage(msg['device'], msg['payload']);
}
}); }
but now it seems write function in sendMessage(uuid,payload) don't work properly because didn't send any payload to connected ble device: charac.write(new Buffer.from(payload), false, function(error) { if (!error) { console.log("Sent message: " + payload); message = "sent"; } else { console.log("Error sending message"); message = "error"; } }.bind(this));
can you help me for resolve it?
On Tue, Feb 4, 2020 at 11:59 AM zey zo z.morshedi@gmail.com wrote:
Hi, excuse me for late reply, I was sick. As I said, when I published a command to the broker for one connected device, ble_gateway service crashed. I captured screenshot from each steps, you can see all of them with meaningful file name in attachment.
On Sun, Feb 2, 2020 at 7:53 PM Bogdan Oniga notifications@github.com wrote:
Hi Bogdan, Please help me, Your given link not working. Also, when I published to mosquitto broker, ble_gateway service crashed! I used command below: #mosquitto_pub -t gateway/b827ebfffeb46407/tx -m '{"uuid":"UUID","payload":"hello"}' -h 127.0.0.1 -p 1883 I have an Esp32 with ble server sketch and I connected it to ble gateway successfully but when I published a message for this esp32 with that command , ble gateway service crashed … <#m_-2042112181690169875m-2993996605460698756_> On Sun, Feb 2, 2020 at 9:05 AM zey zo @.> wrote: unfortunately this link not working... On Sat, Feb 1, 2020 at 7:54 PM Bogdan Oniga @.> wrote: > Before sending a message, the BLE device has to be connected with the BLE > gateway. You can use this snippet to test the connection using an ESP32 > https://github.com/bogdanoniga/IoT/blob/master/code_snippets/ble/esp32/BLE_write_read/BLE_write_read.ino
. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <#1 https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7XUKNTYQKA6XGV6U3TRAWO5PA5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRA2LY#issuecomment-581045551>, or unsubscribe > https://github.com/notifications/unsubscribe-auth/ADHNA7UU4N3DAM54VIQM35TRAWO5PANCNFSM4KMUWEHA . > -- Best Regards, Zoheir Morshedi. -- Best Regards, Zoheir Morshedi.
The message should be '{"device":
,"payload":"hello"}' (see #L331-L334 https://github.com/bogdanoniga/ble_gateway/blob/master/routes/api.js#L331-L334 )— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bogdanoniga/ble_gateway/issues/1?email_source=notifications&email_token=ADHNA7WVUEWUBX2CRRW5N7TRA3XP5A5CNFSM4KMUWEHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKR2TRI#issuecomment-581151173, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHNA7SP5HWFWWTU6F55DUDRA3XP5ANCNFSM4KMUWEHA .
-- Best Regards,
Zoheir Morshedi.
-- Best Regards,
Zoheir Morshedi.
Hi, bogdanoniga Thank you for your nice work. But, I try to install it again and again without any successful on Rpi. I face with a lot of errors in Cloning ble_gateway software step. Can you help me?