Wish List (generally ignored ;-), Brainstorming
Post Reply
CpServiceSpb
Posts: 4
Joined: 22 Oct 2019, 21:21

Usb_modeswitch, get imei/imsi, add it as symlinks to ttyUSB.

Post by CpServiceSpb » 22 Oct 2019, 21:58

May you add functionality the following functionality:
- switch modem as by now;
- if it is a serial device, get imei/imsi (may be engaging AT command) ;
- according udev rules, create separate symlink for each ttyUSB device by got imei or imsi.

For example:
there is Huawei E367 (non switched) 12d1/1505;
it has some imei;
there is sim card inserted with some imsi.

mode is switched to 12d1/1506, 3 ttyUSB devices is created, imei and/or imsi is got, what is written in udev rule file (may be in /lib/udev/rules.d/40-usb_modeswitch.rules file) and symlink for each ttyUSB device for the device is created: for example E367modem, E367audio, E367diaginterface.

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Usb_modeswitch, get imei/imsi, add it as symlinks to ttyUSB.

Post by LOM » 23 Oct 2019, 02:52

Identifying what each serial port is intended for is not a task for usb_modeswitch which is a utility to switch a device but nothing more. You can of course write your own userspace tool to do that for a specific modem.

CpServiceSpb
Posts: 4
Joined: 22 Oct 2019, 21:21

Re: Usb_modeswitch, get imei/imsi, add it as symlinks to ttyUSB.

Post by CpServiceSpb » 23 Oct 2019, 13:20

I wrote some I called getimei, but there is two difficult things, for me at least.
First, is to identify management ttyUSB interface of modem.
Because of modem may has 2 or 3 serial ttyUSB interfaces and for example Huawei' s management interface is with the lowest number, as for zte, it is with the highest number (at least MF170) , I don' t understand clearly how is to define one ?
Second one is after usb_modeswitch made its function, switched modem, my soft is not engaged until either second restart (with modem already switched) or until reset one (what -R make of) .
It would be better to combine all functional in all in one.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Usb_modeswitch, get imei/imsi, add it as symlinks to ttyUSB.

Post by Josh » 10 Nov 2019, 12:22

The problem is that there is no common standard how the function of serial ports can be determined. We would end up treating each modem or manufacturer individually. That's really outside the scope of usb_modeswitch.

You might want to look at Redhat's "modem-manager" which is part of "Network Manager". I think they have such individual configurations.

farare
Posts: 6
Joined: 30 Nov 2023, 06:41

Re: Usb_modeswitch, get imei/imsi, add it as symlinks to ttyUSB.

Post by farare » 15 Dec 2023, 04:51

The integration of USB_modeswitch with the capability to spacebar clicker retrieve IMEI/IMSI and subsequently adding them as symlinks to ttyUSB is a crucial enhancement for modem management on Linux systems. This functionality greatly enhances the usability and monitoring of USB-connected modems.

Post Reply