Setting up a Raspberry Pi as an LTE Hotspot - not working

Hi there,

I have a Raspberry pi 3B+ with sixfab 4G Hat, I have a working connection to the internet via the simcard.
I wanted to make a hotspot, to attach a wifi camera to the pi.
Using this guide: Setting up a Raspberry Pi as an LTE Hotspot
But something is wrong because I cannot see my wifi that I setup. First I set it up as wwan0 instead of usb0 because I could not see any usb0 connected.
However despite no errors I don’t have any connection with another device and I seem to have lost the option to connect to my personal home wifi.
I figured wwan0 was not the right chose, so changed all conf files to usb0, but no succes, it says that
“interface usb0 does not exist!” when adding the bridge (‘sudo brctl addif bro usb0’)
But this time I still can connect to my home network, and have internet via 4G so at least this is working.
So instead of guessing another option, what could I check to determine the problem?

Should be ‘sudo brctl addif br0 usb0’
(Zero, not the letter O)

Thanks for answering,

I double checked every letter, but despite making a typo in the question I used br0 and wwan0.But without succes. And when I redid today I succesfully setup a network (I can see it on my phone and pc) but without acces to internet. And the raspberry pi also has no acces to internet any more.
Which tools can I use to find the problem?

@JaTa Can you start over / re-image your SD card?
Also once you get your RPi booted, do sudo update && sudo upgrade -y
Once everything is updated, can you paste the output of ifconfig here so we can see what interfaces are showing up?

Thanks for the input Scott.
I executed the update en upgrade (sudo apt update && sudo apt upgrade) but one problem I have no internet on the pi currently so I will do a total start over. But in the mean time, this is the result of ifconfig:

br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::84ba:32ff:fe29:b5b7  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:ca:0a:84  txqueuelen 1000  (Ethernet)
        RX packets 137  bytes 26399 (25.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1223  bytes 148910 (145.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.22.178  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::7202:c0b4:6153:cf1f  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:9f:5f:d1  txqueuelen 1000  (Ethernet)
        RX packets 7744  bytes 750018 (732.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8780  bytes 3297823 (3.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 2277  bytes 159545 (155.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2277  bytes 159545 (155.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether b8:27:eb:ca:0a:84  txqueuelen 1000  (Ethernet)
        RX packets 73  bytes 23624 (23.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5927  bytes 911613 (890.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.225.34  netmask 255.255.255.0  broadcast 192.168.225.255
        inet6 fe80::a727:f95d:356e:8559  prefixlen 64  scopeid 0x20<link>
        ether 4e:f2:4b:6e:a7:8b  txqueuelen 1000  (Ethernet)
        RX packets 26  bytes 2078 (2.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 72  bytes 9450 (9.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

One thing to add, I connect the pi via ethernet to my pc and use VNC to interact with it.

Restarted everything, new version of raspberry pi 32-bit OS. New install of CORE, started the tutorial again. Stopped before creating the bridge because after reboot I don’t see the wifi.
Here is the output of ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.22.178  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::6bf8:54a9:827f:2123  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:9f:5f:d1  txqueuelen 1000  (Ethernet)
        RX packets 2779  bytes 257874 (251.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2650  bytes 1585596 (1.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 870  bytes 60980 (59.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 870  bytes 60980 (59.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:ca:0a:84  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.26  netmask 255.255.255.0  broadcast 192.168.225.255
        inet6 fe80::3df1:eb0d:762e:d22  prefixlen 64  scopeid 0x20<link>
        ether 1a:57:ee:0b:6d:04  txqueuelen 1000  (Ethernet)
        RX packets 51  bytes 3496 (3.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 74  bytes 7192 (7.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

@JaTa , I’m not sure what “CORE” is. This is what I would do: (I’m not saying it’s right or wrong)
Lets just get a baseline of a “clean” install with a properly working RPi
1/ Re-image the SD card with the RPi OS.
2/ Boot up, go through the regular setup things you do, (i.e. setup WiFi and localization etc. via Raspi-Config)
3/ Update/upgrade the OS.
4/ Ensure that both the LAN and WiFi connections are working on the RPi.
5/ Do NOT install any other software.
6/ Make sure your SixFab HAT is plugged into the RPi GPIO AND USB connection.
7/ The lets see the output of ifconfig.
NOTE: You may need to look around for a better tutorial on how to get just the RPi working on WiFi. once that is all working, then we can look at getting the SixFab stuff working.

Ok, sounds clear before the results of your test. I found a problem, my internet was down (My laptop was using the neighbours internet) so that’s solved. However I now see the network the pi creates so it seems that this is working. However I have no longer internet on the pi, so the cellular connection is somehow lost in the proces.
Core, as in sixfab core.This was installed to initiate the simcard and I thaught was necessary? When you start using the sim, you enable it in the webapplication (https://connect.sixfab.com/) and get the installation code:
sudo bash -c "$(curl -sN https://install.connect.sixfab.com)" -- -t Aflutter-Untapped-Removing-Muzzle-Edgy-Passport isTrusted true
I ended this proces and start from scratch on a new SD card (Card 2) and here is the output after a clean install, and plugged in the sixfab hat (without any software or so, only configured the wifi which is working):

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.22.178  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::768d:8ce6:bb68:4f61  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:9f:5f:d1  txqueuelen 1000  (Ethernet)
        RX packets 323  bytes 31861 (31.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 152  bytes 45607 (44.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 25  bytes 2635 (2.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 25  bytes 2635 (2.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.233  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 2a02:1810:ac81:e500:c05:a480:a613:887d  prefixlen 64  scopeid 0x0<             global>
        inet6 fe80::a9ac:3afe:30fb:79be  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:ca:0a:84  txqueuelen 1000  (Ethernet)
        RX packets 934  bytes 143742 (140.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 120  bytes 25063 (24.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.225.52  netmask 255.255.255.0  broadcast 192.168.225.255
        inet6 fe80::90a5:3301:6a16:b896  prefixlen 64  scopeid 0x20<link>
        ether c6:70:f2:a5:af:24  txqueuelen 1000  (Ethernet)
        RX packets 121  bytes 9548 (9.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 298  bytes 27482 (26.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I’ve never messed with that CORE stuff. I don’t need it.
I guess try following that original tutorial to see if you can make it work now.

Thanks for the input. I searched online but only got fixes for very specific problems but nothing helped for the main problem. One of the things I cannot figure out is this: After a clean instal of raspberry pi os, setup wifi and connect the hat. lsusb shows the hat is correctly connected. However I cannot reach internet. My wifi says connected, my laptop is connected to the same internet and working fine. Turning it of and on again does not work (tested the wifi, rebooted, shutdown and start up).


Any help is welcome, even to help troubleshoot because something is off and I dont now where to look.

sudo nano /etc/sysctl.conf
Change #net.ipv4.ip_forward=1 to net.piv4.ip_forward=1
(Remove the “#”)

I changed the conf file, nothing changed this is the config file:

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

###################################################################
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438

this is the ifconfig result after changing the sysctl.conf:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.22.178  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::768d:8ce6:bb68:4f61  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:9f:5f:d1  txqueuelen 1000  (Ethernet)
        RX packets 14112  bytes 1433509 (1.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13637  bytes 4460390 (4.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 35  bytes 3434 (3.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35  bytes 3434 (3.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.233  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 2a02:1810:ac81:e500:c05:a480:a613:887d  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::a9ac:3afe:30fb:79be  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:ca:0a:84  txqueuelen 1000  (Ethernet)
        RX packets 1331  bytes 253847 (247.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 389  bytes 57047 (55.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.225.52  netmask 255.255.255.0  broadcast 192.168.225.255
        inet6 fe80::e696:2e55:800f:e6aa  prefixlen 64  scopeid 0x20<link>
        ether 36:8b:ce:27:85:27  txqueuelen 1000  (Ethernet)
        RX packets 1638  bytes 121259 (118.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3760  bytes 317724 (310.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I wonder why you don’t see “usb0” (Which should be the HAT) in your ifconfig output?

Hello,

Apologies for any inconvenience. After reviewing your messages above, it appears that you may be using a Telit module. Telit modules typically shows as the “wwan0” interface, whereas Quectel modules are recognized as “usb0” when Sixfab CORE is installed.

In light of this, it’s advisable to utilize the “wwan0” interface instead of “usb0” for your configuration.

I’ve also have reviewed our documentation to check any missing information to ensure a more seamless experience. The following note has been mentioned.

If you read my first question carefully you could have read that I tried wwan0 and usb0. Because at the time I didn’t know that a Telit modem should always use wwan0. So that is clarified but not the problem.
Using the ECM mode, I found out that this is quite tricky and just a pain to work with. The modem is quite stubborn to communicate with.
Link to a similar problem:

I went with libqmi-utils instead. Enabled network manager instead of dhcp, but still new errors keep popping up.

Using this guide I’m stuck at getting the operating-mode=‘online’ of the qmicli.
I tried these commands:
sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode
sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode=‘online’

Error don’t have much info: (collection of errors after trying multiple times;)
Er: Warning ** Error reading from istream: Resource temporarily unavailable
error: operation failed: endpoint hangup
error: couldn’t release client: Transaction timed out
Er: error: couldn’t create client for the ‘dms’ service: CID allocation failed in the CTL client: Transaction timed out
Er: -Warning ** Error reading from istream: Resource temporarily unavailable
Er: error: couldn’t create client for the ‘dms’ service: CID allocation failed in the CTL client: Transaction timed out

Any help is welcome. I’m right now looking at seeing if the modem is receiving commands or something that could be interupting my commands.