zhuravskiy / wl500g

Automatically exported from code.google.com/p/wl500g
0 stars 0 forks source link

ZTE MF-60 Cannot work with RT-N16 in "Ethernet over USB" mode #394

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install 1.9.2.7-rtn-r5066 firmware (on RT-N16 router) 
2. Plug in ZTE MF60 3.75g modem
3. Insert info (apn etc)
3. press connect at USB Network Devices-3G/CDMA Modem
5. autodetect device- YES
6. click view at View connected modems
7. select ZTE modem from the list
8. click apply and restart modem

What is the expected output? What do you see instead?

What version of the product are you using?
1.9.2.7-rtn-r5066

Please describe the problem as detailed as it's possible.
If you have connection problem, then syslog file is required. (please do
attach it as a file)

I am tried to connect the ZTE MF60 MODEM to RT-N16 and enable it as WAN port, 
this modem can only shown as ethernet port when I connected it to PC's USB 
port, I also tried to set up it as "Ethernet over USB" on RT-N16 wan 
connectoion type config, but still cannot get ip assigned from it's DHCP, I saw 
in the change log, this MF60 modem should already supported in current release, 
but in my case, since the modem itself cannot be used as ppp dial, is it 
possible to add the "Ethernet over USB" support on this one in the new release 
of firmware?

Original issue reported on code.google.com by jackyloo...@gmail.com on 1 May 2013 at 1:31

Attachments:

GoogleCodeExporter commented 8 years ago
my method select usb modem as wan and connect first 
then select ethernet over usb save and reboot
but ethernet over usb always disconnet in idle , need login webui to reconnet 
or 
keep ping to hold connect

I use mf820 and wl-500gp

Original comment by wch...@gmail.com on 1 May 2013 at 11:31

GoogleCodeExporter commented 8 years ago
Thanks for your prompt responce, I had followed you method, I can see the 
driver been loaded correctly in thr syslog, but still cannot obtained the IP 
from MF60, I think something were not setup correctly, but just no idea where 
the issue is, I had tried all settings in the "Ethernet over USB", but result 
is the same, I also tried to manual config the static IP, but failed to ping 
MF60, If anyone of you have other suggestion, please kindly advise, Thanks a 
lot!!

Jan  1 08:00:04 kernel: usb 1-2.4: new high speed USB device using ehci_hcd and 
address 6
Jan  1 08:00:04 kernel: usb 1-2.4: configuration #1 chosen from 1 choice
Jan  1 08:00:04 kernel: usbcore: registered new interface driver rndis_host
Jan  1 08:00:04 kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jan  1 08:00:04 kernel: usbcore: registered new interface driver usbserial
Jan  1 08:00:04 kernel: drivers/usb/serial/usb-serial.c: USB Serial support 
registered for generic
Jan  1 08:00:04 kernel: usbcore: registered new interface driver 
usbserial_generic
Jan  1 08:00:04 kernel: drivers/usb/serial/usb-serial.c: USB Serial Driver core
Jan  1 08:00:04 kernel: usbcore: registered new interface driver cdc_acm
Jan  1 08:00:04 kernel: drivers/usb/class/cdc-acm.c: v0.26:USB Abstract Control 
Model driver for USB modems and ISDN adapters
Jan  1 08:00:04 kernel: drivers/usb/serial/usb-serial.c: USB Serial support 
registered for GSM modem (1-port)
Jan  1 08:00:04 kernel: option 1-2.1:1.0: GSM modem (1-port) converter detected
Jan  1 08:00:04 kernel: usbcore: registered new interface driver cdc_wdm
Jan  1 08:00:04 kernel: usb 1-2.1: GSM modem (1-port) converter now attached to 
ttyUSB0
Jan  1 08:00:04 kernel: option 1-2.1:1.1: GSM modem (1-port) converter detected
Jan  1 08:00:05 kernel: usb 1-2.1: GSM modem (1-port) converter now attached to 
ttyUSB1
Jan  1 08:00:05 kernel: usbcore: registered new interface driver option
Jan  1 08:00:05 kernel: drivers/usb/serial/option.c: USB Driver for GSM modems: 
v0.7.2
Jan  1 08:00:05 kernel: qmi_wwan 1-2.1:1.2: cdc-wdm0: USB WDM device
Jan  1 08:00:05 kernel: usb0: register 'qmi_wwan' at usb-0000:00:04.1-2.1, 
WWAN/QMI device, 06:9a:36:74:bf:1a
Jan  1 08:00:05 kernel: usbcore: registered new interface driver qmi_wwan
Jan  1 08:00:05 kernel: cdc_ncm: 14-Mar-2012
Jan  1 08:00:05 kernel: usbcore: registered new interface driver cdc_ncm
Jan  1 08:00:05 kernel: device usb0 entered promiscuous mode
Jan  1 08:00:05 kernel: wan0: port 1(usb0) entering learning state
Jan  1 08:00:05 dhcp client: deconfig: lease is lost

Original comment by jackyloo...@gmail.com on 1 May 2013 at 12:50

GoogleCodeExporter commented 8 years ago
Current nightbuilds ( http://asus.vectormm.net/rtn/ ) contain an additional 
information for modem and qmi control. Please send us "Status & Log - PPP Chat 
Log" and "Diagnistic Info".

Original comment by rssdev10@gmail.com on 15 Jun 2013 at 8:53

GoogleCodeExporter commented 8 years ago
Hi, here is the log, there is no ppp chat since I am DHCP client under MF60, it 
appeared the system cannot get ip from MF60's dhcp. Thanks for all the help in 
advance.

Original comment by jackyloo...@gmail.com on 15 Jun 2013 at 5:17

Attachments:

GoogleCodeExporter commented 8 years ago
Just tested the latest firmware 5163, and the result is the same, cannot get ip 
assignment from MF60.

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 LAN br0
169.254.0.0     *               255.255.0.0     U     0      0        0 WAN wan0

Original comment by jackyloo...@gmail.com on 15 Jun 2013 at 5:33

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi, "Ethernet over USB" mode consist of two phases. The first is an automatic 
usb0 physical interface building. The second is an external mobile network 
connection. The second phase activates by qmi (or ncm) interface using the uqmi 
utility. I don't see in you logs this activation.

Please try to run following command: 
uqmi --device=/dev/cdc-wdm0 --keep-client-id wds --start-network APN_INTERNET

where APN_INTERNET is your real APN.

By the way, do you use any login/password for qmi mode?

Original comment by rssdev10@gmail.com on 16 Jun 2013 at 5:44

GoogleCodeExporter commented 8 years ago

Original comment by rssdev10@gmail.com on 16 Jun 2013 at 5:46

GoogleCodeExporter commented 8 years ago
Hi, Thanks for reply, I had tried you command, but nothing happened.
The MF-60 itself had automatically connected to the 3G network and I can using 
my iphone connect to it.
when connected MF-60 to regular PC, it will just act as ethernet card with ip 
assigned by MF-60's DHCP server function, but when connected it to RT-N16, no 
IP can be obtained, it appeared only config with USB over ethernet than the qmi 
driver would be loaded wit MF-60, but the problem is as above, no ip obtained 
from MF-60. I am not sure if I had supply enough information, if you need any 
debug' log, please kindly let me know, I will try to get it. Thanks again.

usb0      Link encap:Ethernet  HWaddr 92:C1:83:14:D5:1B
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:8901 (8.6 KiB)

wan0      Link encap:Ethernet  HWaddr 92:C1:83:14:D5:1B
          inet addr:169.254.149.84  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:9990 (9.7 KiB)

Original comment by jackyloo...@gmail.com on 16 Jun 2013 at 7:45

GoogleCodeExporter commented 8 years ago
This is debug firmware for rt-n16: 
https://docs.google.com/file/d/0Bwx0cbtdU5K6c2NiZUlyVnlHMTQ/edit?usp=sharing
Don't forget to save flashfs and configs before updating.

Please check logs for your logins/passwords, mask it by '*' and send me.

Original comment by rssdev10@gmail.com on 16 Jun 2013 at 8:52

GoogleCodeExporter commented 8 years ago
Hi, Here is the debug log I just collected, the situation remained the same, 
for your information and Thanks for helping on this issue.

Original comment by jackyloo...@gmail.com on 16 Jun 2013 at 10:11

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks. I don't see APN in the log:
uqmi --device=/dev/cdc-wdm0 --keep-client-id wds --start-network  ???

1. Check APN at http://my.router/Advanced_USBNet_Content.asp. If absent, fill 
it and reboot the router.
2. Try to run a modem connection using the command above and please send me an 
execution result. If your ISP requires login/password, that specify it as:
uqmi --device=/dev/cdc-wdm0 --keep-client-id wds --start-network APN --username 
NAME --password PASSWORD

Original comment by rssdev10@gmail.com on 16 Jun 2013 at 10:29

GoogleCodeExporter commented 8 years ago
Hi, MF-60 did not accept start the interconnection by client, it will connect 
by itself automatically hence there is no APN or user/pass needed for it. when 
I connected it to my PC, my PC will obtained the IP 192.168.0.100 and MF60 is 
192.168.0.1 and there is nowhere I can change this configuration in the MF60. 
In another words, the MF-60 I have cannot be configured as a modem, it can only 
appeared in the connected PC as "ehter net adapter". Hope the information is 
clear.Thanks

Original comment by jackyloo...@gmail.com on 16 Jun 2013 at 11:57

GoogleCodeExporter commented 8 years ago
Sorry, I didn`t see what is the mf60. It supports QCDM, AT, QMI/wwan interfaces 
but QMI support is limited. There is a problem with network initialization.

Our drivers already contain all needed patches like 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/n
et/usb/qmi_wwan.c?id=6fecd35d4cd79fc75e8290abb86734c18500d2a2

It is possible to switch the router into pure Ehernet over USB mode but 
according to 
http://lists.freedesktop.org/archives/libqmi-devel/2012-July/000098.html the 
"set instance id" message is required.

But I don`t know how to send SET_INSTANCE_ID command because uqmi does not 
allow it. Unfortunately I haven`t qmi devices for debugging. Can you help us 
with uqmi (http://nbd.name/gitweb.cgi?p=uqmi.git;a=summary) modifications or 
searching and describing other variants for linux?

Original comment by rssdev10@gmail.com on 16 Jun 2013 at 1:42

GoogleCodeExporter commented 8 years ago
Sir, Thanks for your prompt reply, I wish I am capable to help you run the uqmi 
debugging , unfortunate I am not so familiar with it, but if there is any 
command you want me to try, You can send me the command, I will do my best to 
send you the result ASAP. Thanks

Original comment by jackyloo...@gmail.com on 16 Jun 2013 at 2:16

GoogleCodeExporter commented 8 years ago
Ok, thanks. I will try to find a way to initialize your modem connection. But 
it requires a time.

Original comment by rssdev10@gmail.com on 16 Jun 2013 at 2:29

GoogleCodeExporter commented 8 years ago
My connection solution
1. check connect status (1.jpg),wait to connect and get IP 169.x.x.x 
2. click connect buttopn to reconnect and with change to real IP ( 2.jpg)

3 and 4.jpg is my usb ppp and system log,hope can help to solve connect issue

Original comment by wch...@gmail.com on 17 Jun 2013 at 12:07

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for advise, but my MF-60 did not support to be run as a "modem" hence 
cannot initiate the 3g connection,it can only work as a pure ethernet adapter 
when connected to computer, and using DHCP to obtain the IP assigned from it.

I just tried your method, it is not working, but Thanks for the advise anyway. 
:)

Original comment by jackyloo...@gmail.com on 17 Jun 2013 at 3:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi , I managed to get it work by following:

$ perl -e 'print pack("C*", map {hex} @ARGV)' 01 0f 00 00 00 00 00 00  20 00 04 
00 01 01 00 00 >/dev/cdc-wdm0
$ /sbin/udhcpc -i wan0
udhcpc (v1.20.2) started
Sending discover...
Sending select for 192.168.0.102...
Lease of 192.168.0.102 obtained, lease time 86400

is it possible add this method into new firmware?

I noticed there is lack of usb_modeswitch config for MF-60
/usr/share/usb_modeswitch.d/19d2:2000

I this it's content should be like this after I checked the debug log.

# ZTE MF60 (Variant)

TargetVendor=  0x19d2
TargetProduct= 0x2000

MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=1

Could you please also add it into next release? Thanks a lot.

Original comment by jackyloo...@gmail.com on 20 Jun 2013 at 11:52

GoogleCodeExporter commented 8 years ago
Hi, try to execute the following command:
echo -e "\x01\x0f\x00\x00\x00\x00\x00\x00\x20\x00\x04\x00\x01\x01\x00\x00" > 
/dev/cdc-wdm0

Firmware already contains identical usb_modeswtich commands:
http://wl500g.googlecode.com/svn/trunk/usb_modeswitch/data/usb_modeswitch.d/19d2
:2000

Original comment by rssdev10@gmail.com on 20 Jun 2013 at 12:35

GoogleCodeExporter commented 8 years ago
Hi ,
I tried your command, it also work :)
Will it be included in the new firmware?

Thanks

Original comment by jackyloo...@gmail.com on 20 Jun 2013 at 12:57

GoogleCodeExporter commented 8 years ago
Ok, this is your command but translated from perl to "echo" syntax.

You can write this command as "Device initial script:" on "USB Network Devices 
- 3G/CDMA Modem" page. But delay for drivers loading is required:

sleep 10 && echo -e 
"\x01\x0f\x00\x00\x00\x00\x00\x00\x20\x00\x04\x00\x01\x01\x00\x00" > 
/dev/cdc-wdm0

I`m not sure that including in firmware of this command is needed. Now we know 
mf60  as the only modem with non standard initialization.

Original comment by rssdev10@gmail.com on 20 Jun 2013 at 1:24

GoogleCodeExporter commented 8 years ago
Hi,

Yes, I had added it in the "initial script" and it works also.
One last thing I noticed is that it did not support "hot plug", the MF-60 must 
be connected to the RT-N16 prior reboot than it can be detected correctly as 
"19d2:1402"
If I connected it after reboot, than it will always stay with "19d2:2000",
Is it possible to let this kind of 3g device work with hot plug capability too?

Many Thanks!

Original comment by jackyloo...@gmail.com on 20 Jun 2013 at 2:27

GoogleCodeExporter commented 8 years ago
Send me please debug syslog with hot pluging the modem.

Original comment by rssdev10@gmail.com on 20 Jun 2013 at 2:47

GoogleCodeExporter commented 8 years ago
Here it is, I post with the part after I plug in the device.

Jan  1 08:00:46 DEBUG[1]: Hit enter to continue...
Jan  1 08:01:03 udhcpc[437]: Sending discover...
Jan  1 08:01:06 udhcpc[437]: Sending discover...
Jan  1 08:01:09 udhcpc[437]: Sending discover...
Jan  1 08:01:12 DEBUG[530]: rc applet: udhcpc.script leasefail 
Jan  1 08:01:15 kernel: usb 1-2.1: new high speed USB device using ehci_hcd and 
address 6
Jan  1 08:01:15 kernel: usb 1-2.1: config 1 has an invalid interface number: 3 
but max is 0
Jan  1 08:01:15 kernel: usb 1-2.1: config 1 has no interface number 0
Jan  1 08:01:15 kernel: usb 1-2.1: configuration #1 chosen from 1 choice
Jan  1 08:01:15 kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jan  1 08:01:17 kernel: scsi 2:0:0:0: CD-ROM            ZTE      USB SCSI 
CD-ROM  2.31 PQ: 0 ANSI: 2
Jan  1 08:01:26 DEBUG[540]: _eval: <540> ntpd -qt -p time.stdtime.gov.tw 
Jan  1 08:01:26 DEBUG[439]: child_reap: Reaped 540
Jan  1 08:01:32 udhcpc[437]: Sending discover...
Jan  1 08:01:36 udhcpc[437]: Sending discover...
Jan  1 08:01:39 udhcpc[437]: Sending discover...
Jan  1 08:01:42 DEBUG[541]: rc applet: udhcpc.script leasefail 

Original comment by jackyloo...@gmail.com on 20 Jun 2013 at 3:36

GoogleCodeExporter commented 8 years ago
After that the system will enter infinity udhcpc look, it seems the system can 
only detect the device as CD-ROM caused the issue, That's why I suspect maybe 
associated with usb-modswitch. Also for your informaiton, Thanks

Original comment by jackyloo...@gmail.com on 20 Jun 2013 at 3:39

GoogleCodeExporter commented 8 years ago
Hi, It is needed the system log from debug firmware. 

Original comment by rssdev10@gmail.com on 22 Jun 2013 at 8:43

GoogleCodeExporter commented 8 years ago
Hi , Here it is, I took the part after I inserted MF-60. Thanks!!

Jan  1 08:00:45 DEBUG[1]: Hit enter to continue...
Jan  1 08:01:03 udhcpc[437]: Sending discover...
Jan  1 08:01:06 udhcpc[437]: Sending discover...
Jan  1 08:01:08 kernel: usb 1-2.1: new full speed USB device using ehci_hcd and 
address 6
Jan  1 08:01:08 kernel: usb 1-2.1: device descriptor read/64, error -32
Jan  1 08:01:08 kernel: usb 1-2.1: new full speed USB device using ehci_hcd and 
address 7
Jan  1 08:01:08 kernel: usb 1-2.1: device descriptor read/64, error -32
Jan  1 08:01:09 kernel: usb 1-2.1: device descriptor read/64, error -32
Jan  1 08:01:09 kernel: usb 1-2.1: new full speed USB device using ehci_hcd and 
address 8
Jan  1 08:01:09 kernel: usb 1-2.1: device not accepting address 8, error -32
Jan  1 08:01:09 kernel: usb 1-2.1: new full speed USB device using ehci_hcd and 
address 9
Jan  1 08:01:09 udhcpc[437]: Sending discover...
Jan  1 08:01:10 kernel: usb 1-2.1: device not accepting address 9, error -32
Jan  1 08:01:10 kernel: hub 1-2:1.0: unable to enumerate USB device on port 1
Jan  1 08:01:12 DEBUG[530]: rc applet: udhcpc.script leasefail 
Jan  1 08:01:25 DEBUG[531]: _eval: <531> ntpd -qt -p time.stdtime.gov.tw 
Jan  1 08:01:26 DEBUG[439]: child_reap: Reaped 531
Jan  1 08:01:32 udhcpc[437]: Sending discover...
Jan  1 08:01:36 udhcpc[437]: Sending discover...
Jan  1 08:01:39 udhcpc[437]: Sending discover...
Jan  1 08:01:42 DEBUG[532]: rc applet: udhcpc.script leasefail 

Original comment by jackyloo...@gmail.com on 24 Jun 2013 at 11:48

GoogleCodeExporter commented 8 years ago
The most likely reason of this problem is insufficient power supply to the 
modem.

Original comment by rssdev10@gmail.com on 26 Jun 2013 at 8:10

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,

Sorry to bother you again,

I found the command to let the usb_modswitch do it's work after re-plug the 
mf-60
here it is
usb_modeswitch -W -v 19d2 -p 2000 -V 19d2 -P 1402 -M 
"5553424312345679000000000000061b000000020000000000000000000000" -n -s 20

but I failed to connected to it's ip network.

how can I manual rebind the ip back to wan0 ? is there a command cando the work?

Thanks again for your advise..

BTW, the new night bulids no longer support 19d2:1402, last know builds work is 
1.9.2.7-rtn-r5163-debug

Original comment by jackyloo...@gmail.com on 13 Jan 2014 at 5:29

GoogleCodeExporter commented 8 years ago
Hi! 19d2:1402 are target vid/pid. Current database contain an appropriate rule 
for ZTE modems - 
http://wl500g.googlecode.com/svn/trunk/usb_modeswitch/data/usb_modeswitch.d/19d2
:2000

Before unplugging you should to down WAN:
nvram set rc_service=wan_disconnect,0 && kill -SIGUSR1 1 

After the modem reconnection you should to up WAN:
nvram set rc_service=wan_connect,0 && kill -SIGUSR1 1

Original comment by rssdev10@gmail.com on 13 Jan 2014 at 6:42

GoogleCodeExporter commented 8 years ago
Thanks a lot, I will try it.

Original comment by jackyloo...@gmail.com on 14 Jan 2014 at 12:27

GoogleCodeExporter commented 8 years ago
Hi,

One issue were noticed while I running the usb_modeswitch test,
I noticed the system must boot up with the mf-60 attached than the usbnet can 
work normally as well as the usb_modeswitch command.
if the rt-n16 boot without mf-60 attached in the beginning, then although in 
dmesg I can see the driver loaded properly , however, I cannot bring up the 
usbnet at all.

Is it some kind of s/w design limitation?

Thanks

Jacky

Original comment by jackyloo...@gmail.com on 14 Jan 2014 at 7:15

GoogleCodeExporter commented 8 years ago
It may be errors in drivers. Please attach files with dmesg and syslog. But 
check an absence of your personal data.

Original comment by rssdev10@gmail.com on 15 Jan 2014 at 6:52

GoogleCodeExporter commented 8 years ago
Hi,

Thanks for your help, attached is the required log,le tme know if you need 
other information,

Sincerely

Jacky

Original comment by jackyloo...@gmail.com on 17 Jan 2014 at 11:08

Attachments:

GoogleCodeExporter commented 8 years ago
Hi!

Do you really need to plugin the modem only after boot-up? It is possible to 
replug the modem after boot-up. But we not tested enough the firmware in this 
mode. However it may be works.... Try to up WAN by command in console.

Unfortunately syslog does not contain enough information about current state of 
interfaces. Full information it is possible to obtain only in debug mode. 
Should I rebuild the debug firmware?

Original comment by rssdev10@gmail.com on 21 Jan 2014 at 7:04

GoogleCodeExporter commented 8 years ago
Hi,

Thanks for your reply, to be honest , I can live with it even this is not 
working, your development on this RT-NT is really great, the best cust-firmware 
I'd ever run.

Since we already spend quite some time on this issue and been go for this far, 
I'd like to support debugging if you want continue your effort on it.

Sincerely

Jacky

Original comment by jackyloo...@gmail.com on 22 Jan 2014 at 2:42

GoogleCodeExporter commented 8 years ago
Hi, thanks.

I rebuilt the debug firmware. 
https://drive.google.com/file/d/0Bwx0cbtdU5K6STZZOEUxVlQ0OGs/edit?usp=sharing

Please send me syslog. But don`t forget to clear you personal data. I will try 
to find the error but do not promise fast reply.

Original comment by rssdev10@gmail.com on 22 Jan 2014 at 6:56