Re:Simple Raspberry Pi Powered SMS Gateway
by ajsnigrutin on Sunday December 05, 2021 @01:27PM
(#29451490)
It has to be said here, that usb_modeswitch software already recognises most modems and has those magic strings saved in a file, and does the switch automagically.
Only if you have a relatively new or rare modem, you need to find the magic string yourself (or even reverse engineer it from a windows setup), to make it work.
This "usb_modeswitch" program handles that for linux. It sniffs the USB traffic and switches the mode to 3G/4G for you. All the crazy args are whatever was in the Windows config file. The -v 12d1 is the "VID" (vendor ID) of the device to sniff traffic for. The -p arg is similar, but the "PID" (product ID). The -P 14ac is the "PID" to switch to to get from storage to 3G/4G device. The -M <long-string> is the magic payload sent to the device to make it switch.