On Mar 22, 2017, at 4:07 AM, Johan Hovold <johan@kernel.org> wrote:

On Wed, Mar 22, 2017 at 03:50:11AM -0700, Greg Hazel wrote:
On one side of Greybus I have a small nuttX environment with a UART
connected device which I can write modules for, and on the other side
of Greybus I’d like to provide a network interface. I can’t modify
that side, so I have to work with the kernel modules it has available.
I thought it might be possible to present a virtual USB CDC-EVM to
Greybus, and my guess (hope) is that cdc_ether would pick it up on the
other side.

Ah, if this isn't really a network device, or modem, I wouldn't mess
with cdc-evm.  If it is a modem, then it should "just work" with the
uart code today, just tell userspace this is a modem and all should be
fine.

Indeed, that would be the way to go.

This suggestion isn’t clear to me. The UART device is not a standard
network device or modem; it needs some of my software to behave like
one. I’d like to present it in a way that Greybus can provide to the
host machine. cdc-evm was my first guess at that interface; but what
do you think would be better?

You said you have a UART connected device on your module, so the easiest
way to expose that is to use the Greybus bridged-phy class to expose
it as a tty device to user space.

What exactly do you have connected on the other side of that module
uart?

That UART is currently a TI SimpleLink/EasyLink. I’m also considering a slip-radio. These are relatively simple wrappers from radio to ethernet. Most importantly, I can only control the software on my side of the Greybus, so using bridged-phy to expose the UART as a tty would not enable me to use the tty on the other side…

-Greg