Thu Jun 14, 2012 11:29 pm
Trouble shooting wise, I've found that re-installing the packages and re-compiling the code works. I've conflated everything that has worked for me so far into one bash script:
#!/bin/sh
cd
echo
echo "...Disable CD drive on modem..."
echo
rmmod usb-storage
echo
echo "...Enable E220 modem as serial port..."
echo
mknod /dev/ttyUSB1 c 188 1
mknod /dev/ttyUSB2 c 188 2
modprobe usbserial vendor=0x121d1 product=0x1003
echo
echo "...recreate Windows USB communication"
echo
gcc -lusb /home/pi/Desktop/3g/huaweiAktBbo.c -o huaweiAktBbo.out
./huaweiAktBbo.out
echo
echo "...running AT commands..."
echo
DEV=/dev/ttyUSB0
echo "ATZ" >$DEV
head -n 2 $DEV
echo 'AT+CGDCONT=1,"IP","three.co.uk"' >$DEV
head -n 2 $DEV
echo 'ATD*99***1#' >$DEV
head -n 2 $DEV
sleep 1
/usr/sbin/pppd debug nodetach 460800 $DEV
NB - file path names of huaweiAktBbo.c and APN (three.co.uk) are user specific.
I get these inconsequential 'errors':
ERROR: Modules usb_storage does not exist in /proc/modules
(not a problem that I can't find something that I want to remove)
mknod: '/dev/ttyUSB1': File exists
mknod: '/dev/ttyUSB2': File exists
(not a problem that I cant create something because it already exists)
My only real problem is the password thingy - I think this is just a ppp(?) setting that could easily resolve by inserting a command or two in the above script if I only knew what to add. I know that "three" and "three" is my network username adn password and that I have a sim password and sim pin, but am unsure how to sue them to get around this authorization.
The stages shown by the working Windows software are:
Detect Modem -> Detect Network Service -> Dial Up -> Open port -> Connect Device -> Authorise -> Connected!
I am optimistic that this authorisation requirement should be the last (and hopefully lesser) of my problems.
Ostendo ignarus addo scientia.