[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wi-Fi USB dongle disconnects



On Mon 02 May 2022 at 21:10:18 (-0300), riveravaldez wrote:
> On 5/2/22, David Wright <deblis@lionunicorn.co.uk> wrote:
> > On Mon 02 May 2022 at 12:26:44 (-0300), riveravaldez wrote:

> But nothing I remember to have created (at least manually).
> 
> > Or has the upgrade tried to revert the system back to a more
> > conventional ifupdown/wpa configuration in some way?
> 
> Maybe, that's one of the things I'm trying to rule out/discard,
> but can't think/know of a way to check it.

I don't think that's the main issue. But see below.

> If the USB-port makes an unstable contact, could that connect/
> /disconnect make the system assign new name to the dongle in
> each iteration? (Just an idea...)

I suppose so. That would presumably be done by the kernel and
USB driver. I have flaky USB (and HDMI, and power) ports on
one laptop. The power cable has to be tucked under it so that
it imparts a torque to maintain contact (the battery is shot).
The HDMI doesn't matter too much; I just wiggle it.

For USB sticks, I use an extension cable, also tucked underneath,
but not imparting any torque. It just means the inboard end of
the cable doesn't move when I connect and disconnect things at
the outboard end.

That might work for a wifi dongle; after all, some people have
to use a socket extender to improve the radio signal behaviour.

> >> may 02 10:35:08 debian dhclient[6067]: Failed to get interface index:
> >> No such device

> >> Tried renaming the interface with:
> >>
> >> $ sudo ip link set wlan1 name wlan0
> >>
> >> But it was unable to connect:

Some time ago I read about iwd on their blog, and it talked about
the redundancy of interface names when using the index instead.
Or something like that. But memory is hazy as I didn't understand
a lot of it, and the context.

I thought the .link file should prevent all the renaming, as it
uses a wildcard match. But I don't have any experience of this,
nor can I replicate it as using the rfkill switch would not be
a comparable operation. (I have a dongle that used to work with
ndiswrapper, but I think that's gone since 5.x kernels came in.)

I know your configuration is a little more complex (hybrid) than
mine, as you posted it here a few months ago. You were using:

  allow-hotplug wlan4
  iface wlan4 inet dhcp

if your /e/n/i file rather than using iwd's built-in DHCP client.
I wonder whether some of the problem is caused by hotplug being
fooled by the reconnection into trying to redo the DHCP, which
could cause the old lease to be "stopped" (I don't know the jargon).

Is it possible that iwd could sail through the interruptions,
perhaps even /because/ it locks onto the index/interface name,
but for the hotplug actions screwing things up. I don't know.

As for my configuration, I've now settled on iwd+openresolv,
controlled by systemd-networkd/systemd-resolved. Perhaps it's
time I reposted it. Not that it will solve your underlying
connection problem, unfortunately.

Cheers,
David.


Reply to: