Hello is it possible to add a setting in the network options/adapters to use while installing a software the wifi connection instead of the ethernet that the modem is connected,i have setup my wifi connection from there but it keeps asking for the ethernet to install a software,particular i wanted to install the Hotspot so the internal wifi of the raspberry pi 3 will be used as a hotspot and another external wifi to be connected to as client to another access point to have internet that i already had setup,i managed to install wifi hotspot software but upon boot it keeps searching for the ethernet, i dont have a modem anymore so its not possible to use the hotspot like this
I want Dietpi to install and use any software by wifi and not by ethernet only
@symbios24
Many thanks for your input.
At least currently when installing Hotspot, DietPi expects an Ethernet connection for internet access while the WiFi is reserved for the Hotspot. AFAIK there is no way to use a single WiFi adapter for both, as Hostpot and to connect to the internet as well.
There is a request to allow using WiFi-only as Hotspot, but then for a local-only network without any internet capability.
Another idea is to allow 2 WiFi adapters, one as Hotspot and one to connect the AP itself to the internet, which would then be something like a repeater setup.
€: Ah re-reading, I think this is what you actually want?
Generally I aim to make our network setup more flexible, so that you can configure each attached network adapter individually for a certain use, as default internet gateway, local network access only, or Hotspot.
yes that is what i want to allow 2 WiFi adapters, one as Hotspot and one to connect the AP itself to the internet
thanks
is it possible to do it manual for now before it can be added to dietpi pi?
I'm using this exact setup for years with excelent performance thanks to the wifi AC chip of the 3b+. I use an external usb wifi to connect to the access point, and internal wifi to serve my devices using the create_ap script with some optimisations that I can post on request.
The only problem is that I cannot go to the network adapter part of the dietpi-config, as it will reset the ap config and break the connection as internal wifi will be reseted to client.
My optimisations are as following:
Fast wifi AC up to 300 mbits / seconds
Firewall rules to create a real secure router (create_ap is a bit weak on this level)
Fireqos to get some qos
Switch to ethernet if wifi usb not present (in fact, selecting eth0 with create_ap will use usb wifi if available, and eth if not)
All this with pihole, kodi music, netdata and some java progam running in background
This is the create_ap conf with optimisations. The dns and dnsmasq are pihole, so not from create_ap, and this one uses wifi AC. Haveged is consuming too much cpu, and interace is eth0 as it will be replaced by usb wifi if present.
GATEWAY=192.168.99.100
SSID=Myssid
SHARE_METHOD=nat
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
CHANNEL=36
WPA_VERSION=2
ETC_HOSTS=0DHCP_DNS=1.1.1.1,8.8.8.8
DHCP_DNS=gateway
NO_DNS=1
NO_DNSMASQ=1
HIDDEN=0
MAC_FILTER=0
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
ISOLATE_CLIENTS=0
IEEE80211N=1
IEEE80211AC=1
HT_CAPAB=[MAX-AMSDU-3839][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]
VHT_CAPAB=[SHORT-GI-80][SU-BEAMFORMEE]
DRIVER=nl80211
NO_VIRT=1
COUNTRY=US
FREQ_BAND=5
NEW_MACADDR=
DAEMONIZE=0
NO_HAVEGED=1
PASSPHRASE=Secretpass
USE_PSK=0
This is the create_ap modified with bad scripting to put the rest of the parameters for the wifi. This part is important:
if [[ $IEEE80211AC -eq 1 ]]; then
echo "ieee80211ac=1" >> $CONFDIR/hostapd.conf
echo "obss_interval=300" >> $CONFDIR/hostapd.conf
echo "require_vht=1" >> $CONFDIR/hostapd.conf
echo "ieee80211h=1" >> $CONFDIR/hostapd.conf
echo "vht_oper_chwidth=1" >> $CONFDIR/hostapd.conf
echo "vht_oper_centr_freq_seg0_idx=$((${CHANNEL}+6))" >> $CONFDIR/hostapd.conf
echo "basic_rates=180 240 360 480 540" >> $CONFDIR/hostapd.conf
echo "disassoc_low_ack=0" >> $CONFDIR/hostapd.conf
fi
@thaihugo
Many thanks for sharing! 😃
Haveged is consuming too much cpu,
As you mention it. With v6.25 haveged will be installed on all DietPi systems. The reported issues without it are simply to drastic/critical, and became even worse since I think kernel 4.15 and some recent systemd update. Boot hangs, network hangs, service start timeouts and other things happen, that bad just for a small number of users, but potentially all systems can face them. For good reason it is at least mentioned in hostapd, since the demand of entropy raises much with this service. Half of the reported heavy problems due to empty entropy pool were in combination with hostapd up.
CPU usage is only there if cat /proc/sys/kernel/random/entropy_avail fails below the defined 1024 (KiB), so in case during early boot and when it is otherwise obviously required. Although if 1024 is a good boarder or not could be discussed. I did never face sudden drops > ~300 at least, so 512 could be sufficient in very most cases.
If empty entropy pool causes issues or not depends on how the software handles it. In the past this was often ignored by systemd/Debian but with recent versions they became stricter due to the security impact of missing/pseudo-random bits, which is why the issues became even more urgent on Buster system (network simply hangs before initial entropy has been filled).
Sorry to make this a topic here but since I am as well unhappy with the demand of an additional package+service, I am open for discussion/tuning or alternatives in case of other opinions or if someone simply has more experience/knowledge about this topic 😉: https://github.com/MichaIng/DietPi/issues/2806
@MichaIng I understand your problem, and I'll be happy to monitor this and report any fine tuning on the #2806.
The Haveged service overuse is more because of a constant loop in the script. My guess is that the batch implementation of Create_ap (not hostapd) cannot call the service to see if it has worked and any system wait in bash can be a cpu hog by itself.
So I would say that it's the Haveged call from create_ap script every 2 seconds that is a cpu hog.
@thaihugo
That cannot be. haveged is a passive daemon that cannot be interacted with, nor does it ship any other binary.
But I just checked the code... https://github.com/oblique/create_ap/blob/master/create_ap#L418-L438
That loop is a very bad implementation. The daemon itself already checks if entropy drops below the defined -w 1024 (default) argument and in case does it's job, and this in a muuuch more efficient way. These which, cat, pidof and in mutex_(un)lock external binary calls all there are a huge overhead. command -v, $(<file) and such bash internals should be used, which are tenth of times faster, if you already need to run a 2 seconds loop. But the whole loop is not required.
So yeah, totally reasonable to remove all that haveged part from create_ap then 👍. And seeing this I believe we will go with an own slim implementation to enable access points 😉. But until then, great to have such an alternative. Also the official one allows to skip all the haveged part by adding --no-haveged as command line argument.
Yes the script is a good starting point, but is too big where not needed and too small on important points.
If people want to use the same script before your own implementation on a 3b 2.4ghz device, here is the corresponding config which must be used with the official create_ap or my modification (I don't think I modified the 2.4 ghz part of the script.
Again, dns and dhcp (dnsmasq) done by pi hole, you must put them to 0 if you are not using it.
Also note that IOS will reject the dual band 2.4 ghz and force the router to a single band if you try a larger one.
GATEWAY=192.168.99.100
SSID=Yourssid
SHARE_METHOD=nat
WIFI_IFACE=wlan0
INTERNET_IFACE=eth0
CHANNEL=6
WPA_VERSION=2
ETC_HOSTS=0DHCP_DNS=1.1.1.1,8.8.8.8
DHCP_DNS=gateway
NO_DNS=1
NO_DNSMASQ=1
HIDDEN=0
MAC_FILTER=0
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
ISOLATE_CLIENTS=0
IEEE80211N=1
IEEE80211AC=0
HT_CAPAB=[MAX-AMSDU-3839][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]
DRIVER=nl80211
NO_VIRT=1
COUNTRY=US
FREQ_BAND=2.4
NEW_MACADDR=
DAEMONIZE=0
NO_HAVEGED=1
PASSPHRASE=Secretword
USE_PSK=0
hi when this will be added to dietpi? :WiFi Hotspot: Support for 2 WiFi adapters
@symbios24
I hope we can manage it for v6.26, however there are two other tasks to do first and it is a larger project since some deeper rewrite of our network setup needs to be done first.
This would be awesome.
I want to use one of my old Pi3Bs as a "travel router" with a built in VPN, pi-hole, etc. The goal is to be able to take it with me and when I get into a hotel, I connect to the hotel wifi with my Pi, which hosts as an accesspoint that is VPN'd to my home network.
@dequeant
There is this neat solution out there:
https://github.com/billz/raspap-webgui
Perhaps it could be incorporated in the fantastic diet-pi package in the future.
@snix47
Me aiming for a lightweight console-based solution, however if one wants a web UI, this is indeed pretty beautiful.
@snix47
Me aiming for a lightweight console-based solution, however if one wants a web UI, this is indeed pretty beautiful.
So, I´ve tried the raspap-webgui, it is pretty indeed, however on the diet-pi it does not wanna play, on standard raspberry it works just fine. The functionality though, with or without web is pretty freakin great, the pi acting as router with nat(ing) and a hotspot, perfect for hotels and travel. Myself I run a plex server and wifi hotspot on a pi for the kids pleasure (good in the car and hotels), I do miss the diet-pi beeing able to hookup to Internet via wifi or cable and nat that aswell over the wifi pi-hotspot.