Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 17 Sep 2019, 18:46
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to attach a driver to a dvice?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
sjsrikanth


Joined: 28 Mar 2011
Posts: 114
Location: Chennai, India

PostPosted: Mon 19 Sep 2011, 02:11    Post subject:  How to attach a driver to a dvice?  

How to attach and detach a driver to a device using command line?

[puppy 5.28, want to attach cdc_acm to a usb modem which is seen as a modem but not using cdc_acm]
Back to top
View user's profile Send private message 
muggins

Joined: 20 Jan 2006
Posts: 6754
Location: hobart

PostPosted: Mon 19 Sep 2011, 02:22    Post subject:  

Have you tried:

Code:
modprobe cdc_acm


If some other driver has grabbed the device, you might need to blacklist it using the BootManager.
Back to top
View user's profile Send private message 
sjsrikanth


Joined: 28 Mar 2011
Posts: 114
Location: Chennai, India

PostPosted: Mon 19 Sep 2011, 04:19    Post subject:  

That does not do the magic ,it just loads the module (lsmod shows cdc_acm is used by 0) is there a way to force the driver on the device?
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 4208
Location: Kiel,Germany

PostPosted: Mon 19 Sep 2011, 15:45    Post subject:  

Quote:
# usb_modeswitch

* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 1.0.2 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions

No default vendor/product ID given. Aborting.


I don't know if that is something , what your are looking for , and I have no experience with that command , but it might lead to further directions .
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1951
Location: Maine, USA

PostPosted: Tue 20 Sep 2011, 20:13    Post subject:  

sjsrikanth,
I could help you if you would attach some diagnostic information to a posting here. We need to see the real data in order to assess what is happening.

Please boot up with pfix=ram and click on the "connect" icon. If it does not show a detected modem, open a console and enter the command:
pmodemdiag

Attach the tar.gz file it creates in your root directory, to a message posting, so we can analyze it. Thanks.
Richard
Back to top
View user's profile Send private message 
sjsrikanth


Joined: 28 Mar 2011
Posts: 114
Location: Chennai, India

PostPosted: Wed 21 Sep 2011, 05:27    Post subject:  

Thank u rerwin, I'm attaching the pmodemdiag file.

Pls look at the usb_modeswitch_log file (which I think is the source of my problem) also the lsmod file shows that cdc_acm is used by 0.

(Actually you are not new to this issue, we were working this out in another thread http://www.murga-linux.com/puppy/viewtopic.php?t=62658&start=45,
I was waiting for sometime for your response to the pmodemdiag posted there. But I guess u were quite busy making puppy better and I'm happy that u did (5.2.Cool ( thank you) !

I somehow feel that usb_modeswitch is not able to attach the appropriate driver or detach the storage kernel driver.
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1951
Location: Maine, USA

PostPosted: Wed 21 Sep 2011, 14:13    Post subject:  

sjsrikanth,
Sorry about not responding in that other thread. The conversation was more about connecting to BSNL and you seemed to have resolved that. I had no further ideas on where to go from there.

About the current issue, usb_modeswitch thinks the device is busy and eventually gets an error code. That must be a mode-switcher problem. One thing you can try, though, is the newest version of the switcher, 1.1.9, which is in the "patch-4" package I posted in the lupu 5.2.8 thread, page 19, here:
http://www.murga-linux.com/puppy/viewtopic.php?p=564158#564158
Maybe something relevant got fixed there.

I just checked the modeswitch forum, looking for clues. At the end of a thread about getting the modem recognized, the developer added
Quote:
I'm still standing by my claim (well, assumption) that this multi-mode thing is rather a by-product of using cell phone chips in the modems. ("Well, we have that storage there - what can we do with it?")

Many phones can be put into both a storage mode and a communication mode. But I don't think manufacturers thought about switching through the USB connection originally. This "feature" was added later with the stick firmware.

From USB view, it's weird to have multiple IDs in one device. These things act like two different pieces of hardware, the switching does resemble a hard re-plug. Very messy.
Elsewhere he mentions re-plugging the device each time you start it (when manually making some changes).

If 1.1.9 and re-plugging don't help, maybe it is time to send a request for assistance to the usb_modewitch forum
http://www.draisberghof.de/usb_modeswitch/

Apparently, that device is more complicated than most. More work might be needed on the mode switcher to handle it.

But before you/we contact the developer (Josh), please try wary 5.1.4.1, just to be sure there is nothing unique about lupu that might relate to the "busy" condition. Wary uses 1.1.7, but that should also support your modem. If you decide to contact Josh, you can find the usb_modeswitch listings in /tmp/usb_modeswitch*/usb_modeswitch*. (Pmodemdiag collects them into usb_modeswitch_logs.)

- - -

A few hours later - I have an idea!
Your diag data contains an interesting set of messages regarding the cdc-acm driver and usb_modeswitch.
    Sep 22 05:32:54 puppypc user.info kernel: cdc_acm 1-2:2.1: ttyACM0: USB ACM device
    Sep 22 05:32:54 puppypc user.info kernel: cdc_acm 1-2:2.3: ttyACM1: USB ACM device
    Sep 22 05:32:54 puppypc user.info kernel: usbcore: registered new interface driver cdc_acm
    Sep 22 05:32:54 puppypc user.info kernel: cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters

    Sep 22 05:33:04 puppypc user.warn kernel: usb 1-2: usbfs: interface 1 claimed by cdc_acm while 'usb_modeswitch' sets config #3
The last two show that the mode switcher runs 10 seconds after the driver claims an interface that the switcher needs. What if we delay the loading of cdc-acm until after the mode switcher executes? To try this, I attach a package to insert the delay, as well as make 2 bug fixes I found necessary while testing this -- a triple!

Please install this on your lupu528 setup, do a pupdial CHOOSE > ERASE, and reboot. If you click on "connect" right away, you should see a "Please wait" popup and then the wizard with the modem detected. Obtain a pmodemdiag file at that point, whatever happens. The delay is 20 seconds, which should be enough for the mode switcher to run. If you need to adjust that value, you can edit /etc/modprobe.d/cdc-acm.conf to change the number after the word, "sleep". I am eager to se the results.
Richard
lupu528_sjsrikanth_experiment-1.pet
Description  Delays start of cdc-acm driver to allow mode switching.
pet

 Download 
Filename  lupu528_sjsrikanth_experiment-1.pet 
Filesize  6.86 KB 
Downloaded  174 Time(s) 
Back to top
View user's profile Send private message 
sjsrikanth


Joined: 28 Mar 2011
Posts: 114
Location: Chennai, India

PostPosted: Thu 22 Sep 2011, 03:34    Post subject:  

Thnx for the ideas,

but still he problem persists, this is the new pmodemdiag ( I even tried sleep 30)

also tried the new usbmodeswitch no luck guess I should contact Josua!
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1951
Location: Maine, USA

PostPosted: Thu 22 Sep 2011, 11:07    Post subject:  

sjsrikanth,
Well, the results are different than last time, but the situation just looks even more mystifying. I am afraid I have to agree with you about contacting Josua. It would probably be helpful to him if you include the messages and usb_modeswitch_logs files from both of the pmodemdiag files you posted here. Or maybe the entire diag files with references to those files.

Let me know if I can be of help in that conversation. For Josua's sake, I think it best if you make the contact, instead of getting me in between. Thanks for pursuing this.
Richard
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0537s ][ Queries: 12 (0.0139s) ][ GZIP on ]