Activation Codes and Methods, Hardware Details, Sniffing
mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 04 Apr 2013, 23:53

Hi there ... i am desperate to get the E398 running on my raspberry pi:

I have managed so far to get it mode switched and the wwan0 interface shows up.

I have configured the wwan0 interface in /etc/network/interfaces like this:

Code: Select all

iface wwan0 inet dhcp
  wwan_pin  "1234"
  wwan_apn  "internet.t-mobile"
  wwan_user "t-mobile"
  wwan_pw   "tm"
  # enable script debugging
  wwan_debug 1
After checking this is run:

Code: Select all

pi@raspberrypi /etc/qmi $ export IFACE=wwan0
pi@raspberrypi /etc/qmi $ export PHASE=pre-up
pi@raspberrypi /etc/qmi $ export IF_WWAN_APN=internet.t-mobile
pi@raspberrypi /etc/qmi $ export VERBOSITY=true
pi@raspberrypi /etc/qmi $ sudo -E ./qmi-ifupdown
running the qmi-ifupdown returns no result. it just finishes

sudo dhcpcd wwan0 then says

Code: Select all

p
err, wwan0: timed out
warn, wwan0: using IPV4LL address 169.254.139.166
dhcpcd.sh: interface wwan0 has been configured with new IP=169.254.139.166
What am I doing wrong here? Am i missing something?

Cheers!

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

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by bmork » 05 Apr 2013, 09:11

mfgMobile wrote:Hi there ... i am desperate to get the E398 running on my raspberry pi:

I have managed so far to get it mode switched and the wwan0 interface shows up.

I have configured the wwan0 interface in /etc/network/interfaces like this:

Code: Select all

iface wwan0 inet dhcp
  wwan_pin  "1234"
  wwan_apn  "internet.t-mobile"
  wwan_user "t-mobile"
  wwan_pw   "tm"
  # enable script debugging
  wwan_debug 1
After checking this is run:

Code: Select all

pi@raspberrypi /etc/qmi $ export IFACE=wwan0
pi@raspberrypi /etc/qmi $ export PHASE=pre-up
pi@raspberrypi /etc/qmi $ export IF_WWAN_APN=internet.t-mobile
pi@raspberrypi /etc/qmi $ export VERBOSITY=true
pi@raspberrypi /etc/qmi $ sudo -E ./qmi-ifupdown
running the qmi-ifupdown returns no result. it just finishes
well, it is an ugly hack I wrote for initial testing at a time there were no other userspace QMI utilities. Nowadays you should really use libqmi, uqmi, oFono or some other more complete and failsafe QMI userspace applications.

I assume the script silentliy fails to connect for some reason. It doesn't do much error checking IIRC

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 05 Apr 2013, 21:20

Cheers mate,
but i am really struggeling to get this to work. For example uqmi. Cloned from the repository and it just gives me errors on missing libs.

Do you have any link to a tutorial to get any of the tools for the e398 running?

Cheers!

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by LOM » 06 Apr 2013, 01:56

If you are not able to install some missing libraries after being given their names in the error log then I think you are better off using the device in ppp serial mode instead.

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 06 Apr 2013, 10:23

LOM wrote:If you are not able to install some missing libraries after being given their names in the error log then I think you are better off using the device in ppp serial mode instead.
Wow ... Great comment Buddy!

I cloned the libubox and stuck it into /lib/ ... Didn't work. Tried /usr/local/lib/ ... Didn't work. Then I just changed the C code to include them from a absolute path (I know ... Nasty!). Lua was missing then ... So I installed lua5.2 via apt-get which should install it correctly, but still lua.h was missing during compiling.

I know I am not a Linux pro ... But maybe someone can help me out here!

Cheers!

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

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by bmork » 06 Apr 2013, 10:35

mfgMobile wrote:I cloned the libubox and stuck it into /lib/ ... Didn't work. Tried /usr/local/lib/ ... Didn't work. Then I just changed the C code to include them from a absolute path (I know ... Nasty!). Lua was missing then ... So I installed lua5.2 via apt-get which should install it correctly, but still lua.h was missing during compiling.
You don't need lua for uqmi. Just disable it when configuring libubox:

Code: Select all

cmake CMakeLists.txt -DBUILD_LUA=OFF 

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 06 Apr 2013, 11:25

Cheers mate. Finally a doctor that tries to help a patient ;)

I compiled it now successfully and i can finally call uqmi from the commandline. Is there a documentation on how to properly initiate a connection?

Code: Select all

sudo uqmi -d /dev/cdc-wdm0 --start-network internet.t-mobile
... seems to be incomplete? Result is: error=Call failed

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

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by bmork » 06 Apr 2013, 13:43

mfgMobile wrote:Cheers mate. Finally a doctor that tries to help a patient ;)

I compiled it now successfully and i can finally call uqmi from the commandline. Is there a documentation on how to properly initiate a connection?

Code: Select all

sudo uqmi -d /dev/cdc-wdm0 --start-network internet.t-mobile
... seems to be incomplete? Result is: error=Call failed
Works For Me(tm)

There shouldn't be any other steps required, provided the PIN code is disabled or verified and the radio is on (which I believe it is by default for these modems). You can check both conditions using standard GSM AT commands:

Code: Select all

AT+CPIN?
AT+CFUN?
But I guess the reason for the failure is the same as for the script. The main difference is that you now see the error:)

You may want to play with the other QMI commands to see if they provide more hints. Using pppd for debugging is also possible. The underlying network connection is the same, and will probably fail for the same reason.

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 06 Apr 2013, 14:06

I disabled the PIN on the SIM.

Code: Select all

pi@raspberrypi ~ $ sudo uqmi -d /dev/cdc-wdm0 --get-pin-status
pin1_status=disabled
pin1_verify_tries=3
pin1_unblock_tries=10
pin2_status=not_verified
pin2_verify_tries=2
pin2_unblock_tries=10
Somehow I am registredd with the correct network already.

Code: Select all

pi@raspberrypi ~ $ sudo uqmi -d /dev/cdc-wdm0 --get-serving-system
registration=registered
plmn_mcc=262
plmn_mnc=1
plmn_description=T-Mobile D
roaming=false
I am apparently on LTE (LED is also flashing in blue)

Code: Select all

pi@raspberrypi ~ $ sudo uqmi -d /dev/cdc-wdm0 --get-signal-info
qmi_parse_nas_get_signal_info_response: Invalid TLV length in message, tlv=0x14, len=5
type=lte
rssi=-75
rsrq=-8
rsrp=-106
snr=0
But still ...

Code: Select all

pi@raspberrypi ~ $ sudo uqmi -d /dev/cdc-wdm0 --start-network internet.t-mobile
error=Call failed
I found a code snippit somewhere (dd-wrt?) which also used the client-id and the "wds". The call crashed my uqmi call.
As i have still not found any detailled documentation on the uqmi i am just putting together random combinations of command line parameters. boy this is frustrating :(

Is there a way to let uqmi log why the call failed?

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 06 Apr 2013, 14:37

ppp results with sakis3g

Code: Select all

Apr  6 12:32:58 raspberrypi pppd[8043]: pppd 2.4.5 started by root, uid 0
Apr  6 12:32:58 raspberrypi pppd[8043]: Using interface ppp0
Apr  6 12:32:58 raspberrypi pppd[8043]: Connect: ppp0 <--> /dev/ttyUSB0
Apr  6 12:32:58 raspberrypi pppd[8043]: CHAP authentication succeeded
Apr  6 12:32:58 raspberrypi pppd[8043]: CHAP authentication succeeded
Apr  6 12:32:59 raspberrypi pppd[8043]: Modem hangup
Apr  6 12:32:59 raspberrypi pppd[8043]: Connection terminated.
Apr  6 12:32:59 raspberrypi pppd[8043]: Exit.
Not very satisfying results :(

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

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by Josh » 08 Apr 2013, 20:43

Try to change your APN string from "internet.t-mobile" to "internet.telekom" (I assume you are in Germany).

That was the last obstacle for me when I managed to get my Huawei E398 LTE working. I found this after a extended Google search.

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 08 Apr 2013, 21:03

Josh wrote:Try to change your APN string from "internet.t-mobile" to "internet.telekom" (I assume you are in Germany).

That was the last obstacle for me when I managed to get my Huawei E398 LTE working. I found this after a extended Google search.
Yes I am in Germany. But ...

Code: Select all

pi@raspberrypi ~ $ sudo uqmi -d /dev/cdc-wdm0 --start-network internet.telekom
error=Call failed
:(

I also don't get this result:

Code: Select all

pi@raspberrypi /etc/qmi $ sudo ./qmi_scanner

        -----  QMI Network Scanner v0.1  -----

Scanning for GSM1800...          Scan timed out! Abort scan request!
Scanning for GSM900 Extended...  Scan timed out! Abort scan request!
Scanning for GSM900 Primary...   Scan timed out! Abort scan request!
Scanning for UMTS2100...         Scan timed out! Abort scan request!
Scanning for LTE800...           1 network(s) found!

        1. -- [LTE800]  MCC:262 MNC:02 (Vodafone.de)

Scanning for LTE1800...          1 network(s) found!

        1. -- [LTE1800]  MCC:262 MNC:01 (TMO D)

Scanning for LTE2600...          0 network(s) found!
But at leasts it detects the LTE networks!

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 08 Apr 2013, 21:07

Did not have my SIM inserted:

Code: Select all

pi@raspberrypi /etc/qmi $ sudo uqmi -d /dev/cdc-wdm0 --start-network internet.telekom
handle=35164392
So ... what now?

Code: Select all

sudo  ifup wwan0
I get a timeout on the DHCP :(

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 08 Apr 2013, 21:37

I am online ... thanks to: http://svn.dd-wrt.com/browser/src/route ... ?rev=20847

So the trick is:

Code: Select all

pi@raspberrypi /etc/qmi $ sudo uqmi -d /dev/cdc-wdm0 wds --get-client-id wds
6
pi@raspberrypi /etc/qmi $ sudo uqmi -d /dev/cdc-wdm0 wds --start-network internet.telekom --set-client-id wds,6
Awesome!

mfgMobile
Posts: 10
Joined: 04 Apr 2013, 23:43

Re: huawei E398 / Telekom Speedstick LTE /Vodafone K5005

Post by mfgMobile » 08 Apr 2013, 22:26

So as a quick summary this is what you need to do to get the E398 / LTE Telekom Speedstick running (on the raspberry pi):
  • Get usb_modeswitch
  • Get libubox and install it without LUA

    Code: Select all

    sudo git clonegit://nbd.name/luci2/libubox.git
    cd libubox
    sudo cmake CMakeLists.txt -DBUILD_LUA=OFF 
    make install
    
    (i needed to add a symlink to /lib/)
  • Get uqmi

    Code: Select all

    sudo git clone git://nbd.name/uqmi.git
    sudo cmake CMakeLists.txt
    sudo make install
    
  • Configure wwan0 in /etc/network/interfaces

    Code: Select all

    iface wwan0 inet dhcp
      pre-up uqmi -d /dev/cdc-wdm0 --start-network internet.telekom --keep-client-id wds
    
    (internet.telekom being your APN, might need additional login info with --auth-type, --username, --password!)
This will bring up the wwan0 interface on boot and connect it to the internet.

Post Reply