Linux - HOWTO (With Stats)

Status
Not open for further replies.
You are going to kill yourself over this. If the serial port is setup and working (which by this stage it is :D), then these commands should work:

Code:
echo "AT+COPS=1,2,"65501",0 > /dev/<serial_port>

and

echo "AT+COPS=1,2,"65510",0 > /dev/<serial_port>
Replace <serial_port> with the port and you are a for away !

Sometimes for some reason - these commands don't work. I know you can get minicom to read commands from the command line, which we will do if this doesn't work :)

So you can make a simple file that contains the following,

vodacom.sh:
Code:
#!/bin/bash
echo "AT+COPS=1,2,"65501",0 > /dev/<serial_port>

chmod +x vodacom.sh
./vodacom.sh

Laterz !
Hmm... unfortunately that doesn't seem to work for me :(
On the bright side though, at least I don't need to kill myself :D

How do I get minicom to read commands from the command line?
 
Huawei E220 & Linux ???

Anyone got a guide to get the Huawei E220 to work in linux ?
Linux in use is Debian based (Ubuntu)

I did a search here but did not find anything.
 
Hey ponder,

At the start of this thread is the install guide. Simply download the files and run the wvdial command :) should be wvdial hsdpa internet :)

Just wanted to check - the e220 is the pcmcia one ? So many numbers....

;)

Anyone got a guide to get the Huawei E220 to work in linux ?
Linux in use is Debian based (Ubuntu)

I did a search here but did not find anything.
 
Hey Wild,

What card do you have ?

Code:
AT^SYSCFG=13,1,3FFFFFFF,2,4
OK
AT^SYSCFG=14,1,3FFFFFFF,2,4
OK

Works for me :(

Hey tux,

Ok ... using the 3rd serial port of the Huawei card you can get status updates regarding the connection.

I see 4 updates sent...

^RSSI:n <= appears to be the receive signal strength, what n means i'm not sure
^DSFLOWRPT:n,n,n,n,n,n,n <= no clue what this is
^BOOT:n,n,n,n,n <= no clue what this is
^MODE:n,n <= here i get 5,4 or 5,5 ..... the light changes from blue to bluegreen respectively. This may be the technology being used indicator?

The commands... both return errors.
GPRS Only - AT^SYSCFG=13,1,3FFFFFFF,2,4
3G Only - AT^SYSCFG=14,1,3FFFFFFF,2,4

I'm going to hack around with the Linksys code and see what the exact command is it issues to the card to change modes.



-WP
 
Vodacom 3G on Linux for relative beginners

Howzit,

Sorry if somebody already posted this link, but I feel I must let the world know how this site has helped me!!

If you're a relative newcomer to Linux and are trying to get your Vodafone 3G card to work with Linux, you will find this site helpful.
http://www.pharscape.org/index.php?option=content&task=view&id=28

I was able to set it up in less than 30 minutes and I'm happy to say that I'm finally making this post from Linux.

Hope it helps somebody, somewhere.
 
Last edited:
Hi. Is it possible to make an internet connection if you are using a linux live cd? The one i've got is Ubuntu. I'm using a motorola v1050 as modem using a usb cable. I've never used linux before so please give detailed instructions if it is possible :)

Edit: i use vc & vm sims
 
Last edited:
The information below relates to the Huawei E620 data card.

^RSSI:n <= appears to be the receive signal strength, what n means i'm not sure
This is the received information signal strength indication expressed as a number from 0 - 31. 99 means unknown or undetectable.
"n * 2 - 113" gives you the value in dBm.
"n * 100 / 31" give you a percentage.

^DSFLOWRPT:n,n,n,n,n,n,n <= no clue what this is
This gives you connection statistics while online, you should receive them every two seconds. The values are all in hexadecimal.
n1 is the duration of the connection in seconds
n2 is transmit (upload) speed in bytes per second (n2 *8 / 1000 will give you kbps)
n3 is receive (download) speed in bytes per second (n3 *8 / 1000 will give you kbps)
n4 is the total bytes transmitted during this session
n5 is the total bytes transmitted during this session
n6 is the negotiated QoS uplink in bytes per second (n2 *8 / 1000 will give you kbps)
n7 is the negotiated QoS downlink in bytes per second (n2 *8 / 1000 will give you kbps)
Note: n4 and n5 are 64-bit integers, for those >4GB torrent sessions! :)
You can reset the connection statistics by sending AT^DSFLOWCLR.

^BOOT:n,n,n,n,n <= no clue what this is
No idea what this means, but it stops once the card is properly initialized.
The sequence I use is as follows:
Send AT^HS=0,0
Receive something like ^HS:489066,0,0,0,9
Make a note of the first parameter and echo it back:
Send AT^BOOT=489066,0

^MODE:n,n <= here i get 5,4 or 5,5 ..... the light changes from blue to bluegreen respectively. This may be the technology being used indicator?
I concur, my findings seem to suggest that:
^MODE:3,2 indicates GPRS
^MODE:3,3 indicates EDGE
^MODE:5,4 indicates 3G
^MODE:5,5 indicates HSDPA

AT^SYSCFG=13,1,3FFFFFFF,2,4
OK
AT^SYSCFG=14,1,3FFFFFFF,2,4
OK
I have:
AT^SYSCFG=2,1,3FFFFFFF,1,2 for GPRS/EDGE Preferred
AT^SYSCFG=2,2,3FFFFFFF,1,2 for 3G Preferred
AT^SYSCFG=13,1,3FFFFFFF,1,2 for GPRS/EDGE Only
AT^SYSCFG=14,2,3FFFFFFF,1,2 for 3G Only
The third parameter, 0x3FFFFFFF tells the card to use all bands. A value of 0x400380 here means GSM900/1800/WCDMA2100 only and a value of 0x200000 here means GSM1900 only. Any ideas why our fourth and fifth parameters are different?
 
Last edited:
Hey sky,

It should be - most of the livecd have more kernel options compiled then programs :)

Simply following the insruction on the start of this thread should give you the right result, but be warned - I havn't played with Ubuntu much - let alone the live cd

But post any problems,question here :)

Laterz

Hi. Is it possible to make an internet connection if you are using a linux live cd? The one i've got is Ubuntu. I'm using a motorola v1050 as modem using a usb cable. I've never used linux before so please give detailed instructions if it is possible :)

Edit: i use vc & vm sims
 
Not sure - I have the docs somewhere and will check. From what I remember when we looked at it, "3,4" made sense - Maybe Wild can try the "1,2" ones ?

Laterz !

*snip*
I have:
AT^SYSCFG=2,1,3FFFFFFF,1,2 for GPRS/EDGE Preferred
AT^SYSCFG=2,2,3FFFFFFF,1,2 for 3G Preferred
AT^SYSCFG=13,1,3FFFFFFF,1,2 for GPRS/EDGE Only
AT^SYSCFG=14,2,3FFFFFFF,1,2 for 3G Only
The third parameter, 0x3FFFFFFF tells the card to use all bands. A value of 0x400380 here means GSM900/1800/WCDMA2100 only and a value of 0x200000 here means GSM1900 only. Any ideas why our fourth and fifth parameters are different?
 
Not sure - I have the docs somewhere and will check.
You mean there are docs for this damn thing? :eek: I've been reverse-engineering the Huawei dashboard software for ages! Would you please PM me if you're willing to share what you've got?

The way I am dealing with ^SYSCFG is to first query the current values, with AT^SYSCFG?, then only modifying the first two parameters and sending it back.
 
Last edited:
Ubuntu Linux Live

Hey sky,

It should be - most of the livecd have more kernel options compiled then programs

Simply following the insruction on the start of this thread should give you the right result, but be warned - I havn't played with Ubuntu much - let alone the live cd

But post any problems,question here

Laterz

I tried but didn't get it right :( I'm a bit clueless when it comes to linux.

This is how I plugged in the settings:
System-->Administration-->-->networking
Connections tab-->Modem connection (the interface ppp0 is not configured)-->properties
General tab-->enable connection
Phone Number: *99***1#
Dial prefix: [blank]
Username: username
Password: password
Modem tab
Modem port: items in drop down box : /dev/modem; /dev/ttyS0;..S1;..S2;..S3 {i typed in /dev/usb/cma/0}
Dial type: tone; pulse {tried both on different attempts}

Once the settings were in and I tried to activate it only activated when I use one of the S0 to S3 options and not the modem or usb option. The modem port also had an option to autodetect. I tried that too but it couldn't auotdetect my phone modem.

When it was activated (on eof the S0 to S3 options) and I tried to go to a website on Firefox it just came up with a could not be found error. There was no attempt to establish a dial up connection. Then when I went back to the networking settings it now said: "the ppp0 interface is not active".:confused: I tried it several times with same result.

I couldn't find anything called stupid mode or anywhere to put in the script: at+cgdcont=1,"IP","internet".
 
Last edited:
Trust me - I did the same thing :o ....

You mean there are docs for this damn thing? :eek: I've been reverse-engineering the Huawei dashboard software for ages! Would you please PM me if you're willing to share what you've got?

The way I am dealing with ^SYSCFG is to first query the current values, with AT^SYSCFG?, then only modifying the first two parameters and sending it back.
 
Yeah...this is a problem. Normally the devices have a default dialer, so you shouldn't need to set the apn etc. That solves one problem. Next is the phone - with the phone connected, run lsusb and it should give you the phone with vendor and product id's. Run the following commands (in a terminal):

Code:
rmmod usbserail
modprobe usbserial vendor=<vendor_id> product=<product_id>

Now you usb port should be active. You can also run
Code:
tail /var/log/messages
to see what is going on - In the log it should say where it is attaching the usb port.

Keep us posted !

I tried but didn't get it right :( I'm a bit clueless when it comes to linux.

This is how I plugged in the settings:
System-->Administration-->-->networking
Connections tab-->Modem connection (the interface ppp0 is not configured)-->properties
General tab-->enable connection
Phone Number: *99***1#
Dial prefix: [blank]
Username: username
Password: password
Modem tab
Modem port: items in drop down box : /dev/modem; /dev/ttyS0;..S1;..S2;..S3 {i typed in /dev/usb/cma/0}
Dial type: tone; pulse {tried both on different attempts}

Once the settings were in and I tried to activate it only activated when I use one of the S0 to S3 options and not the modem or usb option. The modem port also had an option to autodetect. I tried that too but it couldn't auotdetect my phone modem.

When it was activated (on eof the S0 to S3 options) and I tried to go to a website on Firefox it just came up with a could not be found error. There was no attempt to establish a dial up connection. Then when I went back to the networking settings it now said: "the ppp0 interface is not active".:confused: I tried it several times with same result.

I couldn't find anything called stupid mode or anywhere to put in the script: at+cgdcont=1,"IP","internet".
 
Yeah...this is a problem. Normally the devices have a default dialer, so you shouldn't need to set the apn etc. That solves one problem. Next is the phone - with the phone connected, run lsusb and it should give you the phone with vendor and product id's. Run the following commands (in a terminal):

Code:
rmmod usbserail
modprobe usbserial vendor=<vendor_id> product=<product_id>

Now you usb port should be active. You can also run
Code:
tail /var/log/messages
to see what is going on - In the log it should say where it is attaching the usb port.

Keep us posted !

I tried your suggestions. Results below:

Code:
ubuntu@ubuntu:~$ rmmod usbserail
ERROR: Module usbserail does not exist in /proc/modules
ubuntu@ubuntu:~$ rmmod usbserial
ERROR: Removing 'usbserial': Operation not permitted
ubuntu@ubuntu:~$ tail /var/log/messages
Oct 23 20:18:25 localhost gconfd (ubuntu-18786): Resolved address "xml:readonly:/var/lib/gconf/defaults" to a read-only configuration source at position 7
Oct 23 20:18:25 localhost kernel: [4294827.262000] NET: Registered protocol family 10
Oct 23 20:18:25 localhost kernel: [4294827.262000] Disabled Privacy Extensions on device c02eb280(lo)
Oct 23 20:18:25 localhost kernel: [4294827.262000] IPv6 over IPv4 tunneling driver
Oct 23 20:18:40 localhost gconfd (ubuntu-18786): Resolved address "xml:readwrite:/home/ubuntu/.gconf" to a writable configuration source at position 0
Oct 23 20:19:19 localhost kernel: [4294880.895000] usb 3-2: new full speed USB device using uhci_hcd and address 2
Oct 23 20:19:19 localhost kernel: [4294881.433000] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
Oct 23 20:19:19 localhost kernel: [4294881.531000] usbcore: registered new driver cdc_acm
Oct 23 20:19:19 localhost kernel: [4294881.531000] drivers/usb/class/cdc-acm.c: v0.23:USB Abstract Control Model driver for USB modems and ISDN adapters
Oct 23 20:19:19 localhost usb.agent[18934]:      cdc-acm: loaded successfully

From the above I assumed that the modem was detected when I plugged it in. In the network settings I used the modem port as : /dev/ttyACM0 and was able to activate the settings. I then went to Firefox. Still didn't work. I went back to the network settings and it was de-activated again. When I went to properties the only setting missing was the phone number which I put in again and re-activated successfully.

I tried the terminal window again with the following result:

Code:
ubuntu@ubuntu:~$ tail /var/log/messages
Oct 23 20:23:58 localhost chat[19188]: ^M
Oct 23 20:23:58 localhost chat[19188]: AT&FH0M0^M^M
Oct 23 20:23:58 localhost chat[19188]: ERROR
Oct 23 20:23:58 localhost chat[19188]:  -- failed
Oct 23 20:23:58 localhost chat[19188]: Failed (ERROR)
Oct 23 20:23:58 localhost kernel: [4295160.087000] atkbd.c: Unknown key pressed (translated set 2, code 0xaa on isa0060/serio0).
Oct 23 20:23:58 localhost kernel: [4295160.087000] atkbd.c: Use 'setkeycodes e02a <keycode>' to make it known.
Oct 23 20:23:58 localhost kernel: [4295160.201000] atkbd.c: Unknown key released (translated set 2, code 0xaa on isa0060/serio0).
Oct 23 20:23:58 localhost kernel: [4295160.201000] atkbd.c: Use 'setkeycodes e02a <keycode>' to make it known.
Oct 23 20:23:59 localhost pppd[19184]: Exit.
ubuntu@ubuntu:~$

I thought that the script AT&FH0M0^M^M might be the problem but I don't know how to change it:( Maybe I am wrong:confused:
 
Status
Not open for further replies.
Top
Sign up to the MyBroadband newsletter
X