Connecting to a WPA2 network with ifconfig

Hi there! I am having a lot of issues with my wireless lately. I suspect it is actually hardware related (I just stopped working one day, and it stopped working at the same time on OpenBSD and a Linux live USB I used).

The machine is a Laptop, and I am using the iwm driver. Expanding a bit what I just said, I was watching some youtube videos and fell asleep. By the time I woke up, the connection was down. I had this happening to me before on an old machine, and there you just need to reboot (restarting netif didn't work). Tried that, but no dice. Tried on different OS, and nothing.

When I do an ifconfig, I see that the device is detected, but no ESSID and no carrier: (cut down to amke it smaller)
Code:
wlan0: 
        groups: wlan
        ssid "" channel 11 (2462 MHz 11g ht/20)
        regdomain FCC country US authmode WPA1+WPA2/802.11i privacy MIXED
        parent interface: iwn0
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
The issue I am having is that connecting as normal using the wpa_supplicant and the rc.conf scripts don't give much info and I can't debug. I wish to make a manual connection to check any error, but I can't find a way of doing it:
the manual for ifconfig is huge, and I couldn't find anything after reading for over an hour.
I tried checking Internet, but all I find is how to use ifconfig to connect to an unprotected network. I want to connect to a wpa2 network with ifconfig, or a similar tool (I know I can use wpa_supplicant, but that pulls from the config file and still doesn't give me any useful output) I can use ifconfig to scan (that works, but not always detects my ESSID), and I can use it to manually connect to that ESSID, but still can't finish the connection because I can't define a password.

ps: I managed to have WiFi for a short time by sitting next to the router, so it might be the antennas are detached, because I only had about 20% signal strength literally centimeters from said router. Still, I think it can be useful to know those things even if I fix the issue.
 
Thank you for all the replies. I tried wpa_cli, but again it is not verbose at all, so no idea what is wrong with the card, or at which point it fails. I took it off from the laptop and checked the antennas where in place, no physical damage, etc. Again, after moving into the living room to disassemble the computer the WiFi works, so it most likely is a range issue.

At least I can do USB tethering with my mobile or use my Ethernet cable at home for now. USB tethering never worked for me before. so I am pleased now that is not an issue.

I also noted that when WiFi was working, my RAM usage was quickly ramping up until I was forced to restart. I tough it was a Firefox issue, but this doesn't happen while using wired network or the USB tether, so either my hardware was interacting odd with the driver because of a physical fault, or there is some memory leak on the iwn driver.
 
I had to do some wireless troubleshooting and I found this.
When you fire up wpa-supplicant manually it probably is the best way to see problems.
Only add this to rc.conf with your interface name=$.
wlans_$="wlan0"

This is the normal syntax for firing up wireless WPA from the command prompt.
wpa_supplicant -i wlan0 -c/etc/wpa_supplicant.conf

That gives you basic console messages but for the whole stream of messages use the -d/-dd/-ddd option
wpa_supplicant -i wlan0 -dd -c/etc/wpa_supplicant.conf
 
Back
Top