Activation Codes and Methods, Hardware Details, Sniffing
Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 18 Aug 2011, 19:12

Maybe you are lucky ...

See if this helps:
http://www.draisberghof.de/usb_modeswit ... =4995#4995

thomasschaefer
Posts: 114
Joined: 17 Jul 2011, 12:08

Post by thomasschaefer » 18 Aug 2011, 21:01

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

olga2323
Posts: 4
Joined: 24 Feb 2011, 17:09
Contact:

NDIS (network) mode

Post by olga2323 » 09 Sep 2011, 12:26

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

olga2323
Posts: 4
Joined: 24 Feb 2011, 17:09
Contact:

Re: NDIS (network) mode

Post by olga2323 » 21 Dec 2011, 11:06

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.

thomasschaefer
Posts: 114
Joined: 17 Jul 2011, 12:08

Re: NDIS (network) mode

Post by thomasschaefer » 21 Dec 2011, 21:33

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.
That sounds good and a little bit to nice to be true. Have you published your code?
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.

marlina
Posts: 1
Joined: 26 Dec 2011, 18:21

HUAWEI E398 compatible router?

Post by marlina » 26 Dec 2011, 18:28

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.

thomasschaefer
Posts: 114
Joined: 17 Jul 2011, 12:08

Re: NDIS (network) mode

Post by thomasschaefer » 24 Feb 2012, 23:35

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
Last edited by thomasschaefer on 01 Apr 2012, 23:17, edited 1 time in total.

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

Post by Josh » 25 Feb 2012, 01:07

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 ...



thomasschaefer
Posts: 114
Joined: 17 Jul 2011, 12:08

Re: just found some resources

Post by thomasschaefer » 06 Jul 2012, 08:19

Access restricted


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

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

Post by Josh » 08 Jul 2012, 21:28

Take care - when registering, you are consenting to a very strict non-disclosure agreement ...

bmork
Posts: 167
Joined: 15 Mar 2012, 22:47
Location: Oslo, Norway

Post by bmork » 10 Jul 2012, 11:37

Josh wrote:Take care - when registering, you are consenting to a very strict non-disclosure agreement ...
I fully agree that you should be careful wrt what you agree to, and what the received documentation can be used for.

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.

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

Post by Josh » 10 Jul 2012, 23:22

These "Terms of Use" are different from what you have to confirm before downloading the QMI lib and doc.

Here is the other one ...

bmork
Posts: 167
Joined: 15 Mar 2012, 22:47
Location: Oslo, Norway

Post by bmork » 11 Jul 2012, 10:27

Josh wrote:These "Terms of Use" are different from what you have to confirm before downloading the QMI lib and doc.
Thanks. Yes, those restrictions are a lot more limiting.

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....

fsp
Posts: 9
Joined: 24 Aug 2012, 04:20

Re: NDIS (network) mode

Post by fsp » 26 Aug 2012, 23:02

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
I get this error when I'm using the script.

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.

Post Reply