Raspberry-Pi Wifi Access-point

access-point
wifi

#1

Hi All,
I’m trying to make my raspberry pi act as a router by spinning up a container. I have 2 wifi interfaces (wlan0, wlan1), wlan0 to be connected to my home network and wlan1 to be made an access point. I’m using the hostapd with dnsmasq (added ‘bind-interfaces’) and port forwarding to bring up a container in the pi. When I push the code to the device via resin, an access point is created on wlan1 and then the device goes offline when it tries to start the dnsmasq. I used this code for a demo, the device went offline after starting up an access point. Is there a way to make this use case work? and was there any steps given in the documentation that I missed? Appreciate any reply. Thanks!


#3

Hi, which version of resinOS are you using?

It should be different for resinOS 1.x and 2.x, will ask the project creator , but on 2.x it should be even simpler, using NetworkManager. If that’s your case, you can look around for resources on that (access point creation with NM), and we’ll have more info when the resinOS version used is know.


#4

Hello @imrehg,
I’m using Resin OS 2.0.6+rev3.
I have created a dummy repo for the code here. Please take a look at it. Thanks!


RPi3 Wireless Access Point & Bridge Setup
#5

Hi @roop

We use Network Manager in resinOS2.x to manage the devices connections. Network Manager supports both creating access points and automatically bridging the connection between multiple interfaces.

Just drop the below example configuration into a file inside the /boot/system-connections directory on the SD card and name it resin-hotspot, next use the Network Manager DBUS API to enable the connection called resin-hotspot.

You will then be able to connect to the hotspot using resin-hotspot as both the SSID and password.

As a bonus this hotspot method automatically bridges the connection!

[connection]
id=resin-hotspot
uuid=36060c57-aebd-4ccf-aba4-ef75121b5f77
type=wifi
autoconnect=false
interface-name=wlan1
permissions=
secondaries=

[wifi]
band=bg
mac-address-blacklist=
mac-address-randomization=0
mode=ap
seen-bssids=
ssid=resin-hotspot

[wifi-security]
group=
key-mgmt=wpa-psk
pairwise=
proto=
psk=resin-hotspot

[ipv4]
dns-search=
method=shared

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

Creating access point - Raspberry Pi Zero W
Creating access point - Raspberry Pi Zero W
Creating access point - Raspberry Pi Zero W
Creating access point - Raspberry Pi Zero W
#6

Hi @joe,

Thanks for the reply!

I tried doing the mentioned procedure but I’m unable to resolve my problem. Maybe I’m doing it wrong.
I have included a resin-hotspot file in /boot/system-connections directory on the SD card replacing with the current device’s uuid.
I’m trying to use the Network Manager DBUS API to enable resin-hotspot. But I’m getting the following hex values while trying to get the available connections in python terminal.

and while trying to use the example python program activate_connection.py given with the source code, I’m getting the following,

Can you kindly direct me to the correct procedure for using the Network Manager DBUS API. Thanks!


Creating access point - Raspberry Pi Zero W
#7

It looks like your wireless interface is not named correctly or is already in use.

Please can you burn a dev image, copy the connection file onto the SD card as you did before and connect to the host OS (more info here)

Once you have connected to the host OS please run nmcli, nmcli c and nmcli d posting the output here.

Thanks


#8

Update to this thead available here with a similar issue - Creating access point - Raspberry Pi Zero W