Batteries included
dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 30 Mar 2019, 04:12

I emailed this to the address on the app, but I can't be sure it didn't end up in spam or missed or something, so I thought I'd post here where others can give their input too.

Here is the email I sent:
I have a Huawei MS2372h device that works normally in linux, but doesn't seem to work with PPP Widget 3.

When I plug it in, it says, 'no response from device'.

the USB log just has:

ATE0
no response

ATE0
no response

over and over again.

When I use it in linux, it works on /dev/ttyUSB0 and /dev/ttyUSB2. /dev/ttyUSB1 has no response.

If I uninstall ppp widget 3, android sees /dev/ttyUSB0, /dev/ttyUSB1, and /dev/ttyUSB2. If I have ppp widget 3 installed, those devices go away (I presume this is intentional).

I've tried the 'h' button as well, but it did nothing.

The way i connect to the internet in linux with wvdial is:

[Dialer Defaults]
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
ISDN = 0
Baud = 7372800
Dial Attempts = 1
Init1 = ATZ
Init4 = AT+CGDCONT=1,"IP","LTEMOBILE.APN"
Phone = *99#
Stupid Mode = 1
Further, if I open a couple terminals with SU on the device, and do cat /dev/ttyUSB0 in one, and echo "ATZ" > /dev/ttyUSB0; echo 'AT+CGDCONT=1,"IP","LTEMOBILE.APN"' > /dev/ttyUSB0; echo "ATDT *99#" > /dev/ttyUSB0 in another terminal, the one with cat /dev/ttyUSB0 says "OK
OK
CONNECTED <some huge number>"

No idea if that's of any assistance, but there you have it.

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 02 Apr 2019, 00:51

So after a bunch of searching, playing around, and reading, I think I'm suffering from the same problem others have complained about where mode switching is happening in the kernel.

My findings are as follows:

The device connects as 12d1:14fe. It is immediately mode switched to 12d1:1506. The logcat says it's running usb_modeswitch (2.4.0), but remounting /vendor and removing /vendor/bin/usb_modeswitch seems to have no effect on that whatsoever. It still happens.

By comparison, when I set it up on my motorola phone, it works perfectly, but ppp3 widget REQUIRES that I run it in 'huawei alternate mode', and creates device 12d1:155e to do it.

Did the beta version that used the built-in usb library for oreo ever get merged/released? If not, would you mind adding me to the beta of that? My play store email is drunkennewfiemidget at <the domain of google mail here>.

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 12 Apr 2019, 21:32

Welp.. I've officially given up for now.

USB mode switch on the device switches it to 12d1:1506. It responds if I manually set the modem port in ppp widget 3, and it dials, does ppp negotiation, and then hangs at 'building network...'

PPP log shows ppp negotiation completed, and then every few seconds, 'ppp negotiation completed' again.

But it just sits there at building network for a long time, and then eventually (after a minute or so) switches to 'disconnected' and won't reconnect again until I unplug and replug the device.

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

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by LOM » 13 Apr 2019, 05:48

dnm wrote:Welp.. I've officially given up for now.

USB mode switch on the device switches it to 12d1:1506. It responds if I manually set the modem port in ppp widget 3, and it dials, does ppp negotiation, and then hangs at 'building network...'
It is at this point the transmitter is activated making the dongle draw more current than before.
Try using a separately powered hub between dongle and PX5.

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 13 Apr 2019, 05:50

Yes I have and I already am.

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

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by LOM » 13 Apr 2019, 05:57

Just realizing that PX5 is a car dashboard media center.
Most users has problem with such devices, they all have 3G support built-in using their own mode switch software, drivers, and connection managers which interferes with pppwidget.

Use a mfgr supported dongle with the native 3G support.

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 13 Apr 2019, 05:59

Not an option; those are all devices that only support Asian telcos unless I use like... 2g.

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

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by LOM » 13 Apr 2019, 06:33

dnm wrote:Not an option; those are all devices that only support Asian telcos unless I use like... 2g.
Use a modem having a USB Id (vid:pid) which is not supported by your media center, it may avoid the clash between its own software and pppwidget.

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 13 Apr 2019, 19:11

So I tried getting the device working just using pppd and a chat script.

It works perfectly.

Not ideal because unlike ppp widget 3, I can't see link status and I have to run a script to keep it running, but it does seem it is possible.

Fwiw.

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

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by Josh » 15 Apr 2019, 05:55

Hi,
I've been on vacation and have not monitored the forum during that time.

Can you please post the USB log of PPP Widget after freshly inserting the modem?

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 15 Apr 2019, 06:37

Absolutely. Plus: bonus data!

USB log:

Code: Select all

Apr 15, 2019 00:29:48

Device manufacturer string: rockchip
Total RAM: 4080 MB. Available RAM: 2193 MB

Start search for USB devices
 visible on Android OS level ...
 Looking at device: /dev/bus/usb/001/038 ...
  Check device 0bda:0179, interface 2, might be a modem
 Looking at device: /dev/bus/usb/001/042 ...
  Check device 12d1:1506, interface 2, might be a modem
 Request permission from system to handle device ...
 Found possible 3G USB device 12d1:1506
  System has permitted USB device handling
New device on /dev/bus/usb/001/042
 Class of interface 0 is 0xFF
Looking at USB device 12d1:1506 with class 255
 Device top dir: /sys/bus/usb/devices/1-1.2, active cfg: 1
Active configuration ID: 1
Device layout (config 1) - cl:00  sc:00  pr:00
 if:0 as:0 -  cl:ff  sc:02  pr:01 -  ir:83  bi:82  bo:02
 if:1 as:0 -  cl:ff  sc:02  pr:03 -  bi:84  bo:03
 if:2 as:0 -  cl:ff  sc:02  pr:12 -  bi:85  bo:04
 if:3 as:0 -  cl:ff  sc:02  pr:16 -  ir:87
 if:3 as:1 -  cl:ff  sc:02  pr:16 -  ir:87  bi:86  bo:05

Found 3 serial ports (0)
Manual port index set to 0, trying to start there
Port 0 has type SERIAL
 Using port 0 for connecting
Disable kernel USB power-save, as set in app config
Opening port type SERIAL (interface 0)
PPP log:

Code: Select all

Apr 15, 2019 00:29:49

Total RAM: 4080 MB. Available RAM: 2188 MB

Starting modem command sequence (Init) ...
>
ATE0
<
OK
>
AT+CGSN
<
866667030266489

OK
--> Using device profile 866667030266489
>
AT+CPIN?
<
+CPIN: READY

OK
>
AT+CIMI
<
302370603958075

OK
--> Using parameter profile 302370603958075

SIM is ready to use
====

Apr 15, 2019 00:29:53

Total RAM: 4080 MB. Available RAM: 2187 MB

Starting modem command sequence (Dial) ...
>
AT+CPIN?
<
+CPIN: READY

OK
>
AT+CFUN?
<
+CFUN: 1

OK
>
AT+CGDCONT=1,"IP","ltemobile.apn"
<
OK
>
ATD*99***1#
<
CONNECT
====
Dialling complete


Now start PPP negotiation ...
>
ff03c021010000140206000000000506f7adb02907020802a565
<
ff03c0210101001d08020702020600000000010405dc0506000005430305c223055c67ff03c021020000140206000000000506f7adb029070208024e0c
>
ff03c021030100080304c0232248
<
ff03c0210102001c08020702020600000000010405dc0506000005430304c023692e
>
ff03c0210202001c08020702020600000000010405dc0506000005430304c0235a74
>
c023010100100564756d6d790564756d6d79f4d3
<
c023020100100b4772656574696e67732121be44802101010004bb99
>
802101000016030600000000810600000000830600000000627c
<
80210300000411fa
<
802101010004bb99
>
80210201000476bc
<
802101020004df76
>
8021020200041253
<
802101030004032c
>
802102030004ce09
<
80210104000406a0
>
802102040004cb85
<
802101050004dafa
>
80210205000417df
<
802101060004be15
>
8021020600047330
<
802101070004624f
>
802102070004af6a
<
802101080004a505
>
8021020800046820
<
802101090004795f
>
802102090004b47a
<
8021010a00041db0
>
8021020a0004d095
<
8021010b0004c1ea
>
8021020b00040ccf
<
8021010c0004c466
>
8021020c00040943
<
8021010d0004183c
>
8021020d0004d519
<
8021010e00047cd3
>
8021020e0004b1f6
<
8021050f00044cfb
PPP negotiation finished
Apr 15, 2019 00:31:29

Total RAM: 4080 MB. Available RAM: 2189 MB

<
8021050f00044cfb
PPP negotiation finished
Apr 15, 2019 00:31:35

Total RAM: 4080 MB. Available RAM: 2187 MB

<
8021050f00044cfb
PPP negotiation finished
Apr 15, 2019 00:31:41

Total RAM: 4080 MB. Available RAM: 2184 MB

<
8021050f00044cfb
PPP negotiation finished
Apr 15, 2019 00:31:47

Total RAM: 4080 MB. Available RAM: 2192 MB

<
8021050f00044cfb
PPP negotiation finished
Apr 15, 2019 00:31:53

Total RAM: 4080 MB. Available RAM: 2182 MB

<
8021050f00044cfb
PPP negotiation finished



The pppd config I use to use it from a terminal:

Code: Select all

/dev/ttyUSB0
crtscts
modem
passive
usepeerdns
noipdefault
persist
novj
defaultroute
noauth
nodetach
debug
connect "chat -v -f /etc/chat/call_fido"
The chat script:

Code: Select all

TIMEOUT 10
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
REPORT CONNECT
'' 'ATQ0'
SAY 'Asking modem to identify itself...\n'
'OK-AT-OK' 'ATi'
SAY 'Setting APN\n'
OK 'AT+CGDCONT=1,"IP","ltemobile.apn"'
ABORT 'NO CARRIER'
SAY 'Dialing...\n'
OK 'ATD*99#'
CONNECT

Finally, I had to add to ip-up to make android actually be able to see any hosts after connection:

Code: Select all

ndc resolver setnetdns ppp0 "" "$DNS1" "$DNS2"

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

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by Josh » 15 Apr 2019, 18:32

Hmm, that may be a problem with the PPP implementation of PPP Widget after all.

I think this is the culprit:

Code: Select all

>
802101000016030600000000810600000000830600000000627c
<
80210300000411fa
I send a ICPC request which is replied to with an empty REJECT.
Such a reject is supposed to specify which part of the request is specifically rejected.

Now, the top bonus data would be if you could catch the log of the negotiation happening with the script.

With a normal pppd, this is achieved by adding the config options

logfile <filename>

and (already configured in your setup)

debug

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

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by Josh » 15 Apr 2019, 18:50

dnm wrote:Did the beta version that used the built-in usb library for oreo ever get merged/released? If not, would you mind adding me to the beta of that? My play store email is drunkennewfiemidget at <the domain of google mail here>.
I did add the option to use the native system USB. It's in the config page.

However, the USB subsystem is not the problem here. Two things:
  1. As you have noticed, the mode switch kernel patch provided by Huawei is applied, so there is no way to customize it. We could ask HAL9K to make it optional, with a small additional kernel patch. The other configuration you are seeing on the Motorola phone is likely much more efficient for data transfer than the classic serial PPP (look for "NCM" in the USB log there).
  2. There seems to be a PPP negotiation issue as stated. We might be able to fix this; it would be considerably easier though having the log of the successful negotiation with the script method at hand.

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 16 Apr 2019, 02:35

Josh wrote:
dnm wrote:Did the beta version that used the built-in usb library for oreo ever get merged/released? If not, would you mind adding me to the beta of that? My play store email is drunkennewfiemidget at <the domain of google mail here>.
I did add the option to use the native system USB. It's in the config page.

However, the USB subsystem is not the problem here. Two things:
  1. As you have noticed, the mode switch kernel patch provided by Huawei is applied, so there is no way to customize it. We could ask HAL9K to make it optional, with a small additional kernel patch. The other configuration you are seeing on the Motorola phone is likely much more efficient for data transfer than the classic serial PPP (look for "NCM" in the USB log there).
ya, I figured that out later as I progressed through trying to solve the issue.
[*]There seems to be a PPP negotiation issue as stated. We might be able to fix this; it would be considerably easier though having the log of the successful negotiation with the script method at hand.[/list]
Happy to oblige.
Asking modem to identify itself...

Setting APN

Dialing...

chat: Apr 15 19:34:11 CONNECT
Script chat -v -f /etc/chat/call_fido finished (pid 26565), status = 0x0
Serial connection established.
using channel 63
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xf72b534d> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <accomp> <pcomp> <asyncmap 0x0> <mru 1500> <magic 0x543> <auth chap MD5>]
No auth is possible
sent [LCP ConfRej id=0x1 <auth chap MD5>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xf72b534d> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x2 <accomp> <pcomp> <asyncmap 0x0> <mru 1500> <magic 0x543>]
sent [LCP ConfAck id=0x2 <accomp> <pcomp> <asyncmap 0x0> <mru 1500> <magic 0x543>]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x1]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfReq id=0x2]
sent [IPCP ConfAck id=0x2]
rcvd [IPCP ConfNak id=0x2 <addr 25.20.39.26> <ms-dns1 64.71.255.254> <ms-dns2 64.71.255.253>]
sent [IPCP ConfReq id=0x3 <addr 25.20.39.26> <ms-dns1 64.71.255.254> <ms-dns2 64.71.255.253>]
rcvd [IPCP ConfAck id=0x3 <addr 25.20.39.26> <ms-dns1 64.71.255.254> <ms-dns2 64.71.255.253>]
Could not determine remote IP address: defaulting to 10.64.64.64
local IP address 25.20.39.26
remote IP address 10.64.64.64
primary DNS address 64.71.255.254
secondary DNS address 64.71.255.253
Script /etc/ppp/ip-up started (pid 26611)
Script /etc/ppp/ip-up finished (pid 26611), status = 0x0

dnm
Posts: 10
Joined: 30 Mar 2019, 04:04

Re: Huawei on MS2372h on PX5 Hal9k device.

Post by dnm » 23 May 2019, 15:13

Any ideas on this?

Post Reply