create cdc-ncm module

This commit is contained in:
Daniel Barlow 2024-05-14 18:07:33 +01:00 committed by Raito Bezarius
parent 9cb73f3fec
commit 0f520ceee2
2 changed files with 23 additions and 1 deletions

View file

@ -20,7 +20,7 @@ in rec {
}; };
imports = [ imports = [
# ../modules/wlan.nix ../modules/cdc-ncm
../modules/network ../modules/network
../modules/vlan ../modules/vlan
../modules/ssh ../modules/ssh

View file

@ -0,0 +1,22 @@
{ config, ... }:
{
config = {
kernel.config = {
USB_NET_HUAWEI_CDC_NCM = "y";
USB_USBNET = "y";
USB_SERIAL = "y";
USB_SERIAL_OPTION = "y";
};
# an ncm ethernet adaptor does
# * usb modeswitch
# * AT commands
# and then behaves like a link.
# we could identify by vid:pid but that's a bit awkward
# if there's more than one present. IMEI?
# https://stackoverflow.com/questions/5477882/how-to-i-detect-whether-a-tty-belonging-to-a-gsm-3g-modem-is-a-data-or-control-p
};
}