* Messages for package net-misc/modemmanager-1.4.4:
* If your USB modem shows up as a Flash drive when you plug it in, You
* should install sys-apps/usb_modeswitch which will automatically
* switch it over to USB modem mode whenever you plug it in.
* (Note: Above message is only printed the first time package is
* installed. Please look at /usr/share/doc/modemmanager-1.4.4/README.gentoo*
* for future reference)
I find it unclear what you want to say. From my experience I believe you speak about the USB modem appearing as a CDROM drive instead. For the beginners it would also be helpful if you mentioned one can do 'eject /dev/USB0' to test whether the modem switches to modem state.
It's refers to usb_modeswitch being needed to get NetworkManager to automatically use it for connecting to internet when you connect it
I know but I really wanted the einfo message being improved. I wonder whether you want to say 'Flash drive', I think it is a CD-ROM drive (at least in my experience it always was).
BTW, it is not specific requirement of modemmanager, even "plain pppd needs it". But what it really does it "ejects" the virtual CD-ROM exposed by the USB modem and it then switches into the modem-like mode and starts to liste to AT commands. That is the real reason why the application "needs" to be installed although eject(1) command does the same in effect.
Do you mean that the USB pendrive is shown as a CD-ROM :/
(In reply to Pacho Ramos from comment #3)
> Do you mean that the USB pendrive is shown as a CD-ROM :/
I don't know what you mean. The device is a modem but upon plugin it exposes a CD-ROM -like interface.
Maybe you mean that Network or ModemManager show an icon like a 'flash drive'? I use XFCE, it also shows up some icons here and there. so, just make the einfo message clearer, you know what I mean. ;-) Thank you.
I don't what do you mean because in my case when I connected the pendrive it showed up as a pendrive :| (well, nautilus window showed some drivers that are present on it for Windows but I remember it wasn't detected as a CDrom and it didn't try to handle it with a CD player or similar :/)
I will hand-write a change I wanted to happen:
- * Messages for package net-misc/modemmanager-1.4.4:
- * If your USB modem shows up as a Flash drive when you plug it in, You
- * should install sys-apps/usb_modeswitch which will automatically
- * switch it over to USB modem mode whenever you plug it in.
+ * Messages for package net-misc/modemmanager-1.4.4:
+ * If your USB 3G/LTE modem shows up as a CD-ROM drive when you plug it in, You
+ * should install sys-apps/usb_modeswitch which will automatically
+ * switch it over to USB modem mode and expose its SD card whenever you plug
+ * it in. You may manually also run 'eject /dev/ttyUSB0' to see if this
+ * approach is going to work. See 'dmesg' output for more info about your
+ * modem and about its runtime changes triggered by eject or usb_modeswitch.
But the message is not about using your pendrive as an sd card or similar. This package, and its message, is needed for USB modems for being used as USB modems, instead of only recognizing them as storage pendrives
Also, what does eject do here? (apart of probably the device name changing from one setup to another)
(In reply to Pacho Ramos from comment #7)
> But the message is not about using your pendrive as an sd card or similar.
But it is about about the need to switch it to the modem state. And IMHO by default the SD card interface is not acessible, it only becomes accessible after the CD-ROM interface is gone and when the modem interface is made available. And that is why I thought the einfo is wrong in the beginning (#c0).
it does not work as a flash drive by default (unless 'flipped').
> This package, and its message, is needed for USB modems for being used as
> USB modems, instead of only recognizing them as storage pendrives
But the modems do not expose by default their modem interface but only the emulated CD-ROM interface with mostly Windows drivers. So you need to either eject the /dev/srX or use usb_modeswitch if somebody already registered the pair of USB IDs and you have recent enough /usr/share/misc/usb.ids from sys-apps/hwids.
# grep DESCR /usr/portage/sys-apps/usb_modeswitch/usb_modeswitch-2.3.0.ebuild
DESCRIPTION="A tool for controlling 'flip flop' (multiple devices) USB gear like UMTS sticks"
> Also, what does eject do here? (apart of probably the device name changing
> from one setup to another)
It does the 'flip flop' task, handled also by the usb_modeswitch based on the recognized USB ID value.
What about simply this?
* If your USB 3G/LTE modem shows up as a storage drive when you plug it in, please install sys-apps/usb_modeswitch which will automatically
* switch it over to USB modem mode.
Also, I don't think we should suggest people to run "eject" on a random device (the numbering is likely to change depending on the setup) to see "if it happens to work after that", supposedly it should work when usb_modeswitch is present and that is the pathway people should follow
(In reply to Pacho Ramos from comment #9)
> What about simply this?
> * If your USB 3G/LTE modem shows up as a storage drive when you plug it in,
> please install sys-apps/usb_modeswitch which will automatically
> * switch it over to USB modem mode.
> Also, I don't think we should suggest people to run "eject" on a random
> device (the numbering is likely to change depending on the setup) to see "if
> it happens to work after that", supposedly it should work when
> usb_modeswitch is present and that is the pathway people should follow
As you wish. It turned out on one of my devices I have to issue the command multiple times to get the modem switched:
usb_modeswitch -J -v 0x12d1 -p 0x15ca
* If your USB 3G/LTE modem shows up as a storage drive when you plug it in,
* please install sys-apps/usb_modeswitch which will automatically
* switch it over to USB modem modeupon plugin. That can be seen in syslog
* Sometimes it does not switch away from the storage-like mode with broken
* firmware of the device so you may need to retry manually running
* usb_modeswitch again. Check 'dmesg' or lsusb for your device ID.
* For example, Huawei E3131 must switch from 12d1:15ca to 12d1:1506 to
* expose its three /dev/ttyUSB* and one /dev/sr* interfaces. The command is:
* usb_modeswitch -J -v 0x12d1 -p 0x15ca
(In reply to Martin Mokrejš from comment #10)
> As you wish. It turned out on one of my devices I have to issue the command
> multiple times to get the modem switched:
> usb_modeswitch -J -v 0x12d1 -p 0x15ca
This looks to me like a bug, I would report it to upstream to try to see if they are able to handle it in a way that doesn't require manual intervention
I'm going to tweak the message a bit with the 1.8.2 bump. Feel free to look it over and tell what else might be tweaked there. I don't think we want to go into complicated specifics, like trying with eject and so on.
The bug has been closed via the following commit(s):
Author: Mart Raudsepp <email@example.com>
AuthorDate: 2018-10-07 15:44:31 +0000
Commit: Mart Raudsepp <firstname.lastname@example.org>
CommitDate: 2018-10-07 15:44:54 +0000
net-misc/modemmanager: bump to 1.8.2
Also tweak the usb_modeswitch message a bit
Signed-off-by: Mart Raudsepp <email@example.com>
Package-Manager: Portage-2.3.49, Repoman-2.3.11
net-misc/modemmanager/Manifest | 1 +
net-misc/modemmanager/modemmanager-1.8.2.ebuild | 118 ++++++++++++++++++++++++
2 files changed, 119 insertions(+)
Created attachment 549770 [details, diff]
another attempt to improve the einfo message
Thank you for you efforts but how about this change?
That goes into complicated details I said I don't think we want to go in. If it shows up only as storage device, basically the user should just add usb_modeswitch and everything should just work. If not, then that's a bug to report upstream or somewhere. No need to go testing with some command line utilities, including having instructions on using usb_modeswitch, when the instruction is all about basic information about when it might be necessary to install usb_modeswitch - if it's already installed (so the example works), then there's nothing to inform about here.
For ModemManager the idea is that things just work, that you don't need to go ejecting and running commands - so it's only telling that you might need an additional package at runtime for everything to work seamlessly. It's just an alternative to always simply pulling in usb_modeswitch. I'd rather do that, if the instructions otherwise get a page long.
Few more comments.
The USB dongles are too cheap and often with broken firmwares here and there. Sometimes you need to use eject command manually even if you have usbmodeswitch installed and it supposedly already issued the eject command (the firware sometimes ignores the command).
Second, people are not advised to 'eject' randomly a /dev/sr* device, the device name is logged in dmesg, as well as USB ID of the CDROM-like virtual device.
My point is to record where to look for basic info and summarize basic commands to check the device state. The change is minimal.
You would not believe but of the 3 USB dongles I have bought none of them had the USB ID registered in teh USB ID databses, used by usbmodeswitch. So, the commands are handy to learn the USB ID of all the interfaces, thjen a user is supposed to report the to http://www.linux-usb.org/usb-ids.html and then to http://www.draisberghof.de/usb_modeswitch/#contrib .
I am sorry but getting a new and "ordinary" USB LTE dongle to work under "Gentoo" always took me the above effort.
> Also, what does eject do here? (apart of probably the device name changing from one setup to another)
Just causes dongle's firmware to switch into modem-like state while withdrawing the CDROM-like interface with MS Win drivers and exposing all the /dev/USB* interfaces and the /dev/sd* interface of the SDcard slot (if present).
Sounds like information that might want to be in usb_modeswitch then, not modemmanager
And I forgot to mention that GSM providers in different countries change the firmwares of the dongles and change the USB IDs. That is arguably the main reason physically same dongles have a range of USB IDs. And that is why in almost every country they have different IDs and the IDs even change if you 'flash' the device. And upgrading the firmware is a real pain, requiring unlock, etc.
Ah, true, some of this could be better placed in usbmodeswitch ebuild messages.