Closed bokky closed 5 years ago
The tutorial sais Raspbian Jessie, but I think it also works with Stretch. Never tried Buster. Why don't u just use a Jessie?
i used a Rpi3 B+ but Jessie is not running on it, you need a newer distro, therefor I took the lastest.
Digging in my shelve I found a Rpi3 B, jessie boots fine but after following the lwcomm manual it is still failing on serialport module, now with different errors (see at the end).
I used the last jessie-lite image (July-2017), which give me: node -v : v10.16.0 npm -v : 6.9.0
I also build the docker container but at compile time it gives me the same error messages at the serial module. So can anybody tell my what magical combo you need to have of OS, node and npm and serialport to make it work?
pi@laserpi:~/lw.comm-server $ npm install
serialport@6.2.2 install /home/pi/lw.comm-server/node_modules/serialport prebuild-install || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=10.16.0 runtime=node arch=arm platform=linux)
make: Entering directory '/home/pi/lw.comm-server/node_modules/serialport/build'
CXX(target) Release/obj.target/serialport/src/serialport.o
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:41:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local
electron@1.8.8 postinstall /home/pi/lw.comm-server/node_modules/electron node install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@2.1.0 (node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.1.0: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@1.0.1 (node_modules/7zip-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
added 630 packages from 320 contributors and audited 1926 packages in 158.419s
found 78 vulnerabilities (34 low, 25 moderate, 18 high, 1 critical)
run npm audit fix
to fix them, or npm audit
for details
I cannot see any errors, only warnings. It should work like this.
The service start fine and does not crash, the site loads fine but when I look in Comms -> machine connection there is nothing to select from in the drop down menu. Do I need to hard code it somewhere which my usb connected port is (/dev/ttyUSB0) ? Or do I need to set something else?
On my desktop full laserweb works nicely and porst are immediately available.
Ok seems that I have found it... but weired...
Exported my desktop config of laserweb, imported it into rpi laserweb. Then I got a usb port avaiable (not the correct one) Then I did server connection -> to my pi port 8000 -> connect Now I have the correct ports available in USB, I managed to get a successful connect
Stil encountered out of bound errors but I should be able to solve that myself, no time today to figure that out.
I wanted to move away from my fixed linux pc to raspberrypi setup but I can not get it to find my USB connected laser. The reason for that is it gives tons of errors compiling serialport.
I followed the node10 manual here on github, which is written for debian wheezy. I noticed that Rpi updated their noobs and raspbian images to debian buster in June, most probably that has to do with my errors.
Anybody successfully build it on buster?
Here are my specs: Rpi v3 node -v : v10.16.0 npm -v : 6.9.0
Errorlog when running "npm install" (it is long, I know. Just want to be complete)
root@laserpi:~/lw.comm-server# npm install
prebuild-install WARN install No prebuilt binaries found (target=10.16.0 runtime=node arch=arm platform=linux) make: Entering directory '/root/lw.comm-server/node_modules/serialport/build' CXX(target) Release/obj.target/serialport/src/serialport.o In file included from ../src/./serialport.h:6, from ../src/serialport.cpp:1: ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker)’: ../../nan/nan.h:2208:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type] , reinterpret_cast(AsyncExecuteComplete)
^
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Open(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:41:49: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
v8::String::Utf8Value path(info[0]->ToString());
^
In file included from /root/.node-gyp/10.16.0/include/node/v8.h:26,
from /root/.node-gyp/10.16.0/include/node/node.h:63,
from ../../nan/nan.h:52,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/root/.node-gyp/10.16.0/include/node/v8.h:2892:28: note: declared here
explicit Utf8Value(Local obj));
^ v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Local options = info[1]->ToObject();
^
In file included from /root/.node-gyp/10.16.0/include/node/node.h:63,
from ../../nan/nan.h:52,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/root/.node-gyp/10.16.0/include/node/v8.h:10046:15: note: declared here
Local )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Open, (uv_after_work_cb)EIO_AfterOpen);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:113:53: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Local options = info[1]->ToObject();
^
In file included from /root/.node-gyp/10.16.0/include/node/node.h:63,
from ../../nan/nan.h:52,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/root/.node-gyp/10.16.0/include/node/v8.h:10046:15: note: declared here
Local )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Update, (uv_after_work_cb)EIO_AfterUpdate);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:175:70: warning: cast between incompatible function types from ‘void ( )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Close, (uv_after_work_cb)EIO_AfterClose);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:215:70: warning: cast between incompatible function types from ‘void ( )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Flush, (uv_after_work_cb)EIO_AfterFlush);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:250:53: warning: ‘v8::Local v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
v8::Local options = info[1]->ToObject();
^
In file included from /root/.node-gyp/10.16.0/include/node/node.h:63,
from ../../nan/nan.h:52,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/root/.node-gyp/10.16.0/include/node/v8.h:10046:15: note: declared here
Local )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Set, (uv_after_work_cb)EIO_AfterSet);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Get(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:314:68: warning: cast between incompatible function types from ‘void ( )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Get, (uv_after_work_cb)EIO_AfterGet);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE GetBaudRate(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:363:76: warning: cast between incompatible function types from ‘void ( )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_GetBaudRate, (uv_after_work_cb)EIO_AfterGetBaudRate);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(2, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/serialport.cpp:409:70: warning: cast between incompatible function types from ‘void ( )(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Drain, (uv_after_work_cb)EIO_AfterDrain);
^ Nan::Callback::Call(int, v8::Local) const’ is deprecated [-Wdeprecated-declarations]
data->callback.Call(1, argv);
^
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
../../nan/nan.h:1655:3: note: declared here
Call(int argc, v8::Local argv[]) const {
^~~~
../src/serialport.cpp: At global scope:
../src/serialport.cpp:430:28: warning: unnecessary parentheses in declaration of ‘ToParityEnum’ [-Wparentheses]
SerialPortParity NAN_INLINE(ToParityEnum(const v8::Local& v8str)) {
^
../src/serialport.cpp:449:30: warning: unnecessary parentheses in declaration of ‘ToStopBitEnum’ [-Wparentheses]
SerialPortStopBits NAN_INLINE(ToStopBitEnum(double stopBits)) {
^
In file included from ../../nan/nan.h:52,
from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
/root/.node-gyp/10.16.0/include/node/node.h:573:43: warning: cast between incompatible function types from ‘void ( )(v8::Handle)’ {aka ‘void ()(v8::Local)’} to ‘node::addon_register_func’ {aka ‘void ( )(v8::Local, v8::Local, void)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/root/.node-gyp/10.16.0/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^::SetWeak(P , typename v8::WeakCallbackInfo
~~~~ /root/.node-gyp/10.16.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator attribute((deprecated(message))) ^~~~~~ ../src/serialport.cpp:48:53: warning: ‘v8::Local~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterOpen(uv_work_t)’: ../src/serialport.cpp:95:30: warning: ‘v8::Local~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterUpdate(uv_work_t)’: ../src/serialport.cpp:150:30: warning: ‘v8::Local~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterClose(uv_work_t)’: ../src/serialport.cpp:188:30: warning: ‘v8::Local~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterFlush(uv_work_t)’: ../src/serialport.cpp:231:30: warning: ‘v8::Local~~~ ../src/serialport.cpp: In function ‘void EIO_AfterSet(uv_work_t)’: ../src/serialport.cpp:285:30: warning: ‘v8::Local~~~ ../src/serialport.cpp: In function ‘void EIO_AfterGet(uv_work_t)’: ../src/serialport.cpp:336:30: warning: ‘v8::Local~~~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterGetBaudRate(uv_work_t)’: ../src/serialport.cpp:383:30: warning: ‘v8::Local~~~~~ ../src/serialport.cpp: In function ‘void EIO_AfterDrain(uv_work_t)’: ../src/serialport.cpp:424:30: warning: ‘v8::Local~~~~ ../src/serialport.cpp:485:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(serialport, init); ^~~In file included from /root/.node-gyp/10.16.0/include/node/node.h:63, from ../../nan/nan.h:52, from ../src/./serialport.h:6, from ../src/serialport.cpp:1: /root/.node-gyp/10.16.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void ()(const v8::WeakCallbackInfo&)]’:
/root/.node-gyp/10.16.0/include/node/node_object_wrap.h:84:78: required from here
/root/.node-gyp/10.16.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ( )(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
reinterpret_cast(callback), type);
^::SetWeak(P , typename v8::WeakCallbackInfo
~~~~~~~/root/.node-gyp/10.16.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void ()(const v8::WeakCallbackInfo&)]’:
../../nan/nan_object_wrap.h:66:61: required from here
/root/.node-gyp/10.16.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ( )(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
CXX(target) Release/obj.target/serialport/src/serialport_unix.o
In file included from ../src/serialport.h:6,
from ../src/serialport_unix.cpp:2:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker )’:
../../nan/nan.h:2208:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
, reinterpret_cast(AsyncExecuteComplete)
^
In file included from /root/.node-gyp/10.16.0/include/node/node.h:63,
from ../../nan/nan.h:52,
from ../src/serialport.h:6,
from ../src/serialport_unix.cpp:2:
/root/.node-gyp/10.16.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo&)]’:
/root/.node-gyp/10.16.0/include/node/node_object_wrap.h:84:78: required from here
/root/.node-gyp/10.16.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ( )(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
reinterpret_cast(callback), type);
^::SetWeak(P, typename v8::WeakCallbackInfo&)]’:
../../nan/nan_object_wrap.h:66:61: required from here
/root/.node-gyp/10.16.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ( )(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
../src/serialport_unix.cpp: In function ‘int setup(int, OpenBaton*)’:
../src/serialport_unix.cpp:176:60: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);
^
::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void (
)(const v8::WeakCallbackInfo~~~~~~~/root/.node-gyp/10.16.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void (
)(const v8::WeakCallbackInfo~~~~~~~~ ../src/serialport_unix.cpp:176:13: note: ‘snprintf’ output 20 or more bytes (assuming 1043) into a destination of size 1024 snprintf(data->errorString, sizeof(data->errorString), "Error %s Cannot open %s", strerror(errno), data->path);