Problem with Cmotech CNU680 CDMA modem+wr1043

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
AndyGon
DD-WRT Novice


Joined: 19 Apr 2012
Posts: 3

PostPosted: Mon Jun 04, 2012 19:05    Post subject: Problem with Cmotech CNU680 CDMA modem+wr1043 Reply with quote
Spend a lot of time trying to use CNU 680 as wan connection. At lost i made it, but there is another problem. WAN bandwith is limited at 62 Kbyte/sec (stable line), I don't understand why. Trying another modem AnyData 520+DD-WRT - everything ok - up to 200 Kbyte. Trying OpenWRT+CNU680 - also no bandwith limit, but not stable connection.
In windows modems work good.
What I do:
Flash r18777,
usb_modeswitch -v 0x16d8 -p 0x6803 -m 0x07 -M 5553424308e0408524000000800008ff524445564348470000000000000000

rmmod cdc_acm ; rmmod sierra ; rmmod option ; rmmod usb_wwan ; rmmod usbserial ; insmod usbserial vendor=0x16d8 product=0x6803

and set in GUI protocol 3g dial #777 login, password. It's all, modem make a connection and all good except Internet speed.
How to view log of pppd, or what to do?
P.S sory for my english
Sponsor
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Mon Jun 04, 2012 21:02    Post subject: Reply with quote
There is probably a combination of reasons for the low speed, one is that the modem is not supported by the option driver which normally improves the performance compared to only using usb-serial.

Your modeswitch message doesn't look right either, give me the output from "cat /proc/bus/usb/devices", first without running the modeswitch command and then once again after the modeswitch command.

Where did you get that modeswitch message?

Your AnyData modem is supported in the option driver so no surprise that it is faster.

_________________
Kernel panic: Aiee, killing interrupt handler!
AndyGon
DD-WRT Novice


Joined: 19 Apr 2012
Posts: 3

PostPosted: Tue Jun 05, 2012 14:09    Post subject: Reply with quote
Here is before:
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=16d8 ProdID=6803 Rev= 0.00
S: Manufacturer=CMOTECH CO., LTD.
S: Product=USB Mass Storage
S: SerialNumber=000000000002
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=07(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms




after modeswitch
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=16d8 ProdID=6803 Rev= 0.00
S: Manufacturer=CMOTECH CO., LTD.
S: Product=CMOTECH CDMA Technologies
C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=07(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbserial_generic
E: Ad=87(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=08(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

I don't remember where i get this string.
There is another one wich also work, and the speed is also low, the modem is attached as ttyACM0, and i should start pppd manual

usb_modeswitch -v 0x16d8 -p 0x6803 -m 0x07 -M 555342435c0000000900000000000aff524445564348473100000000000000
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Tue Jun 05, 2012 15:46    Post subject: Reply with quote
I wonder what driver OpenWRT are using since you are getting much higher speed there, you can do the same cat cmd or lsusb to see which driver is attached to the stick in OpenWRT.

The modem can, as you have noticed, be switched into presenting itself as a cdc device by using a different modeswitch message.

You should remove the endpoint specification (-m 0x07) from your message, that switch is only for testing and should never be needed for normal use since the usb_modeswitch routine will automatically detect that the stick has switch to modem mode without the need for an endpoint to be specified.

Here is a link to a thread in the usb_modeswitch forum for this stick, you could try the messages listed there to see if they make any difference. I guess the message with the extra "31" inside will set it to cdc mode.

http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=426&sid=2581c094928063912ba8d81684d28bd2

The CMOTECH series of modems will soon be supported in dd-wrt and I intend to add support for them in the option driver unless they work better in cdc mode.
In such case they will get modeswitch messages for cdc mode instead of option serial mode.

It would be good if you can show me an interface list for each of the other 3 messages (yours cdc + the 2 messages from the usb_modeswitch forum.
There is not much info on the net about these modems so any input is appreciated.

_________________
Kernel panic: Aiee, killing interrupt handler!
AndyGon
DD-WRT Novice


Joined: 19 Apr 2012
Posts: 3

PostPosted: Fri Jun 08, 2012 20:37    Post subject: Reply with quote
Thank you for you help. I don't undarstand what happens, but everything is working now. I use my second command to switch modem in ttyACM0 and start connection manual, and everything work, speed is about 2mbit/s. Here is working command
usb_modeswitch -v 0x16d8 -p 0x6803 -M 555342435c00000009000000000
00aff524445564348473100000000000000

Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 003 on bus 001 ...
Using endpoints 0x07 (out) and 0x86 (in)
Using endpoints 0x07 (out) and 0x86 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
Vendor String: CMOTECH
Model String: Mass Storage
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: CMOTECH CO., LTD.
Product: USB Mass Storage
Serial No.: 000000000002
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x07 for message sending ...
Trying to send message 1 to endpoint 0x07 ...
Sending the message returned error -4. Trying to continue
Resetting response endpoint 0x86
Error resetting endpoint: -4
Resetting message endpoint 0x07
Error resetting endpoint: -4
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.

device:
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=16d8 ProdID=680a Rev= 0.00
S: Manufacturer=CMOTECH CO., LTD.
S: Product=CMOTECH CDMA Technologies
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=07(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=87(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=08(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

next
root@DD-WRT:~# usb_modeswitch -v 0x16d8 -p 0x6803 -M 555342431234567824000000800
008ff524445564348473100000000000000

Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 005 on bus 001 ...
Using endpoints 0x07 (out) and 0x86 (in)
Using endpoints 0x07 (out) and 0x86 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
Vendor String: CMOTECH
Model String: Mass Storage
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: CMOTECH CO., LTD.
Product: USB Mass Storage
Serial No.: 000000000002
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x07 for message sending ...
Trying to send message 1 to endpoint 0x07 ...
Sending the message returned error -4. Trying to continue
Resetting response endpoint 0x86
Error resetting endpoint: -4
Resetting message endpoint 0x07
Error resetting endpoint: -4
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.

root@DD-WRT:~# cat /proc/bus/usb/devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.02
S: Manufacturer=Linux 3.2.12-rc1-svn18774 ehci_hcd
S: Product=Atheros AR91xx built-in EHCI controller
S: SerialNumber=platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=16d8 ProdID=680a Rev= 0.00
S: Manufacturer=CMOTECH CO., LTD.
S: Product=CMOTECH CDMA Technologies
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=07(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=87(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=08(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
root@DD-WRT:~# pppd file /tmp/ppp.conf

last
root@DD-WRT:~# usb_modeswitch -v 0x16d8 -p 0x6803 -M 555342431234567824000000800008ff524445564348470000000000000000

Looking for default devices ...
Found devices in default mode or class (1)
Accessing device 007 on bus 001 ...
Using endpoints 0x07 (out) and 0x86 (in)
Using endpoints 0x07 (out) and 0x86 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
Vendor String: CMOTECH
Model String: Mass Storage
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: CMOTECH CO., LTD.
Product: USB Mass Storage
Serial No.: 000000000002
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x07 for message sending ...
Trying to send message 1 to endpoint 0x07 ...
Sending the message returned error -4. Trying to continue
Resetting response endpoint 0x86
Error resetting endpoint: -4
Resetting message endpoint 0x07
Error resetting endpoint: -4
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.

root@DD-WRT:~# cat /proc/bus/usb/devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 3.02
S: Manufacturer=Linux 3.2.12-rc1-svn18774 ehci_hcd
S: Product=Atheros AR91xx built-in EHCI controller
S: SerialNumber=platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 8 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=16d8 ProdID=6803 Rev= 0.00
S: Manufacturer=CMOTECH CO., LTD.
S: Product=CMOTECH CDMA Technologies
C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=07(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=87(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=08(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

Modeswitch in 1st and 2nd time is work normal, there some errors, but modem switched and work. I don't know why it was not worked before.
May be you can help me one more time? There is a lot of errors in ppp:
ppp0 Link encap:Point-to-Point Protocol

UP POINTOPOINT RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12634815 errors:5478 dropped:0 overruns:0 frame:0
TX packets:6096780 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:3257895564 (3.0 GiB) TX bytes:531066507 (506.4 MiB)

, what to do with it, where to see it, or may be it's normal?
And how to make connection and modeswitch automatically. Ican not to edit nvram parameter (nvram set 3gdata="/dev/ttyACM0"), it in a few second become 3gdata=/dev/usb/tts/0.
And after rebooting modem i need to write a file ppp.conf to tmp dir. I can't make jffs, there is no free space.
P.S. thanks for you help one more time
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Jun 09, 2012 5:10    Post subject: Reply with quote
Ok, so it works well with the cdc-acm driver, I will then add support for it as a cdc device.

The number of receive errors you have is nothing to worry about, 5000 error packets out of 12 millions is less than 0.05%..

The reason why your 3gdata variable gets changed is due to the connection watchdog in combination with the modem not being supported yet in dd-wrt and you can probably fix this by killing the connection watchdog.

do a ps cmd and find the pid for the process, looks like this:

995 root 1256 S /tmp/ppp/redial 30

and then kill -9 995

in ps you will also see:
19639 root 1436 S pppd file /tmp/ppp/options.pppoe

which you also can kill, edit the options.pppoe file and then restart pppd.
This file is for pppoe WAN connecion type but I think the same file is also used for 3G.

_________________
Kernel panic: Aiee, killing interrupt handler!
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum