My KiCAD version of USBtinyISP

I’m looking to make a USB AVR ISP, Eagle files are easy to find, so I thought I’d do a KiCAD version. The circuit is the same used by Ladyada, although the board is not designed to fit into the same box! I’m loving KiCAD, this took about two hours to do schematic capture and PCB layout.

USB AVR ISP - Schematic

USB AVR ISP – Schematic

PCB layout…USB AVR ISP - PCBAll the files needed are here: USB_AVR_ISP. Time to get making!

BeagleBone and USB GSM Stick

More sysadmin than electronics today!

I have an O2 USB modem and I was wondering about getting the BeagleBone hooked up to it.  It would be cool to have the BeagleBone “phone home” if is was out in the field logging, or whatever.

Front side of my USB GSM modem

As you can see form the photo of the back-side it’s a Huawei Mobile Broadband E1752C USB modem.

The back side of the Huawei Mobile Broadband E1752C USB stick

It turns out to be really easy to use this (or any other USB GSM modem) with Ubuntu.  It a little “old school” without a GUI to work in, but hay, command line is king after all!.. It brings back memories of using pppd and chat scripts when I used Linux to connect over a copper phone line to the “Internet!”.

On the O2 network here in Ireland my /etc/ppp/peers/o2 file looks like this:

debug
connect "/usr/sbin/chat -v -f /etc/chatscripts/o2"
lock
local
user "o2"
password "o2"
ttyUSB0
noauth
defaultroute
noipdefault
usepeerdns
ipcp-max-failure 5
lcp-echo-failure 5
lcp-echo-interval 30
persist

#auth
refuse-chap
refuse-mschap
refuse-mschap-v2
refuse-eap

# compression
novjccomp
nobsdcomp
noaccomp
nopcomp
novj
noccp

And my chat script looks like this:

ECHO ON
TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
ABORT 'NO CARRIER'

""    AT
OK    AT+CPIN=XXXX
TIMEOUT 5 ERROR-AT-OK
AT+CGDCONT=1,"IP","open.internet"
OK    "ATD*99#"
CONNECT    ""

Nice little trick here for the PIN entry.. You need it the first time the modem boots up, but not for re-connecting the “TIMEOUT 5 ERROR-AT-OK” will allow the PIN code to fail (because it already been entered) and not stop the script.

As I want to remote connect to BeagleBone, I’ve got it to send it’s IP address back to base (every time the PPP interface comes up).  You will need to set up shared SSH keys between your server and the Bone to get this to work without a password.

Then I created the following little script ( /etc/ppp/ip-up.d/001updateIP ):

#!/bin/sh
#
# scp the current IP address back to base...
# (MMcK 2012-11-19)
#

/sbin/ifconfig -a \
    | awk '/inet addr/ { print $2 }' \
    | awk -F: '{ print $2 }' \
        > /tmp/bone.ipaddr

/usr/bin/scp -q /tmp/bone.ipaddr <me>@<my server>:

Now every time the Bone comes online over the PPP interface I can connect to it by looking up it’s new IP address.