PiOS - Wavesahre 4G Hat, dropping connection

Hi,

I have a 4G Waveshare hat running on a PiZero W.

I have it 99% setup. It will connect, but web connection only holds for a few minutes.

Here is the PON output…

Any help appreciated.



pi@raspberrypi:~ $ sudo pon
abort on (BUSY)
abort on (VOICE)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (NO DIAL TONE)
abort on (NO ANSWER)
abort on (DELAYED)
abort on (ERROR)
abort on (+CGATT: 0)
send (AT^M)
timeout set to 12 seconds
expect (OK)
AT^M^M
OK
 -- got it

send (ATH^M)
expect (OK)
^M
ATH^M^M
OK
 -- got it

send (ATE1^M)
expect (OK)
^M
ATE1^M^M
OK
 -- got it

send (AT+CGDCONT=1,"IP","connect","",0,0^M)
expect (OK)
^M
AT+CGDCONT=1,"IP","connect","",0,0^M^M
OK
 -- got it

send (ATD*99#^M)
timeout set to 22 seconds
expect (CONNECT)
^M
ATD*99#^M^M
CONNECT
 -- got it

send (^M)
Script /usr/sbin/chat -s -v -f /etc/chatscripts/gprs -T connect finished (pid 1224), status = 0x0
Serial connection established.
using channel 2
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4a76df32> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x4 <asyncmap 0x0> <auth chap MD5> <magic 0x208db197> <pcomp> <accomp>]
sent [LCP ConfNak id=0x4 <auth pap>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4a76df32> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x5 <asyncmap 0x0> <auth pap> <magic 0x208db197> <pcomp> <accomp>]
sent [LCP ConfAck id=0x5 <asyncmap 0x0> <auth pap> <magic 0x208db197> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x4a76df32]
sent [PAP AuthReq id=0x1 user="###############" password=<hidden>]
rcvd [LCP DiscReq id=0x6 magic=0x208db197]
rcvd [LCP EchoRep id=0x0 magic=0x208db197 4a 76 df 32]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
rcvd [LCP ProtRej id=0x7 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=0x2]
sent [IPCP ConfNak id=0x2 <addr 0.0.0.0>]
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
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=0x3]
sent [IPCP ConfAck id=0x3]
rcvd [IPCP ConfNak id=0x2 <addr 203.196.93.255> <ms-dns1 203.7.225.10> <ms-dns2 203.34.31.50>]
sent [IPCP ConfReq id=0x3 <addr 203.196.93.255> <ms-dns1 203.7.225.10> <ms-dns2 203.34.31.50>]
rcvd [IPCP ConfAck id=0x3 <addr 203.196.93.255> <ms-dns1 203.7.225.10> <ms-dns2 203.34.31.50>]
Could not determine remote IP address: defaulting to 10.64.64.64
Script /etc/ppp/ip-pre-up started (pid 1241)
Script /etc/ppp/ip-pre-up finished (pid 1241), status = 0x0
not replacing default route to wlan0 [192.168.86.1]
local  IP address 203.196.93.255
remote IP address 10.64.64.64
primary   DNS address 203.7.225.10
secondary DNS address 203.34.31.50
Script /etc/ppp/ip-up started (pid 1244)
Script /etc/ppp/ip-up finished (pid 1244), status = 0x0
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
IPV6CP: timeout sending Config-Requests
Terminating on signal 15
Connect time 1.2 minutes.
Sent 126 bytes, received 8448 bytes.
Script /etc/ppp/ip-down started (pid 1828)
sent [LCP TermReq id=0x2 "User request"]
rcvd [LCP TermAck id=0x2]
Connection terminated.
Script /etc/ppp/ip-down finished (pid 1828), status = 0x0
1 Like

Hey Warwick,
Welcome to the Forums!

It seems like it is dropping out at a network level, this could be due to GSM signal strength issues or a network error from your Router. Is there any more info you could give us about your setup that may help understand what may be going wrong here? Can you test if there are timeouts on your network?

I would love to be a bit more helpful, however currently Waveshare seems to be down so I cant look through the documentation to check what the specific issue may be. However will check back later to try and get some more info from the Documentation to help me understand it a bit more.

Cheers,
Blayden

Hi Blayden,

Thanks for looking. If I knew how to stop it trying to use IPV6, and just use the existing connection, maybe it will resolve. I just am not sure where the commands below come from.

I have feeling it ‘might’ be do do with IPV6, look at the below from the PON output.


sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
sent [IPV6CP ConfReq id=0x1 <addr fe80::7160:1fe4:755a:7174>]
IPV6CP: timeout sending Config-Requests
Terminating on signal 15
Connect time 1.2 minutes.

Hey Warwick,

You may be right there, there is no response to that request, so it is likely something to do with the IPV6 connection

What model of Waveshare HAT are you using? Could you include a Link or the Product SKU for me so that I can have a bit of a look into it when Waveshare is responsive again? I may be able to find an alternate path to the IPV6 connection.

Also, Are you following a specific guide to get this set up?

Cheers,
Blayden

Thanks.

The model is the SIM7600G H (SKU - SKU: CE07877 )

I have used their guide to help get it setup, it all works fine… just kicks the ppp0 connection after a small while.

1 Like

here is the Interface Config, straight after boot.



sudo ifconfig -a
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 21  bytes 2497 (2.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 21  bytes 2497 (2.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 203.196.93.255  netmask 255.255.255.255  destination 10.64.64.64
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 21  bytes 1178 (1.1 KiB)
        RX errors 4  dropped 0  overruns 0  frame 0
        TX packets 377  bytes 29841 (29.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.86.53  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fd7e:9bdb:b5a0:4a83:c28f:226e:92a3:3aba  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::df3d:621e:48f:70dd  prefixlen 64  scopeid 0x20<link>
        inet6 fd72:58a3:45b1:2bd0:5c79:1b80:c1a2:8598  prefixlen 64  scopeid 0x0<global>
        ether e4:5f:01:75:be:d0  txqueuelen 1000  (Ethernet)
        RX packets 923  bytes 149579 (146.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 565  bytes 126012 (123.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.240.253  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::7c91:62cb:df29:7bff  prefixlen 64  scopeid 0x20<link>
        ether c6:33:50:b3:ef:80  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 28  bytes 4554 (4.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

1 Like

Hi Blayden,

Any further ideas or help ?

1 Like

I am having the same issue, see logs below.

vlad@raspberrypi:~ $ sudo pppd call gprs
pppd options in effect:
debug # (from /etc/ppp/peers/gprs)
nodetach # (from /etc/ppp/peers/gprs)
dump # (from /etc/ppp/peers/gprs)
noauth # (from /etc/ppp/peers/gprs)
remotename 3gppp # (from /etc/ppp/peers/gprs)
/dev/ttyUSB2 # (from /etc/ppp/peers/gprs)
115200 # (from /etc/ppp/peers/gprs)
lock # (from /etc/ppp/peers/gprs)
connect chat -s -v -f /etc/chatscripts/quectel-chat-connect -T telstra.internet # (from /etc/ppp/peers/gprs)
disconnect chat -s -v -f /etc/chatscripts/quectel-chat-disconnect # (from /etc/ppp/peers/gprs)
nocrtscts # (from /etc/ppp/peers/gprs)
modem # (from /etc/ppp/peers/gprs)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 2 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/options)
novj # (from /etc/ppp/peers/gprs)
novjccomp # (from /etc/ppp/peers/gprs)
ipcp-accept-local # (from /etc/ppp/peers/gprs)
ipcp-accept-remote # (from /etc/ppp/peers/gprs)
ipparam 3gppp # (from /etc/ppp/peers/gprs)
noipdefault # (from /etc/ppp/peers/gprs)
ipcp-max-failure 30 # (from /etc/ppp/peers/gprs)
defaultroute # (from /etc/ppp/peers/gprs)
replacedefaultroute # (from /etc/ppp/peers/gprs)
usepeerdns # (from /etc/ppp/peers/gprs)
noccp # (from /etc/ppp/peers/gprs)
noipx # (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
AT^M^M
OK
– got it

send (ATE0^M)
expect (OK)
^M
ATE0^M^M
OK
– got it

send (ATI^M)
expect (OK)
^M
^M
SIM7000E R1351^M
^M
OK
– got it

send (AT+CSUB^M)
expect (OK)
^M
^M
+CSUB: V02^M
^M
OK
– got it

send (AT+CSQ^M)
expect (OK)
^M
^M
+CSQ: 20,99^M
^M
OK
– got it

send (AT+CPIN?^M)
expect (OK)
^M
^M
+CPIN: READY^M
^M
OK
– got it

send (AT+COPS?^M)
expect (OK)
^M
^M
+COPS: 1,0,“Telstra Telstra”,7^M
^M
OK
– got it

send (AT+CGREG?^M)
expect (OK)
^M
^M
+CGREG: 0,1^M
^M
OK
– got it

send (AT+CNMP=38^M)
expect (OK)
^M
^M
OK
– got it

send (AT+CMNB=1^M)
expect (OK)
^M
^M
OK
– got it

send (AT+CGDCONT=2,“IP”,“telstra.internet”,0,0^M)
expect (OK)
^M
^M
OK
– got it

send (AT+CGDCONT?^M)
expect (OK)
^M
^M
+CGDCONT: 1,“IP”,“telstra.internet”,“0.0.0.0”,0,0,0,0^M
+CGDCONT: 13,“IP”,“T”,“0.0.0.0”,0,0,0,0^M
+CGDCONT: 2,“IP”,“telstra.internet”,“0.0.0.0”,0,0,0,0^M
+CGDCONT: 4,“IP”,“telstra.wap”,“0.0.0.0”,0,0,0,0^M
^M
OK
– got it

send (AT+CNACT?^M)
expect (OK)
^M
^M
+CNACT: 1,“100.97.100.114”^M
^M
OK
– got it

send (ATD*99#***2#^M)
expect (CONNECT)
^M
^M
CONNECT
– got it

Script chat -s -v -f /etc/chatscripts/quectel-chat-connect -T telstra.internet finished (pid 1424), status = 0x0
Serial connection established.
using channel 10
Using interface ppp0
Connect: ppp0 ↔ /dev/ttyUSB2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe822cb9e> ]
rcvd [LCP ConfReq id=0x3c <asyncmap 0x0> <magic 0xa2f34808> ]
sent [LCP ConfAck id=0x3c <asyncmap 0x0> <magic 0xa2f34808> ]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xe822cb9e> ]
sent [LCP EchoReq id=0x0 magic=0xe822cb9e]
rcvd [LCP DiscReq id=0x3d magic=0xa2f34808]
rcvd [CHAP Challenge id=0x1 <45436a85842f8a171184dfd918966296>, name = “UMTS_CHAP_SRVR”]
sent [CHAP Response id=0x1 <429ccc42f5885c1c033800fe3c2eaed9>, name = “raspberrypi”]
rcvd [LCP EchoRep id=0x0 magic=0xa2f34808 e8 22 cb 9e]
rcvd [CHAP Success id=0x1 “”]
CHAP authentication succeeded
CHAP authentication succeeded
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPV6CP ConfReq id=0x1 ]
sent [LCP EchoReq id=0x1 magic=0xe822cb9e]
IPCP: timeout sending Config-Requests
IPV6CP: timeout sending Config-Requests
sent [LCP TermReq id=0x2 “No network protocols running”]
sent [LCP TermReq id=0x3 “No network protocols running”]
Connection terminated.
abort on (ERROR)
abort on (NO DIALTONE)
unterminated quote (line 4)
Script chat -s -v -f /etc/chatscripts/quectel-chat-disconnect finished (pid 1437), status = 0x1
disconnect script failed
Modem hangup

2 Likes

Hi All, I did some reading and it seems signal may be a concern?

1 Like

Hi,

I have the two LTE antenna’s that came with the board connected. Maybe a higher gain or different antenna?

1 Like

Hi Warwick,

What does AT+CSQ come back at you with?

1 Like
pi@raspberrypi:~ $ minicom -D /dev/ttyUSB2


Welcome to minicom 2.8                                                    
                                                                          
OPTIONS: I18n                                                             
Port /dev/ttyUSB2, 10:29:13                                               
                                                                          
Press CTRL-A Z for help on special keys                                   
                                                                          
AT+CSQ                                                                    
                                                                          
+CSQ: 2,99                                                                
                                                                          
OK
1 Like

Thanks for investigating @Warwick182029 - 2.99 seems like it might be a low signal quality. That might explain the timeouts.

There is no unit indicated, which is a bit unhelpful.

Still, armed with this knowledge it might be worth experimenting with repositioning the unit and executing AT+CSQ again to find a better location, and see if a different CSQ value correlates to better performance.

1 Like

So I can get the Singal Quality up to 20.



Welcome to minicom 2.8                                                    
                                                                          
OPTIONS: I18n                                                             
Port /dev/ttyUSB2, 20:29:08                                               
                                                                          
Press CTRL-A Z for help on special keys                                   
                                                                          
AT+COPS?                                                                  
                                                                          
ERROR                                                                     
AT+CSQ                                                                    
                                                                          
+CSQ: 20,99                                                               
                 

But still no connection. I can put that same SIM into my iPhone and it works flawlessly. From the exact same location. Could the BUS to the LTE over UFL be shit ?

2 Likes

Dang

And you’ve taken a dive through the waveshare FAQ for this board?
There is an entry for forcing to use ipv4/6

I can get '20" after the following command.


Welcome to minicom 2.8                                                    
                                                                          
OPTIONS: I18n                                                             
Port /dev/ttyUSB2, 21:42:31                                               
                                                                          
Press CTRL-A Z for help on special keys                                   
                                                                          
AT+CSQ                                                                    
                                                                          
+CSQ: 20,99                                                               
                                                                          
OK                                                                        
 

But then this.

What is an acceptable value ? Also, this SIM works perfectly fine ion an iPhone15.



**pi@raspberrypi**:**~ $** sudo pon

abort on (BUSY)

abort on (VOICE)

abort on (NO CARRIER)

abort on (NO DIALTONE)

abort on (NO DIAL TONE)

abort on (NO ANSWER)

abort on (DELAYED)

abort on (ERROR)

abort on (+CGATT: 0)

send (AT^M)

timeout set to 12 seconds

expect (OK)

^M

OK

-- got it

send (ATH^M)

expect (OK)

^M

^M

ERROR

-- failed

Failed (ERROR)

Script /usr/sbin/chat -s -v -f /etc/chatscripts/gprs -T connect finished (pid 24712), status = 0xb

Connect script failed