0

I'm running a python script to configure the wifi interface, but I'm having a problem with the ifdown and ifup command. It looks like this command has been replaced by:

sudo ip link set wlan0 down
sudo ip link set wlan0 up

But I can not use this command since I'm using wifi library to interact with these files and programs. The file /etc/network/interfaces:

source-directory /etc/network/interfaces.d

iface wlan0-kenta inet dhcp
    wpa-ssid kenta
    wireless-channel auto
    wpa-psk #here has code apparently in hexadecimal representing the password,
            #I have already tried to switch to the character password.

How can I fix this problem?

2
  • Why are you using these bizarre commands? None of these are used in current Raspbian.
    – Milliways
    Mar 5 '19 at 6:25
  • I'm using a python library that when trying to connect to a network, uses this command to disable and enable network interface.
    – kenta
    Mar 5 '19 at 14:14
0

I saw this thread on stack overflow which seems to use the wifi library. Maybe it will work for you.

Stack overflow link to using wifi library

2
  • Thanks, but this did not work for me, now I wrote my own wifi network configuration library that did not need this command.
    – kenta
    Mar 5 '19 at 23:12
  • @kenta And does it work now? If so, please make an answer to tell that your problem is solved. This will also finish your question.
    – Ingo
    Mar 6 '19 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.