YunoHost-Apps / hotspot_ynh

Wifi Hotspot app for YunoHost
GNU Affero General Public License v3.0
39 stars 19 forks source link

Testing #95

Closed alexAubin closed 1 year ago

Thatoo commented 2 years ago

Could it be merged? Since update to v2.0, only the internal wifi of the raspberry pi is working as hotspot. The panda usb wireless dongle is unfortunately useless...

alexAubin commented 2 years ago

We should be careful about other places where iw_devices is invoked to be consistent:

 $ grep -nr iw_devices ./
./scripts/_common.sh:15:function iw_devices()
./scripts/config:30:    if [[ $(iw_devices) == "" ]]
./scripts/config:79:    if [[ $(iw_devices) == "" ]]
./scripts/config:86:        for device in $(iw_devices | sed "s/,/ /g")
./scripts/install:133:wifi_device=$(iw_devices | awk -F\| '{ print $1 }')
./scripts/restore:106:wifi_device=$(iw_devices | awk -F\| '{ print $1 }')
./scripts/upgrade:167:wifi_device=$(iw_devices | awk -F\| '{ print $1 }')

@zamentur : do you know why in install/restore/upgrade we seem to be using | as a separator (which indeeds seems to corresponds to the code of iw_devices, but this PR assumes the separator to be , ?

alexAubin commented 2 years ago

@Thatoo : could you share the output of /sbin/iw dev | grep Interface ?

Thatoo commented 2 years ago

sure! Thank you Alex for taking some of your time to help me.

~ $ /sbin/iw dev | grep Interface
    Interface wlan1
    Interface wlan0

which seems to say that both devices are detected. If I disconnect the wireless usb dongle, only wlan0 remain.

However, when I go to hotspot settings, I don't have any choice, only one option with wlan1|wlan0 as explain in picture in here : https://github.com/YunoHost-Apps/hotspot_ynh/issues/91

Thatoo commented 2 years ago

We should be careful about other places where iw_devices is invoked to be consistent:

 $ grep -nr iw_devices ./
./scripts/_common.sh:15:function iw_devices()
./scripts/config:30:    if [[ $(iw_devices) == "" ]]
./scripts/config:79:    if [[ $(iw_devices) == "" ]]
./scripts/config:86:        for device in $(iw_devices | sed "s/,/ /g")
./scripts/install:133:wifi_device=$(iw_devices | awk -F\| '{ print $1 }')
./scripts/restore:106:wifi_device=$(iw_devices | awk -F\| '{ print $1 }')
./scripts/upgrade:167:wifi_device=$(iw_devices | awk -F\| '{ print $1 }')

@zamentur : do you know why in install/restore/upgrade we seem to be using | as a separator (which indeeds seems to corresponds to the code of iw_devices, but this PR assumes the separator to be , ?

You're awesome @alexAubin !!!!! with | it works! line 86 should not be changed from for device in $(iw_devices) to for device in $(iw_devices | sed "s/,/ /g") but to for device in $(iw_devices | sed "s/|/ /g")

ericgaspar commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:rocket: Test Badge