November 29, 2013

My first day with the Beaglebone

Back in May, I bought a couple of Beaglebone Blacks, and they have been sitting in their boxes ever since. But now (6 months later) I am getting them out and seeing how much effort is involved in getting started with them.

I plug them (via a USB cable) into my Fedora 19 linux system and they are recognized right away (they identify themselves as vendor 1D6B with product ID 0104. My system sets up three devices for them. A serial port as ttyACM0 (I have no idea what that is for), a mass storage device, and a RNDIS network device. I can mount and examine the mass storage device, but something is wrong with the RNDIS device. I am supposed to be able to access the Beagle at 192.168.7.2, but it isn't working. The command "ifconfig -a" shows a bizarre network device enp0s29u1u7 with the same MAC address as was reported in the system logs when the USB system was detecting the Beagle, but it is not UP or RUNNING, nor does it have an IP number assigned.

The advice I got from a Beagle veteran is to just use USB to power the device, and then hook up a network cable and let it do DHCP. This works rather nicely, I just have to look at the web management page for my router to find out what IP address got assigned. Then once I have the IP address, I can use that to visit a web page, or ssh as root (root has no password by default).

My device is running (from uname -a) linux 3.8.13

My Angstrom version (from /etc/anstrom-version) is 2012.12

Writing Code

And now we face the issue of writing code for the Beagle Bone. The method that is encouraged as the Beagle Bone mainstream is to write code in Javascript using the Cloud 9 IDE. I am always unsure about an IDE, but they are trying to make this "arduino like" and cater to non programmers. Javascript is fine, but we find ourselves suddenly in the midst of Node JS, SocketIO, and html5 -- although maybe not all at once.

The mainstream method of writing javascript for the Beagle Bone is to use "bonescript", which is a library of BeagleBone specific routines for Javascript and Node.js. There is also a mental adjustment required to the way that Node.js does everything in event driven callbacks.

Well, it looks like Cloud 9 is as buggy as a bait store. I wisely make a file with only one line in it and try to save it and it gives me errors telling me to check my network connection. Cloud 9 by the way, not that you should rush trying to use it, is at port 3000 of whatever address your device shows up at, in my case http://192.168.0.32/3000. Some searching on this topic hints strongly that these problems will be solved if I upgrade to the latest Angstrom distribution

Using ps to grub around shows that cloud9 is running as an instance of "node4". I wonder what is different between node and node4. I also wonder what gateone.py is, and where it lives.

/usr/bin/node autorun.js
/usr/bin/node4 /usr/share/cloud9/bin/cloud9.js -l 0.0.0.0 -w /var/lib/cloud9 -p 3000
/usr/bin/python gateone.py
Amazingly, I see an instance of X running! Hard to believe we have X and no locate!!

The upgrade requires that I go buy a micro SD card of 4G or greater capacity. It also requires that I run from a powered USB hub or using a 5 volt wall wart that will put out 1 amp or greater. Current draw may exceed 500 mA, which will cause nightmares if I try to do it while powered from a PC USB jack, as I currently am.

End of day conclusions

Nothing but problems. Could not get network access over USB, which made it impossible to follow the regular "getting started" instructions. No locate command once I get in via ssh, which makes it problematic to find out how they have laid out files. The Cloud9 gui is unable to save files, making it impossible to even try the simplest demos (unless I want to try typing in code that will be lost to the four winds, if that even works). A possible fix is doing a software upgrade, which requires me to go to a store and buy a 4G micro SD card. This will be about a $10 purchase at Best Buy or some office supply store. An even bigger problem is the need for a 5 volt wall wart - I need to go check my collection and see if I get lucky.

Pretty shameful to ship a product that basically does not work out of the box.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org