Re: Beaglebone: Bonescript on Ubuntu, GPIO Pins not working

1,041 views
Skip to first unread message

Walter Wurscht

unread,
Aug 25, 2012, 3:52:20 AM8/25/12
to beagl...@googlegroups.com
I now can confirm that at least "digitalWrite" is working on ubuntu, after i reinstalled everything.
"attachInterrupt" doesn't work, so I was thinking that the problem is only for a few functions of bonescript. So on the weekend I'm gonna test each function if it is working or not, to narrow the problem down...

Jason Kridner

unread,
Jan 10, 2013, 10:50:54 AM1/10/13
to beagl...@googlegroups.com

If you have issues with a simple 'npm install bonescript', I would appreciate a note here or, even better, a bug report on the github project.

On Jan 10, 2013 7:23 AM, <alpes...@gmail.com> wrote:
hey Walter,
I am having the same problem as you. Can you guide me how to install bonescript properly. I am working through a proxy server so also tell me how to configure proxy for npm.
thanks in advance.



On Saturday, 25 August 2012 13:22:20 UTC+5:30, Walter Wurscht wrote:
I now can confirm that at least "digitalWrite" is working on ubuntu, after i reinstalled everything.
"attachInterrupt" doesn't work, so I was thinking that the problem is only for a few functions of bonescript. So on the weekend I'm gonna test each function if it is working or not, to narrow the problem down...

--
For more options, visit http://beagleboard.org/discuss
 
 

sba...@haivision.com

unread,
Sep 24, 2013, 7:00:38 PM9/24/13
to beagl...@googlegroups.com
I have Ubuntu 13 and a beaglebone black.   The ubuntu is from the beaglebone image section which I flashed onto the bone.

uname:   Linux arm 3.8.13-bone21 #1 SMP Fri Jun 14 03:10:29 UTC 2013 armv7l armv7l armv7l GNU/Linux

I compiled nodejs from source and it's version 0.10.18.

node -v      :   v0.10.18

I'm having a big problem installing bonescript.  When I run "sudo node install -g bonescript" I get the following:

ubuntu@arm:~$ sudo npm install -g bonescript
[sudo] password for ubuntu:
npm http GET https://registry.npmjs.org/bonescript
npm http 304 https://registry.npmjs.org/bonescript

> bonescript @ 0.2.3 preinstall /usr/local/lib/node_modules/bonescript
> node-gyp clean || (exit 0); node-gyp configure build

make: Entering directory `/usr/local/lib/node_modules/bonescript/build'
  CXX(target) Release/obj.target/misc/misc.o
../misc.cpp:1:0: warning: "BUILDING_NODE_EXTENSION" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
../misc.cpp:21:27: error: variable or field ‘pollpri_event’ declared void
../misc.cpp:21:27: error: ‘EV_P_’ was not declared in this scope
../misc.cpp:21:46: error: expected primary-expression before ‘int’
../misc.cpp:32:5: error: ‘ev_io’ does not name a type
../misc.cpp:148:31: error: ‘EV_P_’ has not been declared
../misc.cpp:148:43: error: expected ‘,’ or ‘...’ before ‘*’ token
../misc.cpp: In static member function ‘static void Pollpri::Init(v8::Handle<v8::Object>)’:
../misc.cpp:37:34: warning: statement has no effect [-Wunused-value]
../misc.cpp:38:38: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:47:33: warning: statement has no effect [-Wunused-value]
../misc.cpp: In constructor ‘Pollpri::Pollpri()’:
../misc.cpp:51:49: warning: statement has no effect [-Wunused-value]
../misc.cpp:54:18: error: ‘event_watcher’ was not declared in this scope
../misc.cpp:54:46: error: ‘ev_init’ was not declared in this scope
../misc.cpp:56:9: error: ‘ew’ was not declared in this scope
../misc.cpp: In destructor ‘virtual Pollpri::~Pollpri()’:
../misc.cpp:60:48: warning: statement has no effect [-Wunused-value]
../misc.cpp:63:20: error: ‘EV_DEFAULT_’ was not declared in this scope
../misc.cpp:63:33: error: ‘event_watcher’ was not declared in this scope
../misc.cpp:63:46: error: ‘ev_io_stop’ was not declared in this scope
../misc.cpp: In static member function ‘static v8::Handle<v8::Value> Pollpri::New(const v8::Arguments&)’:
../misc.cpp:67:32: warning: statement has no effect [-Wunused-value]
../misc.cpp:84:49: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:84:55: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:84:73: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:88:53: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:88:73: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:93:56: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:93:60: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:93:63: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:93:83: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:99:43: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:99:47: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:99:64: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:102:48: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:102:52: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:102:55: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:102:74: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:105:22: error: ‘class Pollpri’ has no member named ‘ew’
../misc.cpp:105:32: error: ‘EV_READ’ was not declared in this scope
../misc.cpp:105:39: error: ‘ev_io_set’ was not declared in this scope
../misc.cpp:106:21: error: ‘EV_DEFAULT_’ was not declared in this scope
../misc.cpp:106:38: error: ‘ev_io_start’ was not declared in this scope
../misc.cpp:111:32: warning: statement has no effect [-Wunused-value]
../misc.cpp: In member function ‘void Pollpri::Event(Pollpri*, int)’:
../misc.cpp:117:57: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:117:61: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:117:67: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:118:23: error: ‘EV_READ’ was not declared in this scope
../misc.cpp:126:43: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:126:47: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:126:64: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:129:48: warning: left operand of comma operator has no effect [-Wunused-value]
../misc.cpp:129:52: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:129:55: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp:129:74: warning: right operand of comma operator has no effect [-Wunused-value]
../misc.cpp: In static member function ‘static void Pollpri::pollpri_event(int)’:
../misc.cpp:149:42: warning: statement has no effect [-Wunused-value]
../misc.cpp:150:44: error: ‘req’ was not declared in this scope
../misc.cpp:151:21: error: ‘revents’ was not declared in this scope
../misc.cpp:152:42: warning: statement has no effect [-Wunused-value]
../misc.cpp: In function ‘void init(v8::Handle<v8::Object>)’:
../misc.cpp:160:33: warning: statement has no effect [-Wunused-value]
make: *** [Release/obj.target/misc/misc.o] Error 1
make: Leaving directory `/usr/local/lib/node_modules/bonescript/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:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.13-bone21
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /usr/local/lib/node_modules/bonescript
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
ubuntu@arm:~$

garyamort

unread,
Sep 25, 2013, 1:18:19 PM9/25/13
to beagl...@googlegroups.com, sba...@haivision.com


On Tuesday, September 24, 2013 7:00:38 PM UTC-4, dsm...@gmail.com wrote:
I have Ubuntu 13 and a beaglebone black.   The ubuntu is from the beaglebone image section which I flashed onto the bone.

uname:   Linux arm 3.8.13-bone21 #1 SMP Fri Jun 14 03:10:29 UTC 2013 armv7l armv7l armv7l GNU/Linux

I compiled nodejs from source and it's version 0.10.18.

node -v      :   v0.10.18

I'm having a big problem installing bonescript.  When I run "sudo node install -g bonescript" I get the following:

ubuntu@arm:~$ sudo npm install -g bonescript
[sudo] password for ubuntu:
npm http GET https://registry.npmjs.org/bonescript
npm http 304 https://registry.npmjs.org/bonescript

Your getting a 304 error, so the problem is in trying to download bonescript from npmjs.org 

When I just tried going to https://registry.npmjs.org/bonescript in my browser, Chrome complained about the certificate for that website, so my guess would be that npm defaults to some strict certificate checking.

Try installing from http://registr.npmjs.org/bonescript instead

Jason Kridner

unread,
Sep 25, 2013, 1:50:26 PM9/25/13
to beagl...@googlegroups.com
On Tue, Sep 24, 2013 at 7:00 PM, dsm...@gmail.com <sba...@haivision.com> wrote:
I have Ubuntu 13 and a beaglebone black.   The ubuntu is from the beaglebone image section which I flashed onto the bone.

uname:   Linux arm 3.8.13-bone21 #1 SMP Fri Jun 14 03:10:29 UTC 2013 armv7l armv7l armv7l GNU/Linux

I compiled nodejs from source and it's version 0.10.18.

node -v      :   v0.10.18

I'm having a big problem installing bonescript.  When I run "sudo node install -g bonescript" I get the following:

ubuntu@arm:~$ sudo npm install -g bonescript
[sudo] password for ubuntu:
npm http GET https://registry.npmjs.org/bonescript
npm http 304 https://registry.npmjs.org/bonescript

> bonescript @ 0.2.3 preinstall /usr/local/lib/node_modules/bonescript
> node-gyp clean || (exit 0); node-gyp configure build

make: Entering directory `/usr/local/lib/node_modules/bonescript/build'
  CXX(target) Release/obj.target/misc/misc.o
../misc.cpp:1:0: warning: "BUILDING_NODE_EXTENSION" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
../misc.cpp:21:27: error: variable or field ‘pollpri_event’ declared void

Sounds like a libuv/libio incompatibility. I don't currently have an Ubuntu image handy, but will download one. I'm working on removing the POLLPRI entirely and replacing it with standard events using gpio-keys, but I am adding auto-generation of PWM .dtbo files first, rather than relying on anything in /lib/firmware.
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sam Bagot

unread,
Sep 25, 2013, 3:23:31 PM9/25/13
to beagl...@googlegroups.com
I read somewhere that the bonescript in npm at that source isn't compatible with 0.10.x   so I downloaded the source for 0.8.25 and then did configure --without-snapshot && make && make installed.  then I did npm install -g bonescript and it worked.  I guess its a problem with bonescript compatability with 0.10.X and 0.9.X

I'm using this in my version 4 of the robot gardener by the way in case anyone is interested in helping me write a little code.  www.RobotGardener.com   Its an open source implementation of a smart greenhouse controller that will help people control and maintain their gardens. 

Thanks for your help and I'll contribute back what I can.

- Sam




You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Nrn0G52Rs6M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Samuel Bagot - Sr. Software Engineer - Web Media, Haivision

sba...@haivision.com - O +1 (512) 878 - 4228

Austin (KulaByte) - 1917 Dutton Drive, Suite 110, San Marcos, TX 78666 USA - P
+1.512.878.4228 - F +1.512.392.5395
Montreal - 4445 Garand Street, Montreal, Quebec, H4R 2H9 CANADA - O +1.514.334-5445 -
F +1.514.334-0088
Chicago - 13975 Polo Trail Drive, Lake Forest, Illinois 60045 USA - P +1.847.362.6800 - F
+1.847.362.6866
Reply all
Reply to author
Forward
0 new messages