WiFi on LePotato - Debian 12

I come from the Pi world, but they’re still WAY overpriced and impossible to find. I’m currently writing some software that needs to be displayed on TVs & the Pi 0 doesn’t have enough horsepower to display scrolling text without jerking horribly (which is utterly ridiculous IMO), plus getting a browser running in kiosk mode was much much much more involved than it should be… eventually just gave up.

Happened across the LibreComputer LePotato board when shopping for something else on Amazon a couple weeks ago and decided to give it a shot. Number of the board I bought is AML-S905X-CC. The one I bought came with a MT7601U USB wifi dongle, which was supposed to be plug & play.

Power adapters tried have been the CanaKit 3amp adapters I’ve used with Raspberry Pi boards, an Apple 2.4amp USB charging adapter, and a generic no-name power brick. There has been no difference between any of them.

I downloaded debian-12-base-arm64+aml-s905x-cc.img from the LibreComputer page, wrote it to a Samsung micro SD card, and watched it boot. Logged in as root, changed the password, and at this point got stuck.

There is no device node for the wifi dongle in /dev. The dmesg said that the system was renaming it from wlan0 to wlx, but there was nothing starting with wlx in /dev either. After much frustration, I noticed that I had to reset the password on every boot… little troubleshooting revealed that nothing I did was written to the card. :confused: Dug out another card - ironically this one a PNY brand - and it’s functioning how one would expect. :laughing:

Unfortunately, while files written are now saved to the card, I still cannot do anything wifi-related. The information you would expect is written to the /sys/class/net/wlx files. ‘wpa_cli’ complains that it cannot connect to wpa_supplicant and is then stuck retrying indefinitely. ‘iw list’ shows the device and ‘iw dev wlc info’ spits out basic information about it, but I’ve been unable to get it to actually connect to anything. (Not helping is that net-tools doesn’t seem to come with the OS image, so no ifconfig :frowning_face: )

I’ve found references online to some people needing to modify the source code for the driver to disable calibration & recompile, but those are from 2012-2016. (Plus, you need to download a bunch of stuff to do this & I don’t have network access without wifi so it’s a catch-22.)

Looked around in my boxes of computer stuff and found a Rosewill RNX-N150HG USB wifi dongle, which has an Atheros chipset. Plugged this in and am in the same exact situation, so seriously doubt it’s a driver issue.

Admittedly, I’ve never configured wifi on linux without ifconfig & iwconfig, so this could easily be something stupid I’m doing or not doing… commands I’m trying to use are ‘ip link set wlx up’ followed by ‘iw wlx connect’ (taken from stack exchange). Unfortunately, nothing works with either adapter.

Anyone have any tips or tricks that I could use to get one of these dongles working? Frankly, I’d like to get the one that came with the board functioning as it’s physically MUCH smaller than the Rosewill (which is nearly as big as the board!), plus it’ll be easier to just order another kit like I bought for each of the screens I’m going to end up needing to drive.

Thanks in advance.

Here’s a detailed update in case anyone finds this thread in the future:

The download page for the image has instructions on how to configure WiFi - I did not scroll down far enough. :man_facepalming: I followed that, some of which worked and some of which did not. There are also steps missing from that page which are required to get the network connection working as one would expect, at least in my case using Debian 12 base.

I edited /etc/systemd/network/10-wlx-dhcp.network as described on the download page:

  [Match]
  Name=wlx*
  
  [Network]
  DHCP=yes
  IgnoreCarrierLoss=3s

Continuing those directions:

  ip link show
  systemctl enable iwd
  systemctl start iwd
  systemctl daemon-reload
  networkctl reload
  iwctl station wlx<MAC> scan

Unfortunately, this resulted in a ‘Station not found’ or similar message - I didn’t record the exact error message. I played with this for a while, trying different things, and wasn’t able to get anything more out of it. Eventually, I executed the microsoft fix - turned it off and back on again while crossing my fingers. After it came back up:

ip link show
iwctl station wlan0 scan
iwctl station wlan0 get-networks
iwctl station wlan0 connect "my ssid"

Yes - the system stopped changing the interface name from wlan0 to wlx and just left it as wlan0. (Which is much more convenient than having the full MAC as part of the interface name anyway, particularly when typing on a Logitech K400+. :laughing: ) I was prompted to enter the wifi password & after this, the access point showed the device being connected. :slight_smile: I do not know what else needed to be reset in order to get it working without a full reboot - I really do not care much for the overly convoluted systemd.

Unfortunately, there was no network connectivity at all, either by name or IP. At this time, I was past what the directions said to do & since it’d been a week since I created this thread and not gotten any response at all, I figured I was on my own to find a solution. Not having ifconfig available, I took a guess and was right - it simply wasn’t requesting an address via DHCP, despite being told to in the network config file. I ran:

  dhclient

The board immediately got an IP & could ping by IP, but not name, even though /etc/resolv.conf had our DNS servers provided by DHCP in it. Rebooted again and it still didn’t request an IP. Thinking it might be due to the system no longer renaming wlan0 to wlx & the config file set up to reference wlx, I renamed /etc/systemd/network/10-wlx-dhcp.network to /etc/systemd/network/10-wlan0-dhcp.network & changed the Name= line to wlan* instead of wlx*. Actually, I tried many things during this time, rebooting between each change - nothing worked to make dhclient fire after the wifi connected. Found a post about this on a different forum and edited /etc/network/interfaces:

  #bunch of comments here
  source /etc/network/interfaces/interfaces.d
  auto wlan0
  iface wlan0 inet dhcp

After a reboot, dhclient fired and the board got an IP address automatically. My hunch is that the /etc/systemd/network/10-wlan0-dhcp.network file doesn’t matter, but I did not go back and test this. However, even though I could connect by IP, there was still no name resolution happening. After a bunch more searching and tested, I edited /etc/nsswitch.conf by changing one line:

  hosts files resolve dns myhostname

Originally, this was

  hosts files resolve [!UNAVAIL=return] dns myhostname

That’s right - just removed the [!UNAVAIL=return] portion of the line. POOF - the network started working how you’d expect! :slight_smile:

Unfortunately, that wasn’t the end of the problems. apt update returned:

  Certificate verification failed: The certificate is NOT trusted.  The certificate chain uses not yet valid certificate.  Could not handshake: Error in the certificate verification. [IP: 192.53.162.101 443]
  E: Release file for http://deb.debian.org/debian/dists/bookworm/InRelease is not valid yet (invalid for another 219d 20h 28min 40s). Updates for this repository will not be applied.

Found that the system date was set to January 2024 & NTP didn’t work with the NTP server sent with the DHCP response. I set the time manually & tried again, but got more errors blocking the update. Light bulb finally went off and I used:

timedatectl set-timezone <my time zone description>

This set the time zone correctly. Having a functional network, I installed & set up openntpd so I didn’t have to worry about the time again… apt complained about something (which I neglected to write down :confused: ), but it worked. :slight_smile:

Overall, this was a lot more complex than it really should have been. In my opinion, a basic software tool should be built that would do all this for the user, similar to raspi-config in the pi world. Hope this write-up helps someone get networking operational in the future.

okay with the wifi have you by chance tried installing the network-manager? This what i install after updating from cli. I first always setup my Potatoes connected to lan first. I have found it the easiest IMO.

The issue is NTP. First boot via ethernet and let NTP sync. Then do wireless.