This blog post discuss a weird  issue I faced when upgrading (apt-get upgrade) the Beaglebone blue and how I overcame the issue, basically the lesson learnt here is to enable SSH on the Beaglebone before doing anything else.

 

In addition, in the second half of the blog, I have also include the list of commands I used to setup USB webcam, to steam video over WiFi.This is going to help with demoing the features of the Beaglebone Blue as part of my Roadtest review, and a  couple mini projects I plan to do along the way. For this you will need an USB powered hub, to connect the web cam to the Beaglebone as you see in the picture below.

 

 

 

I received my Beaglebone Blue last week for a Roadtest review, and the first thing I did after going through the documentation, was to open the Cloud 9 IDE in Firefox using the url http://192.168.7.2:3000/ide.html and setup the WiFi network using the connmanctl command, and selecting my wifi router.

 

The next obvious step was to update and upgrade the Beaglebone blue, using the following commands

root@beaglebone:/var/lib/cloud9# apt-get update
root@beaglebone:/var/lib/cloud9# apt-get upgrade

 

Since the upgrade command required 170 MB of space to upgrade all the software, I left this to run and head to the kitchen to make myself a cup of tea. But after I was back in about 5 mins, I found my Beaglebone was shutdown, so I disconnected and reconnected my USB cable, and found that default drive for my Beaglebone showed up and I was able to launch default page using http://192.168.7.2 , but was not able to open the Cloud 9 IDE using http://192.168.7.2:3000/ide.html. Then I tried to SSH into the Beaglebone using IP address given to the Beaglebone by my router,(I figure this out by running the nmap command on my laptop), but I was not able to login. I then found a couple of blog post on the internet, that said ssh is not enabled by default on the Beaglebone with Debain Jessie, this meant I was stuck . After trying a few more things in vain for the next couple of hour, I took a break and revisited the issue again in a couple of days.

 

Now , when scrolling through the default Beaglebone page at  http://192.168.7.2  I came across Node –RED, which I knew had a feature to execute system commands, based on reading a few blog post about Node-RED  on the Raspberry Pi.

Beaglebone Blue Node-RED

This was the first time I used  Node – RED, and I just added 3 steps as you see in the screen shot below. The exec step is the middle step named ‘test’, and is used to run commands, so the first thing I ran was a simple ls command to check if this would work, and yes it did !. This meant I then ran

mkdir /var/lib/cloud9  -to create the missing cloud9 ide folder, which could have potentially be deleted as part of the apt-get upgrade process that did not complete.

 

And then I modified the exec step again with – reboot, but after the Beaglebone rebooted this dint do the trick , I then upgrade step again with

apt-get upgrade

which took about 10 mins to complete, and this time around at sat at my desk without moving a mussel , and then reboot the Beaglebone. And finally hooray   the cloud9 ide was up and running again.

 

Now the first thing I did was enable SSH using

root@beaglebone:/var/lib/cloud9# nano /etc/ssh/sshd_config

and then modifying the following section

from:

PermitRootLogin without-password

To:

PermitRootLogin yes

 

And then restarted the ssh service, and was able to login to the Beaglebone from my laptop via the terminal(if you are using Window then this would be something like putty.exe)

root@beaglebone:/var/lib/cloud9# /etc/init.d/ssh restart
[ ok ] Restarting ssh (via systemctl): ssh.service.

 

 

 

I also plan to do a couple of mini projects as part of my Roadtest for the Beaglebone Blue, which meant I had to use the USB webcam to demo, while simultaneously running commands on my laptop and doing a screen record of my laptop.This is something I saw in most of the youtube videos posted about the BeagleBone blue .Here are step to install mjpg_streamer to stream video from the usb webcam to the laptop via wifi. For this you will also need a powered USB hub.

 

Before you move ahead with the steps below check if your webcam is detected using lsusb, in my case I am using a very old Logitech C270 webcam.

root@beaglebone:~# lsusb
Bus 001 Device 003: ID 046d:0825 Logitech, Inc. Webcam C270
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

Now if you USB webcam is detected run the following commands

root@beaglebone:~#apt-get install libjpeg62-turbo-dev imagemagick libv4l-dev

 

Then download the modified version of MJPG-Streamer from Shrkey github repo, and then extract it, and install

  root@beaglebone:~#wget https://github.com/shrkey/mjpg-streamer/raw/master/mjpg-streamer.tar.gz
  root@beaglebone:~#tar -xvf mjpg-streamer.tar.gz
  root@beaglebone:~#cd mjpg-streamer
  root@beaglebone:~/mjpg-streamer# make
  root@beaglebone:~/mjpg-streamer# sudo make install

 

Now, if you are using the same webcam as I am run, the following command

root@beaglebone:~/mjpg-streamer#./mjpg_streamer -i "./input_uvc.so -y YUYV" -o "./output_http.so -p 8090 -n -w ./www"

 

Setting up USB webcam

Note: if you are using a different web cam you may have to modify the command above, to include the video format of your webcam. To check the video format run

root@beaglebone:~/mjpg-streamer#v4l2-ctl --list-formats

 

To login checkout the video stream of you webcam use the url http://BeagleBoneIPaddress:8090/?action=stream

 

Note: If you are only interested in taking picture with the webcam you can install fswebcam, using apt-get install fswebcam.