Raspberry pi 0 w as Repeater

Ok, that is the AP

Then you able to sta also ?

yeah, i can ping google.com and other things on my network from the pi zero

Ok, what the contents of /etc/config/wireless at this point ?

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/soc/20300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'HT20'
        option disabled '0'
        option country '00'
        option legacy_rates '1'

config wifi-iface
        option network 'wwan'
        option ssid 'myWifi'
        option encryption 'psk2'
        option device 'radio0'
        option mode 'sta'
        option bssid '88:90:8D:43:E9:A3'
        option key 'myPassword'

so you cant see the other network with the ap here since i created and set it up manually.

Ok, yes

Well changes to working 18.06.8 has broken features to run simultaneously sta and ap ?

I just got it working on 19.07.3. I'll try again on a snapshot in a few mins.

Also i had a typo in the post with the commands, idk if you were following them, but i fixed it now.

1 Like

Ok, good

Im using my Raspberry Pi Zero W with a I2S audio dac to stream HD music

yup, I was able to get my way to work on the latest snapshot as well...

The problem of getting this working properly with the web interface remains. The fact that I can set it up like this means to me that it must be possible and there's either some bug with OpenWRT or that I am configuring something wrong.

yes, the ap part or the order ?

well keep your notes

i'm sorry, idk exactly what you mean.

My problem is that if I go through the web interface or even directly modify /etc/config/wireless ap+sta does not work and it keeps going between blocking and all that; however, if i use wpad hostapd I can do ap+sta.

At this point I can just make a bash script to do this, but i do not think that is an optimal solution.

ok, it could be the web interface is not bringing up a virtual access point the same way the command line is

sounds possible. My problem with editing source for this is that it's taken me atleast an hour everytime i build an image and I am not familiar enough with this stuff to easily identify where the problem is and how to fix it.

I guess this could be my only option though.

Do you think the problem could have to do with it running hostapd directly on boot instead of wpad hostapd?

like if i run ps after booting I will see an entry /usr/sbin/hostapd -s -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf

not sure,

but you can compare /var/run/hostapd-phy0.conf with your command line
if you setup ap via web interface

Do you have more than Pi zero ?

at a glance i thought this looked fine, but i tried running with wpad hostapd with this as the conf file and it didnt work.

/var/run/hostapd-phy0.conf

root@OpenWrt:~# cat /var/run/hostapd-phy0.conf
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
hw_mode=g
beacon_int=100
channel=11

noscan=1

ieee80211n=1
ht_coex=0
ht_capab=[SHORT-GI-20][DSSS_CCK-40]

interface=wlan0-1
ctrl_interface=/var/run/hostapd
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
auth_algs=1
wpa=0
ssid=myNotUncoolSSID
start_disabled=1
bssid=ba:27:eb:e3:59:ee

also, i have an linksys ea6200, but it's unclear how well it supports OpenWRT.

have a look at how this script works

Here is a more in depth howto how todo it in OpenWRT
https://openwrt.org/docs/guide-user/network/wifi/guestwifi/guest-wlan

Welp I had already read the guest thing, but regardless those don't really tackle the problem of it not working automatically.

I've learned that I can also get AP+STA working with just hostapd, also for the conf file I've started just copying /var/run/hostapd-phy0.conf but removing the lines with ctrl_interface and start_disabled.

For now I'm just using a bash script that starts my second hostapd instance on startup and then restarts it whenever it detects an issue. I would really like to resolve the core issue here rather than just working around it like I am, but I'm running out of ideas.

Well i figured out how to "fix" the issue.

edit /lib/netifd/hostapd.sh such that it doesn't start wpa_supplicant connected to the hostapd interface. IDK why exactly this is a problem and I would expect that you would want them to communicate, but I've got it working pretty consistently sooooo...

to make that edit i just used vi, opened /lib/netifd/hostapd.sh, commented out the line in wpa_supplicant_run() that contained "$@", and deleted the backslash on the preceding line.

Now travelmate even works. although i had to make some changes to make it handles changing wifi channels cleanly.

hey @markbirss , sorry to bother you again, but do you know what I would have to change in the OpenWRT source so that a newly built image would load the g_ether module?

thanks

i think here, so subsequent build it will be used ?

./build_dir/target-arm_arm1176jzf-s+vfp_musl_eabi/root-bcm27xx/etc/modules.d/54-usb-dwc2
./build_dir/target-arm_arm1176jzf-s+vfp_musl_eabi/root-bcm27xx/etc/modules-boot.d/54-usb-dwc2