r/tinycorelinux • • Mar 14 '25

Still having issues with mediatek driver

As I mentioned in my previous thread I have a ralink antenna dongle with a mediatek mt7601u wifi chip. The driver for this is included in the firmware_mediatek.tcz extension. I know the dongle works with TC15, as a guy on r/netbsd actually made an image for me that works with my dongle and allows me to connect to the internet with TinyCore 15 using this dongle. However, when I install TC15 myself and install wifi support and the mediatek firmware and also the wlan firmware (because the image the helpful guy on the netbsd sub sent me also includes it), the driver simply refuses to load and dmesg reports errors registering the driver interface. I cannot connect to the wifi because wlan doesn't exist, because the driver isn't loaded.

I'm at my wits' end here. I have no idea why I can't get this driver to work from scratch on my own, even though the dongle is tested and guaranteed to work with TinyCore 15. Does anyone here have any ideas?

2 Upvotes

46 comments sorted by

View all comments

Show parent comment

1

u/DarthRazor Mar 24 '25

No worries. I've never had issues with any type of Ethernet NIC - cards or onboard.

Back around the 6.x days, I think it even worked with a steam powered 3Com 13-509 10-BaseT card, but don't quote me as my memory from back then is foggy ;-)

1

u/Huecuva Apr 20 '25

I finally found some motivation to tinker with this again. I think I've managed to successfully and consistently create a working install of TC with the wifi dongle. It appears that it needs both the firmware-wlan and the firmware-mediatek or my-firmware-mt7601u extensions. However, the firmware-wlan one must not be in the onboot list and whichever mediatek firmware is installed has to basically be the last thing in the onboot list.

I'm not sure why it is this particular configuration that works now. I'm pretty sure I've done this very thing before without success. However, I have now managed to break and then fix the wifi connection in TC as well as successfully switching back and forth between the firmware-mediak extension and your my-firmware-mt7601u extensnion.

The one thing I"m not sure yet how to do is make it connect to the wifi automatically on boot like your image does. I think Ii will have to examine the extlinux.conf file a little closer.

2

u/DarthRazor Apr 20 '25

Here are simple answers to your points.

All you need in onboot.lst for wifi extensions is: wifi.tcz my-firmware-mt7601u.tcz

in that order, nothing more. Don't add firmware-wlan.tcz - let the OS figure out the dependencies to load.

Also, use my firmware file. It's tailored for your card, and doesn't steal 15MB of your RAM with firmware for cards you do not have, plus your card might trigger similar firmware to load instead of the right one.

extlinux.conf has nothing to do with wifi. It's just for boot flags. Look inside /opt/bootlocal.sh or maybe /opt/bootlocal.sh (I can't remember which file I put it in). There will be a line near the bottom that connects to your wifi network at boot.

1

u/Huecuva Apr 20 '25

Okay. I was pretty sure I hadn't seen anything about connecting to wifi in extlinux.conf so it makes sense that it's not even in that file.

You named the same file twice there. If it's not in /opt/bootlocal.sh where would I find it? I will get around to poking at that probably tomorrow.

It seems to work just fine now consistently with the firmware-mediatek extension, but I will use yours to save the overhead. Space and memory are limited, after all.

2

u/DarthRazor Apr 21 '25

I just checked. Add the following line at the end of /opt/bootlocal.sh to get wifi to auto-connect at boot-up:

/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log

2

u/Huecuva Apr 21 '25

Excellent, that's perfect. The only thing I have to do now is generate a key so my wifi password isn't stored in plain text.

1

u/DarthRazor Apr 21 '25

It looks like wifi.sh gets its password from ~/wifi.db, which is in plain text. I don't know enough about wifi.sh to let it read an encrypted password.

1

u/Huecuva Apr 21 '25

I'll play around with it. It's been a couple of months since I last generated a wifi key or whatever it's called, so I will have to look up how to do it again, but I do know it's pretty easy to do. Hopefully I can just put the key in wifi.db and it will work just as the password. I guess I'll find out.

2

u/DarthRazor Apr 21 '25

Ok I just tried it and it works. Delete your existing wifi.db to clean up the old entry with your plain text password

Now you'll need your psk key. Run wpa_passphrase your-SSID , type in your plain text password and copy the key it spits out

Then run wifi.sh and when prompted for your passphrase, simply paste your psk key instead of your plain text password. Done!

2

u/Huecuva Apr 21 '25

Well, that'll save me having to look it up. Thanks. I was just going to open wifi.db and put the psk key in it, but I guess it's just as easy to do it that way. I will get to that later today or possibly tomorrow.

→ More replies