1. download ubuntu 12.04 armhf version
(http://cdimage.ubuntu.com/releases/12.04.2/release/)
2. unzip file (right click> extract here) and dd to an sd card:
$sudo dd if=precise-preinstalled-desktop-armhf+omap4.raw of=/dev/sdd bs=4M
3. insert sd card in pandaboard. boot. answer some installation questions.
4. install advanced vi (vim).
$sudo apt-get install vim
5. install openssh-server
$sudo apt-get install openssh-server
6. main user does not need sudo passwd
$sudo visudo
add line:
icontrol ALL=NOPASSWD: ALL
7. get rid of networkmanager.
$sudo apt-get purge network-manager
(answer Y to continue)
And then as a bonus:
$sudo rm -rf /etc/NetworkManager
8. configure good old ifup eth0
$sudo vi /etc/network/interfaces
add lines:
manual eth0
iface eth0 inet dhcp
bring eth0 up:
$sudo ifup eth0
9. setup hostapd and dnsmasq
(excerpt from this previous blog)
Edit /etc/network/interfaces
Add lines and save:
auto wlan0
iface wlan0 inet static
address 10.0.0.1
netmask 255.255.255.0
Install hostapd and dnsmasq
$sudo apt-get install hostapd dnsmasq
create hostapd.conf
$sudo vi /etc/hostapd/hostapd.conf
Add lines:
interface=wlan0
driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=icontrol
hw_mode=g
channel=8
beacon_int=100
auth_algs=3
wmm_enabled=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_passphrase=very-secret-password
edit the file /etc/default/hostapd and add the line:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
restart hostapd:
$sudo service hostapd restart
Should result in:
$ sudo service hostapd restart
* Stopping advanced IEEE 802.11 management hostapd [ OK ]
* Starting advanced IEEE 802.11 management hostapd [ OK ]
$
Now edit (create) the file /etc/dnsmasq.d/dnsmasq.conf and add lines:
interface=wlan0
dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h
Finally edit the /etc/hosts and add:
10.0.0.1 icontrol
10. now setup the usb-hsdpa-dongle for 2 purposes: sending sms’es with gammu and connecting to the internet.
first setup the dongle. do some udev hocus pocus.
lsusb shows a device with vendor:product_id 1bbb:0017 with a description T&A Mobile Phones. That’s correct (it’s a alcatel onetouch x515 modem)
this means the usb_modeswitch rules are set correctly for this device.
make a script which on boot time the device connects to al serial driver.
create a file /usr/local/bin/usbAlcatel
$sudo vi /usr/local/bin/usbAlcatel
Add these lines:
#!/bin/sh
echo 1bbb 0017 > /sys/bus/usb-serial/drivers/option1/new_id
ie copy pasting results in a corrupt file, retype it litteraly by hand
Make this file executable:
$sudo chmod +x /usr/local/bin/usbAlcatel
now make some udev rules for this device
$sudo vi /etc/udev/rules.d/alcatelmobile.rules
Add these lines:
ATTRS{idVendor}=="1bbb", ATTRS{idProduct}=="0017" ,RUN+="/sbin/modprobe usbserial vendor=0x1bbb product=0x0017"
ATTRS{idVendor}=="1bbb", ATTRS{idProduct}=="0017", RUN+="/usr/local/bin/usbAlcatel"
ATTRS{idVendor}=="1bbb", ATTRS{idProduct}=="0017", RUN+="/sbin/modprobe option"
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="alcatel_end"
ENV{ID_MODEL_ID}=="0017", ENV{ID_VENDOR_ID}=="1bbb" , SYMLINK+="alcatelmodem$env{ID_USB_INTERFACE_NUM}"
LABEL="alcatel_end"
Also here, don’t copy paste, it will result in corrupt quotes
Now a bunch of /dev/ttyUSBx devices with links to /dev/alcatelmodem0x’s are created.
Next device /dev/alcatelmodem03 will be used for the internetconnection (wvdial) and /dev/alcatelmodem05 for the sms interface (gammu)
install wvdial and gammu:
$sudo apt-get install wvdial gammu
add user to dialup group:
$sudo usermod -aG dialout icontrol
configure gammu:
$sudo vi /etc/gammurc
add these lines:
[gammu]
port = /dev/alcatelmodem05
model = onetouchx515
connection = at
synchronizetime = yes
logfile =
logformat = nothing
use_locking =
gammuloc =
configure wvdial:
$sudo vi /etc/wvdial.conf
add thes lines:
[Dialer Defaults]
Dial Command = ATDT
ISDN = 0
Modem Type = Analog Modem
Modem = /dev/alcatelmodem03
Baud = 9600
[Dialer init]
Init1 = AT+CPIN=0000
[Dialer connect]
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,"IP","live.vodafone.com"
Phone = *99#
New PPPD = yes
Username = vodafone
Password = vodafone
Stupid Mode = 1
Baud = 460800
Now a bad hack has to be made to make this wvdial start at boot time. First the modem has to be initialized with a pincode. Thist can take a while, so a sleep 20 is invoked before the real dialup accurs in the connect section.
edit /etc/rc.local
sudo vi /etc/rc.local
add lines:
wvdial init &
sleep 20
wvdial connect &