3

I have bought a 4G hat for my raspberry pi 3B+ (the sim7600 waveshare for europe) and followed these instructions for setup. It is running the latest version of raspbian and I have internet on the raspberry through the USB interface (wwan0), which works perfectly.

However the next step for me is to setup a wifi hotspot and forward internet to other raspberry pi zeros. I followed setting up hotspot and similar posts like this or this but they all (most) involve ethernet connection. Also, documentation on configuring wwan0 for dhcpcd and dnsmasq or bridging that I could find are not very comprehensive.

I am relatively new and I got stuck in ip table rules and bridges and unable to setup for wwan0. Does somebody know how I should go about this?

Many thanks!

*I hope that I have all the relevant configuration files here.

/etc/network/interfaces

auto lo
iface lo inet loopback

allow-hotplug wwan0
iface wwan0 inet manual #could not start with static

allow hotplug wlan0
iface wlan0 inet manual #same, fails if I substitute with static keyword
    address 192.168.4.1
    netmask 255.255.255.0
    network 192.24.1.255
    broadcast 192.24.1.255

/etc/dnsmasq.conf

interface-wlan0
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h

/etc/dhcpcd.conf

interface wlan0
    static ip_adress=192.168.4.1/24
    nohook wpa_supplicant

/etc/hostapd/hostapd.conf

interface=wlan0
driver=nl80211
ssid=MyId
hw_mode=g
channel=7
wmm_enabled=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=password
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Jarrr
  • 31
  • 4
  • You posted a link to a tutorial, but seemed to have ignored the settings! – Milliways Jul 30 '19 at 09:29
  • Sorry, could you maybe clarify which settings do you think are causing the problems? I assume /etc/network/interfaces file? I posted three tutorials because I followed several and combinations unsuccesfully. – Jarrr Jul 30 '19 at 10:47
  • There are so many inconsistencies just one denyinterfaces wlan0 … interface wlan0 is nonsense. If you randomly mix different unreferenced tutorials you can't expect anyone to debug the mess. – Milliways Jul 30 '19 at 11:07
  • I understand, and your right, only what I really need is some guidence how to forward internet to the created wifi hotspot. Because raspberry documentation I can follow untill "Add routing and masquerade" and I seem to only find examples and no documentation about bridging. I included all this code because I dont know what I need to do – Jarrr Jul 30 '19 at 12:32
  • Welcome. Replacing "raspberry pi" with "linux" in your search terms should turn up much more material. However, what you've already found may suffice as the interface does not matter. Forwarding or bridging from/to an ethernet, wifi, or modem based (e.g., the sim7600) connection is done the same way. For that reason I am closing the question, but if you need to ask anything more specific about specific details then please feel free. – goldilocks Jul 30 '19 at 15:15
  • Hi @Jarrr, you may try this setup Setting up a Raspberry Pi as an access point - the easy way and there look at the section ♦ Setting up an access point and with eth0, with NAT (recommended). This shows a connection using interface eth0 but it should also work if you just replace it with interface wwan0. So it is important that you first setup the 4G connection what you already have done and then try the setup of the access point. – Ingo Jul 30 '19 at 19:01
  • If you get some trouble then please open a new question but only reference these setup and ask what step exactly failed. – Ingo Jul 30 '19 at 19:03
  • I got it working with your link @Ingo! thanks for all the help! – Jarrr Aug 02 '19 at 06:58

0 Answers0