Ralink driver issues mt7 dongle plz help!!

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Ralink driver issues mt7 dongle plz help!!

Postby nadielaya7 » 2017-11-03 18:53

Hello and thanks to all who read and even more to those who answer! =)

I had my Ralink USB Wifi Adapter (148f:760b Ralink Technology, Corp. MT7601U Wireless Adapter) working fine for 1 year approximately (which is the sum amount of time ive been using linux) until latest debian updates. Now it is unable to make because of the kernel apparently.

I got the latest debian stable and it was not being able to make because of some weird pointer issue at make time.


I had used the mtu drivers from https://github.com/art567/mt7601usta.git to make and make install but it is failing after latest debian updates. I believe those are the official drivers themselves.Why aren't they working anymore? I heard the drivers somehow got sort of incorporated into net-tools or something, Ive heard many things about how they are now deprecated or whatever, and about how it should just be working with no need to install outside drivers. Anyway,What is the official correct way to install my ralink usb dongle now? I tried many things online to get it working again, none of them have been able to get it to work again. What changed?

This adapter has been my greatest hurdle with debian I think, as well as Wine and certain wine versions working with certain software versions of this or that application.

Everything else is better than everything else Ive tried.

Below are the actual instructions I keep in a txt file about how to get the ralink usb adapter to work. These instructions are not working anymore as of like 1 month ago's latest round of debian upgrading. (I Update my debian version as fast as they come up with new ones, probably because I don't understand how just updating from inside the previous versions works right.

I tried the official ralink firmware package from apt get and it is not working either. I will try to install another debian version and see if I can get it to work somehow. This is really really annoying as it gets to the connecting phase with the ralink firmware apt get package, and is unable to actually get from connecting to connected. Ive had ti at this level also by messing around fixing the pointer issue with some line of code from the ubuntu forums which Ive included at the end of this message in the instructions I have always used to install this dongle.

///////////////////
RALINK EMABLING WIFI HOTSPOT:
apt-get install build-essential
to be able to make

uname -r the headers then
apt-get install linux-headers-4.2.0-1-amd64 or linux-headers-3.16.0-4-amd64 for jess
to be able to make


apt-get install wireless-tools
enables iwconfig

"vendor driver" from github:https://github.com/porjo/mt7601 (THIS REPO IS DEAD AS OF LATE AND ITS NOW THE ART ONE THAT KEEPS THE DRIVERS AT https://github.com/art567/mt7601usta.git)
make
make install
make clean

should work now.

if it does not want to make, because of the pointer issue /home/l0l/Downloads/mt7601-master/src/os/linux/../../sta/sync.c:2182:12: error: passing argument 8 of ‘StaAddMacTableEntry’ from incompatible pointer type [-Werror=incompatible-pointer-types]
do this:
My solution:( ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter) ./os/linux/Makefile.6: add line as below EXTRA_CFLAGS += -Wno-incompatible-pointer-types -Wno-date-time
//////////////////////////////

THANKS A TON!!! This is SUPER urgent.
nadielaya7
 
Posts: 23
Joined: 2016-10-15 20:43

Re: Ralink driver issues mt7 dongle plz help!!

Postby Head_on_a_Stick » 2017-11-03 19:00

That chipset was supported from kernel 4.2, apparently:

https://wikidevi.com/wiki/MediaTek_MT7601U

So that's either stable, testing/unstable or oldstable+backports.

I think you also need firmware-misc-nonfree.
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6673
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Ralink driver issues mt7 dongle plz help!!

Postby shep » 2017-11-03 20:27

I'm using one of these in Slackware-current - it is one of the few Linux based distros that will work on a Via C3 cpu.

Some history regarding the driver. RaLink typically released chipset specifications which allowed Linux/BSD to write good quality drivers. RaLink also allowed firmware to be distributed with Linux/BSD installation images.

MediaTek purchased Ralink around 2012 and the work on the MT7601u chipset transitioned to MediaTek. MediaTek wrote their own code for Linux which was felt to be of poor quality. The OP's link to the driver is a patched version of MediaTek's code.

LInux developers wrote their own driver from scratch and it is available from Kernel 4.2+ There are also some kernels that have the backported driver. The linux code is a better driver and, outside of not attaching the driver on a warm boot, works well for me.

To summarize: In Debian 9, all you need is the firmware and with it you should see the device in
Code: Select all
# lsmod
# lsusb
# dmesg
# iwconfig
shep
 
Posts: 130
Joined: 2011-03-15 15:22

Re: Ralink driver issues mt7 dongle plz help!!

Postby nadielaya7 » 2017-11-04 02:20

I just reinstalled afresh stable stretch release (latest version), however I used the 658 mb CD version instead of the DVD one because I've got some bandwidth restrictions right now.

this is my sources list:
///////////////////////
#

# deb cdrom:[Debian GNU/Linux 9.2.1 _Stretch_ - Official amd64 xfce-CD Binary-1 20171013-13:08]/ stretch main

# deb cdrom:[Debian GNU/Linux 9.2.1 _Stretch_ - Official amd64 xfce-CD Binary-1 20171013-13:08]/ stretch main

# Line commented out by installer because it failed to verify:
deb http://security.debian.org/debian-security stretch/updates main
# Line commented out by installer because it failed to verify:
deb-src http://security.debian.org/debian-security stretch/updates main

# stretch-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://deb.debian.org/debian/ stretch-updates main
deb-src http://deb.debian.org/debian/ stretch-updates main
/////////////
So all Ive done with my fresh install is remove the comment from the following lines:
deb http://deb.debian.org/debian/ stretch-updates main
and
deb-src http://deb.debian.org/debian/ stretch-updates main

I also tried apt-get update after decommenting out these lines. Everything else is just a fresh install. And ive done absolutely nothing else to this installation because I want to get this right.

Everything else is just normal. It is unable to find anything in apt -get , however it was able to update with apt-get update. I have not tried downloading the ralink firmware or any other package at all because that would imply me fiddling around with the sources list and I Want the perfect recommendations from the experts here because I really need to get this right.

What is the correct way to point my sources list to the exact place where the correct firmware package is? I really need help with the sources list so that its as correct as possible, Ive had issues with it in the past. How exactly should I alter it so that this works perfectly? Please advise on this .

Right off the bat, however, I ran dmesg lsusb,lsmod and iwconfig to test and these are the results:

lsusb detects it:
Bus 003 Device 002: ID 148f:760b Ralink Technology, Corp. MT7601U Wireless Adapter

lsmod implies that there is something working with it :
lsmod sais:
cfg80211 589824 2 mac80211,mt7601u

Dmesg sais:
[ 7.415263] mt7601u 3-3:1.0: ASIC revision: 76010001 MAC revision: 76010500
[ 7.415752] mt7601u 3-3:1.0: firmware: failed to load mt7601u.bin (-2)
[ 7.415855] mt7601u 3-3:1.0: Direct firmware load for mt7601u.bin failed with error -2
[ 7.416103] mt7601u: probe of 3-3:1.0 failed with error -2
[ 7.416127] usbcore: registered new interface driver mt7601u

iwconfig sais command not found as it is a fresh install. i believe I need to install net-tools for that.


What I would do in a desert island is just put some standard debian things in the sources and just try downloading the firmware and the misc package . Should I just do that?
Id just add
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free

deb http://security.debian.org/ stretch/updates main contrib non-free
deb-src http://security.debian.org/ stretch/updates main contrib non-free

as per https://wiki.debian.org/SourcesList

Is this the best way to do my sources.list file right now? I just want the standard official repos but Im not sure how to go about it.Just delete everything in it except the cdrom and add that?
Thanks again a lot for helping out.
nadielaya7
 
Posts: 23
Joined: 2016-10-15 20:43

Re: Ralink driver issues mt7 dongle plz help!!

Postby dilberts_left_nut » 2017-11-04 03:26

Yes, but you don't need the deb-src lines.
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4691
Joined: 2009-10-05 07:54
Location: enzed

Re: Ralink driver issues mt7 dongle plz help!!

Postby debiman » 2017-11-04 07:31

so is this working now? nadielaya7, please use code tags for code!
this is hard to look through.

like this: [_code]...your-code-here...[/code]
i had to add an _ to make the parser ignore the tags.
without the _ it looks like this:
Code: Select all
...your-code-here...

you can type the tags out or make the editor type it out for you by clicking the apprpriate toolbar button above (sometimes also labeled '#' instead of 'Code').
User avatar
debiman
 
Posts: 1528
Joined: 2013-03-12 07:18

Re: Ralink driver issues mt7 dongle plz help!!

Postby Dai_trying » 2017-11-04 10:26

I have a device with MT7601U chipset and with Debian I have to edit my /etc/NetworkManager/NetworkManager.conf (as root or with sudo) and add this to the end
Code: Select all
[device]
wifi.scan-rand-mac-address=no

after reboot it works great on my systems.

HTH
Dai_trying
 
Posts: 332
Joined: 2016-01-07 12:25

Re: Ralink driver issues mt7 dongle plz help!!

Postby shep » 2017-11-04 15:50

Code: Select all
[ 7.415752] mt7601u 3-3:1.0: firmware: failed to load mt7601u.bin (-2)
[ 7.415855] mt7601u 3-3:1.0: Direct firmware load for mt7601u.bin failed with error -2


It will not work without the firmware. You need to find a copy of mt7601u.bin, that you trust, and put it in
Code: Select all
/lib/firmware
.

The firmware is in Stretch - firmware-misc-nonfree
shep
 
Posts: 130
Joined: 2011-03-15 15:22

Re: Ralink driver issues mt7 dongle plz help!!

Postby nadielaya7 » 2017-11-04 21:56

Dai_trying wrote:I have a device with MT7601U chipset and with Debian I have to edit my /etc/NetworkManager/NetworkManager.conf (as root or with sudo) and add this to the end
Code: Select all
[device]
wifi.scan-rand-mac-address=no

after reboot it works great on my systems.

HTH

Hwere do I find the exact line to insert in [DEVICE]? Whats my device name exactly for this? Must be the dmesg labeling I guess?
nadielaya7
 
Posts: 23
Joined: 2016-10-15 20:43

Re: Ralink driver issues mt7 dongle plz help!!

Postby nadielaya7 » 2017-11-04 22:04

I downloaded the misc package firmware-misc-nonfree, and it is now detecting mycelphone's hotspot. However, it starts to connect and after a while of unsuccessful attempting to connect, it just stops and is istill disconnected. It wont finalize and establish a successful connection so that I can use the Internet. Its not my mobile hotspot as I can connect with other devices to it and I was able to connect for 1 year with the debian computers.

So Im now off to try the fiddling with network conf file from this forum's suggestions.

Should I also download the firmware-ralink package as well? Won't they conflict with each others modules or something?

Any Idea why its stuck at connecting and never finalizes successfully?
nadielaya7
 
Posts: 23
Joined: 2016-10-15 20:43

Re: Ralink driver issues mt7 dongle plz help!!

Postby Head_on_a_Stick » 2017-11-04 22:11

Check the output of `iwconfig` to see if Power Management is on and disable it if that is the case.

There may also be some options for the driver itself:
Code: Select all
# modinfo mt7601

That may not be the name of the module, run `lsmod` to list all loaded modules.
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6673
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Ralink driver issues mt7 dongle plz help!!

Postby Dai_trying » 2017-11-04 22:22

Now you have the firmware you simply need to copy this text
Code: Select all
[device]
wifi.scan-rand-mac-address=no

as it is to your /etc/NetworkManager/NetworkManager.conf you do not need to replace [device] with your device name or anything.
Dai_trying
 
Posts: 332
Joined: 2016-01-07 12:25

Re: Ralink driver issues mt7 dongle plz help!!

Postby nadielaya7 » 2017-11-04 22:27

dmesg gives
Code: Select all
[  180.680894] IPv6: ADDRCONF(NETDEV_UP): wlx003676542702: link is not ready
[  181.940538] wlx003676542702: authenticate with 90:b6:86:e4:2e:1c
[  181.969583] wlx003676542702: send auth to 90:b6:86:e4:2e:1c (try 1/3)
[  181.971407] wlx003676542702: authenticated
[  186.970624] wlx003676542702: aborting authentication with 90:b6:86:e4:2e:1c by local choice (Reason: 3=DEAUTH_LEAVING)
[  188.300437] wlx003676542702: authenticate with 90:b6:86:e4:2e:1c
[  188.330139] wlx003676542702: send auth to 90:b6:86:e4:2e:1c (try 1/3)
[  188.331765] wlx003676542702: authenticated
[  193.335277] wlx003676542702: aborting authentication with 90:b6:86:e4:2e:1c by local choice (Reason: 3=DEAUTH_LEAVING)
[  195.060184] wlx003676542702: authenticate with 90:b6:86:e4:2e:1c
[  195.089760] wlx003676542702: send auth to 90:b6:86:e4:2e:1c (try 1/3)
[  195.091333] wlx003676542702: authenticated
[  200.093914] wlx003676542702: aborting authentication with 90:b6:86:e4:2e:1c by local choice (Reason: 3=DEAUTH_LEAVING)
[  202.320497] wlx003676542702: authenticate with 90:b6:86:e4:2e:1c
[  202.346107] wlx003676542702: send auth to 90:b6:86:e4:2e:1c (try 1/3)
[  202.347720] wlx003676542702: authenticated
[  206.003028] wlx003676542702: aborting authentication with 90:b6:86:e4:2e:1c by local choice (Reason: 3=DEAUTH_LEAVING)
[  206.017479] IPv6: ADDRCONF(NETDEV_UP): wlx003676542702: link is not ready
[  208.437115] IPv6: ADDRCONF(NETDEV_UP): wlx003676542702: link is not ready
 

Every time I try to connect to the mobile hotspot
nadielaya7
 
Posts: 23
Joined: 2016-10-15 20:43

Re: Ralink driver issues mt7 dongle plz help!!

Postby nadielaya7 » 2017-11-04 22:38

Dai_trying wrote:Now you have the firmware you simply need to copy this text
Code: Select all
[device]
wifi.scan-rand-mac-address=no

as it is to your /etc/NetworkManager/NetworkManager.conf you do not need to replace [device] with your device name or anything.


That was it after downloading the misc package!! Issue is now resolved. Thanks a ton!!!
nadielaya7
 
Posts: 23
Joined: 2016-10-15 20:43

Re: Ralink driver issues mt7 dongle plz help!!

Postby Dai_trying » 2017-11-05 07:38

You're welcome :)
Dai_trying
 
Posts: 332
Joined: 2016-01-07 12:25

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable