TinkerBoard / tinkerboard.github.io

0 stars 0 forks source link

Tinkerboard R2.0 (S) WiFi Hotspot not working #1

Open cloud4every1 opened 1 month ago

cloud4every1 commented 1 month ago

Tried several versions of Tinker_board-Devian-Buster-v3.0.(27,23,6) but on non of them I can create a Hotspot that a device can connect to.

journal shows when I try to connect to the Tinkerboard (cell phone, tablet):

May 21 17:12:55 linaro-alip hostapd[2296]: Configuration file: /etc/hostapd/hostapd.conf May 21 17:12:55 linaro-alip hostapd[2296]: Could not open configuration file '/etc/hostapd/hostapd.conf' for reading. May 21 17:12:55 linaro-alip hostapd[2296]: Failed to set up interface with /etc/hostapd/hostapd.conf May 21 17:12:55 linaro-alip hostapd[2296]: Failed to initialize interface May 21 17:12:55 linaro-alip systemd[1]: hostapd.service: Failed with result 'exit-code'. May 21 17:12:55 linaro-alip systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator. May 21 17:12:57 linaro-alip systemd[1]: hostapd.service: Failed to add inotify watch descriptor for control group /system.slice/hostapd.service: No space left on device

And yes it is right, there is no hostapd.conf file

The corresponding configuration file looks like:

[connection]
id=Wi-Fi connection 1
uuid=b7ab776a-8ca0-423b-95e9-144866dd366a
type=wifi
interface-name=wlan0
permissions=

[wifi]
band=bg
cloned-mac-address=stable
mac-address=B4:8C:9D:E1:23:0D
mac-address-blacklist=
mode=ap
ssid=XXXXXXXXX_00000W0

[wifi-security]
key-mgmt=wpa-psk
psk=XXXXXXXXX_00000W0

[ipv4]
address1=192.168.137.2/24
dns-search=
method=shared

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=shared

How can this be fixed on the R2 boards?? boardinfo shows:

cat /proc/boardinfo
Tinker Board S R2.0

Many thanks for your help!

asusiot commented 1 month ago

Hello @cloud4every1

please follow the steps to set up the Wi-Fi hotspot:

  1. Update packages and then install dnsmasq & hostapd package: sudo apt-get update sudo apt install dnsmasq hostapd
  2. Unzip SoftAP.zip: For Tinker Board (S) SoftAP_debian10_20220127.zip
  3. Open terminal and go to SoftAP folder, then execute the command line: chmod 755 Enable_SoftAP.sh Disable_SoftAP.sh
  4. Enable SoftAP mode: ./Enable_SoftAP.sh

    default SSID = TinkerSoftAP

    default Password = 87654321

    Disable SoftAP mode:

./Disable_SoftAP.sh

  1. You can modify /etc/hostapd/hostapd.conf for your own softap settings. For example:

ssid=TinkerSoftAP

wpa_passphrase=87654321

channel=6

For MAC address access-list 
0 = accept unless in deny list, deny_mac_file is used to specify deny list. 
1 = deny unless in accept list, accept_mac_file is used to specify accept list. 
macaddr_acl=1 

Accept/deny lists are read from separate files (containing list of # MAC addresses, one per line). accept_mac_file=/etc/hostapd/hostapd.accept deny_mac_file=/etc/hostapd/hostapd.deny

After modify hostapd.conf, you need to disable / re-enable softap again.

reference: Tinker Board S R2.0 & R2.0, Tinker Board & S · TinkerBoard/TinkerBoard Wiki (github.com) (1.11 How to set WIFI as a Hotspot)

cloud4every1 commented 3 weeks ago

Hello ASUSIOT

Many thanks for this very helpful description and sorry for the long delay of response.

I tested it and it works as described.

Problem seems that it works fine until I reboot the board. After this the WLAN access point is gone and I have to disable and re enable SoftAP.

Is there a way to make this configuration persistent??

Many thanks for your help!!

Gerold :-)

On 22.05.2024, at 08:36, asusiot @.***> wrote:

Hello @cloud4every1 https://github.com/cloud4every1 please follow the steps to set up the Wi-Fi hotspot:

Update packages and then install dnsmasq & hostapd package: sudo apt-get update sudo apt install dnsmasq hostapd Unzip SoftAP.zip: For Tinker Board (S) SoftAP_debian10_20220127.zip https://github.com/TinkerBoard/TinkerBoard/files/8107749/SoftAP_debian10_20220127.zip Open terminal and go to SoftAP folder, then execute the command line: chmod 755 Enable_SoftAP.sh Disable_SoftAP.sh Enable SoftAP mode: ./Enable_SoftAP.sh default SSID = TinkerSoftAP

default Password = 87654321

Disable SoftAP mode:

./Disable_SoftAP.sh

  1. You can modify /etc/hostapd/hostapd.conf for your own softap settings. For example:

ssid=TinkerSoftAP

wpa_passphrase=87654321

channel=6

For MAC address access-list 0 = accept unless in deny list, deny_mac_file is used to specify deny list. 1 = deny unless in accept list, accept_mac_file is used to specify accept list. macaddr_acl=1 Accept/deny lists are read from separate files (containing list of # MAC addresses, one per line). accept_mac_file=/etc/hostapd/hostapd.accept deny_mac_file=/etc/hostapd/hostapd.deny

After modify hostapd.conf, you need to disable / re-enable softap again.

reference: Tinker Board S R2.0 & R2.0, Tinker Board & S · TinkerBoard/TinkerBoard Wiki (github.com) https://github.com/TinkerBoard/TinkerBoard/wiki/Tinker-Board-S-R2.0-&-R2.0,-Tinker-Board-&-S#111-how-to-set-wifi-as-a-hotspot (1.11 How to set WIFI as a Hotspot)

— Reply to this email directly, view it on GitHub https://github.com/TinkerBoard/tinkerboard.github.io/issues/1#issuecomment-2123981372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJU2MU45RYJHBHPSKBNAUDZDQ4IDAVCNFSM6AAAAABICBMA6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRTHE4DCMZXGI. You are receiving this because you were mentioned.

asusiot commented 5 hours ago

hello @cloud4every1

you will need to re-execute the script each time after reboot for the settings to come effective; or you can either add the .sh to rc.local or add it as a service so the configs are kept after reboot