SixFab 4G modem: Prioritize connection for requests

I have a Raspberry Pi 5 and the SixFab 4G/LTE Base HAT. The setup was very straightforward (thank you!), and I have verified that it is communicating with the SixFab dashboard.

image

When I ssh into the Pi, I can see the connections are setup as well (replaced actual addresses with “–”):

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500███████████████████████████████████████████████ 100%
        inet --.--.--.---  netmask 255.255.248.0  broadcast --.--.--.--
        inet6 ----::----:----:----:----  prefixlen 64  scopeid 0x20<link>
        ether 2c:cf:67:38:98:d3  txqueuelen 1000  (Ethernet)
        RX packets 207009  bytes 43709335 (41.6 MiB)
        RX errors 0  dropped 8940  overruns 0  frame 0
        TX packets 8521  bytes 1203220 (1.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 107

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 142  bytes 12441 (12.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 142  bytes 12441 (12.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether --:--:--:--:--:--  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.225.31  netmask 255.255.255.0  broadcast 192.168.225.255
        inet6 ----::----:----:----:----  prefixlen 64  scopeid 0x20<link>
        ether --:--:--:--:--:--  txqueuelen 1000  (Ethernet)
        RX packets 497  bytes 33579 (32.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 730  bytes 59362 (57.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Now for the question. I see many examples of people creating publicly accessible web servers with this shield. However, in my case, I want to create a client, not a server. For example, to read the GPS data from the SixFab 4G module, and send it over some sort of restful webservice as a POST request (just an example).

The problem is twofold: I only want to send these service requests over the 4G connection exposed by the SixFab 4G shield, not Ethernet or Wifi. When I look at the output of ifconfig, I see that the wwan0 IP address exposed by the SixFab 4G hat is private (192..), so I’m not sure how that would actually work.

In my case, the Ethernet/Wifi connections are only used so that I can ssh in, but I want all my scripts that create these web service requests to use the FixFab 4G connection.

Hopefully, I am making sense. Basically, I am trying to create a web service client that communicates over a 4G connection, not Wi-Fi or Ethernet, but I can’t figure out how to do that.

Lastly, based on previous posts, I think I can simply send AT commands to query GPS data. The question is, does SixFab have a sort of Python package/lib which encapsulates these commands as an API? Stupid question, but figured I would ask.

Thanks!