Integration of 3G Wireless Modem Detection - 4.1.2 & 4.2.1

A home for all kinds of Puppy related projects
Post Reply
Message
Author
muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#16 Post by muggins »

Rerwin,

after forcing the loading of the option module, then rebooting, then running pupdial->probe, the modem is successfully seen. I just needed to manually alter /etc/wvdial.conf to have the right baud of 460800 etc:

Code: Select all

[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0V1E1S0=0&C1&D2S11=55+FCLASS=0
Carrier Check = no
Dial Command = ATDT
Phone = *99#
Username = ppp
Password = ppp
Auto Reconnect = no
One thing that is slightly different, from my previous wvdial.conf, is that this one has:

Code: Select all

Init2 = ATQ0V1E1S0=0&C1&D2S11=55+FCLASS=0
whereas previous had:

Code: Select all

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Do you know what the significance of the S11=55 is?

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#17 Post by rerwin »

That's good news, muggins! The modeswitching udev rule seems to do its job. About the "S11=55": I looked up the AT commands for an ancient ISA analog modem and found that S11= "Sets the duration and spacing, in milliseconds, for tone dialing.". So it seems innocuous. FWIW, the default on that modem was 70.

I am concerned that you needed to do the pupdial probe, since normal new-modem initialization should show ttyUSB0 in the connect-wizard dialog, as well as in pupdial. And it should be ready to go. I assume you were able to change the speed right there in the top pupdial field, right? Could you run again, but first use pupdial > probe > erase before you reboot? Pupdial will then show that no modem is detected.

On reboot, click "connect" and "Internet by dialup analog modem". I expect you to get a new dialog and then a second, before you get to pupdial. Pupdial should show a modem at /dev/ttyUSB0. Once you fix the speed value, you should be able to dial/log into your ISP. If that does not happen, please tell me, because that's what I am trying to accomplish.

If things are not right, please check /dev/modem to see what it links to, which should be ttyUSB0.

So, now I have the following to research:
- why option is not loaded automatically.
- Why the modem is not detected at bootup, instead of requiring it to be plugged in after bootup.
- why the speed is set so low.

Regarding a different subject: My new modem-initialization scripts currently support "country codes". But I suspect such codes are not relevant to wireless modems, since the codes relate to land-line analog modems, which may be sensitive to particular countries; I gather that newer modems handle that automatically, making the codes obsolete. I will remove that logic in my next dotpet, in case it has unintended consequences. Please tell me if those codes should be retained for these 3G modems.

Schorhr,
Now that muggins has established that the dotpet does handle the modeswitch and that the option driver (as an added module in BootManager) also works, please abandon altogether your testing with the usbserial driver. Please have the "option" driver get loaded at bootup, so we can work from there. Be sure that any previously detected modem is pupdial>probe>erased before rebooting after adding "option" in BootManager. The behavior should be as I described above, to muggins. Also please avoid editing any files, but rather make changes through pupdial or the GPRS-setup option, if that makes sense; but so far it appears that pupdial should let you make all your changes.

UPDATE: I have uploaded a new (-3) dotpet to the first posting of this thread. It has the country code script-logic removed (as unnecessary) and a debug version of the modemswitch udev rule, so we get positive confirmation that usb_modeswitch ran. In debugging the rule I discovered I had coded incorrectly the invocation of usb_modeswitch; I think it works now. So muggins got workable results even without the modeswitch! But maybe things will go better with the updated dotpet. Also, I added our three new drivers to a list in pupdial, which might improve initial startup of pupdial. You can see the debug info in /tmp/udevtrace-modem.log; it will be the output from usb_modeswitch.

After installing the "-3" dotpet, please be sure to "erase" any previously detected modem, to allow a fresh detection upon reboot, and (if you have not already done so) add the driver, option, to the BootManager "add list".
Richard
Last edited by rerwin on Mon 26 Jan 2009, 04:46, edited 1 time in total.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#18 Post by Aitch »

rerwin

I'm not sure of my facts, but seem to recall something about the option modem being one of the new fangled modems with a flashdrive built-in, that contains the windoze driver/connect code - ??

Don't know if this may delay loading if puppy tries to load usb+flash+modem as one-device-with-3-interfaces?

Damn, I wish I could test this thing -it's an Icon225 on Orange Network

Aitch :)

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#19 Post by muggins »

Rerwin,

if I just preload the "option" module, then reboot, then run Connect->Analog modem, then my E169 is detected OK...without installation of your .pet. I then just needed to overwrite /etc/wvdial.conf, with a previously saved version with correct baud, userID & password, and I'm online.

plumtreed
Posts: 68
Joined: Sun 07 Dec 2008, 08:41
Location: Australia

#20 Post by plumtreed »

Many thanks, I seem to be able to 'connect' without any additional tweaking. I can boot with or without the dongle installed and it connects and runs happily.

I have only used the -2 .pet.

I like it!

Schorhr
Posts: 11
Joined: Wed 21 Jan 2009, 16:07

#21 Post by Schorhr »

Hello, sorry for the lack of response, but I currently still need to resolve why the dectop stops booting in the FULL install mode after a few reboots.
As soon I do not need to work with the frugal install anymore and got the rest set up I'll get a second dectop set up and install from scratch regarding your thread and instructions...
Since umts/3g is my only internet access at the moment its a bit difficult to work with one computer :-)

-Marcus

warrick
Posts: 2
Joined: Thu 29 Jan 2009, 09:06

telstra broadband

#22 Post by warrick »

Hi Im new here, which is probably why I posted a question in the wrong place, You can read all about it http://www.puppylinux.org/community/blo ... omment-738
Iv been trying to get a usb modem to work, spec are on http://www.zte.com.au/main/MF626.htm
I also just found this link to connet it to ubuntu http://www.matt-barrett.com/?p=5
which maybe some help. Im not a programer so I will probably not be of much help in that area. but I am keen to learn.
warrick

Schorhr
Posts: 11
Joined: Wed 21 Jan 2009, 16:07

#23 Post by Schorhr »

Hello warrick, I'm also new here, so welcome and good luck :-)

By the way (and not directly related), I found something usefull, Rerwin suggested I should post it:

http://rendo.info/?m=200805 (Google Cache)

-rendo- postet there how to force umts/3G and choose the network by disconnecting and reconnecting!

[quote]at+cops? —> to check what is my network now, which is Indosat GSM network
+COPS: 0,0,

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#24 Post by rerwin »

While there has been no feedback on my -3 dotpet, I have pressed on with the second stage. I have uploaded the "-4" version which has these improvements:
- Added wireless fields to PupDial for the APN and a checkbox to select wireless support. This is so users should not need to supply their own copy of wvdial.conf.
- Added to wvdial.conf, support for PIN numbers, although the common strategy seems to be to have the PIN disabled, making it unnecessary. To use it you must edit wvdial.conf to uncomment a line and add the PIN. I plan to add similar support for forcing 2G or 3G (+COPS) and 3G quality of service (+CGEQMIN/+CGEQREQ).
- Added a udev rule to autoload the "option" module for the Huawei E169, which currently is not recognized. The problem appears to have been corrected in 2.6.27 (in Xubuntu), so the rule can probably be removed when migrating to 2.6.27+.
- Improved speed of rule processing for 3G modems, by correcting some statements.

This is getting close to my goal, so I need feedback from users of the Huawei modems. Please try running without any forced module-loading or custom wvdial.conf files. Try to use the pupdial capabilities. Thank you for whatever you can provide (e.g., reports and the files mentioned in the first posting).

muggins,
I am mystified about how your modem works without the modeswitching, provided by the dotpet. Also about the absence of an APN, which I assume is needed. My hope is that modeswitching will fix the baud-rate problem; but we will know only if you test, preferably using the newest version of the dotpet. You should be able to run without forcing option to load -- I think I have fixed that and need you to verify that.

Schorhr,
You and muggins appear to have the same modem type: E169/E169G (p1001). They have the same vendor & product IDs, so they get treated the same, but differently than the others Huawei modems, in that the driver is not automatically loaded. The "-4" dotpet should correct that. I am puzzled by your different experience with the modem, particularly because you need an APN (the +CGDCONT command) while muggins does not seem to. Is that due to different providers? Please try the new dotpet's pupdial to set the APN. If you reeally need the "X1 command (ATX1DT), try adding it to the second initialization string shown in pupdial. Do you have to modify the max baud value, as muggins does?

plumtreed,
Your E160G modem (p1003) should trigger loading of the option module, and I take it that it does, since you have not mentioned modprobing or forcing it (or usbserial). The new pupdial should allow you to make any changes through it. Please try it out, to see if anything more is needed.

Aitch,
Thanks for your recruiting effort. Your Icon225 represents a different type. Would you provide its vendor and product IDs? I suspect it needs one of my rule files that requires the user to select from several possibilities for the same vendor & product IDs. And the new pupdial should help with the APN. I am eager for you to test it, because it takes us into a new area. Is there no way to download the "-4" dotpup and transfer it to your machine?

warrick,
Thanks for joining us. Your modem sounds challenging but not hopeless. My research shows that puppy should perform the required modeswitch for your MF626, but only if you edit one of the /etc/udev/rules files. This is necessary because many similar modems start out with the same IDs, so the user must know which of the possible rules to activate. The file is:
20-udev-usb_modemswitch-ZTE-Onda-0x19d2-0x2000.rules
and the line to edit is in the section for the ZTE MF628+ modem. Uncomment (remove leading # sign from) line 107, so it begins with:
ACTION=="add"
You will see the IDs 19d2, 2000, and 0031 in that line. usb_modeswitch uses a long hexadecimal string to tell the device to change modes. Since the initial and target IDs are the same as for your MF626, I am assuming that the codes in it will cause the switching of your modem as well as the MF 628+, but there is no proof.

To cause its driver to be loaded, we may be in luck. I see that there is a patch proposed for kernel 2.6.27 that adds support in the "option" driver module. There is apparently no code change other than adding the identification.
EDIT: However, that solution will work only with kernel 2.6.27+, because the patch that adds the MF626 support is for a piece that is not part of the current (2.6.25) kernel. With that kernel, the modem should be recognized automatically.

Back in the current kernel, we could add support for the old usbserial driver you see recommended all over the place. It seems to be gradually superseded by the option driver. My approach has been to bypass that driver altogether, but maybe there is reason to add it, for old modems that never get supported otherwise. Anyway, it would be a good exercise -- if it doesn't bog us down messing with it. So, I plan to work up a modem script that glues puppy modem support together, for the next version of the dotpet (-5).

In anticipation of the script, you might try the puppy counterpart of the "modprobe usbserial" command. You need to use the BootManager to add loading of usbserial to the"add list". After adding it, you will be prompted to add parameters for it; on the same line as the "usbserial" append the parameters, resulting in:
usbserial vendor=0x19d2 product=0x0031

After you boot up with that and go into pupdial (via the Connect icon), try probing for the modem (Probe > probe). If it is found, fill in the wireless and session fields and try it out. My added script will avoid the need for probing and might add some customization. We may also need to add some AT codes, but that is a whole new issue. Best of luck!
/EDIT

Richard

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

New version of wireless modem integration dotpet (-5)

#25 Post by rerwin »

I am pleased to see so many downloads of the wireless modem integration dotpet. Now, I have uploaded a more complete version of the wireless modem integration package for your testing. I fleshed out the support within pupdial and its friends to use the convention in Tazz Tux's wvdial.conf file. It reserves Init1 for an optional PIN, so the other initialization strings are moved to Init2 & Init3.

In addition, Init4 and Init6-9 are preserved by pupdial, so you can maintain them manually without losing them when pupdial runs. That way you can set them as needed for your modem. Pupdial uses the new "Wireless APN" field to signify a wireless modem versus the old analog modems. So enter an APN only when using a wireless modem. With the other modems, an APN causes the dialog with the modem to stop with an error, due to an inappropriate AT command intended only for wireless.

The new dotpet also is updated to the latest version of USB_Modeswitch and its configuration file (translated into udev rules). It adds about six more modems to its coverage, and deletes one.

Please report any problems you have with the new dotpet. And please report any manual editing needed on the wvdial.conf file generated by pupdial.

BTW, be sure to start with a new wvdial.conf, by deleting the old one before booting with the new dotpet installed. If you need to modify the generated wvdial.conf, be sure to exit pupdial before doing so, because it overwrites the file on exit. Then your changes will be retained.

And be sure to uninstall any previous version of the dotpet (with the installer) before installing the "-5" version. (I will remove the "-4" from the download posting after I receive confirmation from some of you that all is well with the "-5".

Enjoy. But please give me feedback so I can know when/whether the package is ready to offer for inclusion in the official Puppy. Thanks.
Richard

plumtreed
Posts: 68
Joined: Sun 07 Dec 2008, 08:41
Location: Australia

#26 Post by plumtreed »

I had to download 4.1.2 and reboot because of another problem not related. This required downloading the latest version rerwin's pet.

Worked perfectly after entering the required details.

The biggest problem I experience now is the 'fickle' nature of mobile broadband in the UK!

plumtreed
Posts: 68
Joined: Sun 07 Dec 2008, 08:41
Location: Australia

#27 Post by plumtreed »

For some reason the 'indicated speed' has dropped to 9600; it doesn't seem to matter as the speed is what I expect. I usually use this configuration in more rural areas and therefore i don't expect top speeds. However, a recent urban centre visit indicated that, under the right conditions, this set-up worked to a very good standard.

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#28 Post by rerwin »

Thanks, plumtreed, for your report. I was beginning to fear I had burned everyone out. I am pleased that the wireless dialup worked as expected. I trust that the values you set were all accessible in pupdial. If not, should the remainder be added to pupdial? I am thinking that the PIN might be added easily, but all the advice I see in various places recommends disabling the PIN from Windows. That seems simplest, unless some have a need to keep a PIN. I left it out of pupdial because it appears to be more detail than necessary for puppy's goal of user friendliness. But it is still available through editing the wvdial.conf file pupdial generates. Open to suggestions on that.

Regarding the 9600 baud speed: It is set by wvdialconf as part of probing for modems. In respect to muggins' reporting his need to update that value to 460800 from 9600, I considered overriding that with 460800 but decided I don't know the ramifications of doing that. One possibility is that it doesn't matter that it is less than the modem's transmission speed -- and plumtreed seems to support that. So I left it at whatever wvdialconf says, and leave it to the user to change it per others' advice on that issue. If anyone experiences poor performance because of that, let me know. At least I can document it here and in the readme file.

A separate issue I discovered after uploading the "-5" version: There is redundant mode switching being done for six modems that use the "hso" driver. Although I intend to correct that in "-6", anyone affected can fix it by editing /etc/udev/rules.d/30-udev-usb...main.rules, to comment out the first six "SYSFS..." entries, which are for modem idVendor 0af0. A separate rules file for the hso driver does the switching in a different way. The affected modems are described as:
# Option GlobeSurfer Icon 7.2, new firmware (HSO driver)
# Option Icon 225 HSDPA
# Option GlobeTrotter HSUPA Modem (aka "T-Mobile Web'n'walk Card Compact III')
# Option iCON 401
# AT&T USBConnect Quicksilver (made by Option, HSO driver)
# Vodafone K3760 (made by Option, HSO driver)

Although I like to hear stories of complete success, I urge anyone having any difficulty with this implementation to report it either here or by PM to me. I suspect there could be some timing issues, where something needs to wait a second (or ten) before something else can be done. When I hear nothing, I can only assume either that it is all perfect or that no one cares/needs to try this new capability. At some point I hope to submit this for inclusion in the official puppys, but need evidence that it is appropriate. Thanks for all help here.
Richard

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#29 Post by Aitch »

Hi rerwin

"I was beginning to fear I had burned everyone out"

No, sorry, been struggling over here in Germany

In & out of hospital/healthcare money difficulties due to German/English administrative 'differences of opinion', & failure of UK motoring organisations to inform us of German tyre laws, resulting in having to change to 'winter tyres' which aren't known of in UK; plus very expensive accommodation
All in all, been kept fairly hectic & no Internet access
The Icon 225 is in your list in the latest post, though still not in a position to test
Looks now as though it may have to wait until I get back to UK, as I dropped my usb harddrive & its been playing up - I had trouble getting it to boot before I dropped it, now it just refuses to be recognised, though if I plug in after running in XP, it is there?? Not enough space on my main drive [old but reliable IBM T30 lappy with 10Gb drive]
Health & survival are priorities out here in the snow, so I'll give this a break - but please keep up the good work :)

Aitch :)

plumtreed
Posts: 68
Joined: Sun 07 Dec 2008, 08:41
Location: Australia

#30 Post by plumtreed »

Every addition needed was possible via Pup Dial, I could even just type in the 'baud rate', whether effective or not????

Couldn't ask for anything better!

warrick
Posts: 2
Joined: Thu 29 Jan 2009, 09:06

telstra next g

#31 Post by warrick »

Sorry I havent been able to get back to you we are having problems with bush fires, here in australia, will let you know when I can test it.

plumtreed
Posts: 68
Joined: Sun 07 Dec 2008, 08:41
Location: Australia

#32 Post by plumtreed »

I dunno but I think I have to reconnect, that is unplug the dongle and replug, to get a 'good' connection with decent speed. Initially, everything works but just will not go anywhere after the browser.

I must admit that I go from one sort of a connection to another; wired, wireless and 2x USB broadband dongles, at various locations so my observations are far from scientific. It also happens when I use Ubuntu 8.04 so it may be a problem that is outside this discussion.

Wonder if it happens to anybody else? :?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#33 Post by mikeb »

Well when trying out connecting with a wireless modem one thing I had to do was make sure any other connection was disabled...eg wireless/lan

something like
ifconfig eth0 down
might be enough but in my case (broadcom wl driver) i had to remove the module
eg rmmod wl

regards

mike

plumtreed
Posts: 68
Joined: Sun 07 Dec 2008, 08:41
Location: Australia

#34 Post by plumtreed »

mikeb wrote:Well when trying out connecting with a wireless modem one thing I had to do was make sure any other connection was disabled...eg wireless/lan

something like
ifconfig eth0 down
might be enough but in my case (broadcom wl driver) i had to remove the module
eg rmmod wl

regards

mike
Ditto but I don't go to the terminal to disconnect. I use the connect 'icon/interface' prior to selecting pup dial. I also have the Bcm wl driver.

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

#35 Post by rerwin »

I find I have that problem when testing ordinary analog modems while I have a broadband/ethernet connection. If I do the "ifconfig eth0 down", I am then able to connect through the modem. But I don't know about the need to remove the ethernet driver.

I assume that puppy uses the better connection if more than one is available. Right now, that issue is beyond what I can deal with, maybe more in dougal's or tempestuous' areas.

Mikeb, thanks for joining us! What wireless modem are you using? I infer from your posting that it does work. Please post the modem name, its vendor and product ID (from pupscan USB interfaces) and which driver it gets assigned (option, hso or sierra, from lsmod as well as pupscan). Thanks.
Richard

Post Reply