Page 1 of 2

rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 10:02 am
by smogan71
Trying to install WIFI Hotspot. Always getting the error message:

Unable to locate package hostapt-realtek
Screenshot 2021-01-14 095935.png
Tried it a couple of times within the last five days. Always the same error message.

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 11:21 am
by Joulinar
Hi,

many thanks for your message. Looks like the apt package hostapt-realtek is not available or even exist. It's specifically added for Realtek RTL8188C* device.

@MichaIng
Pls can you have a look.

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 11:58 am
by smogan71
Joulinar wrote: Thu Jan 14, 2021 11:21 am @MichaIng
Pls can you have a look.
I found out there is a package aviable by the name hostapd-realtek, but not hostapt-realtek aviable like the script tries to install. I guess a typo in the filename or in the installation script?

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 12:14 pm
by Joulinar
could be. Once you hit by the error you get an error handle screen. There you have a possibility to change command. Can you try to change to hostapd-realtek and see if it is working??

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 12:24 pm
by MichaIng
Indeed a typo, many thanks for reporting it! I wonder how this could have survived so long as it's there for a few version already. Probably because of the rare combination with RTL8188C* WiFi chips and Armbian-based images (user counts) :roll:.
Fixed for v6.35: https://github.com/MichaIng/DietPi/comm ... c6b84699d7
Changelog: https://github.com/MichaIng/DietPi/comm ... 4b545d87f5

Quick fix:

Code: Select all

sed -i 's/hostapt-realtek/hostapd-realtek/' /boot/dietpi/dietpi-software

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 2:52 pm
by smogan71
Joulinar wrote: Thu Jan 14, 2021 12:14 pm could be. Once you hit by the error you get an error handle screen. There you have a possibility to change command. Can you try to change to hostapd-realtek and see if it is working??
This worked so far. WIFI Hotspot installs and is aviable in config after reboot. Now there is an other problem when I try to start the hotspot.

Screenshot 2021-01-14 144948.png
Screenshot 2021-01-14 144948.png (28.49 KiB) Viewed 1726 times

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 3:12 pm
by Joulinar
hi can you try to typ on command line systemctl status host and than use TAB to autocomplete the line. Probably it will give something.

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 9:31 pm
by MichaIng
Interesting, the package does not contain any service file. Please do the following (can be done from sub shell from the error prompt as well):

Code: Select all

cat << '_EOF_' > /etc/systemd/system/hostapd.service
[Unit]
Description=Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
After=network.target

[Service]
Type=forking
PIDFile=/run/hostapd.pid
Restart=on-failure
RestartSec=2
Environment=DAEMON_CONF=/etc/hostapd/hostapd.conf
EnvironmentFile=-/etc/default/hostapd
ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}

[Install]
WantedBy=multi-user.target
_EOF_
systemctl daemon-reload

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 9:59 pm
by Joulinar
@MichaIng
Means we would need to check for the availability of a service file and if not present, create our own one

Re: rock64 -> wifi-hotspot -> Unable to locate package hostapt-realtek

Posted: Thu Jan 14, 2021 11:43 pm
by MichaIng
Yes, at least when this package is installed. Although I recognised that the regular hostapd package from Armbian repo as well does not contain a systemd unit (like the Debian package) but an init.d service at least. To assure that we have the same service file in all cases, probably we should install it in every case if /lib/systemd/system/hostapd.service is not present at the end of WiFi Hotspot install step.