MT7601u 148f:7601 driver for Ubuntu 16.04 Xenial & HostAPD

1,749 views
Skip to first unread message

Jason Mumby

unread,
May 18, 2016, 11:32:45 PM5/18/16
to BeagleBoard

I am trying to get this wifi dongle working on a BBB with Ubuntu 16.04.

The adapter can be seen 

lsusb
Bus 001 Device 002: 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter


ifconfig

usb0      
Link encap:Ethernet  HWaddr 90:59:af:82:2e:00  
          inet addr
:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
          UP BROADCAST MULTICAST  MTU
:1500  Metric:1
          RX packets
:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:1000
          RX bytes
:0 (0.0 B)  TX bytes:0 (0.0 B)


sudo lshw
-C network
*-network:1
       description
: Ethernet interface
       physical id
: 3
       logical name
: usb0
       serial
: 90:59:af:82:2e:00
       capabilities
: ethernet physical
       configuration
: broadcast=yes driver=g_ether driverversion=29-May-2008 firmware=musb-hdrc ip=192.168.7.2 link=no multicast=yes

I can ping the adapter from within the ssh session so I guess it is working. I want to set up HostAPD so it is open (no security) and then directs any connected clients to a webserver home page hosted on the BBB. Struggling to sort out the HostAPD config.  


### Wireless network name ###
interface=usb0
#
### Set your bridge name ###
#bridge=br0


#driver
driver
=g_ether


country_code
=NZ


ssid
=myserver


channel
=7


hw_mode
=g


## Accept all MAC address ###
macaddr_acl
=0
#enables/disables broadcasting the ssid
ignore_broadcast_ssid
=0
# Needed for Windows clients
eapol_key_index_workaround
=0

But when I test it I have an error around the driver not being recognised. There are multiple tutorials around loading the driver for this adapter but all seem to link to a dead git.  

Do I need to load the specific driver for this? I have read for this version of Ubuntu the adpater should just work?

How should I configure HostAPD

Jason Mumby

unread,
May 18, 2016, 11:37:35 PM5/18/16
to BeagleBoard
ubuntu@arm:~$ hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
Could not read interface usb01 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=usb01 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=0 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
Could not read interface usb01 flags: No such device
nl80211: Set mode ifindex 0 iftype 2 (STATION)
nl80211: Failed to set interface 0 to mode 2: -1 (Operation not permitted)
nl80211: Try mode change after setting interface down
Could not read interface usb01 flags: No such device
Could not read interface usb01 flags: No such device
nl80211: Failed to set interface up after switching mode
nl80211: Interface mode change to 2 from 0 failed
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x7f98e410)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x7f98e410)
usb01: interface state UNINITIALIZED->DISABLED
hostapd_bss_deinit: deinit bss usb01
usb01: AP-DISABLED 
hostapd_cleanup(hapd=0x7f98eee8 (usb01))
hostapd_free_hapd_data: Interface usb01 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x7f98e410)
hostapd_interface_free: free hapd 0x7f98eee8
hostapd_cleanup_iface(0x7f98e410)
hostapd_cleanup_iface_partial(0x7f98e410)
hostapd_cleanup_iface: free iface=0x7f98e410
ubuntu@arm:~$ 

Robert Nelson

unread,
May 19, 2016, 12:29:44 AM5/19/16
to Beagle Board

usb0 is not your interface to mt7601u...

sudo ifconfig -a

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/84788d1e-c743-4f9d-97cd-8b85fcef2a94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jason Mumby

unread,
May 19, 2016, 12:53:26 AM5/19/16
to BeagleBoard
Not sure what is then ..

ubuntu@arm:~/bin$ sudo ifconfig -a
eth0      
Link encap:Ethernet  HWaddr 90:59:af:82:2e:09  
          inet addr
:192.168.2.19  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr
: fe80::9259:afff:fe82:2e09/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU
:1500  Metric:1
          RX packets
:11526 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:3236 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:1000
          RX bytes
:2134852 (2.1 MB)  TX bytes:434086 (434.0 KB)
         
Interrupt:175


lo        
Link encap:Local Loopback  
          inet addr
:127.0.0.1  Mask:255.0.0.0
          inet6 addr
: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU
:65536  Metric:1
          RX packets
:170 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:170 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:1
          RX bytes
:12610 (12.6 KB)  TX bytes:12610 (12.6 KB)



usb0      
Link encap:Ethernet  HWaddr 90:59:af:82:2e:00  
          inet addr
:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
          UP BROADCAST MULTICAST  MTU
:1500  Metric:1
          RX packets
:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:1000
          RX bytes
:0 (0.0 B)  TX bytes:0 (0.0 B)

Robert Nelson

unread,
May 19, 2016, 9:25:44 AM5/19/16
to Beagle Board

Which kernel?

uname -r

Jason Mumby

unread,
May 20, 2016, 2:56:11 AM5/20/16
to BeagleBoard
3.8.13-bone79. I realise now USB0 is not the adapter. 

Jason Mumby

unread,
May 20, 2016, 5:20:34 PM5/20/16
to BeagleBoard
I have replaced my OS with Debian 4.4.9-ti-r25

Dmesg gives me the following ..

[  445.323174] mt7601u 1-1:1.0: Warning: unsupported EEPROM version 0d
[  445.323225] mt7601u 1-1:1.0: EEPROM ver:0d fae:00
[  445.484435] mt7601u 1-1:1.0: Error: RX urb failed:-71
[  445.489792] mt7601u 1-1:1.0: Error: submit URB dir:128 ep:1 failed:-19
[  445.515282] usb 1-1: USB disconnect, device number 26
[  445.862248] usb 1-1: new high-speed USB device number 27 using musb-hdrc
[  446.001775] usb 1-1: New USB device found, idVendor=148f, idProduct=7601
[  446.001827] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  446.001858] usb 1-1: Product: 802.11 n WLAN
[  446.001887] usb 1-1: Manufacturer: MediaTek
[  446.001914] usb 1-1: SerialNumber: 1.0
[  446.126230] usb 1-1: reset high-speed USB device number 27 using musb-hdrc
[  446.257419] mt7601u 1-1:1.0: ASIC revision: 76010001 MAC revision: 76010500
[  446.263187] mt7601u 1-1:1.0: Firmware Version: 0.1.00 Build: 7640 Build time:wing

Any ideas?
Reply all
Reply to author
Forward
0 new messages