https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263783
--- Comment #82 from Tomasz "CeDeROM" CEDRO <[email protected]> --- I have good feedback :-) Writing this from 14.2-p5 on Panasonic Toughbook CF-MX4 over buit-in USB MBIM modem, I am on a trip this weekend so I had a few moments in a train to build and test in real world environment :-) :-) BIG THANK YOU!! :-) Thank you Ed for the testing branch, looks like it is targeted towards 14.3 so I had to add few defines to build on 14.2 but it works :-) I also created simple /etc/rc.d/umbim script that brings up the connection on boot. This is just an example that works. Can be extended with verification if the provided interface works, maybe also implement several interfaces and configurations per interface if necessary :-) # uname -a FreeBSD cfmx4 14.2-RELEASE-p5 FreeBSD 14.2-RELEASE-p5 #4 releng/14.2-n269542-a14e765aa11a-dirty: Sat Sep 6 09:49:09 CEST 2025 root@cfmx4:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 # umbctl umb0 umb0: state up, mode automatic, registration home network provider "Orange", dataclass GPRS, signal #99 phone number "", roaming "" (denied) APN "internet", TX 50000000, RX 100000000 firmware "SWI9X15C_05.05", hardware "EM7305" diff --git a/sbin/umbctl/Makefile b/sbin/umbctl/Makefile index 35afb1bcfd4b..e7d6eab1ba3f 100644 --- a/sbin/umbctl/Makefile +++ b/sbin/umbctl/Makefile @@ -1,4 +1,4 @@ -CFLAGS+= -I${SRCTOP}/sys/dev/usb/net +CFLAGS+= -I/usr/src/sys -I${SRCTOP}/sys/dev/usb/net PROG= umbctl MAN= umbctl.8 diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile index 6dc4963594af..e9f0a6024a78 100644 --- a/sys/modules/usb/Makefile +++ b/sys/modules/usb/Makefile @@ -49,9 +49,7 @@ SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += atp cfumass uhid uhid_snes ukbd ums udbp uep wmt wsp ugold uled \ usbhid SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ - umct umcs umodem umoscom uplcom uslcom uvisor uvscom umb umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += cp2112 SUBDIR += udl SUBDIR += uether aue axe axge cdce cdceem cue ${_kue} mos rue smsc udav uhso \ diff --git a/sys/net/if_types.h b/sys/net/if_types.h index 17227726a663..dee71af80a5d 100644 --- a/sys/net/if_types.h +++ b/sys/net/if_types.h @@ -256,6 +256,7 @@ typedef enum { IFT_PFLOG = 0xf6, /* PF packet filter logging */ IFT_PFSYNC = 0xf7, /* PF packet filter synchronization */ IFT_WIREGUARD = 0xf8, /* WireGuard tunnel */ + IFT_MBIM = 0xf9, /* Mobile Broadband Interface Model */ } ifType; /* diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index e0f2ab697168..a3988c393494 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -148,5 +148,8 @@ #define SIOCSIFCAPNV _IOW('i', 155, struct ifreq) /* set IF features */ #define SIOCGIFCAPNV _IOWR('i', 156, struct ifreq) /* get IF features */ +#define SIOCGUMBINFO _IOWR('i', 157, struct ifreq) /* get MBIM info */ +#define SIOCSUMBPARAM _IOW('i', 158, struct ifreq) /* set MBIM param */ +#define SIOCGUMBPARAM _IOWR('i', 159, struct ifreq) /* get MBIM param */ #endif /* !_SYS_SOCKIO_H_ */ ===> /etc/rc.conf: umbim_enable="YES" umbim_config="/etc/umbim.conf" umbim_interface="umb0" ===> /etc/rc.d/umbim: #!/bin/sh # PROVIDE: umbim . /etc/rc.subr . /etc/network.subr name="umbim" desc="UMBIM Cellular Modem Interface" rcvar="umbim_enable" command="/sbin/umbctl" pidfile="/var/run/${name}.pid" start_cmd="umbim_start" stop_cmd="umbim_stop" status_cmd="umbim_status" load_rc_config $name umbim_start() { if [ -z "${umbim_config}" ]; then echo "umbim_config not provided!" return 1 fi if [ -z "${umbim_interface}" ]; then echo "umbim_interface not provided!" return 1 fi ${command} -f ${umbim_config} ${umbim_interface} ifconfig ${umbim_interface} up route add default -interface ${umbim_interface} } umbim_stop() { route del default -interface umb0 ifconfig ${umbim_interface} down delete } umbim_status() { ${command} ${umbim_interface} ifconfig ${umbim_interface} } run_rc_command "$1" -- You are receiving this mail because: You are the assignee for the bug.
