[beagleboard] problem with new bonescript

Currently I am playing with Bonescript with BB.

I'll assume BB = BeagleBone, since that is the only board supported by
Bonescript currently (though others are planned).

When I tried to run
blinkled.js, a message ‘optional package ‘./misc’ not loaded’ showed up and
the program stopped. If I commented out the lines with misc in index.js,
then the message is gone, but the led did not blink and the program stopped
after one second.

Actually before I updated bonescript, blinkled.js ran quite well. Anything
new in the lastest bonescript may cause this problem.

misc.node includes some native C routines that are required for some
of the Bonescript functions now. I've changed it to be required,
instead of optional. index.js doesn't have a direct dependency on
'misc' and uses the 'myrequire' function [1] to have alternate
implementations, but 'gpioint.js' has a hard requirement [2].

You should see misc.node under
node_modules/bonescript/build/Release/misc.node. Also, you shouldn't
see a "require('./misc')" anywhere; it should be
"require('./build/Release/misc')".

Can you tell me the revision of Bonescript you are using? What I'd
want is the git commit id via something like 'git show | head'. It
should be 'debd593b47b85cab58f69a8b526160e3754e5bb5', which is about 2
months old and includes the OSCON demo [3].

If not, can you find the offending line and tell me what file it is
in? The file that gets loaded is 'misc.node' which should be under
that build/Release folder or can be built using node-waf and the
provided wscript build file. npm will also build the script if you
used that to install Bonescript yourself, rather than using the
pre-installed version in /var/lib/cloud9 directory on the shipping
Angstrom Distribution image.

[1] https://github.com/jadonk/bonescript/blob/master/node_modules/bonescript/index.js#L33
[2] https://github.com/jadonk/bonescript/blob/master/node_modules/bonescript/gpioint.js#L2
[3] http://beaglebone.local/oscon.html

Hi,
I´m also new to Linux/Angstrom and the Beaglebone. I also have problems with Bonescript.
I have tried the following with no improvement:

  • changed my laptop from Windows 7 to Linux/ubuntu12.04
  • downloaded Angstrom-Beaglebone to a new SD card
  • performed (twice) an " opkg update " and " opkg upgrade "

The following appears to work okay (connecting via ethernet to router):

  • access via a terminal
  • via the browser (Firefox): access to beaglebone.local and access to the JavaScript terminal (bone101)and the Shell (bone101).

The following does not work:

  • via the browser: attempting to access Gate One fails to connect
  • via the browser: accessing Cloud 9 is succesful but all .js files show errors. For example blinkled.js shows either “assigning to undeclared variable” and/or “undeclared variable” at lines 3,4,6,7,8,11,12,13,14,15,16 and 17.

After reading various blog entries I tried the following using Cloud 9:

A " git status " results in:

[guest@cloud9]: /workspace git status

on branch master

changes not staged for commit:

(use “git add …” to update what will be committed)

(use “git checkout – …” to discard changes in working directory)

modified: .gitignore

modified: node_modules/bonescript/build/Release/misc.node

untracked files:

(use “git add …” to update what will be committed)

Hi,
I´m also new to Linux/Angstrom and the Beaglebone. I also have problems with
Bonescript.
I have tried the following with no improvement:
- changed my laptop from Windows 7 to Linux/ubuntu12.04
- downloaded Angstrom-Beaglebone to a new SD card
- performed (twice) an " opkg update " and " opkg upgrade "

Personally, I never like to do "opkg update; opkg upgrade", but rather
download the latest demo image from
http://downloads.angstrom-distribution.org/demo/beaglebone/.

The following appears to work okay (connecting via ethernet to router):
- access via a terminal
- via the browser (Firefox): access to beaglebone.local and access to the
JavaScript terminal (bone101)and the Shell (bone101).

The following does not work:
- via the browser: attempting to access Gate One fails to connect

Get on the latest demo image. Make sure you accept the lack of
certificate on the page. Perhaps the port should be moved to avoid
this issue?

- via the browser: accessing Cloud 9 is succesful but all .js files show
errors. For example blinkled.js shows either "assigning to undeclared
variable" and/or "undeclared variable" at lines 3,4,6,7,8,11,12,13,14,15,16
and 17.

That is a style issue that isn't easy to resolve. I'm declaring global
variables in Bonescript and that is not typically desired. I'm doing
it for the purpose of simplifying access to the functions. Perhaps it
would be better to avoid polluting the global namespace and force
people using Bonescript to learn this basic aspect of JavaScript by
giving them a cleaner example.

After reading various blog entries I tried the following using Cloud 9:

A " git status " results in:
[guest@cloud9]: /workspace git status
# on branch master
# changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# modified: .gitignore
# modified: node_modules/bonescript/build/Release/misc.node
# untracked files:
# (use "git add <file>..." to update what will be committed)
#
# .gitmodules
# node_modules/bonescript/misc.node
# node_modules/fork
no changes added to commit (use "git add" and/or "git commit -a")

A " git log | head -3 " results in:
fatal: ambiguous argument `|` : unkown revision or path not in the working
tree

It sounds like you are executing these commands from within Cloud9
IDE. You can't issue pipe (|) commands in that interpreter and would
need to do it from within bash. You have the output below, so you
don't need to worry about it.

A " git log " results in (only last entry shown here):
Author: Jason Kridner <jkridner@beagleboard.org>
Date: Wed Apr 18 16:32:40 2012 -0400
Merge branch `wants-rebase`
commit 83b2e858ae800de06a01d6d894e4d6a2850aba95

Clearly this is an old version as this does not match
'debd593b47b85cab58f69a8b526160e3754e5bb5'. It seems your image is
off on another branch besides 'master'. Under /var/lib/cloud9 in bash
or in the Cloud9 IDE window, execute:
git remote update
git stash
git checkout master
git status

Then, let me know what the output is.

A " systemctl status bone101.service " results in:
[guest@cloud9]: /workspace$ systemctl status.service

You cannot execute 'systemctl' under the Cloud9 window. It has to be
executed in a bash shell. js_term.html can be used.

Hi, thanks for the reply.

Hi,
I´m also new to Linux/Angstrom and the Beaglebone. I also have problems with
Bonescript.
I have tried the following with no improvement:

  • changed my laptop from Windows 7 to Linux/ubuntu12.04
  • downloaded Angstrom-Beaglebone to a new SD card
  • performed (twice) an " opkg update " and " opkg upgrade "

Personally, I never like to do “opkg update; opkg upgrade”, but rather
download the latest demo image from
http://downloads.angstrom-distribution.org/demo/beaglebone/.

The following appears to work okay (connecting via ethernet to router):

  • access via a terminal
  • via the browser (Firefox): access to beaglebone.local and access to the
    JavaScript terminal (bone101)and the Shell (bone101).

The following does not work:

  • via the browser: attempting to access Gate One fails to connect

Get on the latest demo image. Make sure you accept the lack of
certificate on the page. Perhaps the port should be moved to avoid
this issue?

  • via the browser: accessing Cloud 9 is succesful but all .js files show
    errors. For example blinkled.js shows either “assigning to undeclared
    variable” and/or “undeclared variable” at lines 3,4,6,7,8,11,12,13,14,15,16
    and 17.

That is a style issue that isn’t easy to resolve. I’m declaring global
variables in Bonescript and that is not typically desired. I’m doing
it for the purpose of simplifying access to the functions. Perhaps it
would be better to avoid polluting the global namespace and force
people using Bonescript to learn this basic aspect of JavaScript by
giving them a cleaner example.

But this doesn´t seem to cause problems with other users, am I doing something wrong?

After reading various blog entries I tried the following using Cloud 9:

A " git status " results in:
[guest@cloud9]: /workspace git status

on branch master

changes not staged for commit:

(use “git add …” to update what will be committed)

(use “git checkout – …” to discard changes in working directory)

modified: .gitignore

modified: node_modules/bonescript/build/Release/misc.node

untracked files:

(use “git add …” to update what will be committed)

.gitmodules

node_modules/bonescript/misc.node

node_modules/fork

no changes added to commit (use “git add” and/or “git commit -a”)

A " git log | head -3 " results in:
fatal: ambiguous argument | : unkown revision or path not in the working
tree

It sounds like you are executing these commands from within Cloud9
IDE. You can’t issue pipe (|) commands in that interpreter and would
need to do it from within bash. You have the output below, so you
don’t need to worry about it.

A " git log " results in (only last entry shown here):
Author: Jason Kridner jkri...@beagleboard.org
Date: Wed Apr 18 16:32:40 2012 -0400
Merge branch wants-rebase
commit 83b2e858ae800de06a01d6d894e4d6a2850aba95

Clearly this is an old version as this does not match
‘debd593b47b85cab58f69a8b526160e3754e5bb5’. It seems your image is
off on another branch besides ‘master’.

I don´t understand how it could be an old version since I downloaded directly from the Angstrom-Beaglebone site and also did an opkg update + opkg upgrade and there were no indications of any problems.

Under /var/lib/cloud9 in bash
or in the Cloud9 IDE window, execute:
git remote update
git stash

git checkout master
git status

Then, let me know what the output is.

I did the above in with the following results:

root@beaglebone:/var/lib/cloud9# git remote update
Fetching origin
remote: Counting objects: 103, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 98 (delta 56), reused 96 (delta 54)
Unpacking objects: 100% (98/98), done.
From git://github.com/jadonk/bonescript
d8e7d0e…6265534 blockly → origin/blockly

root@beaglebone:/var/lib/cloud9# git stash
Saved working directory and index state WIP on master: debd593 bone101: remove PrinceXML files
HEAD is now at debd593 bone101: remove PrinceXML files

root@beaglebone:/var/lib/cloud9# git checkout master
Already on ‘master’

root@beaglebone:/var/lib/cloud9# git status

On branch master

Untracked files:

(use “git add …” to include in what will be committed)

Hi, thanks for the reply.

> Hi,
> I´m also new to Linux/Angstrom and the Beaglebone. I also have problems
> with
> Bonescript.
> I have tried the following with no improvement:
> - changed my laptop from Windows 7 to Linux/ubuntu12.04
> - downloaded Angstrom-Beaglebone to a new SD card
> - performed (twice) an " opkg update " and " opkg upgrade "

Personally, I never like to do "opkg update; opkg upgrade", but rather
download the latest demo image from
http://downloads.angstrom-distribution.org/demo/beaglebone/.

>
> The following appears to work okay (connecting via ethernet to router):
> - access via a terminal
> - via the browser (Firefox): access to beaglebone.local and access to
> the
> JavaScript terminal (bone101)and the Shell (bone101).
>
> The following does not work:
> - via the browser: attempting to access Gate One fails to connect

Get on the latest demo image. Make sure you accept the lack of
certificate on the page. Perhaps the port should be moved to avoid
this issue?

> - via the browser: accessing Cloud 9 is succesful but all .js files show
> errors. For example blinkled.js shows either "assigning to undeclared
> variable" and/or "undeclared variable" at lines
> 3,4,6,7,8,11,12,13,14,15,16
> and 17.

That is a style issue that isn't easy to resolve. I'm declaring global
variables in Bonescript and that is not typically desired. I'm doing
it for the purpose of simplifying access to the functions. Perhaps it
would be better to avoid polluting the global namespace and force
people using Bonescript to learn this basic aspect of JavaScript by
giving them a cleaner example.

But this doesn´t seem to cause problems with other users, am I doing
something wrong?

>
> After reading various blog entries I tried the following using Cloud 9:
>
> A " git status " results in:
> [guest@cloud9]: /workspace git status
> # on branch master
> # changes not staged for commit:
> # (use "git add <file>..." to update what will be committed)
> # (use "git checkout -- <file>..." to discard changes in working
> directory)
> # modified: .gitignore
> # modified: node_modules/bonescript/build/Release/misc.node
> # untracked files:
> # (use "git add <file>..." to update what will be committed)
> #
> # .gitmodules
> # node_modules/bonescript/misc.node
> # node_modules/fork
> no changes added to commit (use "git add" and/or "git commit -a")
>
> A " git log | head -3 " results in:
> fatal: ambiguous argument `|` : unkown revision or path not in the
> working
> tree

It sounds like you are executing these commands from within Cloud9
IDE. You can't issue pipe (|) commands in that interpreter and would
need to do it from within bash. You have the output below, so you
don't need to worry about it.

>
> A " git log " results in (only last entry shown here):
> Author: Jason Kridner <jkri...@beagleboard.org>
> Date: Wed Apr 18 16:32:40 2012 -0400
> Merge branch `wants-rebase`
> commit 83b2e858ae800de06a01d6d894e4d6a2850aba95

Clearly this is an old version as this does not match
'debd593b47b85cab58f69a8b526160e3754e5bb5'. It seems your image is
off on another branch besides 'master'.

I don´t understand how it could be an old version since I downloaded
directly from the Angstrom-Beaglebone site and also did an opkg update +
opkg upgrade and there were no indications of any problems.

Under /var/lib/cloud9 in bash
or in the Cloud9 IDE window, execute:
git remote update
git stash

git checkout master
git status

Then, let me know what the output is.

I did the above in with the following results:

root@beaglebone:/var/lib/cloud9# git remote update
Fetching origin
remote: Counting objects: 103, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 98 (delta 56), reused 96 (delta 54)
Unpacking objects: 100% (98/98), done.
From git://github.com/jadonk/bonescript
   d8e7d0e..6265534 blockly -> origin/blockly

root@beaglebone:/var/lib/cloud9# git stash
Saved working directory and index state WIP on master: debd593 bone101:
remove PrinceXML files
HEAD is now at debd593 bone101: remove PrinceXML files

Glad to see you are running the latest version now off of the correct
branch. Not sure how it got messed up before, but this here is good.

root@beaglebone:/var/lib/cloud9# git checkout master
Already on 'master'

root@beaglebone:/var/lib/cloud9# git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitmodules
# node_modules/bonescript/misc.node
# node_modules/fork/
nothing added to commit but untracked files present (use "git add" to track)
root@beaglebone:/var/lib/cloud9#

root@beaglebone:/var/lib/cloud9# git log
    root@beaglebone:/var/lib/cloud9# git checkout master
    Already on 'master'
commit debd593b47b85cab58f69a8b526160e3754e5bb5
    Author: Jason Kridner <jdk@ti.com>
    Date: Thu Jul 26 13:03:59 2012 -0400
            bone101: remove PrinceXML files
            It doesn't work well enough. I'm currently producing PDFs with
screen
            captures instead.

However, the problems (no access to Cloud One and all *.js files unusable)
remain unchanged.

Do you mean Cloud9 IDE (JavaScript IDE for developing apps with the
Bonescript library served up at http://beaglebone.local:3000), Gate
One (ssh shell using the web browser served up at
https://beaglebone.local) or bone101 (demonstration Bonescript
application served up at http://beaglebone.local)? Haven't you been
issuing the commands through Cloud9 IDE? I'm still assuming you have
been based on the command line errors you reported.

What browser are you using? I highly recommend using Google Chrome.

Is there anything else that I can do?

Can you tell a bit more about what you mean by "all *.js files
unusable"? Perhaps capture your screen to make it really clear?

Is there any difference between using the Ubuntu terminal and an ssh
root@192.168.2.xxx connection as opposed to using BeagleBone bash in the
browser?

Do you mean Gate One (https://beaglebone.local)? Yes, there are some
differences. The best performance will be given by performing a
command-line "ssh root@192.168.X.Y" or "ssh root@beaglebone.local".

Hi, thanks for the reply.

Hi,
I´m also new to Linux/Angstrom and the Beaglebone. I also have problems
with
Bonescript.
I have tried the following with no improvement:

  • changed my laptop from Windows 7 to Linux/ubuntu12.04
  • downloaded Angstrom-Beaglebone to a new SD card
  • performed (twice) an " opkg update " and " opkg upgrade "

Personally, I never like to do “opkg update; opkg upgrade”, but rather
download the latest demo image from
http://downloads.angstrom-distribution.org/demo/beaglebone/.

The following appears to work okay (connecting via ethernet to router):

  • access via a terminal
  • via the browser (Firefox): access to beaglebone.local and access to
    the
    JavaScript terminal (bone101)and the Shell (bone101).

The following does not work:

  • via the browser: attempting to access Gate One fails to connect

Get on the latest demo image. Make sure you accept the lack of
certificate on the page. Perhaps the port should be moved to avoid
this issue?

  • via the browser: accessing Cloud 9 is succesful but all .js files show
    errors. For example blinkled.js shows either “assigning to undeclared
    variable” and/or “undeclared variable” at lines
    3,4,6,7,8,11,12,13,14,15,16
    and 17.

That is a style issue that isn’t easy to resolve. I’m declaring global
variables in Bonescript and that is not typically desired. I’m doing
it for the purpose of simplifying access to the functions. Perhaps it
would be better to avoid polluting the global namespace and force
people using Bonescript to learn this basic aspect of JavaScript by
giving them a cleaner example.

But this doesn´t seem to cause problems with other users, am I doing
something wrong?

After reading various blog entries I tried the following using Cloud 9:

A " git status " results in:
[guest@cloud9]: /workspace git status

on branch master

changes not staged for commit:

(use “git add …” to update what will be committed)

(use “git checkout – …” to discard changes in working

directory)

modified: .gitignore

modified: node_modules/bonescript/build/Release/misc.node

untracked files:

(use “git add …” to update what will be committed)

.gitmodules

node_modules/bonescript/misc.node

node_modules/fork

no changes added to commit (use “git add” and/or “git commit -a”)

A " git log | head -3 " results in:
fatal: ambiguous argument | : unkown revision or path not in the
working
tree

It sounds like you are executing these commands from within Cloud9
IDE. You can’t issue pipe (|) commands in that interpreter and would
need to do it from within bash. You have the output below, so you
don’t need to worry about it.

A " git log " results in (only last entry shown here):
Author: Jason Kridner jkri...@beagleboard.org
Date: Wed Apr 18 16:32:40 2012 -0400
Merge branch wants-rebase
commit 83b2e858ae800de06a01d6d894e4d6a2850aba95

Clearly this is an old version as this does not match
‘debd593b47b85cab58f69a8b526160e3754e5bb5’. It seems your image is
off on another branch besides ‘master’.

I don´t understand how it could be an old version since I downloaded
directly from the Angstrom-Beaglebone site and also did an opkg update +
opkg upgrade and there were no indications of any problems.

Under /var/lib/cloud9 in bash
or in the Cloud9 IDE window, execute:
git remote update
git stash

git checkout master
git status

Then, let me know what the output is.

I did the above in with the following results:

root@beaglebone:/var/lib/cloud9# git remote update
Fetching origin
remote: Counting objects: 103, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 98 (delta 56), reused 96 (delta 54)
Unpacking objects: 100% (98/98), done.
From git://github.com/jadonk/bonescript
d8e7d0e…6265534 blockly → origin/blockly

root@beaglebone:/var/lib/cloud9# git stash
Saved working directory and index state WIP on master: debd593 bone101:
remove PrinceXML files
HEAD is now at debd593 bone101: remove PrinceXML files

Glad to see you are running the latest version now off of the correct
branch. Not sure how it got messed up before, but this here is good.

root@beaglebone:/var/lib/cloud9# git checkout master
Already on ‘master’

root@beaglebone:/var/lib/cloud9# git status

On branch master

Untracked files:

(use “git add …” to include in what will be committed)

.gitmodules

node_modules/bonescript/misc.node

node_modules/fork/

nothing added to commit but untracked files present (use “git add” to track)
root@beaglebone:/var/lib/cloud9#

root@beaglebone:/var/lib/cloud9# git log
root@beaglebone:/var/lib/cloud9# git checkout master
Already on ‘master’
commit debd593b47b85cab58f69a8b526160e3754e5bb5
Author: Jason Kridner j...@ti.com
Date: Thu Jul 26 13:03:59 2012 -0400
bone101: remove PrinceXML files
It doesn’t work well enough. I’m currently producing PDFs with
screen
captures instead.

However, the problems (no access to Cloud One and all *.js files unusable)
remain unchanged.

Do you mean Cloud9 IDE (JavaScript IDE for developing apps with the
Bonescript library served up at http://beaglebone.local:3000), Gate
One (ssh shell using the web browser served up at
https://beaglebone.local) or bone101 (demonstration Bonescript
application served up at http://beaglebone.local)? Haven’t you been
issuing the commands through Cloud9 IDE? I’m still assuming you have
been based on the command line errors you reported.

Sorry, I should have said Gate One not Cloud One. If I attempt to connect to Gate One from the bone101 page 7 the error message “fault: connection failed” is displayed.
The Cloud9 IDE appears to work okay but all the *.js files in the Project Files (analog.js, blinkled.js, bone101.js, fade.js, input.js, input2.js, loops.js and parallel.js) show the same errors (assigning to undeclared variable, undeclared variable) see attachment.
I´m using Firefox as a browser.

I used the Ubuntu terminal with " ssh root@192.168.2.xxx " to enter your correction commands.

What browser are you using? I highly recommend using Google Chrome.

Is there anything else that I can do?

Can you tell a bit more about what you mean by “all *.js files
unusable”? Perhaps capture your screen to make it really clear?

Is there any difference between using the Ubuntu terminal and an ssh
root@192.168.2.xxx connection as opposed to using BeagleBone bash in the
browser?

Do you mean Gate One (https://beaglebone.local)? Yes, there are some
differences. The best performance will be given by performing a
command-line “ssh root@192.168.X.Y” or “ssh root@beaglebone.local”.

Gate One does not work at all (fails to connect). With BeagleBone bash above I was referring to the Shell (bone101) called from BeagleBone 101(7). The bash terminal which opens seems to work okay.

BlinkledFoto-120926- 201154.png

> Hi, thanks for the reply.
>
>
>>
>> > Hi,
>> > I´m also new to Linux/Angstrom and the Beaglebone. I also have
>> > problems
>> > with
>> > Bonescript.
>> > I have tried the following with no improvement:
>> > - changed my laptop from Windows 7 to Linux/ubuntu12.04
>> > - downloaded Angstrom-Beaglebone to a new SD card
>> > - performed (twice) an " opkg update " and " opkg upgrade "
>>
>> Personally, I never like to do "opkg update; opkg upgrade", but rather
>> download the latest demo image from
>> http://downloads.angstrom-distribution.org/demo/beaglebone/.
>>
>> >
>> > The following appears to work okay (connecting via ethernet to
>> > router):
>> > - access via a terminal
>> > - via the browser (Firefox): access to beaglebone.local and access
>> > to
>> > the
>> > JavaScript terminal (bone101)and the Shell (bone101).
>> >
>> > The following does not work:
>> > - via the browser: attempting to access Gate One fails to connect
>>
>> Get on the latest demo image. Make sure you accept the lack of
>> certificate on the page. Perhaps the port should be moved to avoid
>> this issue?
>>
>> > - via the browser: accessing Cloud 9 is succesful but all .js files
>> > show
>> > errors. For example blinkled.js shows either "assigning to undeclared
>> > variable" and/or "undeclared variable" at lines
>> > 3,4,6,7,8,11,12,13,14,15,16
>> > and 17.
>>
>> That is a style issue that isn't easy to resolve. I'm declaring global
>> variables in Bonescript and that is not typically desired. I'm doing
>> it for the purpose of simplifying access to the functions. Perhaps it
>> would be better to avoid polluting the global namespace and force
>> people using Bonescript to learn this basic aspect of JavaScript by
>> giving them a cleaner example.
>
>
> But this doesn´t seem to cause problems with other users, am I doing
> something wrong?
>>
>>
>> >
>> > After reading various blog entries I tried the following using Cloud
>> > 9:
>> >
>> > A " git status " results in:
>> > [guest@cloud9]: /workspace git status
>> > # on branch master
>> > # changes not staged for commit:
>> > # (use "git add <file>..." to update what will be committed)
>> > # (use "git checkout -- <file>..." to discard changes in working
>> > directory)
>> > # modified: .gitignore
>> > # modified: node_modules/bonescript/build/Release/misc.node
>> > # untracked files:
>> > # (use "git add <file>..." to update what will be committed)
>> > #
>> > # .gitmodules
>> > # node_modules/bonescript/misc.node
>> > # node_modules/fork
>> > no changes added to commit (use "git add" and/or "git commit -a")
>> >
>> > A " git log | head -3 " results in:
>> > fatal: ambiguous argument `|` : unkown revision or path not in the
>> > working
>> > tree
>>
>> It sounds like you are executing these commands from within Cloud9
>> IDE. You can't issue pipe (|) commands in that interpreter and would
>> need to do it from within bash. You have the output below, so you
>> don't need to worry about it.
>>
>> >
>> > A " git log " results in (only last entry shown here):
>> > Author: Jason Kridner <jkri...@beagleboard.org>
>> > Date: Wed Apr 18 16:32:40 2012 -0400
>> > Merge branch `wants-rebase`
>> > commit 83b2e858ae800de06a01d6d894e4d6a2850aba95
>>
>> Clearly this is an old version as this does not match
>> 'debd593b47b85cab58f69a8b526160e3754e5bb5'. It seems your image is
>> off on another branch besides 'master'.
>
>
> I don´t understand how it could be an old version since I downloaded
> directly from the Angstrom-Beaglebone site and also did an opkg update +
> opkg upgrade and there were no indications of any problems.
>
>> Under /var/lib/cloud9 in bash
>> or in the Cloud9 IDE window, execute:
>> git remote update
>> git stash
>>
>> git checkout master
>> git status
>>
>> Then, let me know what the output is.
>>
> I did the above in with the following results:
>
> root@beaglebone:/var/lib/cloud9# git remote update
> Fetching origin
> remote: Counting objects: 103, done.
> remote: Compressing objects: 100% (43/43), done.
> remote: Total 98 (delta 56), reused 96 (delta 54)
> Unpacking objects: 100% (98/98), done.
> From git://github.com/jadonk/bonescript
> d8e7d0e..6265534 blockly -> origin/blockly
>
> root@beaglebone:/var/lib/cloud9# git stash
> Saved working directory and index state WIP on master: debd593 bone101:
> remove PrinceXML files
> HEAD is now at debd593 bone101: remove PrinceXML files

Glad to see you are running the latest version now off of the correct
branch. Not sure how it got messed up before, but this here is good.

>
> root@beaglebone:/var/lib/cloud9# git checkout master
> Already on 'master'
>
> root@beaglebone:/var/lib/cloud9# git status
> # On branch master
> # Untracked files:
> # (use "git add <file>..." to include in what will be committed)
> #
> # .gitmodules
> # node_modules/bonescript/misc.node
> # node_modules/fork/
> nothing added to commit but untracked files present (use "git add" to
> track)
> root@beaglebone:/var/lib/cloud9#
>
> root@beaglebone:/var/lib/cloud9# git log
> root@beaglebone:/var/lib/cloud9# git checkout master
> Already on 'master'
> commit debd593b47b85cab58f69a8b526160e3754e5bb5
> Author: Jason Kridner <j...@ti.com>
> Date: Thu Jul 26 13:03:59 2012 -0400
> bone101: remove PrinceXML files
> It doesn't work well enough. I'm currently producing PDFs
> with
> screen
> captures instead.
>
> However, the problems (no access to Cloud One and all *.js files
> unusable)
> remain unchanged.

Do you mean Cloud9 IDE (JavaScript IDE for developing apps with the
Bonescript library served up at http://beaglebone.local:3000), Gate
One (ssh shell using the web browser served up at
https://beaglebone.local) or bone101 (demonstration Bonescript
application served up at http://beaglebone.local)? Haven't you been
issuing the commands through Cloud9 IDE? I'm still assuming you have
been based on the command line errors you reported.

Sorry, I should have said Gate One not Cloud One. If I attempt to connect to
Gate One from the bone101 page 7 the error message "fault: connection
failed" is displayed.

Can you give a picture of that error? Likely this is due to the fact
that the https port is being used, but a valid certificate is not
supplied. You'll need to accept the supplied certificate manually.

On Chrome, I get the following message:
The site's security certificate is not trusted!
You attempted to reach beaglebone-2.local, but the server presented a
certificate issued by an entity that is not trusted by your computer's
operating system. This may mean that the server has generated its own
security credentials, which Google Chrome cannot rely on for identity
information, or an attacker may be trying to intercept your
communications.
You should not proceed, especially if you have never seen this warning
before for this site.

At this point, I click "proceed anyway" because I know I'm connected
to my own board and I'm not sharing any secure information over the
connection.

You might be able to import the certificate into your trusted list.
Read more here for Chrome, but Firefox should be similar:
http://superuser.com/questions/27268/how-do-i-disable-the-warning-chrome-gives-if-a-security-certificate-is-not-trust

The Cloud9 IDE appears to work okay but all the *.js files in the Project
Files (analog.js, blinkled.js, bone101.js, fade.js, input.js, input2.js,
loops.js and parallel.js) show the same errors (assigning to undeclared
variable, undeclared variable) see attachment.

Yeah, this is the style issue I was mentioning. These are warnings,
not an indication that the applications won't work. Currently, I make
a lot of use of global assignment as it is simpler than trying to
understand variable scoping. The IDE suggests against that and thus
generates those warnings. You should be able to run the scripts just
fine.

I´m using Firefox as a browser.

I used the Ubuntu terminal with " ssh root@192.168.2.xxx " to enter your
correction commands.

What browser are you using? I highly recommend using Google Chrome.

> Is there anything else that I can do?

Can you tell a bit more about what you mean by "all *.js files
unusable"? Perhaps capture your screen to make it really clear?

>
> Is there any difference between using the Ubuntu terminal and an ssh
> root@192.168.2.xxx connection as opposed to using BeagleBone bash in
> the
> browser?

Do you mean Gate One (https://beaglebone.local)? Yes, there are some
differences. The best performance will be given by performing a
command-line "ssh root@192.168.X.Y" or "ssh root@beaglebone.local".

Gate One does not work at all (fails to connect). With BeagleBone bash above
I was referring to the Shell (bone101) called from BeagleBone 101(7). The
bash terminal which opens seems to work okay.

k, you can execute commands from there that don't need a real
terminal, whereas Gate One provides a real terminal. There are lots of
bugs in my bone101 shell, but it was provided as an example of what
you can create in the browser relatively easily with all of the source
in the bone101 project under /var/lib/cloud9.

Hi, thanks for the reply.

Hi,
I´m also new to Linux/Angstrom and the Beaglebone. I also have
problems
with
Bonescript.
I have tried the following with no improvement:

  • changed my laptop from Windows 7 to Linux/ubuntu12.04
  • downloaded Angstrom-Beaglebone to a new SD card
  • performed (twice) an " opkg update " and " opkg upgrade "

Personally, I never like to do “opkg update; opkg upgrade”, but rather
download the latest demo image from
http://downloads.angstrom-distribution.org/demo/beaglebone/.

The following appears to work okay (connecting via ethernet to
router):

  • access via a terminal
  • via the browser (Firefox): access to beaglebone.local and access
    to
    the
    JavaScript terminal (bone101)and the Shell (bone101).

The following does not work:

  • via the browser: attempting to access Gate One fails to connect

Get on the latest demo image. Make sure you accept the lack of
certificate on the page. Perhaps the port should be moved to avoid
this issue?

  • via the browser: accessing Cloud 9 is succesful but all .js files
    show
    errors. For example blinkled.js shows either “assigning to undeclared
    variable” and/or “undeclared variable” at lines
    3,4,6,7,8,11,12,13,14,15,16
    and 17.

That is a style issue that isn’t easy to resolve. I’m declaring global
variables in Bonescript and that is not typically desired. I’m doing
it for the purpose of simplifying access to the functions. Perhaps it
would be better to avoid polluting the global namespace and force
people using Bonescript to learn this basic aspect of JavaScript by
giving them a cleaner example.

But this doesn´t seem to cause problems with other users, am I doing
something wrong?

After reading various blog entries I tried the following using Cloud
9:

A " git status " results in:
[guest@cloud9]: /workspace git status

on branch master

changes not staged for commit:

(use “git add …” to update what will be committed)

(use “git checkout – …” to discard changes in working

directory)

modified: .gitignore

modified: node_modules/bonescript/build/Release/misc.node

untracked files:

(use “git add …” to update what will be committed)

.gitmodules

node_modules/bonescript/misc.node

node_modules/fork

no changes added to commit (use “git add” and/or “git commit -a”)

A " git log | head -3 " results in:
fatal: ambiguous argument | : unkown revision or path not in the
working
tree

It sounds like you are executing these commands from within Cloud9
IDE. You can’t issue pipe (|) commands in that interpreter and would
need to do it from within bash. You have the output below, so you
don’t need to worry about it.

A " git log " results in (only last entry shown here):
Author: Jason Kridner jkri...@beagleboard.org
Date: Wed Apr 18 16:32:40 2012 -0400
Merge branch wants-rebase
commit 83b2e858ae800de06a01d6d894e4d6a2850aba95

Clearly this is an old version as this does not match
‘debd593b47b85cab58f69a8b526160e3754e5bb5’. It seems your image is
off on another branch besides ‘master’.

I don´t understand how it could be an old version since I downloaded
directly from the Angstrom-Beaglebone site and also did an opkg update +
opkg upgrade and there were no indications of any problems.

Under /var/lib/cloud9 in bash
or in the Cloud9 IDE window, execute:
git remote update
git stash

git checkout master
git status

Then, let me know what the output is.

I did the above in with the following results:

root@beaglebone:/var/lib/cloud9# git remote update
Fetching origin
remote: Counting objects: 103, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 98 (delta 56), reused 96 (delta 54)
Unpacking objects: 100% (98/98), done.
From git://github.com/jadonk/bonescript
d8e7d0e…6265534 blockly → origin/blockly

root@beaglebone:/var/lib/cloud9# git stash
Saved working directory and index state WIP on master: debd593 bone101:
remove PrinceXML files
HEAD is now at debd593 bone101: remove PrinceXML files

Glad to see you are running the latest version now off of the correct
branch. Not sure how it got messed up before, but this here is good.

root@beaglebone:/var/lib/cloud9# git checkout master
Already on ‘master’

root@beaglebone:/var/lib/cloud9# git status

On branch master

Untracked files:

(use “git add …” to include in what will be committed)

.gitmodules

node_modules/bonescript/misc.node

node_modules/fork/

nothing added to commit but untracked files present (use “git add” to
track)
root@beaglebone:/var/lib/cloud9#

root@beaglebone:/var/lib/cloud9# git log
root@beaglebone:/var/lib/cloud9# git checkout master
Already on ‘master’
commit debd593b47b85cab58f69a8b526160e3754e5bb5
Author: Jason Kridner j...@ti.com
Date: Thu Jul 26 13:03:59 2012 -0400
bone101: remove PrinceXML files
It doesn’t work well enough. I’m currently producing PDFs
with
screen
captures instead.

However, the problems (no access to Cloud One and all *.js files
unusable)
remain unchanged.

Do you mean Cloud9 IDE (JavaScript IDE for developing apps with the
Bonescript library served up at http://beaglebone.local:3000), Gate
One (ssh shell using the web browser served up at
https://beaglebone.local) or bone101 (demonstration Bonescript
application served up at http://beaglebone.local)? Haven’t you been
issuing the commands through Cloud9 IDE? I’m still assuming you have
been based on the command line errors you reported.

Sorry, I should have said Gate One not Cloud One. If I attempt to connect to
Gate One from the bone101 page 7 the error message “fault: connection
failed” is displayed.

Can you give a picture of that error? Likely this is due to the fact
that the https port is being used, but a valid certificate is not
supplied. You’ll need to accept the supplied certificate manually.

It doesn´t appear to be a certificate problem, no mention is made of a certifecate, it simply shows that Firefox is unable to make a connection to the server beaglebone.local. The first attachment simply shows the bb101(7) page where I click the Gate One link. The second attachment shows the error message which is then displayed. If I click “back” in Firefox it returns to the bb101(7) page which is still okay since I can click the Cloud9 link and it opens correctly. Also I can successfully connect to the bone via a Ubuntu terminal so I could just use that but it would nice to know what is causing the Gate One problem.

On Chrome, I get the following message:
The site’s security certificate is not trusted!
You attempted to reach beaglebone-2.local, but the server presented a
certificate issued by an entity that is not trusted by your computer’s
operating system. This may mean that the server has generated its own
security credentials, which Google Chrome cannot rely on for identity
information, or an attacker may be trying to intercept your
communications.
You should not proceed, especially if you have never seen this warning
before for this site.

At this point, I click “proceed anyway” because I know I’m connected
to my own board and I’m not sharing any secure information over the
connection.

You might be able to import the certificate into your trusted list.
Read more here for Chrome, but Firefox should be similar:
http://superuser.com/questions/27268/how-do-i-disable-the-warning-chrome-gives-if-a-security-certificate-is-not-trust

The Cloud9 IDE appears to work okay but all the *.js files in the Project
Files (analog.js, blinkled.js, bone101.js, fade.js, input.js, input2.js,
loops.js and parallel.js) show the same errors (assigning to undeclared
variable, undeclared variable) see attachment.

Yeah, this is the style issue I was mentioning. These are warnings,
not an indication that the applications won’t work. Currently, I make
a lot of use of global assignment as it is simpler than trying to
understand variable scoping. The IDE suggests against that and thus
generates those warnings. You should be able to run the scripts just
fine.

I hadn´t tried to run the application (e.g. blinkled.js) because I thought that all the error messages would just result in chaos. So I tried it after your comment above and it does actually work - the LED´s blink. Fantastic. So now the only remaining problem is the failed connection to Gate One.

Could you also tell me how to correctly/safely shutdown and switch off the Bone? It seems a bit crude and maybe dangerous (possible data corruption) to simply switch off or unplug the power supply. I do “exit” the ssh in the terminal and also close any browser tabs to the bone before I switch off the bone´s power.

GateOne-120927-StartViaBB101_7.png

GateOne-120927-ErrorMessage.png