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
Kark
Posts: 26
Joined: Tue 26 Jul 2005, 07:33
Location: Norway/France

#106 Post by Kark »

I'm not an expert, rather fresh actually, but since we seem to have approximately the same modem...

I couldn't get my one to work with wvdial before I'd run the pgprs-connect once, and I also had the problem of the modem being made unusable by wvdial and I had to unplug and replug, so now I only use pgprs.

So: 1) does the same thing happen with pgprs as well?
2) Have you tried the option module? At the stage where you are, the modem actually being recognized as modem, my puppy automatically loads option.

dejan555 wrote:OK, like I said I installed those pets rerwin said patched usb-storage, option, usb_switch etc. and since ZTE626 doesn't show up as storage drive anymore so I can't do that eject tip. When I run usb_modeswitch it doesn't show that error, it says it found default device and when I look into /proc/bus/usb/devices it shows the right vendor and id.



So then I do modprobe usbserial vendor=0x19d2 product=0x0031
Then I enter /dev/usb/ttyUSB1 manually in wvdial.conf 'cause pupdial doesn't recognize it and then I start wvdial from CLI. It shows that modem is initialized, all init lines show OK, and when it comes to ATDT dial command it disconnects. After that modem is not longer recognized as /dev/usb/ttyUSB1, little LED indicator on it switches off and I have to unplug it then plug it back in and do modeswitch again for it to be recognized. :cry:

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#107 Post by dejan555 »

1) Yes, same thing happens with pgprs-connect, it disconnects on same spot
2) I installed that option package, I thought it does something automatically at bootup or something like that, didn't try to load it manually, but when I try to remove usbserial module with rmmod usbserial it says "usbserial is in use by option" so I thought it's automatically loaded? How do I use that?

Thanks for your tips. :idea:
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

Kark
Posts: 26
Joined: Tue 26 Jul 2005, 07:33
Location: Norway/France

#108 Post by Kark »

Well, if your modem is the same as my one (it's got the same vendor and product id) then I guess the modprobe usb_serial should not be necessary. Once the switching actually has taken place, the option driver should be loaded, I think. That's what happens with my modem, What does pupscan say? It should say "VendorID=19d2 ProductID=0031 KERNEL-MODULE=option"

option depends on usb_serial, I think, so both are needed.

And IF we have the same modem, why not try /dev/ttyUSB3? where my one always comes up.

What do the expert say?

Kark

dejan555 wrote:1) Yes, same thing happens with pgprs-connect, it disconnects on same spot
2) I installed that option package, I thought it does something automatically at bootup or something like that, didn't try to load it manually, but when I try to remove usbserial module with rmmod usbserial it says "usbserial is in use by option" so I thought it's automatically loaded? How do I use that?

Thanks for your tips. :idea:

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

#109 Post by rerwin »

dejan555, Kark,
I'd like to clarify things about the drivers. This project supports the new drivers, which include option. I have not addressed usbserial except to provide an initialization script to set ttyUSB0. I support Kark's advice to use the option driver and not usbserial. Note, however, that option is dependent on usbserial, so your modprobing of it could be confusing things. Option should start automatically after a mode switch, but try modprobing it (no arguments) if it doesn't (or even forcing its loading in BootManager).

For now, i suggest commenting out the udev rule for the MF626/MF636, so that the modeswitch is not done at all. Then you should be able to "eject" the storage device to trigger the switching (as I understand what you or someone else did).

Regarding ttyUSB1, I have the impression that the modem is on ttyUSB2, according to some postings somewhere. I have not yet figured out a clean way to handle that in the initialization script (because most use ttyUSB0), but I need to.

Re dejan555's earlier post: This modem requires the patched versions of the option and usb_storage drivers, because they are they only versions that recognize its hardware IDs. (In addition to the 3G_pupdial and usb_modeswitch dotpets.)
Richard

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#110 Post by dejan555 »

Thanks for clarifying things rerwin, regarding ttyUSB2, I don't have that device in /dev or /dev/usb/ , and it would be there if it was on that position right? I'll try with eject thing now.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

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

#111 Post by Aitch »

rerwin

a link, which may give some insight
kayan wrote:@big_bass

Finally i can browse internet using my 3G Wireless Data Terminal ZTE MG478/AC8700 usb modem,in puppy using your Slaxer_Pup, by just editing WvDial Config.
but in all other puplets including Deep Though 4.2 ,modem not found was the standered error reported (even after editing WvDial Config)
Thanks !!!
http://www.murga-linux.com/puppy/viewto ... 4&start=15

HTH

Aitch :)

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

#112 Post by rerwin »

Aitch,
Thanks for directing me to information about the 3G Wireless Data Terminal ZTE MG478/AC8700 usb modem. I have looked into whether puppy supports it. No and yes.

Only the new 2.6.29 kernel in Puppy 5 will recognize it. But currently there is no usb_modeswitch item to effect the switch between its being a storage device and becoming seen as a modem. If you have such a modem and want to create the usb_modeswitch code for it, there is a way. So you could be ready for Puppy 5.
Richard

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#113 Post by big_bass »

rerwin great you started this thread

lets offer another option
http://www.murga-linux.com/puppy/viewto ... 4&start=22

big_bass

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

New version of 3G project dotpets!

#114 Post by rerwin »

Testers and other users,
I have updated the download dotpets in the first posting of this project thread.
http://www.murga-linux.com/puppy/viewto ... 979#266979
and give details there as "UPDATE 5/11/09". It now logs the mode switching, to aid in troubleshooting uncooperative modems. It also should support some more modems: high-speed and Motorola modems as well as modems using device drivers ipw and ipwireless.

I have upgraded the hso driver and usb_modeswitch package to the latest. I created a separate hso-udev dotpet for high-speed-modem switching, to correspond to the tarball it is based on. I obtained it as udev.tar.gz from http://www.pharscape.org/forum/index.php?topic=545.0
but modified the udev rule file heavily for efficiency and addition of new devices. Usb_modeswitch came from the Download section of page http://www.draisberghof.de/usb_modeswitch/

The addition of mode-switch logging and insertion of a delay before making the switch are results of my (unsuccessful) work with Wilky and his ZTE MF626 modem, which gets a "-110" error code in usb_modeswitch that prevents it from working. Now that he can no longer test for me, I will need muggins' help to see whether that is a larger problem.

I am concerned that so few people have complained about this implementation even though I have found large parts that do not work as intended. If something does not work, please tell me before giving up in disgust. Also, I would like a few people to assure me that it works for them, particularly the mode switching. I think I am as far as I can go until I get some feedback on this new version.

Thank you, all, for your help in moving this project forward.
Richard

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#115 Post by dejan555 »

Hi rerwin, gonna try this new packages cause my zte still doesn't work, thanks for your efforts...
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

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

#116 Post by rerwin »

big_bass,
The apparent simplicity is appealing and makes a good workaround until full automatic detection is achieved.
i edited modem= from /dev/ttys0 to /dev/ttyUSB0
i removed the activation string from init2=
set carrier check to no
Baud = from 460800 to 980800
just that is it
But I think he left out a few things.

That ZTE device is one of the hybrids that appear to require switching the mode from storage to modem. He did not say how he did that, but perhaps "ejecting" the storage device (mentioned above somewhere) might suffice. He also did not say how he got to the point where wvdial.conf contained "modem = /dev/ttys0". That suggests a serial modem was already attached so that puppy would set up wvdial.conf appropriately. Also omitted was anything about the driver for it; since option does not see it in P4, usbserial with vendor & product IDs must have been started somehow -- in Puppy that should be through BootManager.

My understanding is that the baud value is essentilly ignored. Others have posted that their modem worked fine even if the value were, like, 56K. I would like to know what in the deleted initialization string prompted him to delete it. Also, why "Dial Command = ATX1DT" instead of just ATDT. The "X1" controls the set of modem responses to be handled -- why is that necessary? I need justification for each divergence from what puppy provides, so I might improve puppy to take them into account.

Almost all of the mods were through the PupDial window, which is appropriate. So my question is about the need for "X1". Regarding the other edit, I wonder if the probe-PROBE function would find ttyUSB0 and set it in wvdial.conf. I would prefer that kind of instruction over editing, which exposes files to accidental corruption. We could work up a set of workaround instructions that avoids editing. Maybe a minor tweak to PupDial would be needed to make that work. Interested?
Richard

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

#117 Post by rerwin »

dejan555,
That's good! Don't forget to include the special versions of the option and usb-storage drivers by tempestuous: http://www.murga-linux.com/puppy/viewto ... 448#254448
And please do not improvise. I need to know where the automated scheme fails, if it does. But my fear is that you will encounter the "error -110" that Wilky and Kark get. Fingers crossed.
Richard

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

Minor corrections to 3G-pupdial-wireless-10 dotpet

#118 Post by rerwin »

I made some minor changes to four scripts in the /usr/sbin directory of the 3G... dotpet. Modemprobe and pupdial have corrections; modemprobe_erase and modemtest are the others. All have the "v41?" annotations changed to "v413". The bugs affect only the first 12 downloads of the dotpet. Details on the download page.

UPDATE 5/13/09: I posted this update in the puppy 5 Alpha 7 Bugs thread along with correcting the firmware omission in Alpha 7. For anyone testing 3G on Alpha 7, the update dotpet is here:
http://www.murga-linux.com/puppy/viewto ... 153#305153
Richard

User avatar
kayan
Posts: 90
Joined: Thu 14 Feb 2008, 18:26
Location: India

#119 Post by kayan »

@rerwin

The apparent simplicity is appealing and makes a good workaround until full automatic detection is achieved.

i edited modem= from /dev/ttys0 to /dev/ttyUSB0
i removed the activation string from init2=
set carrier check to no
Baud = from 460800 to 980800
just that is it

But I think he left out a few things.

That ZTE device is one of the hybrids that appear to require switching the mode from storage to modem. He did not say how he did that, but perhaps "ejecting" the storage device (mentioned above somewhere) might suffice. He also did not say how he got to the point where wvdial.conf contained "modem = /dev/ttys0". That suggests a serial modem was already attached so that puppy would set up wvdial.conf appropriately. Also omitted was anything about the driver for it; since option does not see it in P4, usbserial with vendor & product IDs must have been started somehow -- in Puppy that should be through BootManager.


I am a noob, i just like to tinker with linux, i have SLAX (frugal)installed in my laptop,i was able to connect using kppp dial, i saw the settings and edited the WvDial conf in slaxer_pup .

i tried again from a fresh (frugal) install of slaxer_pup.. i just edited the WvDial.conf
and i am writing this from the slaxer_pup..
Hope this helps :)

My 3g usb modem does not have any flash drive ,hence i think
there was no need for me to use any swiching.. :)

I have a integrated dialup modem in my laptop ,hence i think the /dev/ttys0 entry in wvdial.conf

May be because of better hardware detection by slax - ware in slaxer_pup , it was autodetected :wink:

With Regards
kayan
[color=blue]SAHARA laptop intel celeron M 1.4 GHz/ 768Mb Ram /40GB ,SIS 661 chipset,[/color]

mill0001
Posts: 358
Joined: Thu 01 Feb 2007, 16:30
Location: "People's Republik of Kalifornia"

#120 Post by mill0001 »

Richard,
Here are the steps I had to do to get my Sierra (Sprint) 598U wireless broadband modem to work in Puppy 4.20.
1. Went to sierrawireless.com support and downloaded their pdf file on how to set up the modem in Ubuntu using kppp. This also has instructions to set up modem manually using wvdial.config.

2.Ran "modinfo sierra" to see if my unit was supported by the driver that came with 4.20. It was not.

3.Went back to Sierra website and downloaded latest driver for 4.20 kernel. Unpacked it and created dotpet using dir2pet. Installed my dotpet (now I noticed that you have a dotpet with the new drivers for Sierra in it to download) and rebooted.

4.Ran "modinfo sierra" again. My unit was now listed. Vendor Id=0x1199, Product id=0x0025.

5.Following instructions from Sierra I ran "modprobe -r usbserial" and got "Fatal usbserial in use by sierra." So I next ran "modprobe usbserial vendor=0x1199 product=0x0025" Didn't get an error.

6.Ran "dmesg|grep -i ttyUSB" which told me "Sierra now attached to ttyUSB0 etc."

7.Navigated to /root/ect/wvdial.conf and opened it up in Geany and deleted all the text in it, then copied and pasted the text from the Sierra pdf instructions and saved it.

8.Closed that, went to Connect icon on desktop, clicked and ticked pupdial to open when clicking Connect.

9.Clicked on Connect, opened pupdial and clicked on probe for modem. That gave me "modem detected" report at top. Hit connect to internet and viola here I am.

I must tell you tho I got it boiled down to these steps which I have also used to set up the modem in Puppy4.13NOP, after many hours of reading and fruitless tinkering because I didn't have the proper driver installed. So the very most important step for these modems, which work quite well once set up, is to check to make sure the driver in your system is the right one for your device. I'm not a programmer so I don't know if these steps will help you with you're quest to automate the process, but I hope so.

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

#121 Post by rerwin »

mill0001,
Thanks for your report. I would hope that all that effort would have been unnecessary if you had started out by downloading and installing tempestuous' newer sierra driver. Could you try it without any other changes to see whether the modem is detected automatically? That is my goal. You need the dotpets: 3G...-10, usb_modeswitch-0.9.7 (or maybe not at all, but it won't hurt), and tempestuous' sierra.

In what way was the sierra version of wvdial.conf different from what "3G-puppy" uses?

Let me explain the deal with usbserial. The sierra driver and all the other drivers that use ttyUSB0 are actually "front ends" to usbserial. My guess is that they handle the vendor and product IDs and probably invoke usbserial with the appropriate set. I suspect that, since you could not remove (modprobe -r) usbserial, your modprobe with the arguments had no effect, because usbserial was already loaded for sierra.

Getting back to usb_modeswitch: that entails some "udev rules" to control the switching of the device from a usb-storage impersonation to its modem state. There are rules for two sierra modems, but they do not include yours (1199:0025). Not a problem -- just make one! In the file:
/etc/udev/rules.d/51-usb_modeswitch-sierra-0x1199-0x0fff.rules
just modify one of the rules. Copy and change

Code: Select all

#ACTION=="add", SUBSYSTEM=="usb", ATTRS{idProduct}=="0fff", ATTRS{idVendor}=="1199", RUN+="/usr/sbin/usb_modeswitch.sh -v 0x%s{idVendor} -p 0x%s{idProduct} -V 0x1199 -P 0x0023 -S 1"
to:

Code: Select all

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idProduct}=="0fff", ATTRS{idVendor}=="1199", RUN+="/usr/sbin/usb_modeswitch.sh -v 0x%s{idVendor} -p 0x%s{idProduct} -V 0x1199 -P 0x0025 -S 1"
removing the initial "#" and changing the end from "23 -S 1" to "25 -S 1" -- if you are certain that product-0x0025 is correct (since your use of it was probably ignored). If things still don't work, I would suspect that you need a different value for the "-P" argument. If you use the modem with Windows. look into the device manager driver details to see what the product/device ID is for the modem. The usb-storage part of the device is probably 1199:0fff.

Please try again with my setup, in case that reveals something more for me to address. Thanks.
Richard

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

#122 Post by rerwin »

kayan,
Thank you for posting to this thread and explaining more about your situation. I have looked into a different area of the modem-detection process as a result. However, I cannot find where you mentioned exactly which modem you have, and its vendor and product IDS. That would be helpful.

I have installed slax-pup and see that it uses a newer kernel than the standard puppy 4.1.2. The later kernels handle much of the mode switching, so might account for not needing the mode switcher. But, as you say, maybe yours is not one of the hybrid storage-modem devices I have been focused on. The fact that slax-pup allows you to use the modem means that my 3G-pupdial project may avoid the need for you to edit the wvdial.conf file.

It would be most helpful if you could try the 3G-pupdial...-10 dotpet with slax-pup in a fresh pupsave (pfix=ram) environment, without editing anything, and with the modem unplugged. The part of the detection I need information about is the selection of the modem, especially because you have the serial modem to complicate things. My intent is to sort that all out. There are several possibilities you might see while booting this setup.

1. I expect the first bootup to show "no modem detected". If ttyS0 is shown, please use the connect wizard and analog modem option to get to pupdial, then "probe" and "ERASE", to get "no modem detected".

2. Install the 3G-pupdial dotpet, after downloading it from this thread (first post). I have just now updated it with some delay logic for "option" modems; but if yours is different the logic is unimportant.

3. Plug in the modem, wait a couple of minutes, then look for a file: /etc/init.d/Option ( or some other file there with a name beginning with a capital letter). Let me know whether one is there.

4. Reboot, making a new pupsave file in the process. Ideally, the connect wizard should show detection of a ttyUSB0 device. Verify again whether there is a capitalized file name in /etc/rc.d.

5. Look in /tmp/udevtrace-modem.log for a line about the "option script" and how long it waited for mode switching.

6. If the modem is still not detected, try rebooting one more time, after erasing the ttyS0 selection in pupdial if it appears.

I am curious to see how far you get with this. I want to get right the choosing of the modem -- the USB modem in preference to the serial modem. Please do not do a probe>PROBE, because I suspect that will choose the serial modem.

Thanks for any help you can provide.
Richard

User avatar
zgp152
Posts: 114
Joined: Thu 08 Nov 2007, 19:37

Nooby deadlock

#123 Post by zgp152 »

rerwin wrote: zgp152,
Yes, I am automating the PupDial wireless dialup process, and think I have it done, other than handling individual problems with it. The downloads are in the first posting in this thread and should work with 4.2 when it comes out, as well as 4.1.x-standard. It is too late for me to request its inclusion in 4.2, and the package awaits further input from users, to this thread, to determine whether it works generally. Please try out the "-6" version of the dotpet and the driver dotpets, and tell us how it goes. I think someone reported that the E220 does work.
Richard
Yes, I have progressed to some degree with E220 and pet v 10, but I am not successful yet. The latest hiccup is that I selected in wizard the choice that "starts GPRS dialup next time you click Connect", while the setup was not yet functional. How to undo this selection? The response I get is "Connect script failed / Exit status is 0 / DISCONNECTED / Press ENTER to quit / Press r ENTER to reconnect/try again".

One thing I would like to know in advance, is there any 3G network strength monitoring SW to indicate how good the coverage is? I may be a bit at the edge of the coverage.

Rgds zgp152

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#124 Post by dejan555 »

zgp152 right click on connect icon will give you option to execute connection wizard?
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

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

#125 Post by rerwin »

zgp152,
Regarding signal strength: I stumbled upon an AT command that apparently reports signal strength. I cannot test it myself, but try this:

Edit /etc/wvdial.conf to insert (near the end):
# Current network signal strength
Init6 = AT+CSQ

The result should show as part of the dialup dialog.
Richard

Post Reply