- Saved searches
- Use saved searches to filter your results more quickly
- License
- muratdemirtas/MT7601u
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.MD
- About
- Как подключить вай фай mt7601u в консоли Linux?
- Wifi dongle doesn’t detect networks on kali linux VM
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Ubuntu and Embedded Linux(Raspberry Pi, Banana Pi etc.) drivers for MediaTek MT7601u Wireless Chipset. Support Access Point(AP) and Station Mode(STA). Tested on 32-64 Bit Ubuntu and Raspberry Pi 2 with all kernels since v4.0.0+. You can use this driver for internet sharing(hotspot), robotic, file transfer or ssh.
License
muratdemirtas/MT7601u
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.MD
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.
sudo apt-get update && sudo apt-get upgrade -y
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
sudo git clone https://github.com/muratdemirtas/MT7601u.git
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)
sudo apt-get install nano -y sudo nano /home/pi/mt7601u/etc/Wireless/RT2870AP/RT2870AP.dat
Write your settings and save for configuration, press “ctrl-w” + press “y” and press enter. Compile your driver with this commands.
cd mt7601u/ sudo cp -v /lib/modules/$(uname -r)/build/Module.symvers src/os/linux sudo make clean && make all && make install sudo rm -rvf src/os/linux/Module.symvers
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
sudo nano /etc/modprobe.d/blacklist
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.
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)
sudo apt-get install hostapd isc-dhcp-server
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
sudo nano /etc/dhcp/dhcpd.conf
option domain-name "example.org"; option domain-name-servers ns1.example.org, ns2.example.org;
and change them to add a # in the beginning so they say
#option domain-name "example.org"; #option domain-name-servers ns1.example.org, ns2.example.org;
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
subnet 192.168.42.0 netmask 255.255.255.0
Save the file by typing in Control-X then Y then return
sudo nano /etc/default/isc-dhcp-server
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
sudo ifconfig ra0 192.168.42.1 sudo iptables -F sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward " sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo iptables -A FORWARD -i eth0 -o ra0 -m state --state RELATED,ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -i ra0 -o eth0 -j ACCEPT sudo iptables -t nat -S
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.
git clone https://github.com/muratdemirtas/MT7601u.git cd mt7601u/ sudo cp -v /lib/modules/$(uname -r)/build/Module.symvers src/os/linux sudo make clean && make all && make install sudo rm -rvf src/os/linux/Module.symvers sudo ifconfig wlan0 down sudo rmmod mt7601u sudo ifconfig ra0 up sudo ifconfig ra0 192.168.42.1 sudo iptables -F sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward " sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo iptables -A FORWARD -i eth0 -o ra0 -m state --state RELATED,ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -i ra0 -o eth0 -j ACCEPT sudo iptables -t nat -S sudo service isc-dhcp-server restart
if you receive «Makefile:387: recipe for target ‘LINUX’ failed». You need to get Raspberry Pi linux headers using rpi-source.
sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source sudo chmod +x /usr/bin/rpi-source /usr/bin/rpi-source -q --tag-update sudo rpi-source
About
Ubuntu and Embedded Linux(Raspberry Pi, Banana Pi etc.) drivers for MediaTek MT7601u Wireless Chipset. Support Access Point(AP) and Station Mode(STA). Tested on 32-64 Bit Ubuntu and Raspberry Pi 2 with all kernels since v4.0.0+. You can use this driver for internet sharing(hotspot), robotic, file transfer or ssh.
Как подключить вай фай mt7601u в консоли Linux?
Подключить Wi-Fi в современном Linux дистрибутиве в графической оболочке обычно не составляет проблем, главное чтобы была поддержка «железа», а дальше мышкой клац-клац.
А вот подключить Вай-Фай в консоли Linux уже немного сложнее, но вполне возможно.
Расскажу как подключить интернет по Wi-Fi с помощью USB Wi-Fi свистка TP-Link с чипом mt7601u в Debian.
Для начала необходимо определиться с чипом вашего вай фай оборудования.
Можно попробовать сделать так:
[ 2.367184] mt7601u 4-1.4:1.0 wlx30b5c212d769: renamed from wlan0
Хорошо когда становится понятно, а вот, если ничего не выдает, то делаем
Листаем вывод и ищем упоминания о wi-fi модуле.
Для чипа mt7601u драйвер находится в non-free дистрибутивах Debian, чтобы их задействовать добавим в файл /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ stretch main non-free deb-src http://ftp.de.debian.org/debian/ stretch main non-free
После этого обновим пакеты и установим нужные
apt-get update apt-get install firmware-ralink firmware-misc-nonfree wireless-tools wpasupplicant
Нам нужно подгрузить нужный драйвер в виде модуля, делаем это командой
После этого, проверяем интерфейсы командой ifconfig
Должен появится наш вай фай, обычно называется wlan0
В моем случае получился
wlx30b5c212d769: flags=4163 mtu 1500
Почему-то он не хочет переименовываться в wlan0, но мне это было не принципиально, поэтому не стал тратить время, главное чтобы вай фай заработал!
Дальше мы можем просканировать сети и увидеть нашу.
iwlist wlan0 scanning | grep -i essid
Возможно вместо wlan0 вам нужно будет указать название вашего устройства в системе, в моем случае это wlx30b5c212d769
Видим нашу сеть, хорошо, если нет, то что-то не так, начинаем разбираться.
С помощью команды wpa_passphrase создаем файл с настройками для подключения к нашему wi-fi, для этого выполняем команду, в которой указываем название нашей сети и пароль к ней:
wpa_passphrase MySuperWiFi mybestpassword > /etc/wpa_supplicant/wpa_supplicant.conf
Пробуем подключить к вай фай с помощью файла настроек:
wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
Дальше можно задать IP из нашего диапазона или использовать DHCP.
ifconfig wlan0 192.168.1.10 или dhclient wlan0
Вай фай должен успешно подключиться и работать.
После этого я сделал так — сделал скрипт и в него прописал команды для подключения вай фай после включения компьютера, хотя можно было сделать через файл /etc/network/interfaces, но мне нравится в виде скрипта.
Добавил свой скрипт в init.d, по шаблону для автозагрузки (он стартует самым последним).
#!/bin/bash modprobe mt7601u sleep 3 wpa_supplicant -D wext -i wlx30b5c212d769 -c /etc/wpa_supplicant/wpa_supplicant.conf -B sleep 10 dhclient wlx30b5c212d769
Компьютер включается, скрипт подгружает нужный модуль, делает подключения с нужными настройками, получает IP по DHCP. Вай фай успешно работает!
В процессе настройки столкнулся со множеством различных вариантов проблем и решений, большинство из них не помогло, пришлось по крупицам собрать информацию, чтобы все получилось.
Надеюсь эта заметка поможет и вам, жду отзывов, спасибо за внимание!
Фразы: ASIC revision: 76010001 debian 9, wi-fi в linux консоль, mt7601u 4-1.4:1.0 wlx30b5c212d769: renamed from wlan0, Ralink MT7601U, mt7601u.bin Debian 9 не видит
Wifi dongle doesn’t detect networks on kali linux VM
I have recently bough an usb wifi dongle with a MT7601U chipset to use with a Kali linux virtual machine, and everything is apparently set up correctly (usb enabled on virtual box, no apparent driver issues in the VM), but it doesn’t see any wifi networks with a scan or with the network manager. I tried a couple things (upgrading and installing another driver) but none of that got it working. I can enable monitor mode without problems using ifconfig and airmon-ng, but airodump-ng also doesn’t show any networks. The dongle works fine in windows with the manufacturer’s driver, so it doesn’t appear to be a problem with the dongle. Has anyone solved this problem recently? lsusb output:
Bus 001 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
lo no wireless extensions. wlan0 IEEE 802.11bgn ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off eth0 no wireless extensions.
lo Interface doesn't support scanning. wlan0 No scan results eth0 Interface doesn't support scanning.
0: phy0: Wireless LAN Soft blocked: no Hard blocked: no