All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: modem mode switching
Date: Thu, 13 Aug 2009 16:52:48 +0000	[thread overview]
Message-ID: <1250182368.5896.9.camel@localhost.localdomain> (raw)
In-Reply-To: <4A8433DA.3040003@pardus.org.tr>

On Thu, 2009-08-13 at 17:59 +0200, Kay Sievers wrote:
> On Thu, Aug 13, 2009 at 17:40, Ozan Çağlayan<ozan@pardus.org.tr> wrote:
> > I wonder why there are two different userspace utilities for mode
> > switching on HSDPA modems. modem-modeswitch is shipped with udev,
> > usb_modeswitch is another project which is maintained as well.
> >
> > Do they diverge in some point? If not, are there any plan to merge them
> > together? I'm not sure but relevant kernel drivers for those modems
> > seems to also have some sort of mode switching. When I plug my Huawei
> > device which isn't listed in neither udev rules for the userspace, it
> > first gets probed as an unknown 0xffffffff device and then it gets
> > reconnected and probbed as a serial modem. If kernel-space is able to
> > handle those kind of quirks, why the user space mode switching tools exist?
> 
> Dan should know.

Various reasons, none of which I care about any more, since the tool
works and as long as there's *something* that does the job, that's
great.

We could move the mobile action code into a separate binary since it
doesn't look like it would be that easy to fit into usb_modeswitch's
current architecture.

It also looks like it doesn't distribute a udev rules file by default,
that would be good to keep upstream, since they are clearly not thinking
about distributions, but individual users, which is pretty
short-sighted:

"You should have a folder named "/etc/udev" or similar. Somewhere in
there (I have a folder "rules.d") you find some files with the extension
".rules". Create a new one (or edit an existing one, but by convention
not the default "50-something.rules"). I chose one named
"45-hotplug.rules" since hotplugging is what USB is about after all.
In the chosen/new file add the line

SUBSYSTEM="usb", SYSFS{idProduct}="<YourDefaultProdID>", SYSFS{idVendor}="<YourDefaultVendID>", RUN+="<YourPathToUSB_ModeSwitch>"
"

Obviously for a distro, we need this to run for any USB devices that are
specified in usb_modeswitch's config file, and that means we also need
to uncomment everything in that file when actually putting it in a
distro.

Dan



  parent reply	other threads:[~2009-08-13 16:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-13 15:40 modem mode switching Ozan Çağlayan
2009-08-13 15:59 ` Kay Sievers
2009-08-13 16:52 ` Dan Williams [this message]
2009-08-13 16:57 ` Ozan Çağlayan
2009-08-13 17:09 ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1250182368.5896.9.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.