Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2012 15:37:23 +0530
From:      Manish Jain <bourne.identity@hotmail.com>
To:        Erich Dollansky <erichfreebsdlist@ovitrap.com>
Cc:        Matthias Apitz <guru@unixarea.de>, freebsd-questions@freebsd.org
Subject:   Re: How to get Huawei EC1561 USB modem working under FreeBSD 8.2?
Message-ID:  <BLU0-SMTP2100AFDDA97AFC8F3A58FC6F6C20@phx.gbl>
In-Reply-To: <20120725223628.026cbf52@AMD620.ovitrap.com>
References:  <BLU0-SMTP1086684ACF08C894823C3B0F6D80@phx.gbl> <20120721133611.GA3755@tinyCurrent> <BLU0-SMTP1571F208F049EDC078EC837F6DD0@phx.gbl> <201207231737.43075.erichfreebsdlist@ovitrap.com> <BLU0-SMTP1716BB70E64EAA958F76B9BF6DC0@phx.gbl> <20120725202357.584a931f@AMD620.ovitrap.com> <BLU0-SMTP410F8393DE3043422D16693F6C30@phx.gbl> <20120725223628.026cbf52@AMD620.ovitrap.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 25-Jul-12 21:06, Erich Dollansky wrote:
> Hi
>
> On Wed, 25 Jul 2012 20:21:04 +0530
> Manish Jain<bourne.identity@hotmail.com>  wrote:
>> On 25-Jul-12 18:53, Erich Dollansky wrote:
>>> On Tue, 24 Jul 2012 14:29:07 +0530
>>> Manish Jain<bourne.identity@hotmail.com>   wrote:
>>>> On 23-Jul-12 16:07, Erich Dollansky wrote:
>>>>> On Monday 23 July 2012 16:46:04 Manish Jain wrote:
>>>>>> On 21-Jul-12 19:06, Matthias Apitz wrote:
>>>>>>> El día Saturday, July 21, 2012 a las 06:01:11PM +0530, Manish
>>>>>>> Jain escribió:
>>
>> I tried switching the USB ports and have some information which could
>> help you to help me :
>>
>> usbconfig -u 0 -a 2 dump_device_desc :
>> ugen0.2:<HUAWEI Mobile HUAWEI TECHNOLOGIES>  at usbus0, cfg=0 md=HOST
>> spd=FULL (12Mbps) pwr=ON
>>
>>     bLength = 0x0012
>>     bDescriptorType = 0x0001
>>     bcdUSB = 0x0110
>>     bDeviceClass = 0x0000
>>     bDeviceSubClass = 0x0000
>>     bDeviceProtocol = 0x0000
>>     bMaxPacketSize0 = 0x0040
>>     idVendor = 0x12d1
>>     idProduct = 0x140b
>
> This is strange. src/sys/dev/usb/usbdevs says this:
>
> product HUAWEI E140B		0x140b	3G modem
>
> This means that your product is supported
>
> Is this line in your usbdevs?
>
>> Now what should my devfs.conf contain ? Currently it contains the
>> following :
>
> Mine is empty. Comment all entries out. This might be the problem.
>>
>> link cuaU0.0 modem
>> own modem root:operator
>> perm modem 666
>>
>> link ugen0.3 usv
>> own usv root:operator
>> perm usv 666
>>
>> link cuaU0.1 apcups
>> own apcups root:operator
>> perm apcups 666
>>
>> Obviously, these entries are incorrect since neither my modem speaks
>> to the internet nor is any signal from the APC UPS recognized. I
>> believe once I have the correct devfs entries, the whole system
>> should work smoothly. But please correct me if I am wrong.
>>
>> Surprisingly, /etc/usb_modeswitch.d contains no entries for 12d1:140b
>> or 051d:*. Do I need to reinstall usb_modeswitch.d ? Or can usbconfig
>> configure the devices correctly ? I am no expert here, so if yes, I
>> would need the complete commands.
>>
> What version of FreeBSD are you using?
>
>> Thanks for any help. I am greatly indebted to FreeBSD and its
>> philosophy making things 'as simple as possible, but not any simpler'
>> - which has helped me learn a great deal about computers in general
>> and managing my own computer in particular. But the USB related stuff
>> still beats the hell out of me, so I need help here.
>
> There is something very, very simple wrong. I just do not see now what
> it is.
>
> I have the feeling that your modem is not recognised while it should be
> as it is known to FreeBSD.
>>
>> BTW, my system now has the usbdump command (installed from sources
>> downloaded from http://biot.com/usbdump/) but no manpage.
>>
> You got then a Linux version which might causes more problems that you
> need.
>
> Erich
>
>

Hi Erich/Matthias,

I did some tinkering to make _some_ progress. My APC UPS is working fine 
now under FreeBSD (8.2-RELEASE, amd64). I think I also now have the 
correct device setting in ppp.conf (/dev/cuaU0.0, also symlink'ed as 
/dev/modem via devfs.conf). But the modem still does not speak to 
internet. Here is the latest log :

Jul 26 15:16:15 bourne ppp[1199]: Phase: Using interface: tun0
Jul 26 15:16:15 bourne ppp[1199]: Phase: deflink: Created in closed state
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: default: set device 
/dev/modem
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: default: set speed 115200
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: default: set dial ABORT 
BUSY ABORT NO\sCARRIER TIMEOUT 5  "" AT OK-AT-OK AT&FE0V1X1&D2&C1S0=0 OK 
\dATDT\T TIMEOUT 40 CONNECT
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: default: set timeout 180
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: default: enable dns
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set phone #777
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set device 
/dev/cuaU0.0
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set login
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set authname 
internet@internet.mtsindia.in
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set authkey 
********
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set timeout 0
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: disable ipv6cp
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set ifaddr 
10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: add default HISADDR
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: set dial AT+CRM=1
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: accept PAP CHAP
Jul 26 15:16:15 bourne ppp[1199]: tun0: Command: huawei: enable dns
Jul 26 15:16:15 bourne ppp[1217]: tun0: Phase: PPP Started (auto mode).
Jul 26 15:16:15 bourne ppp[1217]: tun0: Phase: bundle: Establish
Jul 26 15:16:15 bourne ppp[1217]: tun0: Phase: deflink: closed -> opening
Jul 26 15:16:15 bourne ppp[1217]: tun0: Phase: deflink: Connected!
Jul 26 15:16:15 bourne ppp[1217]: tun0: Phase: deflink: opening -> dial
Jul 26 15:16:15 bourne ppp[1217]: tun0: Chat: Phone: #777
Jul 26 15:16:15 bourne ppp[1217]: tun0: Chat: deflink: Dial attempt 1 of 1
Jul 26 15:16:15 bourne ppp[1217]: tun0: Chat: Expect(30): AT+CRM=1
Jul 26 15:16:45 bourne ppp[1217]: tun0: Chat: Expect timeout
Jul 26 15:16:45 bourne ppp[1217]: tun0: Warning: Chat script failed
Jul 26 15:16:45 bourne ppp[1217]: tun0: Phase: deflink: dial -> hangup
Jul 26 15:16:45 bourne ppp[1217]: tun0: Phase: deflink: Disconnected!
Jul 26 15:16:45 bourne ppp[1217]: tun0: Phase: deflink: Connect time: 30 
secs: 0 octets in, 0 octets out
Jul 26 15:16:45 bourne ppp[1217]: tun0: Phase: deflink: 0 packets in, 0 
packets out
Jul 26 15:16:45 bourne ppp[1217]: tun0: Phase:  total 0 bytes/sec, peak 
0 bytes/sec on Thu Jul 26 15:16:15 2012
Jul 26 15:16:45 bourne ppp[1217]: tun0: Phase: deflink: hangup -> closed
Jul 26 15:16:45 bourne ppp[1217]: tun0: Phase: bundle: Dead

I uninstalled usb-modeswitch since I presume u3g.ko would suffice. This 
line is present in /usr/src/sys/dev/usb/serial/u3g.c (as part of the 
struct usb_device_id u3g_devs[]) :

U3G_DEV(HUAWEI, E140B, U3GINIT_HUAWEI), //line 232

Could it be that I am using the wrong AT commands ? Win XP commands are 
underneath :

07-23-2012 23:56:23.203 - Modem type: HUAWEI Mobile Connect - Modem
07-23-2012 23:56:23.203 - Modem inf path: oem10.inf
07-23-2012 23:56:23.203 - Modem inf section: Modem1
07-23-2012 23:56:23.203 - Matching hardware ID: usb\vid_12d1&pid_140b&mi_00
07-23-2012 23:56:23.234 - 460800,8,N,1, ctsfl=0, rtsctl=1
07-23-2012 23:56:23.234 - Initializing modem.
07-23-2012 23:56:23.250 - Send: AT<cr>
07-23-2012 23:56:23.250 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:23.250 - Interpreted response: OK
07-23-2012 23:56:23.265 - Send: AT&FE0V1X1&D2&C1S0=0<cr>
07-23-2012 23:56:23.296 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:23.296 - Interpreted response: OK
07-23-2012 23:56:23.296 - Send: AT<cr>
07-23-2012 23:56:23.296 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:23.296 - Interpreted response: OK
07-23-2012 23:56:23.296 - Waiting for a call.
07-23-2012 23:56:23.312 - Send: ATS0=0<cr>
07-23-2012 23:56:23.312 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:23.312 - Interpreted response: OK
07-23-2012 23:56:23.312 - 921600,8,N,1, ctsfl=1, rtsctl=2
07-23-2012 23:56:23.328 - Initializing modem.
07-23-2012 23:56:23.343 - Send: AT<cr>
07-23-2012 23:56:23.343 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:23.343 - Interpreted response: OK
07-23-2012 23:56:23.343 - Send: AT&FE0V1X1&D2&C1S0=0<cr>
07-23-2012 23:56:23.375 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:23.375 - Interpreted response: OK
07-23-2012 23:56:23.390 - Send: AT<cr>
07-23-2012 23:56:23.390 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:23.390 - Interpreted response: OK
07-23-2012 23:56:23.390 - Passthrough On
07-23-2012 23:56:31.281 - Passthrough Off
07-23-2012 23:56:31.281 - 460800,8,N,1, ctsfl=0, rtsctl=1
07-23-2012 23:56:31.296 - Initializing modem.
07-23-2012 23:56:31.296 - Send: AT<cr>
07-23-2012 23:56:31.312 - Recv: AT<cr>
07-23-2012 23:56:31.312 - Command Echo
07-23-2012 23:56:31.312 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:31.312 - Interpreted response: OK
07-23-2012 23:56:31.312 - Send: AT&FE0V1X1&D2&C1S0=0<cr>
07-23-2012 23:56:31.312 - Recv: AT&FE0V1X1&D2&C1S0=0<cr>
07-23-2012 23:56:31.312 - Command Echo
07-23-2012 23:56:31.359 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:31.359 - Interpreted response: OK
07-23-2012 23:56:31.375 - Send: AT<cr>
07-23-2012 23:56:31.375 - Recv: <cr><lf>OK<cr><lf>
07-23-2012 23:56:31.375 - Interpreted response: OK
07-23-2012 23:56:31.375 - Dialing.
07-23-2012 23:56:31.375 - Send: ATDT####<cr>
07-23-2012 23:56:33.000 - Recv: <cr><lf>CONNECT 153600<cr><lf>
07-23-2012 23:56:33.000 - Interpreted response: Connect
07-23-2012 23:56:33.000 - Receive Connect but CD was low, Waiting for 
signal to go high
07-23-2012 23:56:33.015 - After waiting 20ms CD is still low.
07-23-2012 23:56:33.046 - CD has been raised
07-23-2012 23:56:33.046 - Connection established at 153600bps.
07-23-2012 23:56:33.046 - Error-control off or unknown.
07-23-2012 23:56:33.046 - Data compression off or unknown.
07-23-2012 23:57:03.046 - Read: Total: 7732, Per/Sec: 255, Written: 
Total: 4478, Per/Sec: 148


Thanks for any help.

-- 
Regards,

Manish Jain
+91-99620-10329



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?BLU0-SMTP2100AFDDA97AFC8F3A58FC6F6C20>