USB WiFi learning exercise

I bought a noname USB WiFi dongle from a supermarket and am in a process of trying to get it working on my ThinkPad X61 laptop.

The adapter is branded Qilive, which I have never heard of. The packaging said 'Wireless USB adapter', WiFi B/G/N, 300Mbps. No details about chip.

To start with I inserted in the laptop and ran lsusb from sysutils/usbutils which revealed:-

Bus /dev/usb Device /dev/ugen0.4: ID 0bda:818b Realtek Semiconductor Corp. RTL8192EU 802.11b/g/n WLAN Adapter

Just to be sure I did a lookup of PrdID/VendID on https://the-sz.com/products/usbid/ which gave me:

0x0BDA 0x818B Realtek Semiconductor Corp. RTL8192EU 802.11b/g/n WLAN Adapter

same as lsusb, so am wondering if this is embedded in the device somewhere....

So, a search for freebsd wifi cards RTL8192EU led to Thread 88055, but I can't tell if that actually works with my adapter under 13.2-R.

My /etc/rc.conf
Code:
wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

When I insert the adapter ifconfig wlan0 shows
Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 90:de:80:1a:95:36
    groups: wlan
    ssid "" channel 8 (2447 MHz 11g)
    regdomain FCC country US authmode WPA1+WPA2/802.11i privacy ON
    deftxkey UNDEF txpower 30 bmiss 7 scanvalid 60 protmode CTS wme
    roaming MANUAL
    parent interface: rtwn0
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

ifconfig wlan0 scan detects my wireless network

Code:
SSID/MESH ID                      BSSID              CHAN RATE    S:N     INT CAPS
Home_net                          18:31:bf:68:70:98    2   54M  -83:-95   100 EPS  APCHANREP APCHANREP WPS HTCAP RSN WME

Running
[CODE]Destroyed wlan(4) interfaces: wlan0.
Created wlan(4) interfaces: wlan0.
Starting wpa_supplicant.
Starting dhclient.
ifconfig: ioctl (SIOCAIFADDR): Network is down
wlan0: not found
exiting.
[/CODE]
[CMD]
[CODE]uhub_reattach_port: could not allocate new device
ugen2.2: <Realtek 802.11n NIC> at usbus2
rtwn0 on uhub2
rtwn0: <802.11n NIC> on usbus2
rtwn0: MAC/BB RTL8192EU, RF 6052 2T2R
wlan0: Ethernet address: 90:de:80:1a:95:36
lo0: link state changed to DOWN
wlan0: Ethernet address: 90:de:80:1a:95:36
lo0: link state changed to UP
em0: link state changed to DOWN
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
em0: link state changed to UP
ugen2.2: <Realtek 802.11n NIC> at usbus2 (disconnected)
rtwn0: at uhub2, port 3, addr 2 (disconnected)
rtwn0: r92e_power_off: failed to block Tx queues
rtwn0: detached
usb_alloc_device: set address 2 failed (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
[/CODE]

Can anyone shed any light on what is happening or what I may have missed?



[/CMD] produces
 
I have now installed 14.0-R and the previous error (has partially) disappeared.

ifconfig wlan0 shows:

Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=0
    ether 90:de:80:1a:95:36
    groups: wlan
    ssid *********** channel 2 (2417 MHz 11g ht/20)
    regdomain ETSI country RU authmode WPA1+WPA2/802.11i privacy ON
    deftxkey UNDEF txpower 30 bmiss 7 scanvalid 60 protmode CTS ht20
    ampdulimit 8k ampdudensity 16 shortgi -stbc -ldpc -uapsd wme
    roaming MANUAL
    parent interface: rtwn0
    media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
    status: no carrier
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

cat /etc/wpa_supplicant.conf :-
Code:
### start wpa_supplicant.conf
update_config=1
ctrl_interface=/var/run/wpa_supplicant GROUP=wheel
network={
    ssid="**********"
    psk="*******"
    group=CCMP
}
#EOF
cat /etc/rc.conf :-
Code:
wlans_rtwn0="wlan0"
ifconfig_wlan0="ssid ******* WPA SYNCDHCP"
create_args_wlan0="country RU regdomain ETSI"

What am I missing?

Is there a log of DHCP attempts with reason for no link?
 
How do I trace what happens when processing this line in /etc/rc.conf:?

ifconfig_wlan0="WPA SYNCDHCP"

if doesn't work as expected, is there any way to tie this down to a driver/hardware problem or a configuration problem?

If configuration, is that down to /etc/rc.conf and/or /etc/wpa-supplicant.conf?
 
Try static IP:

ifconfig wlan0 inet 192.168.x.x netmask 255.255.255.0
route add default 192.168.x.1
echo "nameserver your-dns-server" >> /etc/resolv.conf
ifconfig wlan0
ping any-url


Or run wpa_supplicant manually with the debug option, and check the dhclient service log.

Open in different terminals (interactive mode):

wpa_supplicant -d -i wlan0 -c /etc/wpa_supplicant.conf
service dhclient restart wlan0
tail -f /var/db/dhclient.leases.wlan0


rc.conf()
rc_debug (bool) If set to "YES", enable output of debug messages
from rc scripts. This variable can be helpful in diagnos-
ing mistakes when editing or integrating new scripts. Be-
ware that this produces copious output to the terminal and
syslog(3).

rc_info (bool) If set to "NO", disable informational messages from
the rc scripts. Informational messages are displayed when
a condition that is not serious enough to warrant a warning
or an error occurs.

 
Back
Top