Single RS232 port Telit and CMUX mode (GSM 27.010 / n_gsm)

Aleksander Morgado aleksander at aleksander.es
Tue Jul 4 08:58:47 UTC 2017


On 04/07/17 10:21, Tim Small wrote:
> The ID_MM vars are from a custom udev rule which I added, e.g.
> 
> DEVPATH=="/devices/virtual/tty/gsmtty1",
> ENV{ID_MM_TTY_BAUDRATE}="115200", ENV{ID_MM_CANDIDATE}="1",
> ENV{ID_MM_TELIT_PORT_TYPE_MODEM}="1"
> 
> 
>> and we can go from there.  We might also be able to use udev to figure
>> it out, though that's often not as useful for virtual devices.  But the
>> kernel gsmtty code does have specific calls to link the MUX ports to
>> the parent.
>>
>> Basically, we just want each of the MUX ports to show as serial ports
>> of the same base modem.  Then you would get PPP and control muxed over
>> the same port and MM would be aware of it :)
> I had a bit of a poke around before sending the original email, but I
> couldn't see an obvious way of linking the muxed and physical ports via
> udev or sysfs.  Arguably there should be I suppose, and I can have a go
> at hacking something up in the n_gsm kernel module perhaps?  What do you
> think?

Given this is a pure RS232 device, there's not much "auto-probing" we can do, unless as Dan says there's a clear way to link both ports to the same "physical device" via udev properties or what not. Could you run udevadm info again using --attribute-walk in both gsmttyX devices?

Anyway, you can manually "force" both TTYs to be part of the same device by assigning to both the same "uid" in the ID_MM_PHYSDEV_UID udev tag; e.g.:

  DEVPATH=="/devices/virtual/tty/gsmtty0", ENV{ID_MM_PHYSDEV_UID}="muxed"
  DEVPATH=="/devices/virtual/tty/gsmtty1", ENV{ID_MM_PHYSDEV_UID}="muxed"

(only if using ModemManager git master)

Then you would also be able to use the "uid" in mmcli calls, e.g. "mmcli -m muxed --simple-connect", btw.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list