Summary: | [usb/u3g][patch][request] Add support Quectel EM12-G modem | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | tda.77793 | ||||
Component: | kern | Assignee: | Alexander V. Chernikov <melifaro> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | melifaro | ||||
Priority: | --- | ||||||
Version: | 13.0-STABLE | ||||||
Hardware: | amd64 | ||||||
OS: | Any | ||||||
Attachments: |
|
daemon.log(mpd5): Jan 28 18:30:36 eeepc mpd[2722]: Multi-link PPP daemon for FreeBSD Jan 28 18:30:36 eeepc mpd[2722]: Jan 28 18:30:36 eeepc mpd[2722]: process 2722 started, version 5.9 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] Bundle: Interface ng0 created Jan 28 18:30:36 eeepc mpd[2722]: mpd.conf:50: Error in 'set modem speed 150000000': invalid speed '150000000' Jan 28 18:30:36 eeepc mpd[2722]: [L1] Link: OPEN event Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: Open event Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: state change Initial --> Starting Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: LayerStart Jan 28 18:30:36 eeepc mpd[2722]: [L1] CHAT: Detected Custom modem. Jan 28 18:30:36 eeepc mpd[2722]: [L1] CHAT: Dialing server at *99#... Jan 28 18:30:36 eeepc mpd[2722]: [L1] CHAT: Connected at 150000000. Jan 28 18:30:36 eeepc mpd[2722]: [L1] MODEM: chat script succeeded Jan 28 18:30:36 eeepc mpd[2722]: [L1] Link: UP event Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: Up event Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: state change Starting --> Req-Sent Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: SendConfigReq #1 Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACFCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] PROTOCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACCMAP 0x000a0000 Jan 28 18:30:36 eeepc mpd[2722]: [L1] MRU 1500 Jan 28 18:30:36 eeepc mpd[2722]: [L1] MAGICNUM 0xe7fcac1c Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: rec'd Configure Request #76 (Req-Sent) Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACCMAP 0x00000000 Jan 28 18:30:36 eeepc mpd[2722]: [L1] AUTHPROTO CHAP MD5 Jan 28 18:30:36 eeepc mpd[2722]: [L1] MAGICNUM 0xd0448545 Jan 28 18:30:36 eeepc mpd[2722]: [L1] PROTOCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACFCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: SendConfigAck #76 Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACCMAP 0x00000000 Jan 28 18:30:36 eeepc mpd[2722]: [L1] AUTHPROTO CHAP MD5 Jan 28 18:30:36 eeepc mpd[2722]: [L1] MAGICNUM 0xd0448545 Jan 28 18:30:36 eeepc mpd[2722]: [L1] PROTOCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACFCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: state change Req-Sent --> Ack-Sent Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: rec'd Configure Ack #1 (Ack-Sent) Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACFCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] PROTOCOMP Jan 28 18:30:36 eeepc mpd[2722]: [L1] ACCMAP 0x000a0000 Jan 28 18:30:36 eeepc mpd[2722]: [L1] MRU 1500 Jan 28 18:30:36 eeepc mpd[2722]: [L1] MAGICNUM 0xe7fcac1c Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: state change Ack-Sent --> Opened Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: auth: peer wants CHAP, I want nothing Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: LayerUp Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: rec'd Discard Request #77 (Opened) Jan 28 18:30:36 eeepc mpd[2722]: [L1] CHAP: rec'd CHALLENGE #1 len: 35 Jan 28 18:30:36 eeepc mpd[2722]: [L1] Name: "UMTS_CHAP_SRVR" Jan 28 18:30:36 eeepc mpd[2722]: [L1] CHAP: Using authname "gdata" Jan 28 18:30:36 eeepc mpd[2722]: [L1] CHAP: sending RESPONSE #1 len: 26 Jan 28 18:30:36 eeepc mpd[2722]: [L1] CHAP: rec'd SUCCESS #1 len: 4 Jan 28 18:30:36 eeepc mpd[2722]: [L1] LCP: authorization successful Jan 28 18:30:36 eeepc mpd[2722]: [L1] Link: Matched action 'bundle "tm1" ""' Jan 28 18:30:36 eeepc mpd[2722]: [L1] Link: Join bundle "tm1" Jan 28 18:30:36 eeepc mpd[2722]: [tm1] Bundle: Status update: up 1 link, total bandwidth 150000000 bps Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: Open event Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: state change Initial --> Starting Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: LayerStart Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: Up event Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: state change Starting --> Req-Sent Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: SendConfigReq #1 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPADDR 0.0.0.0 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: rec'd Configure Request #8 (Req-Sent) Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: SendConfigAck #8 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: state change Req-Sent --> Ack-Sent Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: rec'd Configure Nak #1 (Ack-Sent) Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPADDR 100.124.246.199 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] 100.124.246.199 is OK Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: SendConfigReq #2 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPADDR 100.124.246.199 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: rec'd Configure Ack #2 (Ack-Sent) Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPADDR 100.124.246.199 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: state change Ack-Sent --> Opened Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IPCP: LayerUp Jan 28 18:30:36 eeepc mpd[2722]: [tm1] 100.124.246.199 -> 10.0.0.1 Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IFACE: Up event Jan 28 18:30:36 eeepc mpd[2722]: [tm1] IFACE: Rename interface ng0 to itc0 Jan 28 18:31:11 eeepc mpd[2722]: caught fatal signal TERM Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IFACE: Close event Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: Close event Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: state change Opened --> Closing Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: SendTerminateReq #3 Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: LayerDown Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IFACE: Down event Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IFACE: Rename interface itc0 to itc0 Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: rec'd Terminate Ack #3 (Closing) Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: state change Closing --> Closed Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: LayerFinish Jan 28 18:31:11 eeepc mpd[2722]: [tm1] Bundle: No NCPs left. Closing links... Jan 28 18:31:11 eeepc mpd[2722]: [tm1] Bundle: closing link "L1"... Jan 28 18:31:11 eeepc mpd[2722]: [L1] Link: CLOSE event Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: Close event Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: state change Opened --> Closing Jan 28 18:31:11 eeepc mpd[2722]: [L1] Link: Leave bundle "tm1" Jan 28 18:31:11 eeepc mpd[2722]: [tm1] Bundle: Status update: up 0 links, total bandwidth 9600 bps Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: Close event Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: Down event Jan 28 18:31:11 eeepc mpd[2722]: [tm1] IPCP: state change Closed --> Initial Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: SendTerminateReq #2 Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: LayerDown Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: rec'd Terminate Ack #2 (Closing) Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: state change Closing --> Closed Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: LayerFinish Jan 28 18:31:11 eeepc mpd[2722]: [L1] Link: DOWN event Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: Down event Jan 28 18:31:11 eeepc mpd[2722]: [L1] LCP: state change Closed --> Initial Jan 28 18:31:13 eeepc mpd[2722]: [tm1] Bundle: Shutdown Jan 28 18:31:13 eeepc mpd[2722]: [L1] Link: Shutdown Jan 28 18:31:13 eeepc mpd[2722]: process 2722 terminated Comment on attachment 229898 [details]
patch for add QUECTEL EM12-G modem support via USB
diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4
index 014a789cb..5fae33b44 100644
--- a/share/man/man4/u3g.4
+++ b/share/man/man4/u3g.4
@@ -70,6 +70,8 @@ Vodafone Mobile Broadband K3772-Z
.It
Qualcomm Inc. CDMA MSM
.It
+QUECTEL EM05, EM12-G, etc.
+.It
Huawei B190, E180v, E220 ('<Huawei Mobile>')
.It
Novatel U740, MC950D, X950D, etc.
diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c
index 33e6339be..90bd82dac 100644
--- a/sys/dev/usb/serial/u3g.c
+++ b/sys/dev/usb/serial/u3g.c
@@ -497,6 +497,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(QUANTA, Q111, 0),
U3G_DEV(QUECTEL, EC25, 0),
U3G_DEV(QUECTEL, EM05, 0),
+ U3G_DEV(QUECTEL, EM12_G, 0),
U3G_DEV(SIERRA, AC402, 0),
U3G_DEV(SIERRA, AC595U, 0),
U3G_DEV(SIERRA, AC313U, 0),
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 010ddddc5..bf5b5e898 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -3948,6 +3948,7 @@ product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS
/* Quectel products */
product QUECTEL EC25 0x0125 LTE modem
product QUECTEL EM05 0x0127 LTE modem
+product QUECTEL EM12_G 0x0512 LTE modem
/* Quickshot products */
product QUICKSHOT STRIKEPAD 0x6238 USB StrikePad
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=217481a3332783d03366c4512b0b164764aa6c6e commit 217481a3332783d03366c4512b0b164764aa6c6e Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2022-01-29 09:53:38 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2022-01-29 09:59:20 +0000 u3g: Add support Quectel EM12-G modem. Submitted by: <tda.77793 at gmail.com> PR: 260218 MFC after: 2 weeks share/man/man4/u3g.4 | 2 ++ sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 3 files changed, 4 insertions(+) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=453b4f81939b5853b8ab493c0eeb4af7b1bbb3fc commit 453b4f81939b5853b8ab493c0eeb4af7b1bbb3fc Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2022-01-29 09:53:38 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2022-03-28 08:54:30 +0000 u3g: Add support Quectel EM12-G modem. Submitted by: <tda.77793 at gmail.com> PR: 260218 MFC after: 2 weeks (cherry picked from commit 217481a3332783d03366c4512b0b164764aa6c6e) share/man/man4/u3g.4 | 2 ++ sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 3 files changed, 4 insertions(+) A commit in branch releng/13.1 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f0b3b85d0223d4a978918cfd2ff5b6a59362db2b commit f0b3b85d0223d4a978918cfd2ff5b6a59362db2b Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2022-01-29 09:53:38 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2022-03-28 15:25:31 +0000 u3g: Add support Quectel EM12-G modem. Submitted by: <tda.77793 at gmail.com> PR: 260218 Approved by: re(gjb) MFC after: 2 weeks (cherry picked from commit 217481a3332783d03366c4512b0b164764aa6c6e) (cherry picked from commit 453b4f81939b5853b8ab493c0eeb4af7b1bbb3fc) share/man/man4/u3g.4 | 2 ++ sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 3 files changed, 4 insertions(+) |
Created attachment 229898 [details] patch for add QUECTEL EM12-G modem support via USB Add Quectel EM12-G modem support via USB for FreeBSD. Tested and works like a mpd5 on FreeBSD-13. dmesg: ... ugen1.2: <Quectel EM12-G> at usbus1 u3g0 on uhub1 u3g0: <Quectel EM12-G, class 0/2, rev 2.00/3.18, addr 2> on usbus1 u3g0: Found 5 ports.