How to set external wifi as default connection device

Hi.

I have an external wifi dongle and I’d like to set it as default connection device with no success. I choose it and I set the password and every time connected with built-in wifi.

The built-in wifi is (wlan0) and external (wlan1).

I own a raspberry pi3.

Any help? Thanks.

Your best option is to disable the internal wifi device if you do not intend using it. Searching the forum here will give many threads with the instructions on how to do this.

i searched and i found this topic Raspberry Pi 3 - How to disable onboard wifi? - #8 by fzinken

But when i try to edit “config.txt” from “boot” folder, i get “error code 3”, “persmission dinied”. I can’t edit, or delete the file. I use WinSCP program.

You need elevated privileges to edit the file. You can either do it with the command line following the instructions below to access and then running sudo nano /boot/config.txt or you can edit the file inside MyOSMC.

Details regarding how to access the command line interface can be found here on our Wiki: https://osmc.tv/wiki/general/accessing-the-command-line/

1 Like

Well finally succeed to change the config.txt via MyOSMC and thank you for that.

But how can i elevated privileges to edit the file? Manually via WinSCP, which is the easiest way, get the error i said before.

And something strange now that my raspberry connected through my extrernal wifi dongle. I can’t connect to my raspberry with WinSCP. I put the correct ip but it doesn’t connect. “Searching for host” and in a few second i get "Network error: Connecting to “my ip” timed out.

You need to read the previous post.

So i can edit files through MyOSMC and command line? Its normal that i can’t edit files with WinSCP?

You can use WinSCP to edit files that don’t need elevated privileges. If you need elevated privileges in WinSCP, see here. Otherwise use the command line and sudo.

1 Like

Your router will have assigned a different IP for external dongle, to that of the one that was assigned to the internal pi3 wifi.

Thanks Tom.

1 Like

Thank you guys. You helped me a lot!

Hi brox

To set winscp with sudo priviligies so it can edit and save config.txt. Do following.

  1. On winscp login click on advanced below the password field. If advanced is greyed out click on edit first.

  2. Click on Scp/shell

  3. In shell drop down menu click on sudo su -

Save. Now winscp should let you edit and save config.txt

Warning: When this is set you will be able to edit and delete system files through winscp so be careful. You can set the shell back to default when you have finished editing saving config.txt.

To disable onboard wifi so its uses the external wifi adapter, place the following line in config.txt and reboot.

dtoverlay=sdhost

Hope this helps :slight_smile:

1 Like

Thanks a lot the_bo

Thats what exactly i was looking for!