Linux - HOWTO (With Stats)

Status
Not open for further replies.
With the card plugged in do a "lsusb" and "lsmod" - if usbserial is not loaded, run the tail again and go "modprobe usbserial". I need you to post the lsusb and what happens after the modprobe.

'lsusb' gives:
Code:
Bus 005 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
Bus 004 Device 004: ID 12d1:1003  
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 003: ID 046d:c509 Logitech, Inc. 
Bus 002 Device 001: ID 0000:0000

and 'lsmod' gives:
Code:
Module                  Size  Used by
nls_utf8                3200  1 
sg                     37404  0 
sr_mod                 18212  1 
usb_storage            75072  1 
arc4                    3200  0 
rate_control            6784  0 
rt73usb                37888  0 
80211                 175880  2 rate_control,rt73usb
crc_itu_t               3200  1 rt73usb
snd_seq_dummy           4996  0 
snd_seq_oss            36480  0 
snd_seq_midi            9984  0 
snd_rawmidi            27264  1 snd_seq_midi
snd_seq_midi_event      8960  2 snd_seq_oss,snd_seq_midi
snd_seq                59120  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_seq_device          9868  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
isofs                  38076  1 
udf                    89348  0 
ext2                   71432  0 
binfmt_misc            13448  1 
rfcomm                 42260  0 
l2cap                  27136  5 rfcomm
bluetooth              53476  4 rfcomm,l2cap
i915                   21632  2 
drm                    74644  3 i915
speedstep_lib           5764  0 
cpufreq_userspace       5408  0 
cpufreq_stats           7744  0 
freq_table              6048  1 cpufreq_stats
cpufreq_powersave       2944  0 
cpufreq_ondemand        8876  0 
cpufreq_conservative     8712  0 
video                  17540  0 
tc1100_wmi              8324  0 
sony_acpi               6412  0 
sbs                    16804  0 
pcc_acpi               14080  0 
i2c_ec                  6272  1 sbs
i2c_core               23424  1 i2c_ec
hotkey                 11556  0 
dev_acpi               12292  0 
container               5632  0 
button                  7952  0 
battery                11652  0 
asus_acpi              17688  0 
ac                      6788  0 
af_packet              24584  0 
nls_iso8859_1           5248  2 
nls_cp437               6912  2 
vfat                   14720  2 
fat                    56348  1 vfat
lp                     12964  0 
tsdev                   9152  0 
snd_intel8x0           34844  1 
snd_ac97_codec         97696  1 snd_intel8x0
snd_ac97_bus            3456  1 snd_ac97_codec
libusual               17040  1 usb_storage
snd_pcm_oss            47360  0 
snd_mixer_oss          19584  1 snd_pcm_oss
ipv6                  272288  10 
usbhid                 45152  0 
snd_pcm                84612  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              25348  2 snd_seq,snd_pcm
e100                   38020  0 
mii                     6912  1 e100
psmouse                41352  0 
floppy                 63044  0 
evdev                  11392  3 
parport_pc             37796  1 
parport                39496  2 lp,parport_pc
intel_agp              26012  1 
agpgart                34888  3 drm,intel_agp
hw_random               7320  0 
shpchp                 42144  0 
pci_hotplug            32828  1 shpchp
pcspkr                  4352  0 
serio_raw               8452  0 
snd                    58372  12 snd_seq_oss,snd_rawmidi,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore              11232  1 snd
snd_page_alloc         11400  2 snd_intel8x0,snd_pcm
ext3                  142728  2 
jbd                    62228  1 ext3
ehci_hcd               34696  0 
uhci_hcd               24968  0 
usbcore               134912  7 usb_storage,rt73usb,libusual,usbhid,ehci_hcd,uhci_hcd
ide_generic             2432  0 
ata_piix               11780  0 
libata                 74892  1 ata_piix
scsi_mod              144648  4 sg,sr_mod,usb_storage,libata
ide_cd                 33696  0 
cdrom                  38944  2 sr_mod,ide_cd
ide_disk               18560  7 
piix                   11780  1 
generic                 5764  0 
thermal                15624  0 
processor              31560  1 thermal
fan                     6020  0 
fbcon                  41504  0 
tileblit                3840  1 fbcon
font                    9344  1 fbcon
bitblit                 7168  1 fbcon
softcursor              3328  1 bitblit
vesafb                  9244  0 
capability              5896  0 
commoncap               8704  1 capability

Since usbserial doesn't appear to be loaded, I ran 'modprobe usbserial' as sudo (no output to terminal), then ran 'lsusb' again:

Code:
Module                  Size  Used by
usbserial              34152  0 
nls_utf8                3200  1 
sg                     37404  0 
sr_mod                 18212  1 
usb_storage            75072  1 
arc4                    3200  0 
rate_control            6784  0 
rt73usb                37888  0 
80211                 175880  2 rate_control,rt73usb
crc_itu_t               3200  1 rt73usb
snd_seq_dummy           4996  0 
snd_seq_oss            36480  0 
snd_seq_midi            9984  0 
snd_rawmidi            27264  1 snd_seq_midi
snd_seq_midi_event      8960  2 snd_seq_oss,snd_seq_midi
snd_seq                59120  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_seq_device          9868  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
isofs                  38076  1 
udf                    89348  0 
ext2                   71432  0 
binfmt_misc            13448  1 
rfcomm                 42260  0 
l2cap                  27136  5 rfcomm
bluetooth              53476  4 rfcomm,l2cap
i915                   21632  2 
drm                    74644  3 i915
speedstep_lib           5764  0 
cpufreq_userspace       5408  0 
cpufreq_stats           7744  0 
freq_table              6048  1 cpufreq_stats
cpufreq_powersave       2944  0 
cpufreq_ondemand        8876  0 
cpufreq_conservative     8712  0 
video                  17540  0 
tc1100_wmi              8324  0 
sony_acpi               6412  0 
sbs                    16804  0 
pcc_acpi               14080  0 
i2c_ec                  6272  1 sbs
i2c_core               23424  1 i2c_ec
hotkey                 11556  0 
dev_acpi               12292  0 
container               5632  0 
button                  7952  0 
battery                11652  0 
asus_acpi              17688  0 
ac                      6788  0 
af_packet              24584  0 
nls_iso8859_1           5248  2 
nls_cp437               6912  2 
vfat                   14720  2 
fat                    56348  1 vfat
lp                     12964  0 
tsdev                   9152  0 
snd_intel8x0           34844  1 
snd_ac97_codec         97696  1 snd_intel8x0
snd_ac97_bus            3456  1 snd_ac97_codec
libusual               17040  1 usb_storage
snd_pcm_oss            47360  0 
snd_mixer_oss          19584  1 snd_pcm_oss
ipv6                  272288  10 
usbhid                 45152  0 
snd_pcm                84612  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              25348  2 snd_seq,snd_pcm
e100                   38020  0 
mii                     6912  1 e100
psmouse                41352  0 
floppy                 63044  0 
evdev                  11392  3 
parport_pc             37796  1 
parport                39496  2 lp,parport_pc
intel_agp              26012  1 
agpgart                34888  3 drm,intel_agp
hw_random               7320  0 
shpchp                 42144  0 
pci_hotplug            32828  1 shpchp
pcspkr                  4352  0 
serio_raw               8452  0 
snd                    58372  12 snd_seq_oss,snd_rawmidi,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore              11232  1 snd
snd_page_alloc         11400  2 snd_intel8x0,snd_pcm
ext3                  142728  2 
jbd                    62228  1 ext3
ehci_hcd               34696  0 
uhci_hcd               24968  0 
usbcore               134912  8 usbserial,usb_storage,rt73usb,libusual,usbhid,ehci_hcd,uhci_hcd
ide_generic             2432  0 
ata_piix               11780  0 
libata                 74892  1 ata_piix
scsi_mod              144648  4 sg,sr_mod,usb_storage,libata
ide_cd                 33696  0 
cdrom                  38944  2 sr_mod,ide_cd
ide_disk               18560  7 
piix                   11780  1 
generic                 5764  0 
thermal                15624  0 
processor              31560  1 thermal
fan                     6020  0 
fbcon                  41504  0 
tileblit                3840  1 fbcon
font                    9344  1 fbcon
bitblit                 7168  1 fbcon
softcursor              3328  1 bitblit
vesafb                  9244  0 
capability              5896  0 
commoncap               8704  1 capability

'tail /var/log/messages' shows that it is now being seen as a serial device, I think:

Code:
Nov  9 11:24:30 nickw-desktop kernel: [18037641.672000] usbcore: registered new driver usbserial
Nov  9 11:24:30 nickw-desktop kernel: [18037641.672000] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Nov  9 11:24:30 nickw-desktop kernel: [18037641.672000] usbcore: registered new driver usbserial_generic
Nov  9 11:24:30 nickw-desktop kernel: [18037641.672000] drivers/usb/serial/usb-serial.c: USB Serial Driver core

Am I right in thinking the direction now is to unload usbserial and do another modload with the device specific info from 'lsusb'?
 
And a follow up to the above:

With 'modprobe usbserial' it now seems to see *something* at /dev/ttyS0, giving this output when using 'wvdial hsdpa' - none of the other ttyS? have a device visible:

--> WvDial: Internet dialer version 1.56
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
 
Ok - now this time I want you to do the same again, except replace the modprobe command with:

modprobe usbserial verdor=0x12d1 product=0x1003

Laterz !

And a follow up to the above:

With 'modprobe usbserial' it now seems to see *something* at /dev/ttyS0, giving this output when using 'wvdial hsdpa' - none of the other ttyS? have a device visible:

--> WvDial: Internet dialer version 1.56
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
 
Oh man, this rocks ....

Check the screenshot http://www.linuxrulz.org/nkukard/screenshots/wrt54g3g-whiterussian-extras.jpg

(the lines with x's are tests and import of my current traffic usage)

I wrote a module for openwrt which keeps track of your traffic usage for the month. The data is saved on the router itself, so even if you have more than 1 pc connecting one can always keep track of the usage.
 
Huawei E220

Ok - now this time I want you to do the same again, except replace the modprobe command with:
modprobe usbserial verdor=0x12d1 product=0x1003

Yes, tried that (I'd tried it before your response, modelling on stuff from post 1 in this thread), and got the same when using 'wvdial hsdpa':
Code:
--> WvDial: Internet dialer version 1.56
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.

Nothing shows after the modprobe in /var/log/messages except the same:
Code:
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] usbcore: registered new driver usbserial
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] usbcore: registered new driver usbserial_generic
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] drivers/usb/serial/usb-serial.c: USB Serial Driver core

It does seem to be seeing *something* at /dev/ttyS0, so I might have thought the AT commands would lead me to success that time, but not quite.

"Almost doesn't count, except in horseshoes and hand grenades..."
 
Hey Nick,

Try /dev/ttyUSB0,1,2,3 ?

Laterz :)

Yes, tried that (I'd tried it before your response, modelling on stuff from post 1 in this thread), and got the same when using 'wvdial hsdpa':
Code:
--> WvDial: Internet dialer version 1.56
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.

Nothing shows after the modprobe in /var/log/messages except the same:
Code:
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] usbcore: registered new driver usbserial
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] usbcore: registered new driver usbserial_generic
Nov  9 20:47:59 nickw-desktop kernel: [17349124.484000] drivers/usb/serial/usb-serial.c: USB Serial Driver core

It does seem to be seeing *something* at /dev/ttyS0, so I might have thought the AT commands would lead me to success that time, but not quite.

"Almost doesn't count, except in horseshoes and hand grenades..."
 
Try /dev/ttyUSB0,1,2,3 ?

No entries for /dev/ttyUSB? so I tried creating them with 'mknod /dev/ttyUSB0 c 188 0' (replacing the 0s with 1, 2 and 3).

In each instance, response to 'wvdial hsdpa' is a variation of:
Code:
--> Cannot open /dev/ttyUSB0: No such device

(Those show in /dev as variations of:
Code:
crw-r--r-- 1 root root 188, 0 2006-11-10 08:45 /dev/ttyUSB0

While the ttyS? look like variations of:
Code:
crw-rw---- 1 root dialout 4, 64 2006-11-10 08:49 /dev/ttyS0

ttyS0, the only one that acts like something is there when dialled, has a time stamp indicating it was updated as part of the modprobe process, I think. All the other ttyS? give a response of:
Code:
--> Cannot open /dev/ttyS1: Input/output error
 
Huawei E220 in Ubuntu...

http://the.taoofmac.com/space/Huawei/E220 posits:

My current suspicion is that, since this is a multi-function device (i.e., storage for drivers + USB serial), Ubuntu's HAL only detects the first portion of the device.

and refers to a workaround supplied with:

Johann Wilhelm (who uses Slackware and has similar issues) wrote in with a workaround, which is rmmoding usb-storage prior to attempting binding the serial port. Sure, you won't be able to use external disks, but it's a more or less reliable workaround.

Actually, it almost works reliably in Ubuntu - because HAL will go and try to read the storage component again.

Still, it might be a usable workaround until a proper fix is found. To do this, create a shell script containing the following:
rmmod usb-storage
modprobe usbserial vendor=0x12d1 product=0x1003
mknod /dev/ttyUSB0 c 188 0
mknod /dev/ttyUSB1 c 188 1
mknod /dev/ttyUSB2 c 188 2

And run the shell script (using sudo, of course).

I have tried it, but with no success yet...
 
No carrier on Huawei 620

I've got the Huawei e620, and thanks to earlier posts, I've set up wvdial.conf (under Fedora 5) with the non-standard commands for the card.

The card works perfectly under Windoze, but under FC5 I always get NO CARRIER (see below). I'd appreciate any thoughts or pointers as to how I could solve this.

--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=xxxx
AT+CPIN=xxxx
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT^SYSCFG=2,2,3FFFFFFF,1,2
AT^SYSCFG=2,2,3FFFFFFF,1,2
OK
--> Sending: AT+CGDCONT=1,"IP","internet";
AT+CGDCONT=1,"IP","internet";
OK
--> Sending: AT+CGEQMIN=1,4,64,384,64,384
AT+CGEQMIN=1,4,64,384,64,384
OK
--> Sending: AT+CGEQREQ=1,4,64,384,64,384
AT+CGEQREQ=1,4,64,384,64,384
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
NO CARRIER
--> No Carrier! Trying again.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
NO CARRIER
--> No Carrier! Trying again.
--> Sending: ATDT*99***1#
--> Waiting for carrier.

Thanks!
 
try this:

Code:
wvdial pin && sleep 10 && wvdial <normal command>

You have to wait a couple of seconds before dialing after sending a pin :)

I've got the Huawei e620, and thanks to earlier posts, I've set up wvdial.conf (under Fedora 5) with the non-standard commands for the card.

*snip*
NO CARRIER
--> No Carrier! Trying again.
--> Sending: ATDT*99***1#
--> Waiting for carrier.

Thanks!
 
Hi Tazz

I have a full install of UBUNTU linux. But still couldn't connect successfully. There is a wvdial.conf file in /etc which is read only and I can't copy your file into that folder too :(
 
Hi Tazz

I have a full install of UBUNTU linux. But still couldn't connect successfully. There is a wvdial.conf file in /etc which is read only and I can't copy your file into that folder too :(

in ubuntu there is no "root" as such, well... not like the other distros anyway. use "sudo -i" to execute commands as root, or just a "sudo" before your command. eg) "sudo cp wvdial.conf /etc". You cannot do this from the file browser as far as i know.
 
I do remember this from somewhere.....but yes...do that :)

in ubuntu there is no "root" as such, well... not like the other distros anyway. use "sudo -i" to execute commands as root, or just a "sudo" before your command. eg) "sudo cp wvdial.conf /etc". You cannot do this from the file browser as far as i know.
 
Become root and it will allow you to over write it :D

sudo_root(8) sudo_root(8)

NAME
sudo_root - How to run administrative commands

SYNOPSIS
sudo command

sudo -i

INTRODUCTION
By default, the password for the user "root" (the system administrator)
is locked. This means you cannot login as root or use su. Instead, the
installer will set up sudo to allow the user that is created during
install to run all administrative commands.

This means that in the terminal you can use sudo for commands that
require root privileges. All programs in the menu will use a graphical
sudo to prompt for a password. When sudo asks for a password, it needs
your password, this means that a root password is not needed.

To run a command which requires root privileges in a terminal, simply
prepend sudo in front of it. To get an interactive root shell, use sudo
-i.

ALLOWING OTHER USERS TO RUN SUDO
By default, only the user who installed the system is permitted to run
sudo. To add more administrators, i. e. users who can run sudo, you
have to add these users to the group 'admin' by doing one of the fol-
lowing steps:

* In a shell, do

sudo adduser username admin

* Use the graphical "Users & Groups" program in the "System settings"
menu to add the new user to the admin group.

BENEFITS OF USING SUDO
The benefits of leaving root disabled by default include the following:

* Users do not have to remember an extra password, which they are
likely to forget.

* The installer is able to ask fewer questions.

* It avoids the "I can do anything" interactive login by default - you
will be prompted for a password before major changes can happen,
which should make you think about the consequences of what you are
doing.

* Sudo adds a log entry of the command(s) run (in /var/log/auth.log).

* Every attacker trying to brute-force their way into your box will
know it has an account named root and will try that first. What they
do not know is what the usernames of your other users are.

* Allows easy transfer for admin rights, in a short term or long term
period, by adding and removing users from the admin group, while not
compromising the root account.

* sudo can be set up with a much more fine-grained security policy.

DOWNSIDES OF USING SUDO
Although for desktops the benefits of using sudo are great, there are
possible issues which need to be noted:

* Redirecting the output of commands run with sudo can be confusing at
first. For instance consider

sudo ls > /root/somefile

will not work since it is the shell that tries to write to that file.
You can use
ls | sudo tee /root/somefile

to get the behaviour you want.

* In a lot of office environments the ONLY local user on a system is
root. All other users are imported using NSS techniques such as
nss-ldap. To setup a workstation, or fix it, in the case of a network
failure where nss-ldap is broken, root is required. This tends to
leave the system unusable. An extra local user, or an enabled root
password is needed here.

GOING BACK TO A TRADITIONAL ROOT ACCOUNT
This is not recommended!

To enable the root account (i.e. set a password) use:

sudo passwd root

Afterwards, edit /etc/sudoers and comment out the line

%admin ALL=(ALL) ALL

to disable sudo access to members of the admin group.

SEE ALSO
sudo(8), https://wiki.ubuntu.com/RootSudo

February 8, 2006 sudo_root(8)

I created a password for root but it still doesn't allow you to log in as root.The sudoers file doesn't even display at all.
 
Thank you Sky.

(ubuntu will never allow you to log in as root. you can stand on your head and fart the national anthem, and ubuntu will still not allow it.)
 
Thank you Sky.

(ubuntu will never allow you to log in as root. you can stand on your head and fart the national anthem, and ubuntu will still not allow it.)

First I want to say a big thank you to Tazz for all his help because I'm now typing this from Linux:D

Actually you can log in as root. You have to create a root password as per my previous post then you have to enable administration log in under system-administration-login window-security tab-allow local system administator log in. Then you can log in as root:D I got this tip from the website in my last post. I only checked that website after submitting that post:o

My connection is working without using the 2g / 3g setting. It came up with a string eror in the terminal.

Thanks again Tazz:D One question out of interest: will i only need the default dialer settings if using a normal telkom dial-up connection?
 
Status
Not open for further replies.
Top
Sign up to the MyBroadband newsletter
X