Working modems LTE and their configurations

Post Reply
rolch
Posts: 10
Joined: Thu Jun 13, 2019 5:53 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 2 times
Contact:

Working modems LTE and their configurations

Unread post by rolch » Mon Jul 15, 2019 5:06 pm

The aim of the topic is to gather all working modems under Android and their configuration.
The one I have tested is ZTE 823 (hilink).
The modem is switched to modem mode by the kernel, so no need to use usb_modeswitch :D .
After plug in lsusb gives:
Bus 001 Device 011: ID 19d2:1405
However, to get network interface I needed to rebuild the Android image.
One need to change setings in file:
frameworks/base/core/res/res/values/config.xml
and set:

<!-- Regex of wired ethernet ifaces -->
- <string translatable="false" name="config_ethernet_iface_regex">eth\\d</string>
+ <string translatable="false" name="config_ethernet_iface_regex">(eth|usb)\\d</string>

and add under <string-array translatable="false" name="config_ethernet_interfaces">

<string-array translatable="false" name="config_ethernet_interfaces">
<item>usb0;12,13,14,15;</item>
</string-array>

If everything is OK we get
usb0 Link encap:Ethernet HWaddr 26:4b:f9:36:95:4e Driver cdc_ether
inet addr:192.168.0.118 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ec88:8f99:3f91:bc9d/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:223948 errors:0 dropped:0 overruns:0 frame:0
TX packets:223961 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14852906 TX bytes:18814119


That's all.
The APN configuration can be done at 192.168.0.1 using Lightning.
These users thanked the author rolch for the post:
odroid (Mon Jul 15, 2019 5:16 pm)

rolch
Posts: 10
Joined: Thu Jun 13, 2019 5:53 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Working modems LTE and their configurations

Unread post by rolch » Mon Jul 15, 2019 5:46 pm

Working modems LTE and their configuration
The settings from config.xml are kept in
/system/framework/framework-res.apk,
so the solution without rebuilding Android is to replace the file to the configured one.
It is possible, that others hilink modems should work too.
I hope that Hardkernel in some next versions, add support for usbN interfaces.

rolch
Posts: 10
Joined: Thu Jun 13, 2019 5:53 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Working modem: Huawei E3372 no hlink

Unread post by rolch » Sun Jul 21, 2019 6:52 pm

Huawei E3372 s153 no hlink
To avoid using usb_modeswitch the modem was permanently set to modem mode using AT command: AT^SETPORT="FF;12,10,16,A2"
outside Android.
This modem need additional kernel drivers so in
/opt/odroid-n2/common/arch/arm64/configs/odroidn2_android_defconfig two lines have to be changed:
CONFIG_USB_NET_HUAWEI_CDC_NCM=y
CONFIG_USB_SERIAL_OPTION=y
According to my first post in this topic to enable wwan0 interface
in config.xml I have now:
<!-- Regex of wired ethernet ifaces -->
<string translatable="false" name="config_ethernet_iface_regex">(eth|usb|wwan)\\d</string>

and
<string-array translatable="false" name="config_ethernet_interfaces">
<item>usb0;12,13,14,15;</item>
<item>wwan0;12,13,14,15;</item>

After booting we can see
two virtual serial ports ttyUSB0 and ttyUSB1
and the interface wwan0 up but without
IP configured. To force prowider DHCP server I used the script:
if [ -e "/dev/ttyUSB0" ]; then
echo "Pid file exists!"
ifconfig wwan0 down
echo -e "AT^NDISDUP=1,1,\"internet\"\r" > /dev/ttyUSB0
sleep 1
ifconfig wwan0 up
fi
Finally we get:
wwan0 Link encap:Ethernet HWaddr 00:1e:10:1f:00:00 Driver huawei_cdc_ncm
inet addr:10.193.81.224 Bcast:10.193.81.255 Mask:255.255.255.192
inet6 addr: fe80::a817:fc6f:c9ee:b26f/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8916 TX bytes:14005


The AT command here depends on GSM operator.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 0 guests