Hello tech@,

following patch enables urtwn driver to attach to USB wifi adapter
ASUS USB-N10 Nano (Wireless-N150)

Sticker on box says:
Model: USB-N10 NANO B1
H/W Ver.: B1

### N10 B1
usbdevs:
addr 02: 0b05:18f0 Realtek, 802.11n NIC

dmesg:
urtwn0 at uhub0 port 1 configuration 1 interface 0 "Realtek 802.11n NIC"
rev 2.00/0.00 addr 2

I also have non-B1 release of the same wi-fi adapter that works out of
the box and that one is detected like this:


### N10 non-B1
usbdevs:
addr 03: 0b05:17ba Realtek, 802.11n WLAN Adapter

dmesg:
urtwn1 at uhub0 port 2 configuration 1 interface 0 "Realtek 802.11n WLAN
Adapter" rev 2.00/2.00 addr 3

I have updated the manpage for urtwn with these two models too.

I have one question - where the B1 version is detected as NIC while the
non-B1 version says WLAN Adapter. Where does this come from? Does the
device itself report it?

Thank you,
JV

### PATCH

Index: share/man/man4/urtwn.4
===================================================================
RCS file: /cvs/src/share/man/man4/urtwn.4,v
retrieving revision 1.49
diff -u -p -u -p -r1.49 urtwn.4
--- share/man/man4/urtwn.4      15 Nov 2020 00:33:24 -0000      1.49
+++ share/man/man4/urtwn.4      22 Apr 2021 17:24:38 -0000
@@ -105,6 +105,8 @@ The following adapters should work:
 .It Alfa AWUS036NHR
 .It Approx APPUSB300NANO V1
 .It Aus. Linx AL-9604R1S
+.It Asus USB-N10 NANO
+.It Asus USB-N10 NANO B1
 .It B-Link BL-LW05-5R
 .It Belkin F7D1102 Surf Wireless Micro
 .It D-Link DWA-121
Index: sys/dev/usb/if_urtwn.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.96
diff -u -p -u -p -r1.96 if_urtwn.c
--- sys/dev/usb/if_urtwn.c      15 Nov 2020 00:04:05 -0000      1.96
+++ sys/dev/usb/if_urtwn.c      22 Apr 2021 17:24:38 -0000
@@ -331,6 +331,8 @@ static const struct urtwn_type {
        URTWN_DEV_8188EU(REALTEK,       RTL8188ETV),
        URTWN_DEV_8188EU(REALTEK,       RTL8188EU),
        URTWN_DEV_8188EU(TPLINK,        RTL8188EUS),
+       URTWN_DEV_8188EU(ASUS,          RTL8188EUS),
+
        /* URTWN_RTL8192EU */
        URTWN_DEV_8192EU(DLINK,         DWA131E1),
        URTWN_DEV_8192EU(REALTEK,       RTL8192EU),
Index: sys/dev/usb/usbdevs.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.750
diff -u -p -u -p -r1.750 usbdevs.h
--- sys/dev/usb/usbdevs.h       5 Apr 2021 20:46:06 -0000       1.750
+++ sys/dev/usb/usbdevs.h       22 Apr 2021 17:24:38 -0000
@@ -1083,6 +1083,7 @@
 #define        USB_PRODUCT_ASUS_RTL8192CU_2    0x17ba          /* RTL8192CU */
 #define        USB_PRODUCT_ASUS_RTL8192CU_3    0x17c0          /* RTL8192CU */
 #define        USB_PRODUCT_ASUS_RTL8156        0x18d1          /* RTL8156 */
+#define        USB_PRODUCT_ASUS_RTL8188EUS     0x18f0          /* RTL8188EUS */
 #define        USB_PRODUCT_ASUS_MYPAL_A730     0x4202          /* MyPal A730 */
 #define        USB_PRODUCT_ASUS2_USBN11        0x0b05          /* USB-N11 */
 
Index: sys/dev/usb/usbdevs_data.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v
retrieving revision 1.744
diff -u -p -u -p -r1.744 usbdevs_data.h
--- sys/dev/usb/usbdevs_data.h  5 Apr 2021 20:46:06 -0000       1.744
+++ sys/dev/usb/usbdevs_data.h  22 Apr 2021 17:24:38 -0000
@@ -1134,6 +1134,10 @@ const struct usb_known_product usb_known
            "RT3070",
        },
        {
+           USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RTL8188EUS,
+           "RTL8188EUS",
+       },
+       {
            USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RTL8192SU_1,
            "RTL8192SU",
        },

### DMESG
// I've changed MAC address to xx:xx:xx:xx:xx:xx and serial for battery
// and nvme to zeroes.

OpenBSD 6.9-current (GENERIC.MP) #0: Thu Apr 22 19:03:24 CEST 2021
    [email protected]:/sys/arch/amd64/compile/GENERIC.MP
real mem = 8469352448 (8077MB)
avail mem = 8197271552 (7817MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x8afbc000 (33 entries)
bios0: vendor Apple Inc. version "426.0.0.0.0" date 12/17/2020
bios0: Apple Inc. MacBookAir7,2
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT 
SSDT DMAR MCFG
acpi0: wakeup devices PEG0(S3) EC__(S3) HDEF(S3) RP01(S3) RP02(S3) RP03(S4) 
ARPT(S4) RP05(S3) RP06(S3) SPIT(S3) XHC1(S3) ADP1(S3) LID0(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz, 1500.21 MHz, 06-3d-04
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz, 1500.00 MHz, 06-3d-04
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins
acpiec0 at acpi0
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-155
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 5 (RP05)
acpiprt6 at acpi0: bus 4 (RP06)
acpisbs0 at acpi0: SBS0 model "bq20z451" serial 00000 type LION oem "DP"
acpipci0 at acpi0 PCI0: 0x00000004 0x00000011 0x00000001
acpicmos0 at acpi0
asmc0 at acpi0: SMC_ (smc-huronriver) addr 0x300/0x20: rev 2.27f627, 612 keys
"ACPI0008" at acpi0 not configured
"ACPI0001" at acpi0 not configured
"APP000D" at acpi0 not configured
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
abl0 at acpi0: PNLF (backlight)
acpibtn2 at acpi0: SLPB
acpicpu0 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@530 mwait.1@0x60), C2(200@148 mwait.1@0x33), 
C1(1000@1 mwait.1), PSS
acpivideo0 at acpi0: IGPU
acpivout0 at acpivideo0: DD01
cpu0: using VERW MDS workaround (except on vmm entry)
cpu0: Enhanced SpeedStep 1500 MHz: speeds: 1601, 1600, 1500, 1400, 1300, 1200, 
1100, 1000, 900, 800, 700, 600, 500 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x09
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 6000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi, BROADWELL, gen 8
azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x09: msi
azalia0: No codecs found
xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 
addr 1
"Intel 9 Series DMA" rev 0x03 at pci0 dev 21 function 0 not configured
"Intel 9 Series SPI" rev 0x03 at pci0 dev 21 function 4 not configured
"Intel 9 Series MEI" rev 0x03 at pci0 dev 22 function 0 not configured
azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x03: msi
azalia1: codecs: Cirrus Logic CS4208
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 9 Series PCIE" rev 0xe3
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 "Intel 9 Series PCIE" rev 0xe3: msi
pci2 at ppb1 bus 2
"Broadcom BCM15700A2" rev 0x00 at pci2 dev 0 function 0 not configured
ppb2 at pci0 dev 28 function 2 "Intel 9 Series PCIE" rev 0xe3: msi
pci3 at ppb2 bus 3
"Broadcom BCM4360" rev 0x03 at pci3 dev 0 function 0 not configured
ppb3 at pci0 dev 28 function 4 "Intel 9 Series PCIE" rev 0xe3: msi
pci4 at ppb3 bus 5
ppb4 at pci4 dev 0 function 0 vendor "Intel", unknown product 0x156b rev 0x00
pci5 at ppb4 bus 6
ppb5 at pci5 dev 0 function 0 vendor "Intel", unknown product 0x156b rev 0x00: 
msi
pci6 at ppb5 bus 7
vendor "Intel", unknown product 0x156a (class system subclass miscellaneous, 
rev 0x00) at pci6 dev 0 function 0 not configured
ppb6 at pci5 dev 3 function 0 vendor "Intel", unknown product 0x156b rev 0x00: 
msi
pci7 at ppb6 bus 8
ppb7 at pci5 dev 4 function 0 vendor "Intel", unknown product 0x156b rev 0x00: 
msi
pci8 at ppb7 bus 57
ppb8 at pci5 dev 5 function 0 vendor "Intel", unknown product 0x156b rev 0x00: 
msi
pci9 at ppb8 bus 106
ppb9 at pci5 dev 6 function 0 vendor "Intel", unknown product 0x156b rev 0x00: 
msi
pci10 at ppb9 bus 107
ppb10 at pci0 dev 28 function 5 "Intel 9 Series PCIE" rev 0xe3: msi
pci11 at ppb10 bus 4
ahci0 at pci11 dev 0 function 0 "Samsung SM951 AHCI" rev 0x01: apic 2 int 16, 
AHCI 1.3
ahci0: port 0: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, APPLE SSD SM0128, BXW3> naa.5002538900000000
sd0: 115712MB, 512 bytes/sector, 236978176 sectors, thin
pcib0 at pci0 dev 31 function 0 "Intel 9 Series LPC" rev 0x03
ichiic0 at pci0 dev 31 function 3 "Intel 9 Series SMBus" rev 0x03: apic 2 int 18
iic0 at ichiic0
iic0: addr 0x2c 03=fc 05=6c 06=80 71=06 72=80 86=77 90=37 91=25 92=35 93=3b 
94=42 95=3c 96=6c 97=86 98=20 99=1d 9a=84 9f=7c a0=7f a1=b5 a2=bf a3=7b a4=28 
a5=cf a6=64 a7=2d words 00=0000 01=0000 02=00fc 03=fc00 04=006c 05=6c80 06=8000 
07=0000
pchtemp0 at pci0 dev 31 function 6 "Intel 9 Series Thermal" rev 0x03
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
efifb at mainbus0 not configured
dt: 443 probes
urtwn0 at uhub0 port 1 configuration 1 interface 0 "Realtek 802.11n NIC" rev 
2.00/0.00 addr 2
urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R, address xx:xx:xx:xx:xx:xx
axe0 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Ethernet 
A1277" rev 2.00/0.01 addr 3
axe0: AX88772, address xx:xx:xx:xx:xx:xx
ukphy0 at axe0 phy 16: Generic IEEE 802.3u media interface, rev. 1: OUI 
0x000ec6, model 0x0006
uhub1 at uhub0 port 3 configuration 1 interface 0 "Apple Inc. BRCM20702 Hub" 
rev 2.00/1.00 addr 4
uhidev0 at uhub1 port 1 configuration 1 interface 0 "Apple Computer product 
0x820a" rev 2.00/1.00 addr 5
uhidev0: iclass 3/1, 1 report id
ukbd0 at uhidev0 reportid 1: 8 variable keys, 6 key codes
wskbd0 at ukbd0: console keyboard
uhidev1 at uhub1 port 2 configuration 1 interface 0 "Apple Computer product 
0x820b" rev 2.00/1.00 addr 6
uhidev1: iclass 3/1, 2 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ugen0 at uhub1 port 3 "Apple Inc. Bluetooth USB Host Controller" rev 2.00/1.50 
addr 7
uhidev2 at uhub0 port 5 configuration 1 interface 0 "Apple Inc. Apple Internal 
Keyboard / Trackpad" rev 2.00/1.71 addr 8
uhidev2: iclass 3/0, 63 report ids
uhid0 at uhidev2 reportid 63: input=64, output=0, feature=0
uhidev3 at uhub0 port 5 configuration 1 interface 1 "Apple Inc. Apple Internal 
Keyboard / Trackpad" rev 2.00/1.71 addr 8
uhidev3: iclass 3/1, 63 report ids
ukbd1 at uhidev3 reportid 1: 8 variable keys, 6 key codes, country code 13
wskbd1 at ukbd1 mux 1
uhid1 at uhidev3 reportid 9: input=0, output=0, feature=3
uhid2 at uhidev3 reportid 63: input=64, output=0, feature=0
ubcmtp0 at uhub0 port 5 configuration 1 interface 2 "Apple Inc. Apple Internal 
Keyboard / Trackpad" rev 2.00/1.71 addr 8
wsmouse1 at ubcmtp0 mux 0
umass0 at uhub0 port 14 configuration 1 interface 0 "Apple Card Reader" rev 
3.00/8.20 addr 9
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0: <APPLE, SD Card Reader, 3.00> removable 
serial.00000000000000000000
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd2 at scsibus4 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006>
sd2: 115711MB, 512 bytes/sector, 236976561 sectors
root on sd2a (1b1ebb38ded39d5e.a) swap on sd2b dump on sd2b
inteldrm0: 1440x900, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
ukphy0 detached
axe0 detached
urtwn0: could not read firmware urtwn-rtl8188eufw (error 2)
urtwn0: could not read firmware urtwn-rtl8188eufw (error 2)
axe0 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Ethernet 
A1277" rev 2.00/0.01 addr 3
axe0: AX88772, address xx:xx:xx:xx:xx:xx
ukphy0 at axe0 phy 16: Generic IEEE 802.3u media interface, rev. 1: OUI 
0x000ec6, model 0x0006
ukphy0 detached
axe0 detached
urtwn1 at uhub0 port 2 configuration 1 interface 0 "Realtek 802.11n WLAN 
Adapter" rev 2.00/2.00 addr 3
urtwn1: MAC/BB RTL8188CUS, RF 6052 1T1R, address xx:xx:xx:xx:xx:xx
urtwn1 detached
urtwn1 at uhub0 port 2 configuration 1 interface 0 "Realtek 802.11n WLAN 
Adapter" rev 2.00/2.00 addr 3
urtwn1: MAC/BB RTL8188CUS, RF 6052 1T1R, address xx:xx:xx:xx:xx:xx
urtwn1 detached


Reply via email to