BeagleBone Black Wireless – Initial setup and wifi connect

The official BeagleBone Black Getting Started guide isn’t very helpful in connecting the wireless version of the BeagleBone Black (BBBW) to a wireless network. This is what worked for me.

1. Connect the BBBW to a computer via USB and install the USB wireless drivers, as mentioned in Step 2 of the Getting Started guide. I am using OS X, but this should also apply to Linux. If you are using Windows, you are on your own.

2. Find the location of the USB serial port and connect to the BBBW via USB serial. I use screen:

screen /dev/tty.usbmodem1423 115200

Login with debian/temppwd, the default credentials.

3. I found a DigiKey page that describes how to use ‘connman’ to manage the wireless connection, but you have to register to gain access to that page and I had to tweak the commands listed on my BBBW. Incidentally, the connmanctl commands are also in the ‘/etc/network/interfaces’ file.

debian@beaglebone:~$ sudo connmanctl
connmanctl> tether wifi disable
connmanctl> enable wifi
connmanctl> scan wifi
connmanctl> services
connmanctl> agent on
connmanctl> connect <wifi network>
connmanctl> quit

The wifi network string is the ‘wifi_<bunch of stuff here>’ string associated with the list displayed after the ‘services’ command.

Try ‘iwconfig wlan0’ to see the wifi status, and/or ‘ifconfig wlan0’ to see that you have an IP address. It might take a short while to connect.

‘Ctrl-D’ to log out, then
‘Ctrl-A k’ to kill your screen session, then
Use ssh to log into your BBBW normally:

ssh debian@<ip address>

Use debian/temppwd to log in, and you should be up and running. You can also access the built-in web documentation by going to the same IP address in a browser. I generally like to stick to the command line, but there is some good information in the web based documentation.

MongoDB Certified

After many years as a professional software developer, I finally felt the urge to pursue one of the many certifications out there. Since I really like using MongoDB lately, and I aced all the MongoDB University online courses I’ve taken, it made sense to take the Certified Developer exam.

Changing Primary Domain for a Google Apps account

Changing the primary domain name on a Google Apps account is a non-trivial process. I recently needed to do this for a customer, and created a console application that makes the job easier.

This works on OS X and Linux; Windows support is unknown (and will not be tested by me). It’s written in Go, so you will need to have a Go development environment set up to build or run it.

Clone the GitHub project:

git clone https://github.com/dougreese/ga-change-primary-domain.git

then follow the instructions in the README to build and run.

Some additional resources:

Installing collectd with Minimal Dependencies on Ubuntu Server 14.04

Installing collectd with the usual command on an Ubuntu 14.04 server:

sudo apt-get install collectd

results in a ton of packages being installed:

acl
at-spi2-core
ca-certificates-java
collectd
collectd-core
colord
dconf-gsettings-backend
dconf-service
default-jre-headless
fontconfig
fontconfig-config
fonts-dejavu
fonts-dejavu-core
fonts-dejavu-extra
hicolor-icon-theme
java-common
libasound2
libasound2-data
libasyncns0
libatk-bridge2.0-0
libatk1.0-0
libatk1.0-data
libatspi2.0-0
libavahi-client3
libavahi-common-data
libavahi-common3
libcairo-gobject2
libcairo2
libcanberra-gtk3-0
libcanberra-gtk3-module
libcanberra0
libcolord1
libcolorhug1
libcups2
libdatrie1
libdbi1
libdconf1
libdevmapper-event1.02.1
libesmtp6
libexif12
libflac8
libfontconfig1
libgd3
libgdk-pixbuf2.0-0
libgdk-pixbuf2.0-common
libgphoto2-6
libgphoto2-l10n
libgphoto2-port10
libgraphite2-3
libgtk-3-0
libgtk-3-bin
libgtk-3-common
libgudev-1.0-0
libgusb2
libharfbuzz0b
libieee1284-3
libjasper1
libjbig0
libjpeg-turbo8
libjpeg8
liblcms2-2
libltdl7
liblvm2app2.2
libmemcached10
libmnl0
libmodbus5
libnotify4
libnspr4
libnss3
libnss3-nssdb
libogg0
libopenipmi0
liboping0
libpango-1.0-0
libpangocairo-1.0-0
libpangoft2-1.0-0
libperl5.18
libpixman-1-0
libpq5
libprotobuf-c0
libpulse0
librabbitmq1
librrd4
libsane
libsane-common
libsctp1
libsensors4
libsndfile1
libsnmp-base
libsnmp30
libtdb1
libthai-data
libthai0
libtiff5
libtokyocabinet9
libtokyotyrant3
libupsclient3
libv4l-0
libv4lconvert0
libvarnishapi1
libvirt0
libvorbis0a
libvorbisenc2
libvorbisfile3
libvpx1
libwayland-client0
libwayland-cursor0
libxcb-render0
libxcb-shm0
libxcomposite1
libxcursor1
libxdamage1
libxfixes3
libxi6
libxinerama1
libxkbcommon0
libxpm4
libxrandr2
libxrender1
libxtst6
libyajl2
lksctp-tools
notification-daemon
openjdk-7-jre-headless
rrdtool
sound-theme-freedesktop
ttf-dejavu
ttf-dejavu-core
ttf-dejavu-extra
tzdata-java
x11-commoni

Most likely this is overkill. To install with minimal dependencies:

sudo apt-get --no-install-recommends install collectd

which results far fewer dependency packages being installed:

collectd
collectd-core
fontconfig
fontconfig-config
fonts-dejavu-core
libcairo2
libdatrie1
libdbi1
libfontconfig1
libgraphite2-3
libharfbuzz0b
libltdl7
libpango-1.0-0
libpangocairo-1.0-0
libpangoft2-1.0-0
libpixman-1-0
librrd4
libthai-data
libthai0
libxcb-render0
libxcb-shm0
libxrender1

Much better.

Bonus: Saltstack state example:

Install collectd:
  pkg.installed:
    - name: collectd
    - install_recommends: False

Convert from FLAC to ALAC

Sites that sell lossless usually offer only FLAC files. To convert to ALAC for iTunes and iDevices using ffmpeg:


for f in `ls *.flac`; do ffmpeg -i $f -c alac ${f/flac/m4a}; done

This assumes the current directory is the directory containing the FLAC files.

Explanation:

  • For all .flac files
  • Call ffmpeg with the original file as input (-i $f)
  • Use the ALAC codec (-c alac)
  • Name the output file the same as the input file but with a m4a extension (${f/flac/m4a})

More on for loops in bash from the OS X command line.