I succeeded to install and run Angstrom on Beagle. Now I need to
install pppd for USB wireless 3.5G key. Does Angstrom support pppd ?
If yes, where and how can I get it ? (I have no ethernet yet on
On my Beagleboard C2 I am successfully using an Huawei E156G key (3.5G on USB 2.0 High Speed; it appears as "/dev/ttyUSB0"; also has a microSD slot), provided that the Beagleboard gets sufficient power on the 5V connector (not USB OTG because the Huawei requires up to 450mA when sending data).
Any 3.5G key "USB 2.0 High Speed" appearing as a serial port (like "/dev/ttyUSB0") will work with these scripts - just test it on your Linux PC to be sure.
My "internet-start.sh" script just does:
# use Italy H3G nameservers:
echo nameserver 184.108.40.206 >/etc/resolv.conf
echo nameserver 220.127.116.11 >>/etc/resolv.conf
# the modem port to use:
# unlock the SIM sending my PIN (skip this if SIM is already unlocked)
echo AT+CPIN=2311^M >$PORT
# note: the "^M" is actually a character 13 (modem does not like LF - wants CR)
# start pppd using these parameters:
# - speed 921600 (it seems it is not needed)
# - use rts/cts controls (not sure if actually needed)
# - detach from terminal only after pppd is up (or if error happens)
# - setup default routing to the newly created pppd
# - use peer DNS (does not work with H3G, so I setup manually nameservers as above)
# - lcp echo is 6*10=60 seconds (lcp echo apparently required by H3G Italy)
# - connect script sends first an ATZ, then the "tre.it" APN (required by H3G
# Italy), then the connect stuff
# ***beware*** the following is a single line
/usr/sbin/pppd $PORT 921600 crtscts updetach defaultroute usepeerdns lcp-echo-failure 6 lcp-echo-interval 10 connect '/usr/sbin/chat -t 6 -s -v "" ATZ OK AT+CGDCONT=1,\"IP\",\"tre.it\",\"\",0,0 OK ATDT*99***1# CONNECT \d\c'
To shut down, you just have to do this command and wait a few seconds (pppd understands what you mean with that HUP signal):
killall -HUP pppd
as far as I know, these are common Linux procedures; they "just work" on all Linux systems having some "serial" port on which a "pppd" can run. Almost anything working under Linux will work on the Beagleboard; I'm sure the above procedures work on all Beagle boards, provided a working USB EHCI port and a "high speed USB 2.0" key.
Also, the above scripts do not require user input (so you may write programs which enable the internet connection only when needed and shut down when not needed anymore).
The only drawback is that the "internet key" will drain a lot of current - even when not used.
Another example: if you use Narcissus Angstrom and want to share that internet connection with the host computer using/powering via USB OTG connection when you have the "usb0" interface, then you can:
- on Beagleboard (which "usb0" interface is something like "192.168.5.2" fixed IP): do the natting/masquerading (not sure if all "modprobe" commands are actually required):
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -d ! 192.168.5.0/24 -j MASQUERADE
- on PC Linux (which "usb0" interface is something like "192.168.5.1" fixed IP) add the default routing towards Beagleboard:
route add default gw 192.168.5.2
(note: on PC Linux the /etc/resolv.conf must be set up as well).
Fun stuff: it appears that my Huawei key can send data (no more than 15-20 kbytes each time) even with 4.0V only, but I cannot guarantee it will work on any other E156G key...