WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: requesting help for 2 internet key  (Read 6687 times)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
requesting help for 2 internet key
« on: April 05, 2011, 10:40:07 PM »
i have 2 intertet key and would want to succeed to connect at least one of the two that to short I will go outside for a few time.
One is huawey E173 and other is MBD-220HU, of this I possess a handbook but i don't have capacity to understanding it

http://dl.dropbox.com/u/10544567/Mobidata%20Hspa%20IMPOSTAZIONI%20PER%20Linux.pdf

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #1 on: April 09, 2011, 09:56:22 AM »
I managed to switches mode to one of two modems with usb_modeswitch.
I compile wvdial, but I can not get it to work:
This is my /etc/wvdial.conf:
Code: [Select]
[Dialer Defaults]
Phone = *99#
Username = wind
Password = wind
Stupid Mode = 1
Dial Command = ATD
Modem = /dev/ttyUSB2
Baud = 460800
Init1= ATZ
Init2 = AT+CGDCONT=1,"IP","internet.wind"
ISDN = 0
Modem Type = Analog Modem
PPPD = /usr/local/sbin/pppd
Carrier Check = no
But, after i ran wvdial:

Code: [Select]
root@box:~# wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1,"IP","internet.wind"
AT+CGDCONT=1,"IP","internet.wind"
OK
--> Modem initialized.
--> Sending: ATD*99#
--> Waiting for carrier.
ATD*99#
ERROR
--> Invalid dial command.
--> Disconnecting at Sat Apr  9 14:54:15 2011
root@box:~#

I hope someone can help me
« Last Edit: April 09, 2011, 10:13:39 AM by vinnie »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: requesting help for 2 internet key
« Reply #2 on: April 09, 2011, 12:18:56 PM »
What happens if you use ATDT instead of ATD?

Also try atdt
« Last Edit: April 09, 2011, 12:32:07 PM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #3 on: April 09, 2011, 08:52:21 PM »
Yes, but this has not resolved the situation.
Actually I did several tests by changing the file wvdial.conf
To this I would ask if you could help me understand if the problem is different.
Maybe even trying to bypass with pppd.

I are forced to hurry because in a week, if not solve, the only way to connect is to use windows, and I do not like  :'(

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: requesting help for 2 internet key
« Reply #4 on: April 10, 2011, 01:22:30 AM »
vinnie: I take it you have checked that your service provider is indeed using '*99#' as the number to dial.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #5 on: April 10, 2011, 09:56:46 AM »
've tried several, but in the end I kept that because it is the same as used on windows, where I connect

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: requesting help for 2 internet key
« Reply #6 on: April 10, 2011, 10:51:50 PM »
@vinnie: First up I need to state that I don't own a USB 3G modem and my knowledge is therefore only of rather theoretical nature, furthermore I don't really know the Italian language. Nevertheless I had a bit a look around the web page of your provider (which I assumed to be "wind.it"). I found theses generic instructions. Just briefly looking at things like the screenshots I can't say that I spotted anything I've would have done differently. I assume that you've already tried out the various variations of the "phone" number (e.g. "*99***1#", and maybe even "*99***9#" or "*99**1*1#").

In the "good old days" (like 10-15 years ago) when analog modems were the norm my typical troubleshooting step at this stage (i.e. after the modem initailisation) would have been to just listen for a dial tone (e.g. by using 'ATDT' without any number). And as the next step to just listen whether I could get the modem to dial out at all (e.g. by using a single digit like 'ATDT 9'). But alas I'm afraid that won't work with your type of modem any more.

As a generic comment: Make sure that you are using the correct combination of 'modem', 'init' strings and 'phone' suitable for your modem and provider. As soon as you get a 'CONNECT ...' it should be merely an issue with the PPPD parameters (e.g. username/password) that you'll have to sort out.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #7 on: April 10, 2011, 11:16:21 PM »
I think the problem lies somewhere else
few times ago i tried to give command with minicom (I can not do the same with cutecom, seems to repeat the input instead uutput):
Code: [Select]
Welcome to minicom 2.4

OPTIONS: I18n                                                                
Compiled on Jun 22 2010, 21:33:10.                                          
Port /dev/ttyUSB2                                                            
                                                                            
Press CTRL-A Z for help on special keys                                      
                                                                            
AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0                                            
OK                                                                                                                                                  
AT                                                                          
OK                                      
ATZ                                    
OK                                      
AT+CGDCONT=1,"ip","internet.wind"      
OK                                      
ATD*99#                                
ERROR

Since I am not convinced, as the guide i posted, I would try to switch the modem with AT commands instead modeswtich, But the guide says to refer to "network manager" to know the name of the device to be set in minicom.
Now I ask, after i insert the usb dispositive, how I can know its device (alias /dev/tty*)?

@maro= thanks for your attention, in pdf that you are finding are apn and number, correspond to those that I already use, but it's good to have a verification, username & password is ininfluent.
For several days this part can assure that I'm doing so many tests (with ppp pppsetup umtsmon eznet/xeznet sakis wvdial...) not last the test with minicom.
Tomorrow I'll try with ubuntu to see if is a linux problem or not.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: requesting help for 2 internet key
« Reply #8 on: April 11, 2011, 01:17:35 AM »
Quote
Now I ask, after i insert the usb dispositive, how I can know its device (alias /dev/tty*)?
Hmmm, I would have thought that there will be some sort of message in the 'dmesg' output.

So what I would do in this case is to boot without the USB device, take a 'dmesg' snapshot (e.g. via dmesg > d1), connect the device in question, and check what has changed (e.g. via dmseg | diff -U 0 d1 -). Likewise if the device requires a firmware file, or a kernel module to be recognised or properly enabled that should also show up in the 'dmesg' output in some form or another.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #9 on: April 11, 2011, 02:59:41 PM »
before doing the test with dmesg and minicom I did that with ubuntu, and in ubuntu works.
This is wvdial.conf that work in ubuntu:
Code: [Select]
[Dialer Defaults]
Dial Command = ATD
Init1 = at
Init2 = AT+CGDCONT=1,"IP","internet.wind"
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Carrier Check = no
Phone = *99#
Modem = /dev/ttyUSB2
Username = wind
Password = wind
Baud = 460800
Stupid Mode = 1

This gave me an opportunity to understand a little more and repeat.
Now the modem as connected with wvdial in tinycore, but  I can not use this connection for Internet.

Code: [Select]
tc@box:/mnt/sda6/wvdial-1.61/wvdial-1.61$ sudo wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: at
at
OK
--> Sending: AT+CGDCONT=1,"IP","internet.wind"
AT+CGDCONT=1,"IP","internet.wind"
OK
--> Modem initialized.
--> Sending: ATD*99#
--> Waiting for carrier.
ATD*99#
CONNECT 7200000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Apr 11 20:41:40 2011
--> Pid of pppd: 9526
--> Using interface ppp0
--> pppd: H&d[08]`#d[08]
--> pppd: H&d[08]`#d[08]
--> pppd: H&d[08]`#d[08]
--> pppd: H&d[08]`#d[08]
--> pppd: H&d[08]`#d[08]
--> pppd: H&d[08]`#d[08]
--> local  IP address 164.132.123.57
--> pppd: H&d[08]`#d[08]
--> remote IP address 10.64.64.64
--> pppd: H&d[08]`#d[08]
--> primary   DNS address 193.70.152.25
--> pppd: H&d[08]`#d[08]
--> secondary DNS address 193.70.192.25
--> pppd: H&d[08]`#d[08]

Wireshark a program that recommended by one friend, identifies the new network as ppp0, now the question is this:
how do I set this connection to be used by tinycore? (in ubuntu it automatically)

Please answer me, I feel, are close to conclusion
« Last Edit: April 11, 2011, 03:01:29 PM by vinnie »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: requesting help for 2 internet key
« Reply #10 on: April 11, 2011, 04:05:56 PM »
Have you looked into output of 'route'?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #11 on: April 11, 2011, 05:24:55 PM »
I do not know what it is! (I also searched route in /var/log)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: requesting help for 2 internet key
« Reply #12 on: April 11, 2011, 05:31:56 PM »
Well, the 'wvdial' log in reply #9 indicates to me that you had a connection. To expand reply #10 a bit I'd suggest to share with us the output of: ifconfig -a ; cat /etc/resolv.conf ; route (obviously after you ran 'wvdial').

Next (potential) simple troubleshoouting steps:
(1) Try to ping the 'local IP address' (e.g. 164.132.123.57 in the example from reply #9, which is a public IP address belonging to Infostrada).
(2) Try to ping a well-know public server (i.e. outside of the realm of your ISP), e.g. ping 8.8.8.8
(3) Test the DNS (e.g. via nslookup google.com)
(4) Test a HTTP transmission (e.g. via wget -qO- http://example.com)

This step-by-step approach should allow you to pinpoint what works and what is faulty (and again you might want to share those results here, if you have problems).

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: requesting help for 2 internet key
« Reply #13 on: April 11, 2011, 06:06:44 PM »
I do not know what it is! (I also searched route in /var/log)

Code: [Select]
route
 ;)

Though I hope maro made that already clear in the meantime
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: requesting help for 2 internet key
« Reply #14 on: April 11, 2011, 06:21:03 PM »
Ok, preface:
the connection that I use (and allows me to write at this time) is a adsl with router alice, therefore dhcp.
To make test of maro I unplugged the ethernet cable and start wvdial.

The first thing to say and that the file /etc/resolv.conf does not automatically change,  and then to validate the remainder of the test, I manually changed with the two dns provided by output of wvdial.

resolv.conf after change:
Code: [Select]
tc@box:/$ cat /etc/resolv.conf
nameserver 193.70.152.25
nameserver 193.70.192.25


Here are the other tests:

Code: [Select]
tc@box:/$ ifconfig -a
dummy0    Link encap:Ethernet  HWaddr 9A:55:B6:B7:E6:F2 
          BROADCAST NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 20:CF:30:6E:C8:D2 
          inet addr:192.168.1.173  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:63052354 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77894 errors:0 dropped:0 overruns:0 carrier:6
          collisions:0 txqueuelen:1000
          RX bytes:143971588 (137.3 MiB)  TX bytes:8767633 (8.3 MiB)
          Interrupt:30

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:896 errors:0 dropped:0 overruns:0 frame:0
          TX packets:896 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:99248 (96.9 KiB)  TX bytes:99248 (96.9 KiB)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:164.132.96.39  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:118 (118.0 B)  TX bytes:154 (154.0 B)

wlan0     Link encap:Ethernet  HWaddr 48:5D:60:04:E8:F7 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Code: [Select]
tc@box:/$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     *               255.255.255.255 UH    0      0        0 ppp0
127.0.0.1       *               255.255.255.255 UH    0      0        0 lo
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

Code: [Select]
tc@box:/$ ping 164.132.96.39
PING 164.132.96.39 (164.132.96.39): 56 data bytes
64 bytes from 164.132.96.39: seq=0 ttl=64 time=0.174 ms
64 bytes from 164.132.96.39: seq=1 ttl=64 time=0.081 ms

Code: [Select]
tc@box:/$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
...indefinitely time...

Code: [Select]
tc@box:/$ nslookup google.com
Server:    193.70.152.25
Address 1: 193.70.152.25

nslookup: can't resolve 'google.com'

Code: [Select]
tc@box:/$ wget -qO- http://example.com
wget: bad address 'example.com'