Results 1 to 8 of 8

Thread: How can i enable disabled wifi adapters from terminal?

  1. #1
    Join Date
    2015-Feb
    Location
    The Netherlands
    Posts
    12

    How can i enable disabled wifi adapters from terminal?

    If i turn off wifi by clicking "turn off" wifi from the options menu in the upper right corner, i can't turn it back on with a command from terminal.
    I'm using 4.3.0-kali1-amd64.

    So far i did try:
    Code:
    -rfkill unblock wifi
    -ifconfig wlan0 up
    -nmcli n on
    -iwconfig wlan0 power on
    -iwconfig wlan0 txpower 20
    -service network-manager start
    Code:
    rfkill list wifi output:
    soft- and hardblock state = no
    Also i'm able to see my network adapters with iwconfig, and ifconfig.

    When i click "wifi on" then everything works.

    Is there any option to enable the wifi adapters with a command from terminal after disabeling wifi from the option menu?

    Best regards

  2. #2
    Join Date
    2015-Jul
    Location
    /home/duxim
    Posts
    408
    try after that
    sudo service network-manager restart
    Repetitio est mater studiorum

  3. #3
    Join Date
    2015-Feb
    Location
    The Netherlands
    Posts
    12
    Thanks for your suggestion. I did try to restart the network manager with: sudo service network-manager restart.
    After restarting rfkill outputs that wifi is softblocked. Then i need to unblock them with rfkill unblock wifi.

    I did try below routine: unfortunately it's still not possible to enable wifi with a command from terminal.

    Any further help would be appreciated.

    Link to uploaded image:
    http://pasteboard.co/1IOsUFC4.png

    Screenshot.jpg
    Last edited by underscore; 2016-02-21 at 15:07.

  4. #4
    Join Date
    2015-Mar
    Posts
    141
    unless i'm looking at this wrong, everything should be working just fine.
    have you tried connecting manually with iwconfig?
    see if your network card can even see any networks( iwlist wlan0 scan )


    God, i hate network-manager... Nothing but problems...

  5. #5
    Join Date
    2015-Feb
    Location
    The Netherlands
    Posts
    12
    Thx for your suggestion.

    I did try all so far i know what's possible.

    when i scan with iwlist if wifi is disabled i can see nearby networks after i do: rfkill unblock wifi and ifconfig wlan0 up.

    I'm not sure it's a protection from Kali to not incidentally connect to wifi?

    Still then it must be possible to enable wifi because a mouse click also can do it.
    When i command network-manager to restart, i see the process is restarting. So i don't think network-manager is causing this problem.

    I did try to find out what processes are starting if i click "wifi on". Only this did not bring me any step further.

    Any suggestion is still welcome.
    Last edited by underscore; 2016-02-21 at 22:32.

  6. #6
    Join Date
    2015-Mar
    Posts
    141
    Sounds like you just aren't auto-connecting.

    What im saying is try and connect manually, like this:
    Code:
    iwconfig wlan0 essid YOUR-ESSID
    ifconfig wlan0 IP-ADDRESS
    echo "nameserver 8.8.8.8" > /etc/resolv.conf
    Then check your iwconfig to see if it associated.

  7. #7
    Join Date
    2015-Feb
    Location
    The Netherlands
    Posts
    12
    Ok, First i did disable wifi. then i used rfkill to unblock wifi, else i could not assign a ip address.

    Code:
    rfkill unblock wifi
    iwconfig wlan0 essid YOUR-ESSID
    ifconfig wlan0 IP-ADDRESS
    echo "nameserver 8.8.8.8" > /etc/resolv.conf
    Still i could not associate with my AP.
    echo "nameserver 8.8.8.8" > /etc/resolv.conf copyed "nameserver 8.8.8.8" into the given path.

  8. #8
    Join Date
    2015-Feb
    Location
    The Netherlands
    Posts
    12
    After a long time of debugging i found that WiFi radio killswitch is causing the problem. I thought i had found a solution to turn it on, unfortunately this only was working untill i reboot the system. Now i'm still looking for a suitable solution to switch it on...

    Edit:

    There is also a easy way to enable wifi. Just:
    Code:
    nmcli r wifi on
    will do the trick.
    Last edited by underscore; 2016-02-22 at 15:07.

Similar Threads

  1. wifi adapters
    By skankhunt42 in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2016-12-29, 06:11
  2. Having a lot of problems with Nexus 7 and OTG wifi adapters
    By masteroc in forum NetHunter General Questions
    Replies: 31
    Last Post: 2016-02-09, 20:14
  3. USB WiFi adapters not being detected.
    By xNotta in forum NetHunter General Questions
    Replies: 0
    Last Post: 2015-11-01, 19:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •