Date: Sun, 28 Jan 2018 14:25:22 +0100 From: Hans Petter Selasky <hps@selasky.org> To: KIRIYAMA Kazuhiko <kiri@kx.openedu.org>, freebsd-current@freebsd.org Subject: Re: USB wifi dongle can't work Message-ID: <10c522c9-1a05-ce39-80ab-e60415e80d68@selasky.org> In-Reply-To: <201801280342.w0S3gKZ7023238@kx.openedu.org> References: <201801280342.w0S3gKZ7023238@kx.openedu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/28/18 04:42, KIRIYAMA Kazuhiko wrote: > Hi, > > I've tested a USB wifi dongle but can't work. It's usbconfig > is as follows: > > ugen0.2: <vendor 0x148f product 0x7601> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (160mA) > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0201 > bDeviceClass = 0x0000 <Probed by interface class> > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x148f > idProduct = 0x7601 > bcdDevice = 0x0000 > iManufacturer = 0x0001 <MediaTek> > iProduct = 0x0002 <802.11 n WLAN> > iSerialNumber = 0x0003 <1.0> > bNumConfigurations = 0x0001 > > So I tried to work with it by adding vendor entry to usbdevs > and if_run.c: > > --- sys/dev/usb/usbdevs.org 2018-01-27 16:00:48.963304000 +0900 > +++ sys/dev/usb/usbdevs 2018-01-27 17:23:53.341085000 +0900 > @@ -3845,6 +3845,7 @@ > product RALINK RT3573 0x3573 RT3573 > product RALINK RT5370 0x5370 RT5370 > product RALINK RT5572 0x5572 RT5572 > +product RALINK RT7601 0x7601 RT7601 > product RALINK RT8070 0x8070 RT8070 > product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter > product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter > --- sys/dev/usb/wlan/if_run.c.org 2018-01-27 17:25:50.504335000 +0900 > +++ sys/dev/usb/wlan/if_run.c 2018-01-27 17:29:29.438094000 +0900 > @@ -300,6 +300,7 @@ > RUN_DEV(RALINK, RT3573), > RUN_DEV(RALINK, RT5370), > RUN_DEV(RALINK, RT5572), > + RUN_DEV(RALINK, RT7601), > RUN_DEV(RALINK, RT8070), > RUN_DEV(SAMSUNG, WIS09ABGN), > RUN_DEV(SAMSUNG2, RT2870_1), > > and reconfigured kernel and set rc.conf: > > hostname="t.pis" > ifconfig_wlan0="DHCP mode 11n" > wlans_run0="wlan0" > saver="logo" > sendmail_enable="NONE" > sshd_enable="YES" > usbd_enable="YES" > ntpd_enable="YES" > > then rebooted. But can't start as DHCP client: > > admin@t:~ % ifconfig > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 > options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 > inet 127.0.0.1 netmask 0xff000000 > nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> > groups: lo > wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 > ether 00:0f:00:4a:7f:28 > nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> > media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) > status: no carrier > ssid "" channel 11 (2462 MHz 11g) > regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7 > scanvalid 60 protmode CTS wme bintval 0 > groups: wlan > admin@t:~ % > > dmesg shows: > > ugen0.2: <vendor 0x148f product 0x7601> at usbus0 > run0 on uhub0 > run0: <vendor 0x148f product 0x7601, class 0/0, rev 2.01/0.00, addr 1> on usbus0 > run0: MAC/BBP RT7601 (rev 0x0500), RF RT5592 (MIMO 1T1R), address 00:0f:00:4a:7f:28 > wlan0: Ethernet address: 00:0f:00:4a:7f:28 > ugen0.3: <SIPODEV USB Composite Device> at usbus0 > ukbd0 on uhub0 > ukbd0: <SIPODEV USB Composite Device, class 0/0, rev 1.10/1.05, addr 2> on usbus0 > kbd2 at ukbd0 > ugen0.4: <vendor 0x0b95 product 0x7720> at usbus0 > ugen0.5: <Alcor Micro, Corp. USB 2.0 Camera> at usbus0 > run0: timeout waiting for MCU to initialize > run0: could not load 8051 microcode > > This means there is not a driver for RT7601? > > root@t:~ # uname -v > FreeBSD 12.0-CURRENT #0: Sat Jan 27 17:58:35 JST 2018 admin@lmainkx:/usr/obj/usr/src/amd64.amd64/sys/RT7601 > root@t:~ # > > and OS revision is r328126. > Is there any idea? > Hi, Try to search the Linux kernel code for idProduct and idVendor values in hexadecimal. You can't just add driver like that and it will work :-) --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10c522c9-1a05-ce39-80ab-e60415e80d68>