From owner-freebsd-questions@freebsd.org Tue Dec 3 09:13:05 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DE901CEC73 for ; Tue, 3 Dec 2019 09:13:05 +0000 (UTC) (envelope-from ml-ktk@netlabs.org) Received: from r2-d2.netlabs.org (r2-d2.netlabs.org [213.238.45.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47Rx8w0k5Pz47lp for ; Tue, 3 Dec 2019 09:13:03 +0000 (UTC) (envelope-from ml-ktk@netlabs.org) Received: (qmail 21320 invoked by uid 89); 3 Dec 2019 09:13:00 -0000 Received: by simscan 1.4.0 ppid: 21315, pid: 21318, t: 0.1959s scanners:none Received: from unknown (HELO eternal.local) (ml-ktk@netlabs.org@103.86.162.10) by 0 with ESMTPA; 3 Dec 2019 09:13:00 -0000 From: Adrian Gschwend Subject: u3g Sierra Wireless LTE device disconnects ppp after 2-3MB of outgoing traffic To: freebsd-questions@freebsd.org Message-ID: <972e8912-0ed7-63c8-d079-c11b12f8c9ad@netlabs.org> Date: Tue, 3 Dec 2019 16:12:57 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47Rx8w0k5Pz47lp X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of ml-ktk@netlabs.org has no SPF policy when checking 213.238.45.90) smtp.mailfrom=ml-ktk@netlabs.org X-Spamd-Result: default: False [4.55 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[90.45.238.213.rep.mailspike.net : 127.0.0.17]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[netlabs.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.91)[0.910,0]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_LONG(0.99)[0.993,0]; RCVD_IN_DNSWL_NONE(0.00)[90.45.238.213.list.dnswl.org : 127.0.10.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:9211, ipnet:213.238.32.0/20, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(1.75)[ipnet: 213.238.32.0/20(4.90), asn: 9211(3.87), country: DE(-0.01)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2019 09:13:05 -0000 Hi everyone, I brought this up on opnsense forum yesterday (https://forum.opnsense.org/index.php?topic=15187.0) but I start to suspect that it's related to mpd or the FreeBSD driver of my LTE Sierra Wireless card so allow me to ask here as well. What I describe here I tried with the latest version of OPNsense (19.7.7) and PFsense (2.4.4). IIRC that is FreeBSD 12.1 or 11.3. I have a "Sierra Wireless MC7430 Qualcomm Snapdragon X7 LTE-A" card in my apu3b4 board with 2 sim card slots. The card is recognized just fine and I can do AT commands on /dev/cuaU0.2. I've set up PPP for my provider and I can connect without problems, I get a private V4 address and no IPv6 address. Download is ok, between 20-30MB/sec, pretty much what I get with my Netgear AirCard 810S Mobile Hotspot as well using the same SIM card. However, there seems to be a problem with outgoing traffic. It starts all fine but at one point upload stalls and the connection dies, also for incoming traffic. Took me a while to figure out a pattern but I'm pretty sure it depends on how much outgoing traffic I generate on the PPP interface. From monitoring the interface it looks like after 2-3MB of traffic, the connection dies. When I wait long enough it recovers and I can reproduce the behavior, every 2-3MB of outgoing traffic. In ppp.log I see this the moment the link stalls: https://pastebin.com/tA6kystN system.log: Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: IP renewal is starting on 'ppp0' Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: On (IP address: 10.131.180.114) (interface: WAN[wan]) (real interface: ppp0). Dec 3 01:28:12 bidul opnsense: plugins_configure hosts () Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan' Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: ROUTING: IPv4 default gateway set to wan Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to 10.64.64.0 Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: ROUTING: keeping current default gateway '10.64.64.0' Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: ROUTING: IPv6 default gateway set to wan Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: ROUTING: skipping IPv6 default route Dec 3 01:28:12 bidul opnsense: plugins_configure monitor () Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: The WAN_DHCP6 monitor address is empty, skipping. Dec 3 01:28:12 bidul opnsense: /usr/local/etc/rc.newwanip: The WAN_PPP monitor address is empty, skipping. As a side-note, ICMP behaves really strange on both opnsense and pfsense with this interface: Sometimes it works towards the Internet, sometimes it doesn't. If it did work, it is most probably broken after I had the first disconnect and won't come back. TCP does not seem to be affected though, even without being able to ping I can use http just fine. I'm a bit lost on how to debug that, any hints are welcome. Is this a PPP problem or more likely an issue with the u3g driver? FWIW I've also updated the firmware on my LTE card, it was almost 3 years old. But same behavior with the latest release. LTE Signal is in general very good, MIMO antenna attached to it. All values are in Good or Excellent range (tx & rx). thanks Adrian