From: Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
To: "jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
<jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
Subject: Re: Plug and play for a tty line disciple networking device
Date: Wed, 20 Mar 2013 17:56:04 -0700 [thread overview]
Message-ID: <20130321005604.GA28671@kroah.com> (raw)
In-Reply-To: <CAKON4OxceqF8LJa9L+QZ_jznFbD0VE+2PejdZWTpOC+gdU2vHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, Mar 20, 2013 at 08:49:50PM -0400, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> On Wed, Mar 20, 2013 at 8:38 PM, Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> wrote:
> > On Wed, Mar 20, 2013 at 08:25:15PM -0400, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> >> On Wed, Mar 20, 2013 at 8:14 PM, Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> wrote:
> >> > On Wed, Mar 20, 2013 at 08:04:29PM -0400, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> >> >> On Wed, Mar 20, 2013 at 7:26 PM, Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> wrote:
> >> >> > On Tue, Mar 19, 2013 at 11:30:05AM -0400, jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> >> >> >> How can you achieve plug and play for a ft2232 based USB serial device
> >> >> >> implementing 802.15.4 networking?
> >> >> >>
> >> >> >> The device has a 802.15.4 SOC with a UART attached to a ft2232. With
> >> >> >> firmware loaded the only thing it can do is talk the 802.15.4 tty line
> >> >> >> discipline, it is not a general purpose serial port.
> >> >> >>
> >> >> >> Right now the device works by plugging it in and it appears as a
> >> >> >> generic USB serial device like ttyUSB0. You then run a user space app
> >> >> >> which sets the line discipline, holds the port open and attaches it to
> >> >> >> the 6lowpan implementation in the networking code. But doing that is
> >> >> >> inconvenient and users needs to be trained to do it. Much simpler if
> >> >> >> we could just plug the device in and it worked.
> >> >> >>
> >> >> >> We can add a EEPROM to the ft2232 to give it a unique USB ID. Is it
> >> >> >> possible to make a kernel driver that see this ID, sets the line
> >> >> >> discipline and wires the serial port directly into the networking
> >> >> >> code?
> >> >> >
> >> >> > Yes, you can do that.
> >> >>
> >> >> Is there an existing driver in the kernel that does this?
> >> >> So far all of the ones I've checked still need a user space app.
> >> >
> >> > Look at the bluetooth drivers, they have their own line dicipline I
> >> > think.
> >>
> >> Bluetooth drivers use line discipline on UARTs. On USB they have their
> >> own set of Bluetooth descriptors.
> >>
> >> CAN over serial has a line discipline but it needs a user space app.
> >
> > In your driver, just attach the line discipline directly to the tty
> > device you create. You will not be using the "normal" usb-serial logic
> > at all if you do this, but you should be fine, right?
>
> USB serial port is based on the FT2232 so we've been using that driver.
>
> Modifying that driver was my plan for doing this. I was hoping that
> there was a more generic way to achieve the same effect.
No, sorry, stick with doing this from userspace, it's a simple one-line
udev rule, right?
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-03-21 0:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 15:30 Plug and play for a tty line disciple networking device jonsmirl-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <CAKON4OxNV85-J8C-hodpq9pY5tRCT+7aYa=m4T3Vk04XSGhOrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-20 23:26 ` Greg KH
2013-03-21 0:04 ` jonsmirl
[not found] ` <CAKON4Oz+2DfzeOcvmKgi3ADAtyC5ie5-22uUQdfH_gcqeaDSYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-21 0:14 ` Greg KH
2013-03-21 0:25 ` jonsmirl
2013-03-21 0:38 ` Greg KH
2013-03-21 0:49 ` jonsmirl
[not found] ` <CAKON4OxceqF8LJa9L+QZ_jznFbD0VE+2PejdZWTpOC+gdU2vHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-21 0:56 ` Greg KH [this message]
[not found] ` <20130321005604.GA28671-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-03-21 1:12 ` jonsmirl-Re5JQEeQqe8AvxtiuMwx3w
2013-03-21 1:19 ` Alan Ott
2013-03-21 1:28 ` jonsmirl
2013-03-21 1:33 ` Alan Ott
2013-03-21 1:43 ` jonsmirl
2013-03-21 1:52 ` jonsmirl
2013-03-21 0:25 ` Marcel Holtmann
2013-03-21 0:30 ` jonsmirl
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=20130321005604.GA28671@kroah.com \
--to=gregkh-hqyy1w1ycw8ekmwlsbkhg0b+6bgklq7r@public.gmane.org \
--cc=alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org \
--cc=jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox