Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
Hey, > > I am in the same situation and my Quectel BG770A-GL modem is using the > EMUX instead of the standard CMUX mode. > > Quectel is only providing full PPP support for this EMUX mode and so > would like to know what could be > the best way to add support for thoses /dev/pts virtual devices in MM ? > > Im using ModemManager 1.18, is it possible to "force" a port (without > udev) in MM ? > I have not done any testing myself with this kind of ptys, but I don't think it should be very difficult to support them, at least e.g. manually. You can try to run the MM daemon with --test-no-udev, and then use mmcli --report-kernel-event to notify about the port additions as if they were notified by udev. See e.g. https://lists.freedesktop.org/archives/modemmanager-devel/2016-August/003269.html This approach *won't work* by default for ptys, but it may give you an initial way forward if you want to start testing custom MM changes to adjust the port probing to support these device types. The MMKernelDevice objects will need to be adjusted to support these device types that don't have a direct counterpart entry in sysfs. -- Aleksander
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
Hello, I am in the same situation and my Quectel BG770A-GL modem is using the EMUX instead of the standard CMUX mode. Quectel is only providing full PPP support for this EMUX mode and so would like to know what could be the best way to add support for thoses /dev/pts virtual devices in MM ? Im using ModemManager 1.18, is it possible to "force" a port (without udev) in MM ? Thanks ! -- Kamel Bouhara, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
On Tue, Apr 9, 2024 at 11:28 AM Garfield Watkins wrote: > > Is there any other workaround you can suggest ? I really do need these > virtual terminals exposed by the multiplexer. > Without adjusting MM to support the specific use case of the ptys, I'm not sure there is any easy way to handle this, I'm afraid. -- Aleksander
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
Is there any other workaround you can suggest ? I really do need these virtual terminals exposed by the multiplexer. On 4/9/24 11:24, Aleksander Morgado wrote: Hey No unfortunately they are not. They (the psuedo terminals) are created by opening /dev/ptmx which creates a terminal(s) in /dev/pts/ . These are not enumerated in any way. Oh well... let me try your suggestion and see if it works. If the ptys don't have an entry in sysfs, not even as virtual devices, then the no-udev path won't work either
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
Hey > > No unfortunately they are not. They (the psuedo terminals) are created by > opening /dev/ptmx which creates a terminal(s) in /dev/pts/ . These are not > enumerated in any way. Oh well... let me try your suggestion and see if it > works. > If the ptys don't have an entry in sysfs, not even as virtual devices, then the no-udev path won't work either -- Aleksander
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
No unfortunately they are not. They (the psuedo terminals) are created by opening /dev/ptmx which creates a terminal(s) in /dev/pts/ . These are not enumerated in any way. Oh well... let me try your suggestion and see if it works. On 4/9/24 11:05, Aleksander Morgado wrote: On Tue, Apr 2, 2024 at 3:43 PM Garfield Watkins wrote: Unfortunately there doesn't seem to be a way for to write a udev rule against a pseudo terminal... Are they not notified via udev really? You could also try to set it up with ModemManager not running with udev support (--test-no-udev) and then report the ports manually with mmcli (--report-kernel-event).
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
On Tue, Apr 2, 2024 at 3:43 PM Garfield Watkins wrote: > > Unfortunately there doesn't seem to be a way for to write a udev rule against > a pseudo terminal... > Are they not notified via udev really? You could also try to set it up with ModemManager not running with udev support (--test-no-udev) and then report the ports manually with mmcli (--report-kernel-event). -- Aleksander
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
Unfortunately there doesn't seem to be a way for to write a udev rule against a pseudo terminal... On 3/8/24 11:31, Aleksander Morgado wrote: Hey Garfield, I have a situation where I have a ublox modem, the LISA u200, wired up using its SPI bus as the communication channel. On the DTE side is a raspberry pi SBC with a custom spi platform driver that exposes a tty device for modem. This driver is not capable of multiplexing and exposing multiple virtual channels. To overcome this I have a user mode daemon that performs this function by connection to the single tty port exposed by the spi driver and in turn creating 5 pseudo tty's (/dev/ptty1 -> /dev/ptty5) to interact with. These are actually links to /dev/pts/1 to /dev/pts/5. I want the ublox plugin to manage this device but there seems to be no way to filter/grab those ports. You should be able to add the ID_MM_PHYSDEV_UID udev tags for all those pseudo TTYs, so that ModemManager can "bind" all those ports together to the same modem object, see https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/ModemManager-Common-udev-tags.html#ID-MM-PHYSDEV-UID:CAPS
Re: How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
Hey Garfield, > I have a situation where I have a ublox modem, the LISA u200, wired up using > its SPI bus as the communication channel. On the DTE side is a raspberry pi > SBC with a custom spi platform driver that exposes a tty device for modem. > This driver is not capable of multiplexing and exposing multiple virtual > channels. > > To overcome this I have a user mode daemon that performs this function by > connection to the single tty port exposed by the spi driver and in turn > creating 5 pseudo tty's (/dev/ptty1 -> /dev/ptty5) to interact with. These > are actually links to /dev/pts/1 to /dev/pts/5. > > I want the ublox plugin to manage this device but there seems to be no way to > filter/grab those ports. > You should be able to add the ID_MM_PHYSDEV_UID udev tags for all those pseudo TTYs, so that ModemManager can "bind" all those ports together to the same modem object, see https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/ModemManager-Common-udev-tags.html#ID-MM-PHYSDEV-UID:CAPS -- Aleksander
How to probe a modem exposing virtual ports (GSM 07.10 muxed ports)
Hi I have a situation where I have a ublox modem, the LISA u200, wired up using its SPI bus as the communication channel. On the DTE side is a raspberry pi SBC with a custom spi platform driver that exposes a tty device for modem. This driver is not capable of multiplexing and exposing multiple virtual channels. To overcome this I have a user mode daemon that performs this function by connection to the single tty port exposed by the spi driver and in turn creating 5 pseudo tty's (/dev/ptty1 -> /dev/ptty5) to interact with. These are actually links to /dev/pts/1 to /dev/pts/5. I want the ublox plugin to manage this device but there seems to be no way to filter/grab those ports. Regards