I sell on Tindie

Saturday, December 20, 2014

Boneleds - RGB Leds at the beaglebone

Beaglebone has 6 PWMs. It can be used by 2 RGB LEDS for some illumination. I wrote a program that slowly changes the colors.
Wiki is available at http://elinux.org/Boneleds

Saturday, December 6, 2014

Beaglebone black as 3G router or wireless access point with 3G connection

Here are things that I found at my storage.
- Beaglebone black
- HUAWEI E220 3G modem
- D-Link DWA-140 wireless N USB stick
- USB hub

Lets make a 3G Wireless AP from this.
All drivers should be enabled in kernel as modules and all devices should be recognized. I tested it with kernel 3.15

1. Get device id with lsusb

Bus 002 Device 003: ID 2001:3c15 D-Link Corp. DWA-140 RangeBooster N Adapter(rev.B3) [Ralink RT5372]
Bus 002 Device 005: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E230/E270/E870 HSDPA/HSUPA Modem
Bus 002 Device 002: ID 05e3:0605 Genesys Logic, Inc. USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

2. Install ppp

sudo apt-get install ppp

3. Install umtskeeper

wget http://zool33.uni-graz.at/petz/umtskeeper/src/umtskeeper.tar.gz 
sudo tar -xzvf umtskeeper.tar.gz
sudo chmod +x umtskeeper

4. Get sakis3g

sudo wget "http://downloads.sourceforge.net/project/vim-n4n0/sakis3g.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fvim-n4n0%2Ffiles%2F&ts=1363537696&use_mirror=tene~t" -O sakis3g.tar.gz
sudo tar -xzvf sakis3g.tar.gz
sudo chmod +x sakis3g

5. Try to connect with sakis3g

./sakis3g --interactive

After some scripts running you should be connected. You should know user and password for your operator.
You can test the connection with

ping -c 4 www.google.com

Now try to run the script from command line

./umtskeeper --sakisoperators "USBINTERFACE='0' OTHER='USBMODEM' USBMODEM='12d1:1003' APN='CUSTOM_APN' CUSTOM_APN='safaricom' SIM_PIN='1234' APN_USER='saf' APN_PASS='data'" --sakisswitches "--sudo --console" --devicename 'Huawei' --log --silent --monthstart 8 --nat 'no'

A few remarks about this command:
in USBMODEM put device Id from lsusb
CUSTOM_APN - access point name reported by sakis3g
SIM_PIN - pin code if it exists
APN_USER/PASSWORD - user name and password for your 3g provider

If it works - put it at the end of /etc/rc.local

PATH_GOES_HERE/umtskeeper --sakisoperators "USBINTERFACE='0' OTHER='USBMODEM' USBMODEM='12d1:1003' APN='CUSTOM_APN' CUSTOM_APN='safaricom' SIM_PIN='1234' APN_USER='saf' APN_PASS='data'" --sakisswitches "--sudo --console" --devicename 'Huawei' --log --silent --monthstart 8 --nat 'no' &

At this point you can restart the beaglebone and make sure that you have the 3G internet.

6. Install hostapd and configure it

sudo apt-get install hostapd
zcat /usr/share/doc/hostapd/examples/hostapd.conf.gz | sudo tee -a   /etc/hostapd/hostapd.conf

Change in /etc/hostapd/hostapd.conf

ssid=NAME OF YOUR WIRELESS NETWORK GOES HERE
channel=10
wpa=2 # This sets the security settings to WPA2
wpa_passphrase=PASSWORD FOR NETWORK GOES HERE
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP

7. Ad to the end of /etc/network/interfaces

auto wlan0
iface wlan0 inet static
hostapd /etc/hostapd/hostapd.conf
address 192.168.8.1
netmask 255.255.255.0

At this point you can restart your beaglebone and make sure that you can connect to wireless access point.

8. Set the routing tables.
Enable routing in kernel. At the /etc/sysctl.conf change the following

net.ipv4.ip_forward=1

Beaglebone should be restarted after this step.

Now set the routing tables

sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
sudo iptables -A FORWARD -i ppp0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o ppp0 -j ACCEPT

You should be able now to connect to the acces point and surf the internet.

For make the routing tables permanent:

sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"

Now edit the file /etc/network/interfaces and add the following line to the bottom of the file:

up iptables-restore < /etc/iptables.ipv4.nat

That's all. Enjoy your beaglebone.

Links used:
http://www.instructables.com/id/Raspberry-Pi-as-a-3g-Huawei-E303-wireless-Edima/
http://seravo.fi/2014/create-wireless-access-point-hostapd
http://elinux.org/RPI-Wireless-Hotspot

Monday, September 29, 2014

Monday, July 21, 2014

Wednesday, June 4, 2014

LCD cape V2

New board design.
5 inch LCD for beaglebone / beaglebone black. 
Resolution: 800x480, 24 bit color, PWM backlight control, 10 points multitouch capacitive touchscreen, 4 user buttons. Power is taken from the beaglebone. Consists of 3 boards - stackable cape for beaglebone, LCD with adapter, board with buttons. 
It can be bought here: Auctiva store





Friday, May 16, 2014

3d printed LCD case

LCD 10.1" B101UAN01 with HDMI input from ebay. Selller chinatobby2011. 1920x1200. Works perfect. But it is missing case. After some work case is printed. The LCD is very large for printing case for it in single part. It exceeds my Ordbot maximum dimensions (200x200 mm). So i assembled it from the smaller parts. 4 sides and back printed separately, mounted with 1.5mm self tapping screws.

It shipped like this.

Case for the boards



Case for LCD mounted



Everything is mounted

XBMC working.

Friday, April 18, 2014

RAMPS Arduino death

So after 3 month of my 3d printer working - one day it stops to communicate with PC. After some research - the dead 5V regulator is found at Arduino board. I run it at 14V because of heatbed. The voltage at the heatbed is 12V only when I put 14V from the power supply. 2V drops on wires to the heatbed. So I must put 14V from the power supply. I replaced regulator with LP2950L 5.0. It is getting hot, but works for 2 week now.

Sunday, March 23, 2014

LCD cape final prototype

Just received a backlight board. Everything works including backlight in Android. Soon will be for sale.

Saturday, February 8, 2014

Wednesday, January 29, 2014

nh5cape - lcd cape for beaglebone

Just finished work on beaglebone cape for Newhaven LCD 5" with capacitive touchscreen.
Works with tslib on ubuntu and on Android.
Multitouch supported.
Kernel 3.8 with device tree.
Next board revision will have 5V and 3.3V regulators on board and backlight support. If someone need it. I need your comments.