Live data from Hacker News

Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

github.com

21–30 of 92 posts

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#21

Has anyone noticed a shortage of Pi Zeros recently? It seems everywhere has run out of stock.

Recently? I've seen a shortage (in EU shops (Pi Zero W specifically)) since it was launched and seems it's not getting better either.

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#22
post #14

A bit off topic: I'm looking for a project that starts with an AP. Once someone connected to it; it opens a web page to configure the client (choose which WIFI from a list, and type the password). It connects to the chosen WIFI and shuts down the AP. Anyone here did something similar to that?

Yep. I didn't do it with a RasPi but with a Chinese chip I found off AliExpress

Managed to strip down OpenWRT so it would fit in the meager 16MB RAM/8MB flash. In the init script (a bash script) just checked if a wifi network was configured previously (creds stored in a file).

If configured, try to connect to the network for 10 seconds. If it couldn't connect, then switch to AP mode and start a lightHTTPd server listening on 192.168.0.1:80.

The only files it served was a simple index.html with some JS that called a bash script via CGI that used a openwrt bash library to scan and list the available wifi networks.

Then a HTML form to choose an SSID and enter the password, upon submit call another bash file to connect to the network (switch to client mode) with a timeout. If it fails, the bash would switch back to AP mode.

Polling in JS to check if the connection was successful (by checking if AP mode becomes active again)

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#23

Can this be used as a range extender if you use the same SSID and password for the access point as the net you're connecting to? Would other clients silently roam between the two (or more) networks using the same name and password?

I think it would need to spoof the same MAC as the original AP too.

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#24
post #9

Whatever happened to ad-hoc mode?

Not sure exactly what you're referring to, did the author explain in the past they rather want ad-hoc network setup or something? Otherwise, ad-hoc is different from AP+Client, as ad-hoc is only between two devices (at least from what I gather) while AP+Client would allow a distributed network where clients are interconnected.

I thought ad-hoc is N devices, optionally decentralized. This could emulate that.

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#25
post #14

A bit off topic: I'm looking for a project that starts with an AP. Once someone connected to it; it opens a web page to configure the client (choose which WIFI from a list, and type the password). It connects to the chosen WIFI and shuts down the AP. Anyone here did something similar to that?

This is basically what a chromecast does?

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#26

Has anyone noticed a shortage of Pi Zeros recently? It seems everywhere has run out of stock.

More time to tinker at home? Over the course of a couple weeks, I purchased four a two months back. A project I worked on inspired at least another person in my office to buy one.

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#27

Can this be used as a range extender if you use the same SSID and password for the access point as the net you're connecting to? Would other clients silently roam between the two (or more) networks using the same name and password?

I think it would need to spoof the same MAC as the original AP too.

No, the identification method of an extended service set is the SSID, aka the network name. Just set up the same SSID and password on both APs, and put them onto the same ip layer network. Your device will roam the networks automatically. Each AP should get its own MAC otherwise they will think packets sent to the other AP was meant for them. WiFi is robust enough to deal with noise like e.g. bluetooth, so it might survive it, but I doubt it'd support two STAs with the same BSSID communicating with each other.

https://en.wikipedia.org/wiki/Service_set_(802.11_network)

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#28
post #9

Whatever happened to ad-hoc mode?

ad-hoc in general runs a different path inside kernel module, which is normally not supported as well as AP/client mode, so, while many chips can do ah-hoc in theory, in software side it is a difference story

Re: Simultaneous AP and Client Mode Wi-Fi on Raspberry Pi Zero W

#30
post #29

I've looked at the links posted here and the repo but I fail to find what is the use case for this?

It could be used as a range extender, though not a very good one.

Probably a better use case would be connecting older devices like the Nintendo DS that don't support WPA2 to your network without forcing all of your other devices onto WEP.

Post reply on HN