Gentoo Archives: gentoo-user

From: katphish <security@××××.com>
To: gentoo-user@l.g.o
Cc: hitachi303 <gentoo-user@××××××××××××××××.de>
Subject: Re: [gentoo-user] Trying to get my ME936 LTE/HSDPA+ 4G modem running
Date: Thu, 09 Mar 2023 16:44:08
Message-Id: 20230309094252.ec892df2c7c7797b767edf09@csrc.com
In Reply to: Re: [gentoo-user] Trying to get my ME936 LTE/HSDPA+ 4G modem running by hitachi303
1 On Thu, 9 Mar 2023 11:27:26 +0100
2 hitachi303 <gentoo-user@××××××××××××××××.de> wrote:
3
4 > Am 08.03.23 um 21:51 schrieb Security:
5 > > On Wed, 8 Mar 2023 15:31:02 +0100
6 > > hitachi303 <gentoo-user@××××××××××××××××.de> wrote:
7 > >
8 > >> Hello everyone,
9 > >>
10 > >> I am trying to get my Huawei ME936 LTE/HSDPA+ 4G modem running. It is
11 > >> build in the laptop.
12 > >>
13 > >> #lsusb | grep -i huawei
14 > >> Bus 003 Device 002: ID 12d1:15bb Huawei Technologies Co., Ltd. ME936
15 > >> LTE/HSDPA+ 4G modem
16 > >>
17 > >> #lspci | grep -i huawei
18 > >> - nothing -
19 > >>
20 > >> #dmesg | grep -i huawei
21 > >> [ 0.869910] usbcore: registered new interface driver huawei_cdc_ncm
22 > >> [ 1.960760] usb 3-4: Product: HUAWEI Mobile Broadband Module
23 > >> [ 1.962533] usb 3-4: Manufacturer: Huawei Technologies Co., Ltd.
24 > >>
25 > >> #ifconfig -a
26 > >> lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
27 > >> inet 127.0.0.1 netmask 255.0.0.0
28 > >> inet6 ::1 prefixlen 128 scopeid 0x10<host>
29 > >> loop txqueuelen 1000 (Lokale Schleife)
30 > >> RX packets 2096 bytes 167808 (163.8 KiB)
31 > >> RX errors 0 dropped 0 overruns 0 frame 0
32 > >> TX packets 2096 bytes 167808 (163.8 KiB)
33 > >> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
34 > >>
35 > >> sit0: flags=128<NOARP> mtu 1480
36 > >> sit txqueuelen 1000 (IPv6-nach-IPv4)
37 > >> RX packets 0 bytes 0 (0.0 B)
38 > >> RX errors 0 dropped 0 overruns 0 frame 0
39 > >> TX packets 0 bytes 0 (0.0 B)
40 > >> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
41 > >>
42 > >> wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
43 > >> [... some info about my wifi ...]
44 > >>
45 > >> wwp0s20f0u4c2: flags=4098<BROADCAST,MULTICAST> mtu 1500
46 > >> ether 02:2c:80:13:92:63 txqueuelen 1000 (Ethernet)
47 > >> RX packets 0 bytes 0 (0.0 B)
48 > >> RX errors 0 dropped 0 overruns 0 frame 0
49 > >> TX packets 0 bytes 0 (0.0 B)
50 > >> TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
51 > >>
52 > >>
53 > >> ofono is set as a use flag
54 > >>
55 > >> I am using net-wireless/iw-5.9 for https://techship.com/faq/how-to-activate-the-data-connection-for-huawei-cellular-modules-over-the-usb-network-interface-in-linux/
56 > > my wifi and as far as I understand
57 > >> this should be working with a modem as well.
58 > >>
59 > >> net-dialup/ppp-2.4.9-r8 is installed. smstools are not. Would I need
60 > >> them for data transfer?
61 > >>
62 > >> I didn't find a guid at the gentoo wiki. Where could I find something?
63 > >> Am I missing something obvious?
64 > >>
65 > >> Thanks for the help.
66 > >>
67 > >
68 > > Did you check out the generic guide[1] for USB WWAN modems? It looks pretty consistent from when I set up a Gobi 3G card years ago. I got lazy and use tethering.
69 > >
70 > > This FAQ[2] walks you through a manual configuration of a Huawei WWWAN to test the concept.
71 > >
72 > > You will need to know you SIM PIN if used and certainly your APN for your Cell Provider.
73 > >
74 > > That ww* interface is auto-created and can be used with different configuration/managnement tools[3].
75 > >
76 > > Good Luck!
77 > >
78 > > [1] https://wiki.gentoo.org/wiki/USB_mobile_broadband_modem
79 > >
80 > > [2] https://techship.com/faq/how-to-activate-the-data-connection-for-huawei-cellular-modules-over-the-usb-network-interface-in-linux/
81 > >
82 > > [3] https://unix.stackexchange.com/questions/159086/difference-between-ppp0-vs-wwan0
83 > >
84 >
85 >
86 > Thanks for this.
87 >
88 > The wiki [1] showed I am missing
89 > <*> USB driver for GSM and CDMA modems
90 >
91 > So now there are /dev/ttyUSB0 to /dev/ttyUSB3
92 >
93 > Does this mean I don't need the mode_switching stuff, since the modem is
94 > already there?
95 >
96
97 Yeah, I would say you don't need it. The gentoo guide was written with external USB plugin adapters in mind. These generally have an install image on them that loads first, thus the need to switch the mode.
98
99 > Also usb_modeswitch is in portage. This is not mentioned in the wiki.
100 > Might this part be outdated?
101
102 Most likely, the guide is talking about 3G adapters and was last updated in 2019 :)
103
104 >
105 > /etc/wvdial.conf
106 > [Dialer Defaults]
107 > Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
108 > Modem Type = Analog Modem
109 > ; Phone = <Target Phone Number>
110 > ISDN = 0
111 > ; Username = <Your Login Name>
112 > Init1 = ATZ
113 > ; Password = <Your Password>
114 > Modem = /dev/ttyUSB0
115 > Baud = 9600
116 >
117 > Does it matter it says "Analog Modem"?
118 >
119
120 No, that tells wvdial to expect a standard AT device. Despite it being digital there is still a legacy device interface to setup the connection.
121
122 > Does using wvdial result in no need to use minicom like mentioned in [2]?
123 >
124
125 Yes, like most things in classic UNIX/Linux there is more than one way to do something.
126
127 wvdial will run a chat script and set up the modem, make the call, and then hand off. Minicom is a terminal emulator and you would be connecting directly to the device and issuing commands. If the the wvdial script failed, you run the commands in minicom to test, for example.