default connection specify -- how to?

Moderator: Forum moderators

Post Reply
User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

default connection specify -- how to?

Post by vin »

conn_screenshot.png
conn_screenshot.png (189.89 KiB) Viewed 2472 times

I am running Xenialpup64 7.5
2 connections are active viz. wlan0 & eth0.
After booting up, wlan0 is connected by default.
Would like to connect to eth0 by default.
Everytime after boot-up I need to disconnect it through Barry's SNS and connect eth0.

Where & how do I specify the default connection choice?
Thanks.

Last edited by Flash on Sat Sep 25, 2021 5:48 pm, edited 1 time in total.
Reason: Added ?
User avatar
mikeslr
Posts: 2964
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 919 times

Re: default connection specify -- how to

Post by mikeslr »

Hi vin,

I thought there was a recent post on this but can't find it. Being 2 floors away from my router, I can't use ethernet. There may be a way to do that using Barry's Simple Network Setup. But, off-hand, I think it's easier if you start with Menu>Setup>Internet Connection Wizard>Wired or Wireless and choose Network Wizard.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to

Post by vin »

@mikeslr
I looked at Barry's SNS as well as Network Wizard.
Although these are nice tools for internet setup, I couldn't find a way to specify default connection.
BTW can you please tell me what's the config file name and location for newtwork setup? Maybe some tweaking in that file would help.

ozsouth
Posts: 1569
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 241 times
Been thanked: 704 times

Re: default connection specify -- how to

Post by ozsouth »

@vin - right click the taskbar network icon then click disconnect. Then right click it again & choose setup. Will be able to delete saved connection & start over.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to

Post by vin »

ozsouth wrote: Sat Sep 25, 2021 5:14 am

@vin - right click the taskbar network icon then click disconnect. Then right click it again & choose setup. Will be able to delete saved connection & start over.

@ozsouth
I did as you said.
Deleted wireless and then reconfigured.
Now eth0 is at no. 1 and wlan0 at no. 2
But after rebooting, wlan0 has become no. 1 and gets connected by default.

BTW there's one file viz. "connections.txt" in "/etc/simple_network_setup/"
Contents ---

Code: Select all

wlan0|Wireless|ath9k|pci|Support for Atheros 802.11n wireless LAN cards. |DC:85:DE:A0:4C:FB|01|A8:DA:0C:D2:4B:22|1|67/70|on|JioFiberVIN-2Ghz|<password goes here>|WPA-PSK||wext|-I ''|
eth0|Wired|alx|pci|Qualcomm Atheros(R) AR816x/AR817x PCI-E Ethernet Network |08:60:6E:51:9E:DC||

Maybe from here, we can change the priority?

Edit:-
I also looked at /usr/sbin/connecwizard file. But don't know how to tweak. Any idea pl.?
Thanks.

ozsouth
Posts: 1569
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 241 times
Been thanked: 704 times

Re: default connection specify -- how to

Post by ozsouth »

@vin - try reversing the entries in connections.txt. Never tried it myself, as always use wireless.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to

Post by vin »

ozsouth wrote: Sat Sep 25, 2021 8:39 am

@vin - try reversing the entries in connections.txt. Never tried it myself, as always use wireless.

Already tried that also.
But after reboot, it changes back to square one.

ndujoe2
Posts: 78
Joined: Sat Mar 27, 2021 4:52 pm
Has thanked: 3 times
Been thanked: 9 times

Re: default connection specify -- how to

Post by ndujoe2 »

This is just a physical solution. Laptops usually will have a function key that turns off the wireless interface. Perhaps that will enable your eth0 default setting.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to

Post by vin »

ndujoe2 wrote: Sat Sep 25, 2021 1:24 pm

This is just a physical solution. Laptops usually will have a function key that turns off the wireless interface. Perhaps that will enable your eth0 default setting.

@ndujoe2
By using function key, wireless would be disabled temporarily. That's it. How can it change default conn in settings file?

User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: default connection specify -- how to?

Post by bigpup »

I am running Xenialpup64 7.5

How is it installed and on what drive?
Full or frugal install?
If Frugal are you making a save file/folder to store changes you make?
Is the Ethernet cable always connected when you boot?

When you setup the eth0 connection.
You should be seeing window that has option to set it as default connection.
Are you seeing this?
Are you shutting down and making a save to store configuration changes?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

@bigpup

bigpup wrote: Sun Sep 26, 2021 2:30 am

I am running Xenialpup64 7.5

How is it installed and on what drive?

Running xenialpup dual boot with LUbuntu.
Installed it from usb pendrive.

Full or frugal install?

Frugal

If Frugal are you making a save file/folder to store changes you make?

Using save folder.

screenshot-savefolder.png
screenshot-savefolder.png (142.99 KiB) Viewed 2454 times

Is the Ethernet cable always connected when you boot?

I reconnect Ethernet cable BEFORE STARTING puppy.
It is disconnected after shutting down puppy.
So effectively it is as good as 'connected always'.

When you setup the eth0 connection.
You should be seeing window that has option to set it as default connection.
Are you seeing this?
Are you shutting down and making a save to store configuration changes?

No, I do not see any such window. (tried all the 3 tools viz. sns, frisbee & network wizard).
While shutting down, I can see that the session is getting saved.

User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: default connection specify -- how to?

Post by bigpup »

You should be seeing the set as default option window, when you finish setup of the connection.

Did you ever setup the WIFI as connection?
If yes.
That could be what got set as default.

but a new connection method setup, should reset this, so you are asked to make it default.

Xenialpup has some updates that may or may not help.
Quickpet icon on desktop.
Quickpet->Info->Xenialpup updates
Reboot and save, so changes are now being used.

Any help?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

bigpup wrote: Mon Sep 27, 2021 3:09 pm

You should be seeing the set as default option window, when you finish setup of the connection.

I get this window after setting up connection. But it is about 'default network tool', not 'default interface'.

defatool.png
defatool.png (210.15 KiB) Viewed 2439 times

Did you ever setup the WIFI as connection?
If yes.
That could be what got set as default.

Sorry, didn't understand what you said.
I did setup wifi interface from sns (and also tried other tools).

....'WIFI as connection'.... is it something different than setting up 'wlan0' profile?

Xenialpup has some updates that may or may not help.
Quickpet icon on desktop.
Quickpet->Info->Xenialpup updates
Reboot and save, so changes are now being used.

Did it.
Could see some updates.
But no change in defa conn.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

Ah, found something....
It clearly says that wireless profile is tried first...
That means wireless choice is by default; it is built into the bricks & mortar of system.
Istn't it?

conn_screenshot_autoWireless.png
conn_screenshot_autoWireless.png (332.52 KiB) Viewed 2438 times
User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

Simple_network_setup will not automatically start a wired ethernet connection if any wifi connection is available. That is the way it was designed.

However, Frisbee provides the option to control whether wifi can be connected at boot-up time. The main window contains a checkbox at the top of the first tab: "Connect WiFi Automatically".
Although it is checked by default, unchecking it will prevent wifi from starting.

I just now tried that in Xenialpup64. Although wifi was actively connected, the network icon changed to eth0 a few seconds after I unchecked the option!

Richard

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

rerwin wrote: Mon Sep 27, 2021 9:07 pm

Simple_network_setup will not automatically start a wired ethernet connection if any wifi connection is available. That is the way it was designed.

However, Frisbee provides the option to control whether wifi can be connected at boot-up time. The main window contains a checkbox at the top of the first tab: "Connect WiFi Automatically".
Although it is checked by default, unchecking it will prevent wifi from starting.

I just now tried that in Xenialpup64. Although wifi was actively connected, the network icon changed to eth0 a few seconds after I unchecked the option!

Richard

@rerwin
Thanks Richard.
It worked exactly as you said.
Almost solved the issue.
Just one observation -- In case eth0 goes down, we need to open frisbee and connect wlan0 manually. (Obviously so, because 'connect automatically' is unchecked). But under LUbuntu, automatically wireless gets connected. No intention of comparing LUbuntu with Puppy, but still....
Anyways, this is not a big deal..... I have set eth0 as default now.
Thanks mate.

User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

vin wrote: Tue Sep 28, 2021 4:08 am

Just one observation -- In case eth0 goes down, we need to open frisbee and connect wlan0 manually.

Thanks for that observation.

In SNS 3.x I made the automatic interface and connection choice dependent on the order of configured connections but retained the preference for any wifi connection over any wired one. Maybe I should include the wired connections when choosing the connection.

In 3.x, the connections are listed starting with the last one defined, except that the wired connections are always at the bottom of the list. So, with a code change, if the last one defined is wired, that would be the preferred/default if available.

Do you (or anyone) think that would be worth changing? If so, please tell me more about what situation you need to accommodate. I infer that either your wired connection is unreliable or that you can plug in your laptop some places but not others, therefore needing wifi.

I wonder what the reasoning was to always use wifi if available. Maybe it was to avoid using a faulty built-in ethernet interface. I tend to agree that wired-first would be better, considering that one could avoid wired by simply not defining the wired connection. Comments, anyone?

Richard

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

@rerwin

rerwin wrote: Tue Sep 28, 2021 2:30 pm

In 3.x, the connections are listed starting with the last one defined, except that the wired connections are always at the bottom of the list. So, with a code change, if the last one defined is wired, that would be the preferred/default if available.
Do you (or anyone) think that would be worth changing?

Yes. It is worth changing.
It would be just great if you change that code to make wired as default if found at the bottom of the list.
In fact, within the "/etc/simple_network_setup/connections" file, I had moved that last line of eth0 to the top. But it got restored to the bottom after reboot :-(

If so, please tell me more about what situation you need to accommodate. I infer that either your wired connection is unreliable or that you can plug in your laptop some places but not others, therefore needing wifi.

The reason is like this ---
I have 150 Mbps optical fibre broadband. Ethernet gives max speed (~140Mbps).
For wireless, my laptop doesn't support 5 GHz wifi. I need to connect to 2.4 GHz. Although it gives good coverage, its speed is ~ 40Mbps.
This is the reason behind prefering eth0 over wifi.
Now, when I move to another room within the building, there is no LAN conn. So I need to connect to wifi.
So I need to keep eth0 & wlan0 as Plan-A and Plan-B.

I wonder regarding the reason behing 'always use wifi if available'. Maybe it was to avoid using a faulty built-in ethernet interface. I tend to agree that wired-first would be better, considering that one could avoid wired by simply not defining the wired connection. Comments, anyone?

Richard

I also wonder why 'wifi over eth' is preferred.
It makes sense to keep wired first choice.

Last edited by vin on Tue Sep 28, 2021 3:25 pm, edited 1 time in total.
User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

vin,

Thank you. I concur and will work on a solution for SNS 3.2.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

@rerwin

rerwin wrote: Tue Sep 28, 2021 3:22 pm

vin,

Thank you. I concur and will work on a solution for SNS 3.2.

Thanks Richard.
I will eagerly look forward for sns 3.2
Do let me know once done so that I can test it.

User avatar
bigpup
Moderator
Posts: 6995
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1528 times

Re: default connection specify -- how to?

Post by bigpup »

I seem to remember the reasoning in SNS always trying the WIFI first, was based on the fact that most people were using WIFI.

They may have at first, used wired connection, to maybe get needed firmware or drivers for the WIFI hardware.
I have had to do this, at times, for different Puppy versions.

After getting WIFI working.
They stopped using wired connection.
Only use WIFI.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

vin wrote: Tue Sep 28, 2021 3:31 pm

I will eagerly look forward for sns 3.2
Do let me know once done so that I can test it.

@vin
I have completed SNS 3.2 and have sent you a beta copy to test. Please check your PMs.

Richard

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

rerwin wrote: Sun Oct 03, 2021 4:11 pm

@vin
I have completed SNS 3.2 and have sent you a beta copy to test. Please check your PMs.

Richard

@rerwin
Thanks for the beta copy.
I installed the .pet, opened sns and tried to configure wlan0 first.
But it is unable to scan wlan0.
I didn't try eth0 (since it is to be done last).

Through Frisbee it can be configured.
(do let me know if any other debug info is needed).

wifi-scan-issue.png
wifi-scan-issue.png (20.59 KiB) Viewed 2552 times
User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

vin wrote: Mon Oct 04, 2021 8:31 am

I installed the .pet, opened sns and tried to configure wlan0 first.
But it is unable to scan wlan0.

(do let me know if any other debug info is needed).

Interesting.

Please turn on tracing in the sns script, /usr/local/simple_network_setup. Uncomment line 66, to make it:

set -x; exec >&2 #DEBUG

Try configuring wlan0. Then when it fails to find a connection, use frisbee to connect and send me (by PM) the log file, /tmp/xerrs.log.

Feel free to look at that file to see if there is anything obvious to you.

Thanks.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

@rerwin
I ve sent the log file via PM.

User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

The PM waits in 'output' until the recipient reads it.

The problem is:
/usr/sbin/sns: line 533: iw: command not found

You need to install 'iw' from the PPM. Later puppys already have it. We did not need the trace to see that.

I think I should make sns detect that and complain.

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

rerwin wrote: Mon Oct 04, 2021 4:07 pm

The PM waits in 'output' until the recipient reads it.

The problem is:
/usr/sbin/sns: line 533: iw: command not found

You need to install 'iw' from the PPM. Later puppys already have it. We did not need the trace to see that.

I think I should make sns detect that and complain.

Fantastic @rerwin
That did the job.
Now I can setup the networks, and eth0 has 1st priority (even after reboot).
Issue solved.
Maybe, you can think of releasing SNS 3.2 (after catching 'iw' dependancy).
Thanks again for your valuable time & efforts. :thumbup:

User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

vin,
Thank you for verifying that 3.2 does the job for you.

I have added the check for 'iw' and will release it soon.

Richard

User avatar
vin
Posts: 62
Joined: Fri Nov 27, 2020 8:39 am
Location: Bharat (India)
Has thanked: 25 times

Re: default connection specify -- how to?

Post by vin »

rerwin wrote: Tue Oct 05, 2021 1:28 pm

I have added the check for 'iw' and will release it soon.

Richard

@rerwin
Do share its location after releasing.
Thanks.

User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: default connection specify -- how to?

Post by rerwin »

I will post it here:
Puppy Network Managers - SNS, Frisbee, NetWiz, Pgprs, Pupdial
viewtopic.php?p=2241#p2241

Post Reply

Return to “Xenial”