Skip navigation
1 2 3 Previous Next

BeagleBoard

101 posts

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.

Pro Perspective: Unleashing BeagleBone Blue

This webinar will be presented by Jason Kridner, co-founder and board member at BeagleBoard.org Foundation and Open Platform Evangelist with Texas Instruments. Seating is limited, register now!

 

Tuesday, July 25, 2017 7:00:00 PM BST - 8:00:00 PM BST

Tuesday, July 25, 2017 2:00:00 PM EDT - 3:00:00 PM EDT

 

Welcome back to the BeagleBone Blue series! There’s nothing more satisfying than seeing your robotics project come to life,
and we’ll show you how to make it happen with a BeagleBone Blue and Autodesk EAGLE. In this webinar we’ll be walking through
a complete robotics project, discussing the details of the code, board features, and chassis that all come together to power a robot.
After attending this webinar you’ll have enough knowledge to start your very own robotics project with a BeagleBone Blue and Autodesk EAGLE.  
What You’ll Learn:  -Learn about coding your own robotics project and how Linux handles encoders. -Learn about the motor drivers on a BeagleBone Blue and
how to mount them on a chassis. -Learn how to interface with your BeagleBone Blue to control motor speed and process data.

 

Speaker
jason-kridner

Jason Kridner, Co-founder and board member at BeagleBoard.org Foundation and Open Platform Evangelist with

Texas Instruments and is currently defining the strategy for growing TI’s open platform ecosystem of developers and customer base.

 

Register for this event here:

https://eagle-support.adobeconnect.com/ed5mftk4ku4y/event/event_info.html

 

Unleashing BeagleBone Blue Webinar

BeagleBone Black Wireless in an Altoids Mint Tin

 

DSC_1128.JPG

Curiously Stong Mints? No, but it is quite powerful. It's a BeagleBone Black Wireless!!!

DSC_1132.JPG

The Adafruit Proto Cape Kit fits with lid fully closed. In order to accommodate additional components

such as sensors, wiring, and others things, it will be necessary to find some Nylon Polyamide Standoffs

that are shorter than the 3/16" standoffs used in the photos.

These are the standoffs that came with the Adafruit BeagleBone Proto Plate. 

DSC_1139.JPG

Custom 27mm x 27mm heatsink. Note, the BBB W does not require a heatsink.

This heatsink was hand cut from one that originally came on a PCI graphics card for a desktop PC.

DSC_1138.JPG

The holes for the dual antennas to pass through are marked but not drilled yet.

Currently I am shopping for the correct adapters to utilize different antennas.

The ones that come from the manufacturer are more than sufficient for most applications but

my intended use requires an antenna configuration with greater range.

DSC_1135.JPG

The mounting hardware that was used came from the Adafruit Proto Plate kit.

If you would like to purchase the mounting hardware separately,

the dimensions are as follows:

 

    4 x 4-40 1/2" Metal or Nylon Polyamide Screws

      4 x 4-40 Metal or Nylon Polyamide Hexnuts

      4 x 3/16" Nylon Polyamide Standoffs *

 

*This height will work if the Micro USB is used for power.

If you desire to use the 5V power jack, a shorter standoff must be used.

Since Beaglebone Black(BBB) internal memory is limited to 4GB and further more, 3.5 GB is already allocated to system and other process. Hence for us to install new modules/programs very less space is left. So it is good idea to use 8/16 GB SD card instead. We can boot from SD card and use the left over space in card to install other modules and programs.

 

To enable this feature, we must format, partition, resize the SD card. Please follow below steps to achieve this:

1) Format the 8 GB card using SD Formatter tool

2) Download the latest Beaglebone image from: http://beagleboard.org/latest-images

3) This image will be a zip file that MUST BE unzipped using 7-Zip tool.

    Get it here: http://www.7-zip.org/download.html

4) Once image file is unzipped, burn this image to the formatted SD card using Win32DiskImager utility.

    Get it here: https://win32-disk-imager.en.uptodown.com/windows

5) Plug the SD card to BBB, keep pressing the boot button and then power on. Remove the hold from boot button when you see all the USR LEDs are lit. This step will allow BBB to boot up from SD card than the eMMC flash

6) Once boot is over, you can verify that the root file system is the SD card now by using below command (first switch to root user using su - root):

root@beaglebone:~# df -h /

Filesystem      Size Used Avail Use% Mounted on

  /dev/mmcblk0p1  3.3G 2.8G  296M  91% /

 

You can see /dev/mmcblk0p1 (i.e. SD card) is mounted on root i.e. ‘\’ . But the space is shown as ~4GB only while our SD card is 8GB. To get the full space, we now need to do the partitioning and resizing. Follow below steps to do this (first switch to root user using su - root):

root@beaglebone:~# sudo fdisk /dev/mmcblk0

 

This will start the fdisk utility. Below are the steps for this utility. Please note the bold magneta text that we need to input when prompted by the utility.

 

Welcome to fdisk (util-linux 2.25.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

     Command (m for help): p        // to print the status

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0xca52207f

 

Device         Boot Start     End Sectors  Size Id Type

/dev/mmcblk0p1 *     8192 6963199 6955008  3.3G 83 Linux

 

     Command (m for help): d        //to delete the partition

Selected partition 1

Partition 1 has been deleted.

 

     Command (m for help): n        // to create new the partition

Partition type

   p primary (0 primary, 0 extended, 4 free)

   e extended (container for logical partitions)

    

     Select (default p): p        // ‘p’ for the primary partition

Partition number (1-4, default 1):

 

First sector (2048-15523839, default 2048): 8192        // the ‘Start’ sector. See the result ot ‘p’ at the very begining

Last sector, +sectors or +size{K,M,G,T,P} (8192-15523839, default 15523839):

 

Created a new partition 1 of type 'Linux' and of size 7.4 GiB.

 

     Command (m for help): p        // to print the status

Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: dos

Disk identifier: 0xca52207f

 

Device         Boot Start      End Sectors  Size Id Type

/dev/mmcblk0p1       8192 15523839 15515648  7.4G 83 Linux

 

     Command (m for help): w        // to save and quit the fdisk utility

The partition table has been altered.

Calling ioctl() to re-read partition table.

Re-reading the partition table failed.: Device or resource busy

 

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

 

NOTE: You might receive the above error message in red. For this, you need to run below commands:

sudo partprobe

 

Now the partition has been created and only thing remaining is to resize it. Use below command for this:

sudo resize2fs /dev/mmcblk0p1

 

And you will see the output like below:

 

resize2fs 1.43 (17-May-2016)

Filesystem at /dev/mmcblk0p1 is mounted on /; on-line resizing required

old_desc_blocks = 1, new_desc_blocks = 1

The filesystem on /dev/mmcblk0p1 is now 1939456 (4k) blocks long.

 

Now recheck below command:

df -h|grep '/dev/mmcblk0\|Avail'

 

To take advantage of the freedom wireless networking offers I wanted to integrate the BeagleBone Black WirelessBeagleBone Black Wireless and the 4.3" LCD touch screen cape4.3" LCD touch screen cape into a fully portable development kit.

You can get an overview of how to get started with the BeagleBone Black Wireless and the display cape on a separate blog post here.

 

 

Rather than trying to print or build an enclosure from scratch, I shopped around to find a small plastic lunchbox of the right size and proportions. I secured the BeagleBone Black Wireless to the bottom of the Lunchbox with 25mm long M3 standard bolts – just the right size to fit the mounting points on the board and long enough to secure the LCD display cape in place. This will help with keeping it in place when additional capes are inserted as the pins have quite a tight fit.

 

I really wanted all the potential of the BeagleBone to be available in the Lunchbox kit. As part of this the two rows of headers need to be accessible to allow for adding of more capes or even other things like LEDs, GPIO switches or for interfacing small motors and sensors. As the board is mounted to the bottom and the lunchbox is deep enough, most capes can be attached and integrated while still allowing the lid of the Lunchbox to be attached.

Parts

Wireless is great for networking, but still being tethered to a power outlet negates that advantage. Fortunately, the BeagleBone Black Wireless can be powered over USB, so some smartphone power banks are able to provide a battery solution. Some smaller or cheaper units may not provide enough power to run the BeagleBone Black Wireless and the LCD display simultaneously, so I made sure to use a battery bank that could provide at least 1 amp of current. I took the battery and circuitry out of the plastic case of the power bank and used mounting tape to attach it to the side of the Lunchbox. I cut a slot to give access to the charging port for the battery and twisted a small micro USB cable around to the port on the BeagleBone Black Wireless. A good tip when assembling this is to have the battery completely discharged so you can test out various fitting positions for the cable without worrying about the BeagleBone Black Wireless turning on.

 

Fortunately the BeagleBone Black Wireless has integrated power and reset buttons, meaning the battery could be connected directly to the micro USB port without having to put a switch in line. The first time it is connected the board will power on, but after shutting it down it can be turned back on with the power button located near the wireless antenna on the board.

 

Connecting a range of things like a keyboard, mouse and a USB thumb drive quickly makes one USB port inadequate, so I integrated a 4 port USB hub into the build. I couldn’t use an actively powered hub as the small battery wouldn’t supply enough power to run it. This unfortunately means high power devices like a hard drive will not work, but low power peripherals like keyboards will function perfectly. I cut a hole and mounted the hub to the right side of the box and secured it in place with some thin nuts and bolts.

USBHub.jpg

I didn’t want the LCD display to be irremovably fixed to the Lunchbox, so rather than a permanent adhesive I used double sided mounting tape to fix the panel to the bottom. Over time it may become a little loose, but this way it can be easily removed with a thin craft knife. I cut a thin slit on the edge of the Lunchbox to fit the LCD ribbon cable through to the BeagleBone Black Wireless underneath. I was careful that the cut slit didn’t have a very sharp edge, as this would wear away at the fragile ribbon cable. To help keep it in place I fixed it in place with a strip of electrical insulation tape.

 

To have some redundancy if the BeagleBone Black Wireless is used without the display cape I needed the HDMI port to be accessible. I used an adapter to convert the micro HDMI into a more common full sized HDMI port. The adapter slotted into a small hole in the side of the Lunchbox. To stop it wiggling loose I stuck it in place with a glob of hot glue.

HDMI.jpgInsideCase.jpg

I sprayed the completed Lunchbox with a metallic silver paint to give it a more sophisticated finish. To give it a little bit of iconography I taped an image of the BeagleBoard.org mascot inside the box and used painters tape to keep that area unpainted on the outside.

ScreenOn2.jpgScreenOn.jpg

List of Materials
BeagleBone Black Wireless with WiFi and BluetoothBeagleBone Black Wireless with WiFi and Bluetooth
Element14 4.3 inch TFT LCD Display Cape with capacitive touchElement14 4.3 inch TFT LCD Display Cape with capacitive touch
5x M3 x 25mm Nuts and Bolts
micro HDMI to HDMI adapter
4 port Bus Powered USB Hub
USB Lithium battery Powerbank with 5v minimum 1000mA outputUSB Lithium battery Powerbank with 5v minimum 1000mA output
8GB class 4 micro SD card8GB class 4 micro SD card

 

If you have any questions or suggestions for improvement about this BeagleBone Black Wireless in a Lunchbox project, comment below and I’ll do my best to answer. I’d also be very interested to read about any other development platforms or single board computers that have been put together in a case with some peripherals to make a custom portable unit.

The BeagleBone Black WirelessBeagleBone Black Wireless is the newest board in the BeagleBoard.org family, replacing the wired Ethernet from its predecessor with full WiFi and Bluetooth connectivity. It’s a development kit loaded with connectivity options that can also be used as a very capable single board computer. It can be powered from a microUSB port or a round 5 volt barrel socket, either way works equally well.

Moneyshot.jpg

The latest operating system for the BeagleBone Black Wireless can be found on the BeagleBoard.org page. Debian Jessie is currently the standard system of choice and the one most widely used, but there are other official options available like a text only terminal version. There are also a range of community developed operating systems including some designed for use as a media center, an IOT device and even a Super Nintendo Entertainment System game emulator.

 

The BeagleBone Black can run an operating system from a microSD card or on a fast 4GB eMMC flash chip that is installed directly on the board. Running from a SD card is a good way to sample an operating system, but for longer term use it’d be beneficial to install it to the onboard flash.

 

Note that some operating system images are protected from being written to the eMMC flash chip and can only be run from the SD card without modification to allow for a full installation.

 

Installing an operating system is done by writing an image to a microSD card then using that to update the onboard chip. There are various programs that can write an image to a microSD card. Win32 Disk Imager is a lightweight option for Windows users and Etcher is a multiplatform option compatible with Windows, Linux and Mac. For official Debian releases the microSD card needs to be a minimum of 4GB in size. Depending on the format the image file is in you may need to decompress it using 7zip.

 

To start the flashing process, just insert the microSD card into the BeagleBone Black Wireless and power it on. If the image on the card is setup to do so, it will take the operating system from the microSD card and install it to the onboard chip. Depending on the speed of memory card used this can take over 30 minutes – you can tell when the installation is complete when all four LEDs stop blinking rapidly and stay solid blue. Power down the board and remove the microSD card to complete the process. You can get more information on the flashing process at the eLinux Wiki.

 

For optimal WiFi and Bluetooth reception the BeagleBone Black Wireless has thin wire antennas pre installed. By default they are oriented to face over the board to keep the unit compact, but they can be rotated around to point away from the board to potentially increase the reception. Be sure to rotate the antenna carefully as the connections are small and fragile.

FourLights.jpgBendAereal.jpg

The easiest way to get started with the BeagleBone Black Wireless is to just connect it to a PC using the included microUSB cable. On first installation it will be recognized as a standard USB mass storage device just like a normal memory stick, making it universally compatible with most computers. When the drive shows up, open the START.htm file inside a web browser to get access to the digital manual.

 

Before playing around with the BeagleBone Black Wireless it is useful to get the Virtual Ethernet to USB drivers installed and running. This makes it function as a mini web server, letting you access and code various features just by connecting it over USB.

 

Scroll down on the START.htm page to Step #2 – Install drivers and choose the driver that matches the operating system you’re using. If you encounter errors when installing the drivers in Windows it might be due to them not being digitally signed – if that is the case, download the alternative signed drivers here.

WebInterface.jpgStarthtm.jpg

The two long rows of headers on the BeagleBone Black Wireless are for stacking on various expansion modules called capes. Recently a new cape released by element14 was a 4.3” LCD display with full capacitive touch.

 

The LCD display cape comes in two parts – the circuit board cape and the capacitive touch LCD panel. There are two orange ribbon cables attached to the LCD panel that slot into the similar sized zero insertion force sockets on the circuit board. The larger one is for video and the smaller is for the touch screen signal.

zif.jpgConnected.jpg

Pull the grey part of the connector out slightly then lift it to hinge it up. Gently slot the ribbon cable into the connector then hinge it back down to secure it in place. Be sure to orient it correctly with the LCD screen and the circuit board both facing upwards, with the pins pointing down and the sockets facing up. The ribbon cable is fairly durable, but be careful not to tear or bend it out of shape.

 

Upon first boot the touch screen can be somewhat inaccurate and require calibration. Under Preferences there is a Calibrate Touchscreen option that can fix any issues. Connecting a USB mouse can help if accessing the menu can’t be done with the touch screen uncalibrated.

calibrate.jpg

I put together a project to assemble these two devices together into a portable development kit unit. Read about it here.

After receiving my first beaglebone black a couple of weeks ago, I was eager to get started playing around with it.

So I followed the instructions, plugged into my PC, opened the BBB as an external drive and opened the getting started page. So far so good, I downloaded the drivers and ran the wizard.

 

Here is where the problems began, I kept getting an error at the end saying that the wizard was unsuccessful. I keep trying, running as admin, re downloading the drivers, trying to install drivers through device manager; but nothing worked.

So after a lot of expletives and shouting (I had just finished a fifteen hour shift and was already a little annoyed) I got fed up of trying and put the BBB in the drawer to try another day.

 

I haven't heard of anyone on the community having this problem, but whilst searching online I found a lot of other people who this affected.

 

I had a look online and found out that window 10 needs drivers to have a Signature to be allowed to install. So I had a look for how to disable this feature, finding a tutorial online at How to Disable Driver Signature Verification on 64-Bit Windows 8 or 10 (So That You Can Install Unsigned Drivers) from How-To-Geek. I won't go into detail here on how to do this but will give a brief overview.

 

Two options exist for doing this the first permanently disables the requirement for signatures (which I didn't want to do, as I know it is there for security reasons) the second only temporarily disables the function, and that is the way I used.

Basically:

  • Restart computer whilst holding down the shift key
  • Click on "Troubleshoot"
  • Select "Advanced Options"
  • Select "Startup Settings"
  • Press F7
  • Finally click restart

 

Now you can run the driver installer and that should be you. Happy days

Build a professional grade up to 4 Axis LinuxCNC control with Beaglebone Black and our CNC cape on Kickstarter.

 

The Cape comes with pre-installed LinuxCNC Open Source Software (Machinekit) and has opto coupled inputs.

For more information see:

 

https://www.kickstarter.com/projects/necitec/up-to-4-axis-beaglebone-black-based-cnc-control?ref=nav_search

 

Cape.JPG

Follow the steps in this guide to join the Internet of Things using NodeJS, Bluetooth and 10 powerful sensors. You will need the BeagleBone Black IoT Solution Kit Buy KitBuy Kit See All Parts

What Exactly are we Using Here?

You may have seen this guide in parts, however I like everything in one place, on one page and appropriately up to date. Or as much up to date as I can possibly do, technology moves so fast!

 

IMG_20160413_233704.jpgTexas Instruments (TI) have this interesting little board called a Sensor Tag and the version I have is a CC2650 running the default firmware. To update the firmware, you need the right cable to plug into it. This cute little board comes with a plastic enclosure, that then can be contained within a rubber sleeve. I imagine you could have a number of these devices placed around though with them being Bluetooth you're going to have to be in an open area or have thin walls, it is 2.4Ghz after all.

 

What's ridiculous (in a good way) about the Sensor Tag is that it comes with 10 sensors on board, and it can sync with any Bluetooth device, including your phone, you can even expand it to add more sensors to it. I'm not sure why you'd want to add more sensors to it, because it already has these:

 

  • "10 sensors including support for light, digital microphone, magnetic sensor, humidity, pressure, accelerometer, gyroscope, magnetometer, object temperature, and ambient temperature"

 

Elementary, my Dear IoT

watson.PNG

Those clever people at International Business Systems (IBM) have been developing a way to make sense of data, lots and lots of data, in various different ways. It may be an artificial intelligence, or it may just be intelligent ways of looking at data. I'm not entirely sure, it helps to watch a video and make sense of it all.

 

 

Since all things Internet will be creating a lot of data, it makes sense that Watson is thrown at IoT. You will need to sign up for an IBM Bluemix account to be able to work through attaching your IoT sensor(s) to it. Fortunately, there is a free tier of Watson IoT for us to play with, however this can scale up to cover thousands of devices with some amount of data traffic and storage. It is a little weird, even if you select Free you're put into the Free Trial, just see it as a nice 'try before you proceed' affair.

 

You need not be Sherlock to join Watson

In a few easy steps you can sign up for then IBM Bluemix account before we look at the hardware you'll need to get started with IBM - Explore IoT

 

 

{gallery} Joining IBM Watson

1.PNG

Step One: Visit the IBM Explore IoT site and click Sign Up

2.PNG

Step Two: Fill out your details on IBM Bluemix

3.PNG

Step Three: Confirm Sign Up with your E-Mail

4.PNG

Step Four: You'll be put onto a premium trial first, but this falls back to a free account.

5.PNG

Step Five: At the login prompt, your IBM ID is your e-mail

 

In case you missed it in the image gallery overlay, your IBM ID is your e-mail address.

 

What do I Need to Get Started?

Set yourself up with IBM and the BeagleBone Black with the Texas Instruments SensorTag. Follow the steps in this guide to join the Internet of Things using NodeJS, Bluetooth and 10 powerful sensors.

BeagleBone Black IoT Solution Kit Buy KitBuy Kit

The kit consist of the following 5 items:

BeagleBone BlackBeagleBone Black

TI Sensor Tag CC2650TI Sensor Tag CC2650

Bluetooth 4 USB AdapterBluetooth 4 USB Adapter

8GB microSD Card8GB microSD Card

Ethernet cableEthernet cable with a connection to the internet.

*You need a way to write to a microSD Card from a laptop or desktop computer.

 

With this hardware I'm making the assumption that you're going to plug the Beaglebone Black into a wired network. Yes, I know that it is possible to setup a 'soft network' using the USB cable that comes with the BeagleBone Black and connecting it to your computer. However, I discovered that the driver bundled with even the latest Debian image does not work with Windows 10 64bit, you're advised to compile the driver yourself. If you don't have a way to view the desktop on the BeagleBone Black (it does require a mini HDMI to something sensible cable) then you won't be able to setup WiFi either. So I suggest plugging in an Ethernet cable to a switch, whether that's a home gateway or on the same network as a computer that's running a DHCP server. If you're not connected to the internet via this connection, you'll have to scour the packages and offline files for yourself.

 

Setting up the BeagleBone Black

20160414_154133.jpgLet's get set up with a reasonably up to date version of Debian Linux. Angstrom hasn't been the default stable for the BeagleBone Black for a while now and thankfully we can use the armhf architecture from Debian. You can download the latest Debian 8.3 Jessie image. If you're using Linux then the setup of the microSD card is straight forward, you can use unxz as a command (or you can even use simply 'xz -d', search your distribution's repository if you don't have either) to extract the downloaded image file, and then use dd to write the image file to the microSD card using something like this:

 

sudo dd if=./BBB*.img of=/dev/sdX

 

Be wary using BBB*.img as the filename if you have more than one image file in the folder you're running this command in. The command is ran from a terminal window, and /dev/sdX is an example name of your SDCard device reader where the microSD card is plugged into. If you're not sure which one it is, then you're going to have a fun dance with "ls /dev/" and dmesg commands as you plug/unplug your SDCard into the computer and correlate the names as to which device is your SDCard.

 

On Microsoft Windows, you can use win32DiskImager, insert your SDCard into your reader, select the appropriate drive letter and the .IMG file, after extracting it with something like 7-Zip and write it to the card. However, I encountered a problem when using win32DiskImager and writing the Debian image, it wouldn't do more than 2gByte of data sometimes and I had to resort to using Linux. Now, it may have been a faulty microSD card, or it could have been Windows to blame. Just be wary that if you're not able to write properly to your SDCard that you may need to try a different operating system, or your card is broken.

 

Once you have your microSD card setup, you can insert it into your BeagleBone Black and connect power to it. Either by powering it with the USB cable or a wall wart rated at 5V, perhaps above 1Amp. Ensure your BeagleBone Black is connected to the wired network.

 

Accessing the BeagleBone Black on the Network

There are many different ways you can find out what the IP address is of the BeagleBone Black if you haven't connected it to your computer using the USB port, ranging from a network scan using nMap (don't run that on corporate networks, your network administrator won't be happy) to looking up the DHCP allocation table on your network router. The method you use will be entirely dependent on your network setup and how you've chosen to connect to it, and unfortunately we won't be covering that here, but by all means ask in the comments below.

 

You'll want to login to the BeagleBone Black via SSH, using either PuTTy on Windows, or just ssh on Linux. You can login as root as by default there is no password set and root is permitted over ssh, alternatively the username and password is:

 

User: debian

Pass: temppwd

 

Once you're connected to your BeagleBone Black then it's time to ensure that your distribution is fully up to date. To keep track of any potential problems, separately you should run:

 

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

sudo apt-get autoremove

sudo apt-get clean

 

This will update your operating system, and you should run through this set of commands at least twice in case any packages are held back. A command I run when I'm being quick, dirty and lazy is:

 

sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade -y; sudo apt-get autoremove -y; sudo apt-get clean -y

 

Which goes through them autonomously, use at your own discretion. Yes, those are semi-colons between commands.

 

Configuring the BeagleBone Black and the Sensor Tag to Access IBM Watson

What we're going to do now involves using the repository software called 'git'. From here we're going to get hold of software from github, and then modify it because it's out of date. I did consider forking the repository and having this fixed in an element14 repo, but I think it serves as a good example to introduce you to the code and also using git.

 

The software basically downloads and installs bluetooth and also sets up nodejs which is a set of Javascript libraries.

 

Make sure you're connected to the internet and we'll download the git repository, effectively cloning it from github and then change to that directory. First you should navigate to your home directory, and we're assuming here that you logged into the BeagleBone Black as the root user:

 

cd ~/

git clone http://github.com/ibm-messaging/iot-beaglebone

cd iot-beaglebone/samples/nodejs

 

There is a setup script which should take care of everything for you. If you logged in as root, you do not need sudo:

 

sudo ./setup.sh

 

Take note of any error messages that you see, this bundled up setup script which installs the packages of bluez and libbluetooth-dev. It also performs an 'npm install'.

 

Fixing the Code

There is a Javascript file which we have to alter ourselves, This is not hosted in github, but is likely pulled through when npm is run, so it is not necessarily straightforward to have been able to apply a preliminary fix.

 

We need to replace a file after successful running of the setup.sh script, the file is attached to this blog post, you can download the file by using wget:

 

wget https://www.element14.com/community/servlet/JiveServlet/download/38-204521/cc2650.js

 

This will download the file to the current folder you are in, you then have to move the file to replace "iot_beaglebone/samples/nodejs/node_modules/sensortag/lib/cc2650.js". We should be able to do this in one command, like so:

 

wget https://www.element14.com/community/servlet/JiveServlet/download/38-204521/cc2650.js  -O ~/iot_beaglebone/samples/nodejs/node_modules/sensortag/lib/cc2650.js

 

This is to fix an API change in the node/javascript calls. The -O parameter here may not strictly be correct,

 

Using the IoT Cloud

 

Now to associate the Sensor Tag with the BeagleBone Black and use it with the IBM Watson service:

 

cd ~/iot_beaglebone/samples/nodejs

node iot_sensortag.js

 

Registering your Device

 

Now you'll want to register your devices in the IBM Watson IoT Platform, there is also a Quickstart where you can check what information the device(s) are sending.

IOT setup using a bluetooth sensor streaming data to the Beaglebone which submits it to the IBM cloud

 

Note: This blog post is being superceded with updates here: BeagleBone Black IoT Project Bundle

 

This is forked from a project HERE, but changed slightly to work with the TI Sensor Tag CC2650.

 

It is a very easy project with only a few minor edits needed. This can be done in about 20 minutes from start to finish, and looks great at the end.

 

 

What You'll Need

 

Beagle Bone Black

24222282422228
TI Sensor CC265024701812470181

 

 

Installing Script

 

First we need to grab the code:

cd ~

git clone http://github.com/ibm-messaging/iot-beaglebone
         

 

Then we need to get to the code's directory

cd iot-beaglebone/samples/nodejs
         

 

Then we need to install the dependencies. Luckily this very easy thanks to the automated script provided

sudo ./setup.sh
         

 

Editing the script

 

We only need to edit one file to get this to work. The credit for this edit goes to AshokRao.

 

You need to download the file attached to this blog, See at the bottom.

This file needs to replace the file iot_beaglebone/samples/nodejs/node_modules/sensortag/lib/cc2650.js. Copy the file at the bottom and replace the existing file with this new one

 

The only differences are on lines 186-188 where we have used a different version of the API from Node.js framework that does not evaluate the offset & continues to read the data from the buffer. The default is “false”. For documentation on this and other API’s, please refer: https://nodejs.org/api/buffer.html#buffer_buf_readint16le_offset_noassert .

 

 

Running it

 

Everything is now done!

Just run the main script using the command

cd ~/iot_beaglebone/samples/nodejs
node iot_sensortag.js
  

 

Now follow the link below and type in your BBB's mac address (shown when you start the .js script) to view the data.

IBM CLOUD

 

Hope it now works for all of you. Please leave your comments, suggestions, and problems below.

I have a Beagebone Black I/O cape on Kickstarter.

 

BBB-GVS-3-CCA_6100-640px.jpg

 

Features List

Here's the specific list of features that the card supports:

  •   (19) GPIOs GVS pins
  • (3) UARTs GVTxRx pins
  • (1) I2C bus GVSdaSck
  • (8) Channels of 3.3V to 5V level translators
  • Use female to female jumpers to route the GPIO lines to the translator channels 5V side has GVS pins
  • (7) 1.8V analog GVS connections with analog voltage/ground Buffer opamps on the analog inputs
  • 5V pins are all ESD protected pins with 15 kV of protection
  • Selectable 5V source (SYS_5V or VDD_5V)
  • 3.3V and 5V are fuse protected
  • Cape configuration EEPROM with write enable jumper
  • Beaglebone Black form factor

I am new to linux platform. Started working for beagle bone black platform development by following the steps given in the link, but i could not ale ot build u-boot to create MLO and image files.

  https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-RootFileSystem

tuxbbbluv.png

After my last post Build fbtft drivers for Linux 4.4 on BeagleBone Black, I was curious what patches are needed to run mainline Linux kernel on BeagleBoard.  Here's what I've found so far:

 

Mainline Linux kernel

 

Robert C. Nelson's bb-kernel repo

"This git repo contains just scripts/patches to build a specific kernel for some ARM devices. The kernel source will be downloaded when you run any of the build scripts"

 

Patchset for BeagleBone:

 

BeagleBone Cape Manager (bone_capemgr):


Workaround: Disable DMA for SPI driver:

 

Related GitHub Gists:

Chicago hackerspace Pumping Station: One uses BeagleBoard to control door access:

door.jpg

 

There is BeagleBone Black on the Front Door and the Back Door:

door2.jpg

door3.jpg

 

The BeagleBone is a connected to a Sparkfun USB RFID breakout with a ID-12 RFID Reader.  This scans the RFID keys:

rfid.jpg

[More photos]

 

PS1 president Derek Bever and other members are collaborating on this GitHub repo:

 

Client-side RFID authentication (and general access control)

This system is built on a BeagleBone Black and Sparkfun's USB board for RFID readers for hardware, and PS1Auth's server-side RFID authentication on the backend.

Client-side software is written in Go.

small_linus.jpg

In previous blog posts, I've showed how to use small LCD displays as a Linux framebuffer on the BeagleBone Black thanks to the fbtft drivers:

 

In this post, I will show how to use fbtft drivers on BBB with the latest version of the Linux kernel.  In this case, that is Linux 4.4.


Full transcript in this GitHub Gist.

 

 

Step 1: Build kernel


Clone Robert C. Nelson's bb-kernel repo and checkout the am33x-v4.4 branch.  When I did last week, the latest kernel version was 4.4-rc1-bone0:

laptop$ git clone https://github.com/RobertCNelson/bb-kernel

 

laptop$ cd bb-kernel/

 

laptop$ git checkout am33x-v4.4

 

laptop$ ./build_kernel.sh

 

The build kernel script will at some point open the kernel config menu system.  Enable Device Drivers->Staging->fbtft:

a.png

b.png

c.png

d.png



Step 2: Install kernel


Flash latest Debian 8.2 (Jessie) console image for the BBB:

laptop$ wget https://rcn-ee.com/rootfs/bb.org/testing/2015-11-15/console/bone-debian-8.2-console-armhf-2015-11-15-2gb.img.xz

 

laptop$ xz -d bone-debian-8.2-console-armhf-2015-11-15-2gb.img.xz

 

laptop$ sudo dd if=/home/afustini/Downloads/bbb-images/bone-debian-8.2-console-armhf-2015-11-15-2gb.img.xz of=/dev/sdc

 

laptop$ sudo eject /dev/sdc

 

Remove and re-insert so that fs gets mounted.  Run this from bb-kernel directory:

laptop$ ./tools/install_kernel.sh

 

Eject card and boot the BeagleBone with it.  Once booted, grow the filesystem to make use of free space on the card:

bone$ sudo /opt/scripts/tools/grow_partition.sh

 

bone$ sudo reboot

 

Finish installation of the new kernel on the BeagleBone.  The install script fails to do this.  In this case, my new kernel is 4.4.0-rc1-bone0:

bone$ sudo cp -pr /dtbs /boot/dtbs/4.4.0-rc1-bone0

 

bone$ sudo cp /zImage /boot/vmlinuz-4.4.0-rc1-bone0

 

Edit /boot/uEnv.txt on Beaglebone so that the new kernel is booted:

bone$ sudo vi /boot/uEnv.txt

uname_r=4.4.0-rc1-bone0

dtb=am335x-boneblack-overlay.dtb

 

bone$ sudo reboot

 

Verify the the BeagleBone booted the new kernel:

bone$ uname -a

Linux beaglebone 4.4.0-rc1-bone0 #4 Thu Nov 19 20:26:04 CST 2015 armv7l GNU/Linux

 

 

Step 3: Configure SPI

 

Build the latest Device Tree Overlays:

bone$ sudo apt-get update

 

bone$ sudo apt-get install git

 

bone$ git clone https://github.com/beagleboard/bb.org-overlays

 

bone$ cd bb.org-overlays

 

bone$ ./dtc-overlay.sh

 

bone$ ./install.sh


Load the Device Tree Overlay for BB-SPIDEV1 "virtual cape" as my LCD is wired up to spi1 pins:

bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF----  -1

1: PF----  -1

2: PF----  -1

3: PF----  -1


bone$ sudo /bin/sh -c 'echo BB-SPIDEV1 > /sys/devices/platform/bone_capemgr/slots'


bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF----  -1

1: PF----  -1

2: PF----  -1

3: PF----  -1

4: P-O-L-  0 Override Board Name,00A0,Override Manuf,BB-SPIDEV1

 

 

Step 4: Load fbtft drivers

 

Load fbtft_device module for adafruit18 (Adafruit 1.8" TFT LCD) which will use the fb_st7735r driver:

bone$ sudo modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:48,reset:60


Display image on the LCD display:

bone$ sudo apt-get install fbi

bone$ wget 'http://beagleboard.org/static/uploads/BorisTux_w_Logo.png'

bone$ sudo fbi -d /dev/fb0 -T 1 -a BorisTux_w_Logo.png