cyoung / stratux

Aviation weather and traffic receiver based on RTL-SDR.
BSD 3-Clause "New" or "Revised" License
1.04k stars 358 forks source link

Not using edimax, 8812au instead, and sticks on bringing up wlan0 interface #830

Closed gettyhub closed 3 years ago

gettyhub commented 3 years ago
  1. Stratux version:1.6r1

  2. Stratux config:

    SDR

    • [ ] single
    • [X] dual

    GPS

    • [ ] yes
    • [X] no type:

    AHRS

    • [ ] yes
    • [X] no

    power source:phone charger

    usb cable:

  3. EFB app and version: (e.g., WingX Pro7 8.6.2)

    EFB platform: (e.g., iOS 9.2)

    EFB hardware: (e.g., iPad Mini 2)

  4. Description of your issue: Not using Edimax wireless adapter, or the resulting rtl871x driver.

While running systemd networking.service during bootup, hangs and never brings up network interface (wireless). Built aircrack 8812au driver from github for wireless adapter via USB, since there isn't a driver in the image. Wireless adapter works after the boot sequence is complete as long as the wireless adapter is removed from USB during boot sequence. After boot sequence, USB wireless adapter can be plugged in and stratux shows up, with hostapd in master/AP mode.

The culprit is the stratux-wifi.sh script. When run outside of the networking.service it works fine and brings up AP, but not necessary to do manually, just plug in after boot sequence is complete.

Making changes to the stratux-wifi.sh script to just start hostapd with a configuration file that would be produced in /tmp/hostapd.conf also either drops AP completely, or does not prevent hanging.

There was a suggestion something to do with ifup.

gettyhub commented 3 years ago

After poking around, I commented out the 'post-up stratux-wifi.sh' from /etc/network/interfaces.

Then I made my own (or just copied a hostapd.service) from another distro.

`[Unit] Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator After=network.target

[Service] ExecStart=/usr/bin/hostapd /etc/hostapd/hostapd.conf ExecReload=/bin/kill -HUP $MAINPID

[Install] WantedBy=multi-user.target `

Other than the edimax loop, this is the normal way of doing this since I'm not using edimax. Now I believe I have no boot stall.

Also, I tried the newer image with AHRS2 beta, and it told me on the same hardware as I'm running 1.6r1, that it didn't run stratux.service because of my cpu. So I had to run it with 1.6r1 in order for stratux.service to run.