debian testing: 2016-01-31 (Node-RED)

Howdy!

So there's a little something new in this week's snapshot (lxqt not console):

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#2016-01-31

http://beaglebone.local:1880/

nodered.org v0.13.1

Regards,

On earlier jessie/stretch rootfs, then can now be installed via:

sudo apt-get update
sudo apt-get install bb-node-red-installer

Regards,

Thanks! I’m downloading it now. I’ll post if I have any issues on a BBG, I plan on using an 8GB SD card.

I think its pretty sweet to have node-red running “out of the box” but without the BoneScript access to the GPIO and A/D pins (I assume BoneScript PWM is still broken) its nowhere near as neat as it could be!

If I “downgrade” to 3.8 kernel, what else is required to get BoneScript working beyond installing the Beaglebone nodes with npm?

I’m having issues with this image getting the “gadget” to connect – it seems to only work from a cold start – when I first plug it in the FAT partition mount but the gadget hangs “waiting for IP address” If I press reset it may or may not start after the reboot. So far its always started if I hold the powerbutton down until it shuts off, and then press it again to do a cold boot.

Some of it may be that I’m using Ubuntu-Mate 15.10, I try it later on my main Ubuntu 10.04 which has been mostly reliable mounting the gadget Ethernet.

Why don’t you use C/C++ addons for Nodejs?

https://nodejs.org/dist/latest-v5.x/docs/api/addons.html

With Nodejs C/C++ addons, you can interface to any I/O on the BBB.

Regards,
John

I think its pretty sweet to have node-red running "out of the box" but
without the BoneScript access to the GPIO and A/D pins (I assume BoneScript
PWM is still broken) its nowhere near as neat as it could be!

GPIO & A/D can be accessed via config-pin

root@beaglebone:~# config-pin -l P9.18
default gpio gpio_pu gpio_pd spi i2c pwm

If I "downgrade" to 3.8 kernel, what else is required to get BoneScript
working beyond installing the Beaglebone nodes with npm?

sudo apt-get install linux-image-3.8.13-bone79
sudo reboot

Bonescript is installed..

I'm having issues with this image getting the "gadget" to connect -- it
seems to only work from a cold start -- when I first plug it in the FAT
partition mount but the gadget hangs "waiting for IP address" If I press
reset it may or may not start after the reboot. So far its always started
if I hold the powerbutton down until it shuts off, and then press it again
to do a cold boot.

Okay, that's different.. Starts flashing the clean image to do reset
button testing. :wink:

journalctl -f | grep kernel
Feb 02 15:52:54 hades kernel: sd 15:0:0:0: Attached scsi generic sg1 type 0
Feb 02 15:52:54 hades kernel: sd 15:0:0:0: [sdb] 81920 512-byte
logical blocks: (41.9 MB/40.0 MiB)
Feb 02 15:52:54 hades kernel: sd 15:0:0:0: [sdb] Write Protect is off
Feb 02 15:52:54 hades kernel: sd 15:0:0:0: [sdb] Mode Sense: 0f 00 00 00
Feb 02 15:52:54 hades kernel: sd 15:0:0:0: [sdb] Write cache: enabled,
read cache: enabled, doesn't support DPO or FUA
Feb 02 15:52:54 hades kernel: sdb: sdb1
Feb 02 15:52:54 hades kernel: sd 15:0:0:0: [sdb] Attached SCSI removable disk
push reboot...
Feb 02 15:53:53 hades kernel: usb 5-1.4: USB disconnect, device number 8
Feb 02 15:53:53 hades kernel: rndis_host 5-1.4:1.0 enx7c669d4bac92:
unregister 'rndis_host' usb-0000:00:10.1-1.4, RNDIS device
Feb 02 15:53:53 hades kernel: sd 15:0:0:0: [sdb] Synchronizing SCSI cache
Feb 02 15:53:53 hades kernel: sd 15:0:0:0: [sdb] Synchronize Cache(10)
failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Feb 02 15:54:18 hades kernel: usb 5-1.4: new high-speed USB device
number 9 using xhci_hcd
Feb 02 15:54:18 hades kernel: usb 5-1.4: New USB device found,
idVendor=1d6b, idProduct=0104
Feb 02 15:54:18 hades kernel: usb 5-1.4: New USB device strings:
Mfr=3, Product=4, SerialNumber=5
Feb 02 15:54:18 hades kernel: usb 5-1.4: Product: BeagleBoneBlack
Feb 02 15:54:18 hades kernel: usb 5-1.4: Manufacturer: Circuitco
Feb 02 15:54:18 hades kernel: usb 5-1.4: SerialNumber: 0C-2414BBBK0103
Feb 02 15:54:18 hades kernel: rndis_host 5-1.4:1.0 eth0: register
'rndis_host' at usb-0000:00:10.1-1.4, RNDIS device, 7c:66:9d:4b:ac:92
Feb 02 15:54:18 hades kernel: cdc_acm 5-1.4:1.2: ttyACM0: USB ACM device
Feb 02 15:54:18 hades kernel: usb-storage 5-1.4:1.4: USB Mass Storage
device detected
Feb 02 15:54:18 hades kernel: scsi host16: usb-storage 5-1.4:1.4
Feb 02 15:54:18 hades kernel: rndis_host 5-1.4:1.0 enx7c669d4bac92:
renamed from eth0
Feb 02 15:54:18 hades kernel: IPv6: ADDRCONF(NETDEV_UP):
enx7c669d4bac92: link is not ready
Feb 02 15:54:19 hades kernel: scsi 16:0:0:0: Direct-Access Linux
File-Stor Gadget 0401 PQ: 0 ANSI: 2
Feb 02 15:54:19 hades kernel: sd 16:0:0:0: Attached scsi generic sg1 type 0
Feb 02 15:54:19 hades kernel: sd 16:0:0:0: [sdb] 81920 512-byte
logical blocks: (41.9 MB/40.0 MiB)
Feb 02 15:54:19 hades kernel: sd 16:0:0:0: [sdb] Write Protect is off
Feb 02 15:54:19 hades kernel: sd 16:0:0:0: [sdb] Mode Sense: 0f 00 00 00
Feb 02 15:54:19 hades kernel: sd 16:0:0:0: [sdb] Write cache: enabled,
read cache: enabled, doesn't support DPO or FUA
Feb 02 15:54:19 hades kernel: sdb: sdb1
Feb 02 15:54:19 hades kernel: sd 16:0:0:0: [sdb] Attached SCSI removable disk
yank power....
Feb 02 15:54:39 hades kernel: usb 5-1.4: USB disconnect, device number 9
Feb 02 15:54:39 hades kernel: rndis_host 5-1.4:1.0 enx7c669d4bac92:
unregister 'rndis_host' usb-0000:00:10.1-1.4, RNDIS device
Feb 02 15:54:39 hades kernel: sd 16:0:0:0: [sdb] Synchronizing SCSI cache
Feb 02 15:54:39 hades kernel: sd 16:0:0:0: [sdb] Synchronize Cache(10)
failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Feb 02 15:55:07 hades kernel: usb 5-1.4: new high-speed USB device
number 10 using xhci_hcd
Feb 02 15:55:07 hades kernel: usb 5-1.4: New USB device found,
idVendor=1d6b, idProduct=0104
Feb 02 15:55:07 hades kernel: usb 5-1.4: New USB device strings:
Mfr=3, Product=4, SerialNumber=5
Feb 02 15:55:07 hades kernel: usb 5-1.4: Product: BeagleBoneBlack
Feb 02 15:55:07 hades kernel: usb 5-1.4: Manufacturer: Circuitco
Feb 02 15:55:07 hades kernel: usb 5-1.4: SerialNumber: 0C-2414BBBK0103
Feb 02 15:55:07 hades kernel: rndis_host 5-1.4:1.0 eth0: register
'rndis_host' at usb-0000:00:10.1-1.4, RNDIS device, 7c:66:9d:4b:ac:92
Feb 02 15:55:07 hades kernel: cdc_acm 5-1.4:1.2: ttyACM0: USB ACM device
Feb 02 15:55:07 hades kernel: usb-storage 5-1.4:1.4: USB Mass Storage
device detected
Feb 02 15:55:07 hades kernel: scsi host17: usb-storage 5-1.4:1.4
Feb 02 15:55:07 hades kernel: rndis_host 5-1.4:1.0 enx7c669d4bac92:
renamed from eth0
Feb 02 15:55:07 hades kernel: IPv6: ADDRCONF(NETDEV_UP):
enx7c669d4bac92: link is not ready
Feb 02 15:55:08 hades kernel: scsi 17:0:0:0: Direct-Access Linux
File-Stor Gadget 0401 PQ: 0 ANSI: 2
Feb 02 15:55:08 hades kernel: sd 17:0:0:0: Attached scsi generic sg1 type 0
Feb 02 15:55:08 hades kernel: sd 17:0:0:0: [sdb] 81920 512-byte
logical blocks: (41.9 MB/40.0 MiB)
Feb 02 15:55:08 hades kernel: sd 17:0:0:0: [sdb] Write Protect is off
Feb 02 15:55:08 hades kernel: sd 17:0:0:0: [sdb] Mode Sense: 0f 00 00 00
Feb 02 15:55:08 hades kernel: sd 17:0:0:0: [sdb] Write cache: enabled,
read cache: enabled, doesn't support DPO or FUA
Feb 02 15:55:08 hades kernel: sdb: sdb1
Feb 02 15:55:08 hades kernel: sd 17:0:0:0: [sdb] Attached SCSI removable disk

humm, really no difference here.. can you do the same with your device?

Some of it may be that I'm using Ubuntu-Mate 15.10, I try it later on my
main Ubuntu 10.04 which has been mostly reliable mounting the gadget
Ethernet.

Regards,

Okay, now this is weird..

Testing the white, same as the black.. Start testing the green..

The "reset" button doesn't 100% work... Except when i want it to fail to work..

seems like a slight delay... (looking at serial debug, while hitting reset)

yet still usb/gadget/mass/acm comes up every time..

running: 4.3.0-1-amd64 on my host..

Regards,

think its pretty sweet to have node-red running “out of the box” but without the BoneScript access to the GPIO and A/D pins (I assume BoneScript PWM is still broken) its nowhere near as neat as it could be!

So, why don’t you learn how to do this without using Bonescript ? It’s not that hard, but is not exactly something that is easily relate-able via email either. But I’ll try . . .

What I did was . . .

  • start from a fresh bare image, but for simplicity a console image would work fine too.
  • downloaded, and installed development prerequisites. Including git.
  • downloaded Nodejs code via git, compiled, and installed once finished compiling.
  • Learned a bit of how to access files from Nodejs . . . and all set . . .done.

Thanks, I will definitely look into this if I find nodejs or node-red useful to my projects, but I’m setting up a system to get a non-programmer started with an automation project using a BBG as an alternative to wiring up a bunch of relays and timers. I’m going to give it to him tomorrow and show him some simple demos I’ve set up. He’s ~80 miles away, being “off-grid” with only limited Internet access via cell phone tethering so there are some serious obstacles for a programming newbie.

I will say, that all the talking you’ve done about Bonescript not working right for you. That time instead invested into learning about the various aspects of GPIO, Nodejs, etc in Linux, and you might be done by now. Me . . . I dove in pretty much knowing nothing about those given subjects, and had something working in a week piddling around with it.

Wally, what was the original purpose of this post ? E.G. what was it your buddy wanted to accomplish ? If it’s just twiddle a couple of GPIO’s and read an ADC or two. That can be done fairly easily in Nodejs, without even any plugins. So not need for Node-RED, or C/C++ if not wanted.

Howdy!

So there’s a little something new in this week’s snapshot (lxqt not console):

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#2016-01-31

http://beaglebone.local:1880/

nodered.org v0.13.1

On earlier jessie/stretch rootfs, then can now be installed via:

sudo apt-get update
sudo apt-get install bb-node-red-installer

Disk image seems to be becoming fairly full. Not sure if I did something wrong there for so much space to be used up.

Per http://nodered.org/docs/hardware/beagleboneblack.html, it seems we should also:

npm install -g --unsafe-perm node-red-node-beaglebone

Having some basic I/O functions like this seems very useful.

I started to try this out a few days ago before I traveled and will try to get back to it.

Sorry, but I’ve been away for awhile, but to answer your question, the main reason I’m thinking node-red and its bonescript nodes instead of “just programming in whatever” is basically two reasons:

  1. My buddy has zero programming skills or experience, although he is expert in electronics having built several non-autonomous robots (RC controlled), and lives “off-grid” with a solar power system he’s installed and maintains. He’s also 80+ miles away so my “hands-on” help is very intermittent at best.

  2. There are multiple buildings and distributed solar power systems, all covered by WiFi. While all his monitoring and control is pretty straightforward, the network code for multiple controller interaction and status reporting would totally blow him away. But node-red, and mqtt nicely offers a solution to this with “visual programming” (ever heard of LabView? I’m not a fan but it works well for scientists and engineers who aren’t programmers). It seems to me he is the person the authors of such systems had in mind. Its just too bad that things aren’t “smoother” out of the box.

While I don’t see node-red and bonescript as particularly useful to me, if it “just worked” after installing an image (or better if it worked with the images shipped in the eMMC) it would be easy to recommend as a starting point or alternative to Arduino (Arduino is a great starting point if one is motivated to learn programming but it falls down if you need networking).

Frankly all this /sys/class/ file read/write and device-tree overlay stuff is a nightmare and nobody seems to care if changes break anything (it especially breaks the documentation such as it is). To expect/demand that a non-programmer jump into it to be able to do anything is absurd.

I’m planning to down load the new 2016-02-21 image (or what follows by the time I actually get a chance to do it) and re-evaluate the situation, hopefully things are getting better.

–wally.

Frankly all this /sys/class/ file read/write and device-tree overlay stuff is a nightmare and nobody seems to care if changes break anything (it especially breaks the documentation such as it is). To expect/demand that a non-programmer jump into it to be able to do anything is absurd.

I do not know . . . I guess I will always view “solutions” that include labview, or node-red( this type of thing ) as an excuse to not have to learn how to write code. Which I view as an incredibly lame excuse . . . because. This gives people who do not understand a system the ability to build that system. Further, it keeps them from understanding the system it’s running on, unless they push themselves. Which I doubt most will do.

What will your friend do when he runs into a problem that is not easily solved with, or is not solvable with this current solution ?

Anyway, with the above aside, I get why you are interested in node-red now. I’ve a friend here who is a very good EE too, but does not like to code. So perhaps this is something he would do too. If I did not write code for his hardware projects that need it.

We’re getting off topic, but …

Frankly all this /sys/class/ file read/write and device-tree overlay stuff is a nightmare and nobody seems to care if changes break anything (it especially breaks the documentation such as it is). To expect/demand that a non-programmer jump into it to be able to do anything is absurd.

I do not know . . . I guess I will always view “solutions” that include labview, or node-red( this type of thing ) as an excuse to not have to learn how to write code. Which I view as an incredibly lame excuse . . . because. This gives people who do not understand a system the ability to build that system. Further, it keeps them from understanding the system it’s running on, unless they push themselves. Which I doubt most will do.

I bet you drive a car, but could you build one, fix the transmission, etc? Do you need to know how to build a computer to program one? Are the guys at TI designing the SOCs programming experts? – I’d wager not, given how bizarre some of the device driver code ends up being – I’d bet the attitude is: “if it saves a micro-cent per chip, fix it later in software!”

What will your friend do when he runs into a problem that is not easily solved with, or is not solvable with this current solution ?

Odds are he’d do the same as you’d likely do when your car breaks down or your A/C unit dies – call in someone with the expertise that you lack to come help you out.

In my friend’s case, that’d be me, in which case I’d would likely be jumping quickly into the nodeJS C/C++ add-ons mentioned above, and build him a few node-red function nodes to deal with it.

Anyway, with the above aside, I get why you are interested in node-red now. I’ve a friend here who is a very good EE too, but does not like to code. So perhaps this is something he would do too. If I did not write code for his hardware projects that need it.

I’d suggesting watching a few of the node-red youTube vidoes out there, If I were building appliances and wanted to add some “smarts” to them and jump on the current Internet Of Things bandwagon, something like node-red and open source SOC boards like the BB could be a game changer.

If my friend lived close by I’d probably have just offered to code for him too, but he wanted/expected to need to learn at least some programming and initially asked me to help decide what would be a better starting point – Arduino, PIC, Beaglebone, Raspberry Pi – small systems he’d heard about. After talking to him, once A/D and networking were in the mix the Beaglebone choice seemed clear and I stumbled across node-red pretty much by accident, but bells went off once I ran the second demo! My initial out of the box experiences with Cloud9 and Bonescript on a shinny new BBG were less than stellar, but that’s another story :slight_smile:

–wally.

Well then, perhaps you should point him to “Javascript - the good parts”, and I’m not sure what’s a good book for Nodejs. Passed that, again, I’m not sure what exactly is a good book for using Linux in the context of embedded Linux . . . with text on sysfs, and all that. I probably would not mind finding such a book myself, but google generally doesn’t disappoint.