Hey
> I have a Quectel BG95 bespoke model with both UART and USB tty interfaces. > When attempting to set the rules as shown below, I am unable to group the > modem and get it working with both interfaces. Only the ttyUSB* is being > acquired, while the UART port (ttyAMA2) is not recognized for Secondary > port, resulting in the error: "Cannot add port and unhandled port type." > > Is it possible to add both USB and UART ports under a single device, > designating one as the primary and the other as the secondary port? > > Here are the udev rules I’ve configured in > /etc/udev/rules.d/77-mm-candidate.rules: > > # Rule for primary AT port (ttyUSB2) > ACTION=="add|change", KERNEL=="ttyUSB2", ENV{ID_MM_CANDIDATE}="1", > ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1", ENV{ID_MM_DEVICE_PROCESS}="1", > ENV{ID_MM_PHYSICAL_DEVICE}="quectel_lpwa" > > # Rule for diagnostic port (ttyUSB0) > ACTION=="add|change", KERNEL=="ttyUSB0", ENV{ID_MM_CANDIDATE}="1", > ENV{ID_MM_PORT_TYPE_QCDM}="1", ENV{ID_MM_DEVICE_PROCESS}="1", > ENV{ID_MM_PHYSICAL_DEVICE}="quectel_lpwa" > > # Rule for secondary AT port (ttyAMA2) > ACTION=="add|change", KERNEL=="ttyAMA2", ENV{ID_MM_CANDIDATE}="1", > ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1", ENV{ID_MM_DEVICE_PROCESS}="1", > ENV{ID_MM_PHYSICAL_DEVICE}="quectel_lpwa", ENV{ID_MM_TTY_BAUDRATE}="115200", > ENV{ID_MM_TTY_FLOW_CONTROL}="none" > Could you please advise if this configuration can support both USB and UART > ports together or if there is a specific method to handle this? > Have you made sure that the udev tags are being correctly configured? You can do so with "sudo udevadm info -p /sys/class/tty/ttyUSB2" and such. If all the tags are set, please provide a MM debug log that includes device probing, so please use the steps at https://modemmanager.org/docs/modemmanager/debugging/ The fact that the ttyAMA2 port is not grabbed could be because the serial settings are incorrect, or because the serial settings are not being correctly used by MM. Also, please note, the kernel does not guarantee that the ttyUSB and ttyAMA ports are always named in the same way, so using udev rules like that is error-prone. A much better approach would be to bind the udev rules to specific sysfs paths, e.g. DEVPATH=="/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5/4-1.5.5" Also, the ACTION rule is missing "bind". The udev tags must be set in all "add", "change" and "bind" actions. This may actually be your issue. -- Aleksander