Project

General

Profile

Actions

Bug #12606

closed

``devd`` is not configured to act on USB interface attach/detach events

Added by Viktor Gurov about 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
Interfaces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default
Affected Version:
2.5.2
Affected Architecture:

Description

There us no rc.linkup events on USB modem attach/detach:

Detach:

kernel: ugen0.2: <ZTE,Incorporated ZTE Mobile Broadband> at usbus0 (disconnected)
kernel: cdce0: at uhub0, port 4, addr 1 (disconnected)
kernel: cdce0: 
kernel: detached
kernel: umass0: at uhub0, port 4, addr 1 (disconnected)
kernel: cd0 at umass-sim0 bus 0 scbus4 target 0 lun 0
kernel: cd0: <ZTE USB SCSI CD-ROM 2.31>  s/n 1234567890ABCDEF detached
kernel: da0 at umass-sim0 bus 0 scbus4 target 0 lun 1
kernel: da0: <ZTE MMC Storage 2.31>  s/n 1234567890ABCDEF detached
kernel: (da0:umass-sim0:0:0:1): Periph destroyed
kernel: (cd0:umass-sim0:0:0:0): Periph destroyed
kernel: umass0: detached
vnstatd[98250]: Interface "ue0" disabled.
rc.gateway_alarm[16370]: >>> Gateway alarm: MODEMGW (Addr:1.1.1.1 Alarm:1 RTT:53.503ms RTTsd:8.031ms Loss:21%)
check_reload_status[402]: updating dyndns MODEMGW
check_reload_status[402]: Restarting IPsec tunnels
check_reload_status[402]: Restarting OpenVPN tunnels/interfaces
check_reload_status[402]: Reloading filter

Attach:

kernel: umass0: <Mass Storage> on usbus0
kernel: cd0 at umass-sim0 bus 0 scbus4 target 0 lun 0
kernel: cd0: <ZTE USB SCSI CD-ROM 2.31> Removable CD-ROM SCSI-2 device
kernel: cd0: Serial Number 1234567890ABCDEF
kernel: cd0: 40.000MB/s transfers
kernel: cd0: Attempt to query device size failed: NOT READY, Medium not present
kernel: cd0: quirks=0x10<10_BYTE_ONLY>
kernel: da0 at umass-sim0 bus 0 scbus4 target 0 lun 1
kernel: da0: <ZTE MMC Storage 2.31> Removable Direct Access SCSI-2 device
kernel: da0: Serial Number 1234567890ABCDEF
kernel: da0: 40.000MB/s transfers
kernel: da0: Attempt to query device size failed: NOT READY, Medium not present
kernel: da0: quirks=0x2<NO_6_BYTE>
vnstatd[98250]: Interface "ue0" enabled.

Actions #1

Updated by Jim Pingle about 3 years ago

Since we do not support hotplugging interfaces and a USB interface couldn't be assigned and unplug/replug like that, I'm not sure it makes sense to make changes to fire events when that happens.

Actions #2

Updated by Viktor Gurov about 3 years ago

Jim Pingle wrote in #note-1:

Since we do not support hotplugging interfaces and a USB interface couldn't be assigned and unplug/replug like that, I'm not sure it makes sense to make changes to fire events when that happens.

This is necessary primarily in cases where USB LTE is used as a failover connection - to follow all linkup up/down steps

fix:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/506

Actions #3

Updated by Jim Pingle about 3 years ago

A WAN connectivity failure shouldn't cause the ue0 interface to disappear and reappear, though. Unless that's a new modem behavior I haven't heard of. If an interface is assigned it should always remain plugged in. We don't support someone only plugging in a new interface dynamically without removing/re-adding the assignment first.

Feature request #9393 is already there to support that but it isn't possible yet. I think adding this code now would encourage people to rely on unsupported behavior.

Actions #4

Updated by Viktor Gurov about 3 years ago

Jim Pingle wrote in #note-3:

A WAN connectivity failure shouldn't cause the ue0 interface to disappear and reappear, though. Unless that's a new modem behavior I haven't heard of. If an interface is assigned it should always remain plugged in. We don't support someone only plugging in a new interface dynamically without removing/re-adding the assignment first.

The most popular use of USE NICs is LTE modems,- this feature allow to change/replace the USB modem, or switch the modem SIM card. It can also help in cases where the LTE modem is accidentally disconnected or dead at a remote site.

Actions #5

Updated by Jim Pingle about 3 years ago

That may be the case, but until #9393 is done that is not supported and I don't think we should encourage it.

Actions #6

Updated by Viktor Gurov over 2 years ago

  • Status changed from New to Feedback
  • Assignee set to Viktor Gurov
  • Target version set to 2.7.0
  • Plus Target Version set to 22.05
Actions #7

Updated by Viktor Gurov over 2 years ago

  • % Done changed from 0 to 100
Actions #8

Updated by Jim Pingle over 2 years ago

  • Subject changed from DEVD does not catch USB interface attach/detach events to ``devd`` is not configured to act on USB interface attach/detach events

Updating subject for release notes.

Actions #9

Updated by Jim Pingle over 2 years ago

  • Status changed from Feedback to Resolved

devd hooks are in place and fire as expected when plugging/unplugging a USB Ethernet dongle

Actions

Also available in: Atom PDF