Integration of 3G Wireless Modem Detection - 4.1.2 & 4.2.1
Posted: Mon 19 Jan 2009, 18:03
THIS THREAD IS NOW OBSOLETE AND IS NO LONGER MONITORED BY THE DEVELOPER. PLEASE GO TO THE THREAD FOR PUPPY 4.3.1, PUPPY 4.3.2 AND LUCID PUPPY 5+.
Dialup/Wireless Modem Upgrade Packages for Puppy 4.3+ http://www.murga-linux.com/puppy/viewto ... 074#431074
Considering that there are several threads and postings regarding getting 3G wireless modems working in Puppy, I have concluded that it might be worthwhile to incorporate the tinkerings into an extension of the existing components for support of dialup modems. My problem is that I do not own any of the 3G devices and have no need to buy one. So I need everyone with these devices to assist in debugging the implementation.
I have begun by creating udev rules to handle the mode-switching task automatically. I have added modem-initialization scripts for the drivers: Option, Hso, Sierra, and Nozomi. (The script names are capitalized to give them priority over PCI and sound-card modem scripts, since the devices are insertable USB modems, removing any need to blacklist other modem drivers.) Drivers hso and nozomi are included, too; option and sierra are already installed in 4.1.2./4.2/4.2.1. For now, I assume that driver usbserial has been superseded by these drivers; I need to be notified of any cases not supported by the three drivers.
I have also added two debug event-trace logs to help us understand what happens. When reporting your experiences with this package, please include in your posting the following files (nd placing attachments inside a tarball or zip file):
- /tmp/pup_event_module_devpath_log (quoted)
- /tmp/udevtrace-modem.log (quoted)
- /tmp/udevtrace.log (as optional attachment)
- /tmp/usb_modeswitch.log (as attachment, if exists)
- /tmp/ozerocdoff.log (as attachment, if exists)
I set as my goal, to make Puppy support 3G modems similarly to analog dialup and GPRS modems. I imagine a user seeing the modems recognized automatically, using the "Internet by analog modem" Connect-Wizard option (augmented if necessary) to enter added parameters, and then dialing in with PupDial.
This goal could entail addition of device-specific logic into udev rules and initialization scripts, logic from the existing GPRS setup script, and creation of new scripts to support udev rules. Various postings suggest to me that some delays will be needed to allow the modems time to start up. My getting those details right depends on your feedback and assistance in debugging solutions. I ask everyone with these modems to report, here or by PM to me, your experience with this package and any suggestions to make it work.
UPDATE 7/29/09: I have edited the historical-progress items, to summarize the current state of the project. The downloads here apply only to puppys 4.1.2, 4.2, and 4.2.1. They are already incorporated into Puppy 4.3.
1. Some USB wireless modems may require two updated driver modules that tempestuous has provided here: http://www.murga-linux.com/puppy/viewto ... 448#254448
They are particularly for ZTE modems, but may help if other modems that use the option driver are not recognized. From the above link, download and install these files:
- option-patched-01Apr09-k2.6.25.16.pet
- usb-storage-ZTE-patch-k2.6.25.16.pet
2. An updated sierra module (also by tempestuous) supports additional Sierra modems, but is needed only if your Sierra modem is not detected by the Puppy 4.1.2/4.2/4.2.1 version. Download it from this posting: http://www.murga-linux.com/puppy/viewto ... 154#286154
3. This auto-detection project does not support modprobing of the usbserial module, used in most of the recommendations found on the Internet. Loading of usbserial with vendor and product IDs is useful only for verifying that a modem can be made to work. The goal here is to automate use of the modem-specific (e.g., hso, option, sierra, etc.) drivers and related (storage-to-modem-device) mode switching.
4. Initialization scripts are added for modems using modules ipw, ipwireless, and moto_modem. They should detect such modems as ttyUSB0. However, no attempt is made to address possible firmware issues. Anyone with such a modem is invited to work with me if more is needed. The Motorola driver supports 3 modem models, and there may be a patched version for a fourth, the 950; tell me if you need the patch.
5. For troubleshooting, usb_modeswitch can be run from the command line. To run it and log its output, use usb_modeswitch.sh with no arguments (instead of usb_modeswitch). But you must set up the usb_modeswitch.conf file beforehand (as explained there).
6. Tips for some special situations:
a. To override the default number for ttyUSB0, change the number in /etc/modemttyUSBnum; some modems use ttyUSB2.
b. When a PIN is specified in Pupdial, it has been sent to the modem for each connection. But that apparently prevents subsequent connections from succeeding. The new 3G_pupdial-wireless-12 dotpet changes that, to limit its use to only the first of a Puppy- or modem plug-in session. If the PIN is needed later in the session, it can be restored by clicking the "ttyUSB0" (or similar device-name, to "test" the modem) button in Pupdial. Please report if this creates more problems. Note that many users recommend disabling the PIN altogether, either in Windows or within the cell phone, if the modem is part of one. But that might create a security issue.
c. New modems probably require activation in a Windows (TM) environment, because there is currently no way to do that in linux.
d. Users of provider VirginBroadband may have connections fail due to an authentication problem. This can be avoided by editing the file: /etc/ppp/options to append a line:
-chap
if not already present). But remember to undo that if you change connection and do not need it. Since this seems to be provider-specific, and could be remedied by the provider, I have not addressed this peculiarity in Pupdial. I would reconsider this if other situations are reported that would justify adding management of the PPP-script files. Please report any other cases where editing that file or /etc/ppp/peers/wvdial is needed to resolve some issue.
7. If you are confused by all the fields to fill in in the PupDial dialer, member kultex has found a chart of the information you may need to connect to your provider. He explains here: http://www.murga-linux.com/puppy/viewto ... 904#337904
(You probably do not need the DNS values, but they could come in handy if required.)
Thanks in advance for whatever you can do to help add this "magic" to Puppy.
Richard
UPDATE 8/22/09: I have replaced the main dotpet with 3G_pupdial-wireless-12. This includes the improvements in the "-11" patch4 and the 4.3 beta2 release (assuming they are accepted), plus support of a few additional modems. This new version changes support of PINs and APNs, so that the PIN is issued only once per session and APNs are now associated with each dialup account. A pulse-dial (ATDP) setting is now retained. Certain Huawei modems may now be detected.
NOTE: I have not upgraded to usb_modeswitch-1.0.3 because it no longer appears to support command-line parameters, which Puppy uses. It stops with a segmentation fault.
UPDATE 9/11/09: I have re-uploaded (after download #105) the 3G_pupdial-wireless-12.pet file with a correction so that pupdial retains user-edited Init6-Init9 lines in the configuration file. The fix is also available if you already have 3G_pupdial installed, here: http://www.murga-linux.com/puppy/viewto ... 321#340321
UPDATE 2/7/2010: I have added 3G_pupdial-wireless-13 as a replacement for "-12". It has more modeswitch rules and support for Vodaphone and some newer modems. Remember, it is only for puppy 4.1.2 & 4.2.1. For 4.3.1, use the updates in the 4.3.1 Bugs thread here, instead: http://www.murga-linux.com/puppy/viewto ... 235#388235
UPDATE 2/13/2010: I found that I mistyped the 18 new rules. "-13" now is corrected. Anyone needing the new rules or still cannot get your USB modem detected should uninstall the original "-13" and download and install this replacement.
Richard
Dialup/Wireless Modem Upgrade Packages for Puppy 4.3+ http://www.murga-linux.com/puppy/viewto ... 074#431074
Considering that there are several threads and postings regarding getting 3G wireless modems working in Puppy, I have concluded that it might be worthwhile to incorporate the tinkerings into an extension of the existing components for support of dialup modems. My problem is that I do not own any of the 3G devices and have no need to buy one. So I need everyone with these devices to assist in debugging the implementation.
I have begun by creating udev rules to handle the mode-switching task automatically. I have added modem-initialization scripts for the drivers: Option, Hso, Sierra, and Nozomi. (The script names are capitalized to give them priority over PCI and sound-card modem scripts, since the devices are insertable USB modems, removing any need to blacklist other modem drivers.) Drivers hso and nozomi are included, too; option and sierra are already installed in 4.1.2./4.2/4.2.1. For now, I assume that driver usbserial has been superseded by these drivers; I need to be notified of any cases not supported by the three drivers.
I have also added two debug event-trace logs to help us understand what happens. When reporting your experiences with this package, please include in your posting the following files (nd placing attachments inside a tarball or zip file):
- /tmp/pup_event_module_devpath_log (quoted)
- /tmp/udevtrace-modem.log (quoted)
- /tmp/udevtrace.log (as optional attachment)
- /tmp/usb_modeswitch.log (as attachment, if exists)
- /tmp/ozerocdoff.log (as attachment, if exists)
I set as my goal, to make Puppy support 3G modems similarly to analog dialup and GPRS modems. I imagine a user seeing the modems recognized automatically, using the "Internet by analog modem" Connect-Wizard option (augmented if necessary) to enter added parameters, and then dialing in with PupDial.
This goal could entail addition of device-specific logic into udev rules and initialization scripts, logic from the existing GPRS setup script, and creation of new scripts to support udev rules. Various postings suggest to me that some delays will be needed to allow the modems time to start up. My getting those details right depends on your feedback and assistance in debugging solutions. I ask everyone with these modems to report, here or by PM to me, your experience with this package and any suggestions to make it work.
UPDATE 7/29/09: I have edited the historical-progress items, to summarize the current state of the project. The downloads here apply only to puppys 4.1.2, 4.2, and 4.2.1. They are already incorporated into Puppy 4.3.
1. Some USB wireless modems may require two updated driver modules that tempestuous has provided here: http://www.murga-linux.com/puppy/viewto ... 448#254448
They are particularly for ZTE modems, but may help if other modems that use the option driver are not recognized. From the above link, download and install these files:
- option-patched-01Apr09-k2.6.25.16.pet
- usb-storage-ZTE-patch-k2.6.25.16.pet
2. An updated sierra module (also by tempestuous) supports additional Sierra modems, but is needed only if your Sierra modem is not detected by the Puppy 4.1.2/4.2/4.2.1 version. Download it from this posting: http://www.murga-linux.com/puppy/viewto ... 154#286154
3. This auto-detection project does not support modprobing of the usbserial module, used in most of the recommendations found on the Internet. Loading of usbserial with vendor and product IDs is useful only for verifying that a modem can be made to work. The goal here is to automate use of the modem-specific (e.g., hso, option, sierra, etc.) drivers and related (storage-to-modem-device) mode switching.
4. Initialization scripts are added for modems using modules ipw, ipwireless, and moto_modem. They should detect such modems as ttyUSB0. However, no attempt is made to address possible firmware issues. Anyone with such a modem is invited to work with me if more is needed. The Motorola driver supports 3 modem models, and there may be a patched version for a fourth, the 950; tell me if you need the patch.
5. For troubleshooting, usb_modeswitch can be run from the command line. To run it and log its output, use usb_modeswitch.sh with no arguments (instead of usb_modeswitch). But you must set up the usb_modeswitch.conf file beforehand (as explained there).
6. Tips for some special situations:
a. To override the default number for ttyUSB0, change the number in /etc/modemttyUSBnum; some modems use ttyUSB2.
b. When a PIN is specified in Pupdial, it has been sent to the modem for each connection. But that apparently prevents subsequent connections from succeeding. The new 3G_pupdial-wireless-12 dotpet changes that, to limit its use to only the first of a Puppy- or modem plug-in session. If the PIN is needed later in the session, it can be restored by clicking the "ttyUSB0" (or similar device-name, to "test" the modem) button in Pupdial. Please report if this creates more problems. Note that many users recommend disabling the PIN altogether, either in Windows or within the cell phone, if the modem is part of one. But that might create a security issue.
c. New modems probably require activation in a Windows (TM) environment, because there is currently no way to do that in linux.
d. Users of provider VirginBroadband may have connections fail due to an authentication problem. This can be avoided by editing the file: /etc/ppp/options to append a line:
-chap
if not already present). But remember to undo that if you change connection and do not need it. Since this seems to be provider-specific, and could be remedied by the provider, I have not addressed this peculiarity in Pupdial. I would reconsider this if other situations are reported that would justify adding management of the PPP-script files. Please report any other cases where editing that file or /etc/ppp/peers/wvdial is needed to resolve some issue.
7. If you are confused by all the fields to fill in in the PupDial dialer, member kultex has found a chart of the information you may need to connect to your provider. He explains here: http://www.murga-linux.com/puppy/viewto ... 904#337904
(You probably do not need the DNS values, but they could come in handy if required.)
Thanks in advance for whatever you can do to help add this "magic" to Puppy.
Richard
UPDATE 8/22/09: I have replaced the main dotpet with 3G_pupdial-wireless-12. This includes the improvements in the "-11" patch4 and the 4.3 beta2 release (assuming they are accepted), plus support of a few additional modems. This new version changes support of PINs and APNs, so that the PIN is issued only once per session and APNs are now associated with each dialup account. A pulse-dial (ATDP) setting is now retained. Certain Huawei modems may now be detected.
NOTE: I have not upgraded to usb_modeswitch-1.0.3 because it no longer appears to support command-line parameters, which Puppy uses. It stops with a segmentation fault.
UPDATE 9/11/09: I have re-uploaded (after download #105) the 3G_pupdial-wireless-12.pet file with a correction so that pupdial retains user-edited Init6-Init9 lines in the configuration file. The fix is also available if you already have 3G_pupdial installed, here: http://www.murga-linux.com/puppy/viewto ... 321#340321
UPDATE 2/7/2010: I have added 3G_pupdial-wireless-13 as a replacement for "-12". It has more modeswitch rules and support for Vodaphone and some newer modems. Remember, it is only for puppy 4.1.2 & 4.2.1. For 4.3.1, use the updates in the 4.3.1 Bugs thread here, instead: http://www.murga-linux.com/puppy/viewto ... 235#388235
UPDATE 2/13/2010: I found that I mistyped the 18 new rules. "-13" now is corrected. Anyone needing the new rules or still cannot get your USB modem detected should uninstall the original "-13" and download and install this replacement.
Richard