giseburt / tinyg-node Goto Github PK
View Code? Open in Web Editor NEWA module to abstract communications and control of the TinyG from node.
License: GNU General Public License v2.0
A module to abstract communications and control of the TinyG from node.
License: GNU General Public License v2.0
Installing this library on both my mac (with node 4.1.1) and raspberry pi (with node 4.2.1) yeilds almost the same message. Is there a trick to getting this installed? Looks like a nice lib!
[email protected] install /usr/local/lib/node_modules/tinyg/node_modules/serialport
node-pre-gyp install --fallback-to-build
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.2.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/tinyg/node_modules/serialport/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/tinyg/node_modules/serialport/build'
make: *** No rule to make target '../.node-gyp/4.2.1/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/usr/local/lib/node_modules/tinyg/node_modules/serialport/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.13-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/tinyg/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-arm/serialport.node" "--module_name=serialport" "--module_path=/usr/local/lib/node_modules/tinyg/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-arm"
gyp ERR! cwd /usr/local/lib/node_modules/tinyg/node_modules/serialport
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/tinyg/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-arm/serialport.node --module_name=serialport --module_path=/usr/local/lib/node_modules/tinyg/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-arm' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:818:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.1.13-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/tinyg/node_modules/serialport
node-pre-gyp ERR! node -v v4.2.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.7
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/tinyg/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-arm/serialport.node --module_name=serialport --module_path=/usr/local/lib/node_modules/tinyg/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-arm' (1)
npm ERR! Linux 4.1.13-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "tinyg"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/tinyg/npm-debug.log
workaround:
g -p /dev/ttyACM0
error:
$ g
/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/async.js:61
fn = function () { throw arg; };
^
TypeError: Cannot call method 'match' of undefined
at /usr/local/lib/node_modules/tinyg/tinyg.js:1070:29
at tryCatcher (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/util.js:16:23)
at Promise.successAdapter [as _fulfillmentHandler0] (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/nodeify.js:23:30)
at Promise._settlePromise (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:558:21)
at Promise._settlePromise0 (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:685:18)
at Promise._fulfill (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:630:18)
at MappingPromiseArray.PromiseArray._resolve (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise_array.js:125:19)
at MappingPromiseArray._promiseFulfilled (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/map.js:97:18)
at Promise._settlePromise (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:566:26)
at Promise._settlePromise0 (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:685:18)
at Promise._fulfill (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:630:18)
at Promise._resolveCallback (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:425:57)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:516:17)
at Promise._settlePromise (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:685:18)
at Promise._fulfill (/usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/promise.js:630:18)
at /usr/local/lib/node_modules/tinyg/node_modules/serialport/node_modules/bluebird/js/release/nodeback.js:42:21
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
workaround1:
sudo ln -s `which nodejs` /usr/local/bin/node
workaround2:
sudo apt-get install nodejs-legacy
error:
~$ sudo npm install -g tinyg
-
> [email protected] install /usr/local/lib/node_modules/tinyg/node_modules/serialport
> node-pre-gyp install --fallback-to-build
/usr/bin/env: node: No such file or directory
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "tinyg"
npm ERR! cwd /home/rig
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/rig/npm-debug.log
npm ERR! not ok code 0
Hi there,
I noticed in the source the tinyg object initializes a 'RTSCTS' default but I'm not clear on how to actually use this flow control in an application. Also, in the tinyg documentation it mentions XON/XOFF for software flow control. In the case of using this library, is RTS/CTS the preferred flow control technique? Thanks for your help in advance!
SerialPort is on 4.0.6
this module still depends on a custom 2.1.2 version
Installing as a depency in a newer project leads to lifecycle errors since 2.1.2 is end of life
C:\Users\peter\Documents\Github\LaserWeb3\node_modules\tinyg\node_modules\serial port>if not defined npm_config_node_gyp (node "C:\Users\peter\AppData\Roaming\np m\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js " clean ) else (node "" clean )
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\peter\\AppData\\ Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.9.1
npm ERR! npm v4.0.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --f allback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs serialport
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.
When I open tinyG in node on my rpi3 I immediately get 2 errors thrown from the tinyG.
error { [TinyGResponseError: TinyG reported an error reading '{"clr":null}': 100 (based on 13 bytes read)] name: 'TinyGResponseError', message: 'TinyG reported an error reading \'{"clr":null}\': 100 (based on 13 bytes read)', data: { r: { clr: null }, f: [ 1, 100, 13, 4451 ] } } error { [TinyGResponseError: TinyG reported an error reading '{"clr":null}': 100 (based on 13 bytes read)] name: 'TinyGResponseError', message: 'TinyG reported an error reading \'{"clr":null}\': 100 (based on 13 bytes read)', data: { r: { clr: null }, f: [ 1, 100, 13, 4451 ] } }
my code looks like this
` g.removeAllListeners();
g.on('error', function (error) {
console.log('error ');
console.log(error);
});
g.open('/dev/ttyUSB0');`
So it is already from the first connection and after pressing the RESET button. I dont have the idea that it is doing something wrong but i would like to know what causes this and how to resolve
Kind regards and thx for this awesome project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.