Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
swrdone
Posts: 3
Joined: 30 Apr 2014, 04:10

Huawei E1750 setup on mips Linux 2.6.30 no carrier issue

Post by swrdone » 30 Apr 2014, 05:03

Hello,

First I have to say thank you for the usb_modeswitch module and support.
I have been tried few weeks, but it still doesn't work for Huawei E1750 3G dongle on mips embedded Linux.
The following log shows below seems translate to modem mode from storage mode succeed.

Code: Select all

/apps/usr/local/sbin # ./usb_modeswitch -W -c usb_modeswitch.conf

 * usb_modeswitch: tool for controlling "flip flop" mode USB devices
 * Version 1.0.2 (C) Josua Dietze 2009
 * Works with libusb 0.1.12 and probably other versions

Reading config file: usb_modeswitch.conf
DefaultVendor=  0x12d1
DefaultProduct= 0x1446
TargetVendor=   0x12d1
TargetProduct=  0x1001
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
MessageEndpoint=0x01
MessageContent="55534243000000000000000000000011060000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check enabled, settle time 5 seconds

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device

Looking for target devices ...
 No devices in targe[  464.244000] usb 1-1: USB disconnect, address 2
t mode or class found
Looking for default devices ...
 Found default devices (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

Received inquiry data (detailed identification)
-------------------------
  Vendor String: HUAWEI
 Product String: Mass Storage
Revision String: 2.31
-------------------------

Device description data (identification)
-------------------------
Manufacturer: HUAWEI Technology
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
 OK, message successfully sent
USB error: could not clear/halt ep 1: Protocol error
Device is gone, skipping further steps ...
Checking for mode switch after 5 seconds settling time ...
smbapp signal SIGUSR1
remove disk /devices/platform/EHCI-brcm.0/usb1/1-1/1-1:1.1/host1/target1:0:0/1:0:0:0/block/sda
hotplugRemove /dev/sda not removed for some reason
[  468.239000] usb 1-1: new high speed USB device using EHCI-brcm and address 3
[  468.356000] usb 1-1: New USB device found, idVendor=12d1, idProduct=1001
[  468.357000] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[  468.358000] usb 1-1: Product: HUAWEI Mobile
[  468.359000] usb 1-1: Manufacturer: HUAWEI Technology
[  468.360000] usb 1-1: configuration #1 chosen from 1 choice
[  468.368000] option 1-1:1.0: GSM modem (1-port) converter detected
[  468.371000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[  468.382000] option 1-1:1.1: GSM modem (1-port) converter detected
[  468.388000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[  468.398000] option 1-1:1.2: GSM modem (1-port) converter detected
[  468.408000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[  468.418000] usb-storage: probe of 1-1:1.3 failed with error -1
[  468.452000] usb-storage: probe of 1-1:1.4 failed with error -1
USB error: failed to open /proc/bus/usb/001/002: No such file or directory
USB error: could not claim interface 0: Bad file descriptor
 Original device can't be accessed anymore. Good.
usb_os_find_devices: Found 003 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
 Found a new device in target mode or class

Mode switch succeeded. Bye.
And then I using the pppd module and command "pppd file wcdma"
Sometimes it shows as:

Code: Select all

/usr/local/sbin # pppd file wcdma
timeout set to 12 seconds
expect (^M)

^BOOT:32136169,0,0,0,26^M
 -- got it

send (ABORT^M)
expect (NO CARRIER)
warning: read() on stdin returned 0
Failed
Can't restore terminal parameters: Input/output error
Connect script failed
And sometimes I get this:

Code: Select all

NO CARRIER
 -- failed
Failed (NO CARRIER)
Connect script failed

Can't get terminal parameters: Input/output error
It's really confused to me for few weeks, I not sure if I lost something important?
Thanks for your support! :)

swrdone
Posts: 3
Joined: 30 Apr 2014, 04:10

Re: Huawei E1750 setup on mips Linux 2.6.30 no carrier issue

Post by swrdone » 12 May 2014, 05:43

Hi all,

As the same question, I have modified the script that provided by pppd-2.4.5
It show me the message as below:

Code: Select all

Jan  1 00:02:06 (none) daemon.notice pppd[1013]: pppd 2.4.5 started by root, uid 0
Jan  1 00:02:07 (none) local2.info chat[1015]: timeout set to 10 seconds
Jan  1 00:02:07 (none) local2.info chat[1015]: abort on (\nBUSY\r)
Jan  1 00:02:07 (none) local2.info chat[1015]: abort on (\nNO ANSWER\r)
Jan  1 00:02:07 (none) local2.info chat[1015]: abort on (\nRINGING\r\n\r\nRINGING\r)
Jan  1 00:02:07 (none) local2.info chat[1015]: send (rAT^M)
Jan  1 00:02:07 (none) local2.info chat[1015]: expect (OK)
Jan  1 00:02:07 (none) local2.info chat[1015]: ^M
Jan  1 00:02:07 (none) local2.info chat[1015]: OK
Jan  1 00:02:07 (none) local2.info chat[1015]:  -- got it
Jan  1 00:02:07 (none) local2.info chat[1015]: send (ATH0^M)
Jan  1 00:02:07 (none) daemon.debug pppd[1013]: Script /usr/local/sbin/ppp-on-dialer finished (pid 1014), status = 0x0
Jan  1 00:02:07 (none) daemon.info pppd[1013]: Serial connection established.
Jan  1 00:02:07 (none) daemon.debug pppd[1013]: using channel 1
Jan  1 00:02:07 (none) daemon.info pppd[1013]: Using interface ppp0
Jan  1 00:02:07 (none) daemon.notice pppd[1013]: Connect: ppp0 <--> /dev/ttyUSB2
Jan  1 00:02:08 (none) daemon.debug pppd[1013]: sent [LCP ConfReq id=0x1 <magic 0xfd8d0791> <pcomp>]
Jan  1 00:02:10 (none) daemon.notice pppd[1013]: Modem hangup
Jan  1 00:02:10 (none) daemon.notice pppd[1013]: Connection terminated.
Jan  1 00:02:10 (none) user.notice getty-start: retval=1
Jan  1 00:02:10 (none) auth.err getty: ttyUSB2[1025]: tcgetattr: No such device or address^M
Jan  1 00:02:11 (none) daemon.info pppd[1013]: Exit.
Jan  1 00:02:20 (none) user.notice getty-start: retval=1
my script is:
(ppp-on)

Code: Select all

debug
nodetach
/dev/ttyUSB0
115200
modem
user web
password web
nocrtscts
noauth
defaultroute
ipcp-accept-local
ipcp-accept-remote
default-asyncmap
connect '/usr/local/sbin/chat -v -f /usr/local/sbin/wcdma-connect-chat'
disconnect '/usr/local/sbin/chat -s -v -f /usr/local/sbin/wcdma-disconnect-chat'
(ppp-on-dialer)

Code: Select all

#!/bin/sh
#
exec /usr/local/sbin/chat -v						\
	TIMEOUT		10				\
	ABORT		'\nBUSY\r'			\
	ABORT		'\nNO ANSWER\r'			\
	ABORT		'\nRINGING\r\n\r\nRINGING\r'	\
	''		\rAT				\
	'OK-+++\c-OK'	ATH0				\
	'OK'		'AT+CGDCONT=1,"IP","internet"'			\
	TIMEOUT		30				\
	OK		ATDT*99#			\
	CONNECT		''				\
I'm not sure whether I setup the usb_modeswitch module or pppd well?
And does the usb_modeswitch works correctly?
Thanks for your support again! :oops:

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Re: Huawei E1750 setup on mips Linux 2.6.30 no carrier issue

Post by Josh » 14 May 2014, 23:39

Hmm, are you using ttyUSB0 or ttyUSB2?

Your last pppd log says "ppp0 <--> /dev/ttyUSB2", whereas your option file says "/dev/ttyUSB0" ...

Which ttyUSB port did you use when you got that very first log where it said:

"^BOOT:32136169,0,0,0,26^M
-- got it"

??

Because that was most likely not the correct port to use.

With Huawei, port ttyUSB0 is usually the one for connecting.

swrdone
Posts: 3
Joined: 30 Apr 2014, 04:10

Re: Huawei E1750 setup on mips Linux 2.6.30 no carrier issue

Post by swrdone » 16 May 2014, 05:51

Hi, Josh,

Thanks for your reply,
I think that I posted the wrong ppp-on script log, it should be ttyUSB2 for my testing result.
I have tried ttyUSB0, ttyUSB1 and ttyUSB2 for test because I'm not sure which port is the correct port.
(I know for Huawei model is usually using ttyUSB0)
How can I verify which port should be correct?

And I have trying to rebuild pppd module including rp-pppoe,
I using ttyUSB0 and ttyUSB2 for script ppp-on and ppp-on2 seperately.
(the ttyUSB1 didn't show correctly log so I think it's not the port should be)
the log shows as:
(I have tried ppp-on twice and ppp-on2 once as the log below)

Code: Select all

/var/log # cat messages
Jan  1 00:00:39 (none) syslog.info syslogd started: BusyBox v1.19.3
Jan  1 00:00:39 (none) user.notice rcS: Mounting apps partition
Jan  1 00:00:40 (none) user.notice rcS: Starting lxginit
Jan  1 00:00:40 (none) user.notice rcS: Starting udhcpc
Jan  1 00:00:40 (none) user.notice udhcpc: udhcpc (v1.19.3) started
Jan  1 00:00:40 (none) user.notice udhcpc: Sending discover...
Jan  1 00:00:43 (none) user.notice udhcpc: Sending discover...
Jan  1 00:00:43 (none) user.notice udhcpc: Sending select for 192.168.0.254...
Jan  1 00:00:44 (none) user.notice udhcpc: Lease of 192.168.0.254 obtained, lease time 30
Jan  1 00:00:44 (none) user.notice udhcpc: adding dns 192.168.0.1
Jan  1 00:00:44 (none) user.notice rcS: Starting gwrepair
Jan  1 00:00:44 (none) user.notice rcS: Starting getty on ttyS0
Jan  1 00:01:14 (none) user.notice gw-repair: default gateway is 192.168.0.1
Jan  1 00:25:58 (none) auth.info login[568]: root login on 'ttyS0'
Jan  1 00:27:22 (none) user.notice add: /devices/platform/EHCI-brcm.0/usb1/1-1/1-1:1.0/ttyUSB0
Jan  1 00:27:22 (none) user.notice add: /devices/platform/EHCI-brcm.0/usb1/1-1/1-1:1.2/ttyUSB2
Jan  1 00:27:22 (none) user.notice add: /devices/platform/EHCI-brcm.0/usb1/1-1/1-1:1.1/ttyUSB1
Jan  1 00:28:23 (none) user.notice getty-start: retval=0
Jan  1 00:29:37 (none) user.notice getty-start: retval=0
Jan  1 00:30:50 (none) user.notice getty-start: retval=0
Jan  1 00:32:04 (none) user.notice getty-start: retval=0
Jan  1 00:33:18 (none) user.notice getty-start: retval=0
Jan  1 00:34:18 (none) user.notice getty-start: retval=0

Jan  1 00:34:52 (none) daemon.info pppd[3112]: Plugin /usr/sbin/pppoe.so loaded.
Jan  1 00:34:52 (none) daemon.info pppd[3112]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
Jan  1 00:34:52 (none) daemon.notice pppd[3112]: pppd 2.4.5 started by root, uid 0
Jan  1 00:34:53 (none) local2.info chat[3128]: timeout set to 10 seconds
Jan  1 00:34:53 (none) local2.info chat[3128]: abort on (\nBUSY\r)
Jan  1 00:34:53 (none) local2.info chat[3128]: abort on (\nNO ANSWER\r)
Jan  1 00:34:53 (none) local2.info chat[3128]: abort on (\nRINGING\r\n\r\nRINGING\r)
Jan  1 00:34:53 (none) local2.info chat[3128]: send (rAT^M)
Jan  1 00:34:53 (none) daemon.debug pppd[3112]: Script /usr/local/sbin/ppp-on-dialer finished (pid 3127), status = 0x0
Jan  1 00:34:53 (none) daemon.info pppd[3112]: Serial connection established.
Jan  1 00:34:53 (none) daemon.debug pppd[3112]: using channel 1
[b]Jan  1 00:34:53 (none) daemon.err pppd[3112]: Failed to set PPP kernel option flags: Inappropriate ioctl for device[/b]
Jan  1 00:34:53 (none) daemon.info pppd[3112]: Using interface ppp0
Jan  1 00:34:53 (none) daemon.notice pppd[3112]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  1 00:34:53 (none) daemon.notice pppd[3112]: Modem hangup
Jan  1 00:34:53 (none) daemon.notice pppd[3112]: Connection terminated.
Jan  1 00:34:53 (none) user.notice getty-start: retval=1
[b]Jan  1 00:34:53 (none) auth.err getty: ttyUSB0[3136]: tcgetattr: No such device or address^M[/b]
Jan  1 00:34:54 (none) daemon.info pppd[3112]: Exit.

Jan  1 00:35:03 (none) daemon.info pppd[3143]: Plugin /usr/sbin/pppoe.so loaded.
Jan  1 00:35:03 (none) daemon.info pppd[3143]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
Jan  1 00:35:03 (none) daemon.notice pppd[3143]: pppd 2.4.5 started by root, uid 0
[b]Jan  1 00:35:03 (none) daemon.err pppd[3143]: tcgetattr: No such device or address (line 931)[/b]
Jan  1 00:35:03 (none) user.notice getty-start: retval=1
Jan  1 00:35:03 (none) auth.err getty: ttyUSB0[3151]: tcgetattr: No such device or address^M
Jan  1 00:35:04 (none) daemon.info pppd[3143]: Exit.

Jan  1 00:35:08 (none) daemon.info pppd[3154]: Plugin /usr/sbin/pppoe.so loaded.
Jan  1 00:35:08 (none) daemon.info pppd[3154]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
Jan  1 00:35:08 (none) daemon.notice pppd[3154]: pppd 2.4.5 started by root, uid 0
Jan  1 00:35:09 (none) local2.info chat[3170]: timeout set to 10 seconds
Jan  1 00:35:09 (none) local2.info chat[3170]: abort on (\nBUSY\r)
Jan  1 00:35:09 (none) local2.info chat[3170]: abort on (\nNO ANSWER\r)
Jan  1 00:35:09 (none) local2.info chat[3170]: abort on (\nRINGING\r\n\r\nRINGING\r)
Jan  1 00:35:09 (none) local2.info chat[3170]: send (rAT^M)
Jan  1 00:35:09 (none) daemon.debug pppd[3154]: Script /usr/local/sbin/ppp-on-dialer finished (pid 3169), status = 0x0
Jan  1 00:35:09 (none) daemon.info pppd[3154]: Serial connection established.
Jan  1 00:35:09 (none) daemon.debug pppd[3154]: using channel 2
Jan  1 00:35:09 (none) daemon.info pppd[3154]: Using interface ppp0
Jan  1 00:35:09 (none) daemon.notice pppd[3154]: Connect: ppp0 <--> /dev/ttyUSB2
Jan  1 00:35:10 (none) daemon.debug pppd[3154]: sent [LCP ConfReq id=0x1 <magic 0x2ad923c3> <pcomp>]
Jan  1 00:35:12 (none) daemon.notice pppd[3154]: Modem hangup
Jan  1 00:35:12 (none) daemon.notice pppd[3154]: Connection terminated.
Jan  1 00:35:12 (none) user.notice getty-start: retval=1
[b]Jan  1 00:35:12 (none) auth.err getty: ttyUSB2[3181]: tcgetattr: No such device or address^M[/b]
Jan  1 00:35:13 (none) daemon.info pppd[3154]: Exit.
Jan  1 00:35:13 (none) user.notice getty-start: retval=1
Jan  1 00:35:22 (none) user.notice getty-start: retval=1
and I modify the ppp-on-dialer script as:

Code: Select all

#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec /usr/local/sbin/chat -v						\
	TIMEOUT		10				\
	ABORT		'\nBUSY\r'			\
	ABORT		'\nNO ANSWER\r'			\
	ABORT		'\nRINGING\r\n\r\nRINGING\r'	\
	''		\rAT				\
	'OK'		'AT+CGDCONT=1,"IP","internet"'			\
	TIMEOUT		30				\
	OK		ATDT*99#			\
	CONNECT		''				\
Do you think the problem is due to my embedded system didn't recongize or connect correctly with my 3G dongle?
Thank you again! :)

Post Reply