Ralink rt7601 driver linux

MT7601U Linux driver

Many cheap USB wifi dongles use the MT7601U chip.

Unfortunately, the driver is not part of the Linux kernel source tree (yet?). This repository contains:

  • source code from DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2 (md5sum 5f440dccc8bc952745a191994fc34699 )
  • file DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0-v2.patch has been applied

The patch improves stability and performance for kernels >= 3.x

First install kernel-devel for your Linux distro

If the module has loaded OK, you should see mt7601Usta listed in the output of lsmod and a new network interface ra0 should be present in the output of ip link .

If all goes well, you can permanently install the driver with make install .

On 26 Aug, 2014 user @poma posted to the linux-wireless mailing list discussing the poor state of driver support for this chipset. Thread can be seen here:

An inital patch was released on 28 Aug, 2014 with the following comment:

A second patch was released on 31 Aug, 2014 with the following comment:

Source code: (c) Copyright 2002-2013, MediaTek Inc. (released under GPLv2)

Patch: @poma at linux-wireless mailing list

About

Linux driver for MT7601U with patch for stability and performance on recent kernel versions

Источник

Подключаем WiFi-адаптер WN727N к Ubuntu/Mint

ВНИМАНИЕ! АВТОР СТАТЬИ НЕ НЕСЕТ НИКАКОЙ ОТВЕТСТВЕННОСТИ ЗА ПРИЧИНЕННЫЙ УЩЕРБ!

Но, если вы сделаете все правильно, последствий не будет. Даже если что-то пойдет не так, ничего страшного не произойдет. Начнем.

Первым делом открываем терминал при помощи клавиш Ctrl+Alt+T и вводим такую команду:

Видим наш адаптер Ralink RT7601(выделено). У вас может быть адаптер Ralink RT5370. Драйвера на разные адаптеры устанавливаются по-разному. Я опишу как это сделать для для двух случаев.

Переходим по ссылке и выбираем RT8070/ RT3070/ RT3370/ RT3572/ RT5370/ RT5372/ RT5572 USB USB. Скачиваем архив с драйвером.

Открываем папку, в которую сохранили драйвер, и распакуем архив bz2. Для этого кликаем правой кнопкой мыши по файлу и нажимаем “Распаковать сюда” (“Extract here”).

После этого появится архив tar. Еще раз его распаковываем. Нажимаем правой кнопкой мыши по файлу и нажимаем “Распаковать сюда” (“Extract here”).

Далее меняем название папки на что то более короткое, так как нам еще предстоит писать ее путь в консоль. Например я назвал ее Driver.

Заходим в распакованную папку и открываем в текстовом редакторе файл /os/linux/config.mk

Находим следующие строки и изменяем букву n на y:

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y

# Support Native WpaSupplicant for Network Maganger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

После этого сохраняем файл. Открываем терминал и переходим в распакованную папку. Внимание! У меня имя пользователя sergey. Вы же вводите свое имя пользователя! В дальнейшем меняйте sergey на имя своего пользователя.

Далее выполняем команды:

И все! О, чудо! WIFI работает, пользуйтсь на здоровье.

Для того, чтобы завести этот адаптер(Ralink RT7601), вам необходимо иметь ядро версии 3.19 или выше. если необходимо — обновите ядро (если не знаете как — google поможет).

Читайте также:  Кривой калькулятор windows 10

Далее идем по ссылке и скачиваем драйвер:

Далее скачанный архив перемещаем в домашнюю папку и распаковываем (клик правой клавишей мыши, «извлечь сюда»). Переименуем получивщуюся папку mt7601-master просто в mt7601.

После этого вводим команду:

Теперь мы в нужном каталоге. Можно произвести сборку драйвера, выполняем команду:

Система запросит пароль — вводим (пароль не отображается).

Далее вводим команды:

И последняя команда, которая включит наш адаптер:

Все. Теперь ubuntu видит wifi.

Но это еще не все! Теперь после каждой перезагрузки необходимо вводить последнюю команду, иначе система не увидит адаптер (именно для Ralink RT7601). Но есть выход! Можно создать скрипт и добавить его в автозагрузку. Ниже написано как это сделать.

Первым делом нам надо сделать так, чтобы система не запрашивала пароль при использовании sudo. Для этого вводим команду:

Откроется такое окно:

%sudo ALL=(ALL:ALL) ALL

%sudo ALL=(ALL:ALL) NOPASSWD: ALL

Сохраняем изменения — нажимаем «Сохранить».

После этого вводим команду:

Открывается пустой текстовый редактор. В нем пишем или копируем:

#!/bin/bash
insmod /etc/Wireless/RT2870STA/mt7601/src/os/linux/mt7601Usta.ko

Нажимаем «Сохранить» и закрываем.

Далее идем в меню Dash и ищем программу как на картинке ниже:

Открываем ее. Нажимаем «Добавить».

Откроется окно. Напротив поля «Имя» пишем:

Напротив поля «Команда» пишем:

sudo sh /etc/Wireless/RT2870STA/autowifi.sh

Нажимаем кнопку «Добавить» и закрываем программу. Перезагружаемся. После перезагрузки все работает. Теперь можно выбрать сеть в трее.

На этом «небольшая» инструкция для адаптера Ralink RT7601 закончена.

Источник

Raspberry Pi MT7601u ACCESS POINT AND STATION MODE SUPPORT

This example will teach you for using unsupported Mediatek MT7601u based wireless chipsets as Access Point mode in Linux systems. So you can use this wireless antenna in your embedded or desktop based Linux robotic projects or sharing your internet connection(as like hotspot). No hardware and programming skills required. We will not use hostapd driver. Just follow what I write.

Plug your Wi-Fi antenna to your PC or Raspberry Pi and write this command to check if you have Clone MT7601.

Look this image if Ralink ID is equal with your Wi-Fi dongle then everything is fine. Your module will work. Follow instractions for your linux based operating systems.

ON UBUNTU 32-64 BIT SYSTEMS…

On Ubuntu 16.04 32-64 bit LTS systems, you can compile this driver easily. But you must be first update your system with these commands.

GETTING DRIVER ON UBUNTU 32-64 BIT SYSTEMS…

If you dont have git package then you install with this command.

GETTING SOURCE CODE FROM THIS REPOSITORY

Get this driver with git clone method from this repo. Type to terminal

COMPILING DRIVER ON UBUNTU 32-64 BIT SYSTEMS…

Driver will download after this command to your home directory. Open downloaded driver folder with

ACCESS POINT CONFIGURATION…

if you want to change your Access Point configuration, use this command for opening. If you have nano package then you can use vim,gedit or install nano package with following command (default ssid : Rpi_Hotspot_Free, password:1234567890)

Читайте также:  Как делать разделы linux

Write your settings and save for configuration, press “ctrl-w” + press “y” and press enter. Compile your driver with this commands.

AFTER COMPILING SOURCE CODE…

So you if not receive any error messages and success , driver is compiled and ready for Access Point mode. Make install command will deploy your Access Point drivers (rtnet7601Uap, mt7601Uap) to kernel automatically. But old MT7601 Chipset kernel module must be remove from Linux kernel system. Only and easy way fort his, add old mt7601 kernel module to Linux blacklist. So you can this easy with these commands.

Just open your /etc/modprobe.d/blacklist file

and add drivername using following syntax:

press “ctrl-w” + press “y” and press enter for save.

EDIT: In later versions since 12.10 (12.04?) the file is /etc/modprobe.d/blacklist.conf Reboot your system and use lsmod command to show the status of modules in the Linux Kernel. If you dont see any modüle as “mt7601u” then success.

After reboot your system, Access Point is established and wait for dhcp install.

DHCP SERVER INSTALLATION

At this moment, you can connect your Access Point but you can’t obtain IP adress because DHCP server isn’t installed. Install with these commands..(You may need to sudo apt-get update if the Pi can’t seem to get to the apt-get repositories)

Next, we will edit /etc/dhcp/dhcpd.conf, a file that sets up our DHCP server — this allows wifi connections to automatically get IP addresses, DNS, etc. Run this command to edit the file

Find the lines that say

and change them to add a # in the beginning so they say

Find the lines that say # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented

Then scroll down to the bottom and add the following lines

Save the file by typing in Control-X then Y then return

and scroll down to INTERFACES=»» and update it to say INTERFACES=»ra0″

set static IP for your wifi card type and route packages for internet share type these commands to terminal

So your Access Point is ready and internet sharing will work

ON RASPBERRY PI EMBEDDED LINUX 32-64 BIT SYSTEMS…

For compiling this module, use these commands for compiling and take a coffee.

if you receive «Makefile:387: recipe for target ‘LINUX’ failed». You need to get Raspberry Pi linux headers using rpi-source.

Источник

MT7601U Linux driver

Note: Kernel 4.2 has been released which contains a driver for mt7601u, this repository is now deprecated.

Driver support since kernel version >= 4.x is dropped and not guaranteed anymore.

This repo is forked from [imZack/mt7601] (https://github.com/imZack/mt7601) and I have added binary packages for this version.

imZack added some features for this driver:

  • Add supports for Xiaomi MiniWifi USB_DEVICE(0x2717,0x4106)
  • Add supports for Synology DS713+ (x86 cedarview)
Читайте также:  Windows авторизация по смарт картам

Many cheap USB wifi dongles use the MediaTek MT7601U chip.

Unfortunately, there is no driver in Linux kernel source tree which can work with this chip, yet. This repository is based on the original driver released by MediaTek which was rejected from Linux kernel because of the poor code quality. The repository includes various stability and performance improvements for kernels >= 3.x and has been tested with the following kernels:

  • 3.15.10-200.fc20.x86_64
  • 3.16.1-301.fc21.x86_64
  • 3.16.1-301.fc21.i686
  • 3.17.0-0.rc2.git3.1.fc22.i686
  • 3.17.0-0.rc2.git3.1.fc22.x86_64
  • 3.12.26-1.20140808git4ab8abb.rpfr20.armv6hl.bcm2708

Usage for Synology DS713+

Now you have to copy os/linux/mt7601Usta.ko and RT2870STA.dat to your target machine.

The interface will be ra0.

Currently the DSM WebGUI will not be able to use the wifi dongle so far, but it works with command line.

Unofficial mt7601u driver

For kernels 3.19 and later a new mac80211 driver was written from scratch by the community. It was done because there is very little chance that this vendor driver will ever become part of official Linux kernel. If you have Linux kernel version between 3.19 and 4.2 you can download the new driver from https://github.com/kuba-moo/mt7601u. If you have Linux 4.2 or later the new driver is already part of the kernel (it’s called mt7601u). Note that from Linux 4.2 on you will have to blacklist the mt7601u driver to continue using code from this repository.

First install kernel-devel for your Linux distro:

RHEL/CentOS: # yum install kernel-devel gcc

Fedora 24/25/26: # dnf install kernel-devel gcc

Debian/Ubuntu: # apt-get install linux-headers-generic build-essential

Clone repository and type following to build driver:

If the module has loaded OK, you should see mt7601Usta listed in the output of lsmod and a new network interface ra0 should be present in the output of ip link .

If all goes well, you can permanently install the driver with make install .

In order to successfully compile this driver for Gentoo, you must compile your kernel with the appropriate wireless extensions included. One way to do that is by enabling Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards wireless module. If you see errors when compiling the driver, check to see if you have the necessary wireless extensions by running zgrep -i wext /proc/config.gz . The output should look something like:

More discussion can be found here

There is a PPA repo available containing a DKMS-capable package based on this repo:

Thanks to @thopiekar

On 26 Aug, 2014 user @poma posted to the linux-wireless mailing list discussing the poor state of driver support for this chipset. Thread can be seen here:

An inital patch was released on 28 Aug, 2014 with the following comment:

A second patch was released on 31 Aug, 2014 with the following comment:

Source code: (c) Copyright 2002-2013, MediaTek Inc. (released under GPLv2)

Patch: @poma at linux-wireless mailing list

About

Linux driver for MT7601U with patch for stability and performance on recent kernel versions

Источник

Оцените статью