-
- Posts: 114
- Joined: 17 Jul 2011, 12:08
Josh wrote:Maybe you are lucky ...
See if this helps:
http://www.draisberghof.de/usb_modeswit ... =4995#4995
zte and huawei... are different.
"COMMAND NOT SUPPORT"
I have to be more carefully using rarely at-commands. Recently I "destroyed" my modem with wrong at+cfun values, and the modem did not work, under windows too.
Also an old driver-package from huawei (self extracting(twice!) shit, but wants to be run as root) disturbs the whole system. (deprecated udev-rules)
New mobile-modems (zte, huawei ...) and linux, that is not very funny sometimes.
Regards,
Thomas
NDIS (network) mode
Huawei has a linux library (libNDIS.so) and a header file to implement 3rd party connect utilities. This library I was able to obtain but it is confidential.
From all that I am aware of the NDIS variant is to be used for speed >17/18MBit. The usbserial/option approach does have its limit there (at least from my experiences with testplants that use HSPA (dual channel) and LTE yet. I do not know about the ipv6 stuff yet.
I have implemented a small utility to connect with NDIS and it works well. It seems that the library mentioned does use Qualcomm QMI protocol to communicate with the device. I am able to set user/pass/apn and PAP/CHAP/NONE. Connection works and the new ethernet device eth2 (I named it ndis in my persistent network rules) uses dhcp to get an IP address. After setting proper routing (or default route over eth2) the connection is established and working.
My goal is to develop my own connection utility not using the libNDIS.so from huwaei. Therefore I must sniff and understand the QMI traffic, can anybody help? (Josh?)
Thanks
From all that I am aware of the NDIS variant is to be used for speed >17/18MBit. The usbserial/option approach does have its limit there (at least from my experiences with testplants that use HSPA (dual channel) and LTE yet. I do not know about the ipv6 stuff yet.
I have implemented a small utility to connect with NDIS and it works well. It seems that the library mentioned does use Qualcomm QMI protocol to communicate with the device. I am able to set user/pass/apn and PAP/CHAP/NONE. Connection works and the new ethernet device eth2 (I named it ndis in my persistent network rules) uses dhcp to get an IP address. After setting proper routing (or default route over eth2) the connection is established and working.
My goal is to develop my own connection utility not using the libNDIS.so from huwaei. Therefore I must sniff and understand the QMI traffic, can anybody help? (Josh?)
Thanks
Re: NDIS (network) mode
Hello All,
we were using the Gobi 2000/3000 sources and adapted them to work with the E398. NDIS connection/dsiconnection works.
The procedure to connect:
a) the driver/udev creates an ethernet device along with 3 usb device nodes (ifconfig -a)
b) start_data_session with apn, user, pass (using qmi protocol)
c) fire up dhclient (or similar) to obtain an IP address, the gateway, default route etc.
Thats it.
we were using the Gobi 2000/3000 sources and adapted them to work with the E398. NDIS connection/dsiconnection works.
The procedure to connect:
a) the driver/udev creates an ethernet device along with 3 usb device nodes (ifconfig -a)
b) start_data_session with apn, user, pass (using qmi protocol)
c) fire up dhclient (or similar) to obtain an IP address, the gateway, default route etc.
Thats it.
-
- Posts: 114
- Joined: 17 Jul 2011, 12:08
Re: NDIS (network) mode
That sounds good and a little bit to nice to be true. Have you published your code?olga2323 wrote:Hello All,
The procedure to connect:
a) the driver/udev creates an ethernet device along with 3 usb device nodes (ifconfig -a)
b) start_data_session with apn, user, pass (using qmi protocol)
c) fire up dhclient (or similar) to obtain an IP address, the gateway, default route etc.
Thats it.
Are there special dependencies? Do you know if SLAAC(ipv6-autoconfiguration) would also work, the right apn provided?
Regards,
Thomas Schäfer
PS: There some good news from kernel developers:
http://www.spinics.net/lists/linux-usb/msg55323.html
Last edited by thomasschaefer on 02 Jan 2012, 22:39, edited 1 time in total.
HUAWEI E398 compatible router?
as i know this mobile dongle is the latest and fastest one by huawei, i'm in using and HUAWEI E160 for my family through the Netgear router, following the networks update, HUAWEI E160 cant be experience the speeds, i gonna to buy this HUAWEI E398 to replace the E160, but i dont know whether it is works for my router, any one has been use or know the result? many info. should be appreciated.
-
- Posts: 114
- Joined: 17 Jul 2011, 12:08
Re: NDIS (network) mode
In the kernel "linux-next" (around 20120220)
the modules cdc_wdm and qmi_wwan support the Huawei E398 in "ethernet-mode".
Instead of at-commands qmi-commands are needed.
The author of the driver has also written as small perl script for that:
http://www.spinics.net/lists/linux-usb/msg58092.html
you get in three steps online:
usb_modeswitch -v 12d1 -p 1505 -M "55534243123456780000000000000011062000000100000000000000000000"
export IFACE=wwan0
export PHASE=pre-up
export IF_WWAN_APN=*your.apn*
export VERBOSITY=true
./qmi-ifupdown
dhcpcd wwan0
For IPv4 it works so far.
Regards,
Thomas
PS: The new driver also works with a lot of different other surfsticks based on the qualcomm-chips.
I can confirm the function for the ZTE K3565-Z
the modules cdc_wdm and qmi_wwan support the Huawei E398 in "ethernet-mode".
Instead of at-commands qmi-commands are needed.
The author of the driver has also written as small perl script for that:
http://www.spinics.net/lists/linux-usb/msg58092.html
you get in three steps online:
usb_modeswitch -v 12d1 -p 1505 -M "55534243123456780000000000000011062000000100000000000000000000"
export IFACE=wwan0
export PHASE=pre-up
export IF_WWAN_APN=*your.apn*
export VERBOSITY=true
./qmi-ifupdown
dhcpcd wwan0
For IPv4 it works so far.
Regards,
Thomas
PS: The new driver also works with a lot of different other surfsticks based on the qualcomm-chips.
I can confirm the function for the ZTE K3565-Z
Last edited by thomasschaefer on 01 Apr 2012, 23:17, edited 1 time in total.
Thanks for the confirmation.
I am following the proceedings of the driver creation with interest (via the "linux-usb" mailing list).
It may take a while until the whole thing (including a user-space helper for the QMI protocol) will be ready for the mainstream distributions. Right now it's real cutting edge hacking ...
I am following the proceedings of the driver creation with interest (via the "linux-usb" mailing list).
It may take a while until the whole thing (including a user-space helper for the QMI protocol) will be ready for the mainstream distributions. Right now it's real cutting edge hacking ...
-
- Posts: 114
- Joined: 17 Jul 2011, 12:08
Re: just found some resources
Access restrictedold_man wrote:https://developer.qualcomm.com/file/7793
It is the updated qmi.zip (Qualcomm MSM Interface (QMI) Architecture Documents)
Thanks for the hint.
qualcomm could be little bit more open, also to unregistered developers/users.
Regards,
Thomas
I fully agree that you should be careful wrt what you agree to, and what the received documentation can be used for.Josh wrote:Take care - when registering, you are consenting to a very strict non-disclosure agreement ...
The TOU in this case is available from http://www.qualcomm.com/site/terms-of-use I cannot see any NDA restrictions there? Where exactly did you see those?
What I can see, and which might be important to many users, is the restriction that the documents can only be used for personal, non-commercial use. That's important to keep in mind.
Thanks. Yes, those restrictions are a lot more limiting.Josh wrote:These "Terms of Use" are different from what you have to confirm before downloading the QMI lib and doc.
I find the whole thing strange, given that they provide the Gobi Linux SDK under an extremely permissive 3-clause BSD license on https://www.codeaurora.org/patches/quic/gobi/
But I'll probably never understand big company licensing decisions....
Re: NDIS (network) mode
I get this error when I'm using the script.thomasschaefer wrote:In the kernel "linux-next" (around 20120220)
the modules cdc_wdm and qmi_wwan support the Huawei E398 in "ethernet-mode".
Instead of at-commands qmi-commands are needed.
The author of the driver has also written as small perl script for that:
http://www.spinics.net/lists/linux-usb/msg58092.html
you get in three steps online:
usb_modeswitch -v 12d1 -p 1505 -M "55534243123456780000000000000011062000000100000000000000000000"
export IFACE=wwan0
export PHASE=pre-up
export IF_WWAN_APN=*your.apn*
export VERBOSITY=true
./qmi-ifupdown
dhcpcd wwan0
For IPv4 it works so far.
Regards,
Thomas
PS: The new driver also works with a lot of different other surfsticks based on the qualcomm-chips.
I can confirm the function for the ZTE K3565-Z
Code: Select all
root@ubuntu-router:/etc/network/if-pre-up.d# ./qmi
wwan0: will use /dev/cdc-wdm0 for management
Can't locate object method "autoflush" via package "IO::File" at ./qmi line 467.