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

Having issues with your DietPi installation or found a bug? Post it here.
smogan71
Posts: 4
Joined: Thu Jan 14, 2021 9:57 am

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

Post 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.
User avatar
Joulinar
Posts: 4815
Joined: Sat Nov 16, 2019 12:49 am

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

Post 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.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
smogan71
Posts: 4
Joined: Thu Jan 14, 2021 9:57 am

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

Post 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?
User avatar
Joulinar
Posts: 4815
Joined: Sat Nov 16, 2019 12:49 am

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

Post 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??
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3014
Joined: Sat Nov 18, 2017 6:21 pm

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

Post 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
smogan71
Posts: 4
Joined: Thu Jan 14, 2021 9:57 am

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

Post 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 1390 times
User avatar
Joulinar
Posts: 4815
Joined: Sat Nov 16, 2019 12:49 am

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

Post 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.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3014
Joined: Sat Nov 18, 2017 6:21 pm

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

Post 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
User avatar
Joulinar
Posts: 4815
Joined: Sat Nov 16, 2019 12:49 am

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

Post by Joulinar »

@MichaIng
Means we would need to check for the availability of a service file and if not present, create our own one
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3014
Joined: Sat Nov 18, 2017 6:21 pm

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

Post 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.
Post Reply