Is it possible to have the Moodlebox use a USB WiFi adapter as the access point?

My Raspberry pi is in a metal case with a power control board on top, which masks the internal WiFi.

I would therefore like to use a USB WiFi adapter (wlan1) instead of the internal (wlan0) for the access point.

Thank you

  • Nicolas replied to this.
  • Hi Nicolas

    Finally got the USB WiFi adapter working

    I disabled the built in WiFi by adding 'dt-overlay=pi3-disable-wifi' in /boot/config.txt, which then made the USB dongle wlan0

    However I was not able to connect to the WiFi AP, as I could not obtain an IP address, so had to do the following as well

    I had to disable the virtual interface by changing KERNEL==""phy0" to "phy1" so that it did not bind to the USB dongle

    I then changed the interface in /etc/dnsmasq.conf to wlan0.

    I can now connect to the AP and log into Moodlebox on the Raspberry Pi

    I obviously don't know if you have come across this before but, on boot, I see an error [FAILED] Failed to start dnsmasq, although this is actually working as it is shown as active when using 'systemctl status dnsmasq.service'

    The error was also being reported when using the internal WiFi before I added the USB dongle

    I am running Moodlebox an a Raspberry pi 4 B

    Thank you for you help

    It is possible, but you'll need to configure it yourself: MoodleBox cannot support out of the box all USB wireless adapters out there.

    You should first make sure your USB adapter functions correctly with your RPi (be aware: not all WiFi adapters work!).

    Then you'll have to adapt MoodleBox to use your USB adapter as an access point. This involves editing several files:

    • /etc/udev/rules.d/90-wireless.rules
    • /etc/dhcpcd.conf
    • /etc/hostapd/hostapd.conf

    Good luck!

    Colinm001 I would therefore like to use a USB WiFi adapter (wlan1) instead of the internal (wlan0) for the access point.

    I'd forgotten to note this: as of MoodleBox version 4.0.0 (and later), the access point works on a virtual interface uap0 (no more wlan0), and this is configured in the above mentioned /etc/udev/rules.d/90-wireless.rules file.

    Hi Nicolas

    Thank you for the information. I will let you know how I get on.

    Just trying to understand the dhcpcd details at the moment

    Colin

    Hi Nicolas

    Finally got the USB WiFi adapter working

    I disabled the built in WiFi by adding 'dt-overlay=pi3-disable-wifi' in /boot/config.txt, which then made the USB dongle wlan0

    However I was not able to connect to the WiFi AP, as I could not obtain an IP address, so had to do the following as well

    I had to disable the virtual interface by changing KERNEL==""phy0" to "phy1" so that it did not bind to the USB dongle

    I then changed the interface in /etc/dnsmasq.conf to wlan0.

    I can now connect to the AP and log into Moodlebox on the Raspberry Pi

    I obviously don't know if you have come across this before but, on boot, I see an error [FAILED] Failed to start dnsmasq, although this is actually working as it is shown as active when using 'systemctl status dnsmasq.service'

    The error was also being reported when using the internal WiFi before I added the USB dongle

    I am running Moodlebox an a Raspberry pi 4 B

    Thank you for you help

      First of all, thanks for your feedback!

      Colinm001 I obviously don't know if you have come across this before but, on boot, I see an error [FAILED] Failed to start dnsmasq, although this is actually working as it is shown as active when using 'systemctl status dnsmasq.service'

      I'll check this and report here.

      2 months later

      I have the same issue exactly as above - I see an error [FAILED] Failed to start dnsmasq, although this is actually working as it is shown as active when using 'systemctl status dnsmasq.service'. I am also having wifi issues and wonder if this is related

      I've yet to test this 😅 . Sorry for the delay.

      10 days later

      No issue at all. Thanks for the help. James