Closed ipitio closed 2 years ago
Hi @ipitio
Thanks for contribution. Sorry for late reply i was never notified by github about this. Could you please ask a little bit more about what is the goal of it's PR.
I ask for that because this script is used every day in production in our devices and i need to be sure before merge anything.
Hi, sorry for not elaborating! The changes from rpi-wifi#26 may actually be outdated as per the latest commit. In hostapd.conf, the change to enable 802.11n and wmm may result in better speeds and the change to the wpa parameters fix syntax.
why use systemctl status hostapd instead of service??
service
is a wrapper for systemctl
so there isn't really a reason to use one over the other.
why add /sbin/ before each command?
If someone doesn't have PATH
set in the proper place, the current script will return "Command not found" errors. Prepending the full path (in this case /sbin
) to each command will prevent this.
There is a power save mode on Wifi on buster? I never see anything about this. It's turned on by default?
There is a power save mode, though I'm not sure whether it's turned on by default; you can check whether it's enabled for wlan0 with iw wlan0 get power_save
. If it is ever enabled for wlan0 or ap0, it may result in an unreliable connection, so it's best to make sure it's off.
Thx for reply @ipitio
I need to improve changes on my side. Have you push these modifications on you repo? Can i use it for testing the changes?
Just pushed the latest changes from #26, didn't test yet. The source given for those changes includes instructions for configuring a bridge between eth0 and ap0, which I can implement later.
@ipitio Ok so i can't merge for now i have to test it before but haven't the time for now too sorry.
@ipitio I executed your branch, but got the following error:
ap_sta_config.sh: line 244:DAEMON_OPTS: unbound variable
@ipitio I executed your branch, but got the following error:
ap_sta_config.sh: line 244:DAEMON_OPTS: unbound variable
This error seems to be caused by a leftover variable declaration from the previous version. I replaced the variables that were causing the error, and it seems to be working well for me so far:
$DAEMON_OPTS ${DAEMON_CONF}
and replace with /etc/hostapd/hostapd.conf
edit: I also made the changes @davidmurdoch suggested (ap0@wlan0
changed to ap@wlan0
, which occurs twice).
Thanks @akumpf! What did you replace the variables with?
@MkLHX @davidmurdoch I've also come across RaspAP and linux-wifi-hotspot, which may interest you.
@ipitio I updated my previous comment to be more explicit.
@MkLHX -- is there any doc/explanation around the ap_sta_cron.sh
script? I see it's commented out of this update. Is that something that just needs to be run/installed once? Or re-run after changes are made to the AP/STA parameters?
Thanks @akumpf! What did you replace the variables with?
@MkLHX @davidmurdoch I've also come across RaspAP and linux-wifi-hotspot, which may interest you.
Thank you. I know RasAP but it to more complex for my use case but it's a really good project. I don't know linux-wifi-hotspot i'll go to see that in depth.
@ipitio I updated my previous comment to be more explicit.
@MkLHX -- is there any doc/explanation around the
ap_sta_cron.sh
script? I see it's commented out of this update. Is that something that just needs to be run/installed once? Or re-run after changes are made to the AP/STA parameters?
cron job manager is script launch at the en of ap_sta_config.sh Stange behavior on raspberry pi doesn't allow me to edit crontab using ap_sta_config.sh so i split it i n 2 files and call the last at the end here
Also i have to repeat my post on september 2020 here: https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP/pull/3#issuecomment-918928508 i can't merge for now, i have to take the time to reveiw every edit from every peoples. Here this master version is used on @greenponik product so it's really touchy for me to merge withtout testing the edits and be sure the feature still work on our products. Also it miss some comments about why edition is submit so it's to hard to say "OK " i merge it.
@MkLHX @ipitio @davidmurdoch I also spotted a couple other things (like a reference to /bin/rpi-wifi.sh
, which this update no longer populates)... but also fixable.
What is super nice about this version:
Best approach might be to keep the existing scripts as-is, and create a new V2.x.x script (named ap_st_config2.sh
?) that uses this updated approach -- I'll create a new pull with an updated version as the new file. Then perhaps it can be merged in as a secondary/experimental script until it has more eyes on it.
@ipitio i merged https://github.com/MkLHX/AP_STA_RPI_SAME_WIFI_CHIP/pull/12 on master so i think i can close this PR. What do you think?
Yep!