Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-29 Thread Brad DeMorrow
On Mon, Dec 14, 2009 at 9:05 PM, Theo de Raadt dera...@cvs.openbsd.orgwrote:



 I don't know what that site means either.  Get it working, and get back
 to us.


Hey all, I ran into a snag I haven't been able to take care of yet while
trying to get a driver made for my edgeport device.
I am hoping for some guidance, so I'll do my best to post what I've read and
done to make it easier to help me.(Plus I don't want anyone thinking I am
posting here blindly without some extensive code and google reading)...

I haven't been able to get my hands on any documentation for the device.
I've tried to contact the author of the linux driver, but he said he didn't
have any documentation and he only worked on the older models that didn't
have the TI chipset.. So I attempted to contact the other names listed in
the sources in the linux driver, but nobody else responded...

To make a long story somewhat short, here is a link to the sources I have
been looking at while trying to write my OpenBSD driver:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/usb/serial/io_ti.c;h=d4cc0f7af400d0133653e4e0515b25a131e2a37f;hb=HEAD

Here is a link to my main file uep.c:
http://pastebin.ca/1730689

Here is a link to uep.h:
http://pastebin.ca/1730690

Here is a link to a dmesg after connecting my device and attaching my new
driver:
http://pastebin.ca/1730693

I've added a section to the files.usb file in /usr/src/sys/dev/usb for my
new driver as follows:
# Inside Out Edgeport
deviceuep
attachuep at uhub
filedev/usb/uep.cuep

I do not know for a fact this is correct, I may be wanting to use ucom(I'm
hoping I can) later..

To finally get to my problem.. I am trying to read the manufacturing
information off of the device.. but every time I call usbd_do_request I get
error 11 returned back to me meaning 'NO POWER'..

I don't quite understand why I'm getting this message.. The other devices
I've looked at don't do anything special before trying to read memory from
the device, nor does the linux driver as far as I can tell.
I've been reading uberry.c, umsm.c, and uvideo.c trying to find out the
order in which the usbd_* functions are called, but it doesn't appear that I
am doing anything special or different in my driver that would make it not
work..

furthermore.. I've read through the usbd_do_request_flags_pipe function
inside usbdi.c, and I can't see anywhere in the function where it returns
USBD_NO_POWER.. so I am confused as to why i'm getting that message.. the
only function that has a possibility of returning NO_POWER as far as I can
tell is the usbd_set_config_index function.

I hope this email has provided enough correct information to allow someone
smarter than myself to tell me what I am not doing correctly..

If there's anything that I left off, please let me know and I will get
whatever information is necessary.

Thank you all for your time, I appreciate it.



Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-17 Thread Tobias Ulmer
On Wed, Dec 16, 2009 at 04:58:12PM -0600, Brad DeMorrow wrote:
 Hey guys, I need a bit of help if you don't mind.
 
 I've been trying to hack up a basic driver to communicate with my Edgeport
 device..
 It started out decent enough, I got a new driver I named uep(for no
 particular reason besides it looked available) to attach to my device just
 fine..
 So at this time I have an extremely simple driver with just these
 functions..
 -uep_match
 -uep_attach
 -uep_detach
 
 ..
 
 Anyway, to get to my point, I read about lkm and thought man that sure would
 be nice if I didn't have to reboot my machine every time I make a change to
 my sources...
 
 Anyway, I was getting
 modload: entry point _uep_lkmentry not found in uep.o
 
 every time I tried to load my module, and I thought for sure I was doing
 something stupid, but it turns out that even the examples inside
 /usr/share/lkm give the same error when I try to load them.

Nice todo for the people who always complain that there is no list of
things to fix in OpenBSD.

 
 I can't find very much documentation on this, so I was hoping someone could
 point me in the right direction..

These examples worked 15 months ago, and they still should...
http://tin.tmux.org/~tobiasu/hgweb/lkm/file/

 
 FYI - I am of course running -current kernel and userland(as of maybe 2 days
 ago).
 
 Thanks,



Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-16 Thread Brad DeMorrow
Hey guys, I need a bit of help if you don't mind.

I've been trying to hack up a basic driver to communicate with my Edgeport
device..
It started out decent enough, I got a new driver I named uep(for no
particular reason besides it looked available) to attach to my device just
fine..
So at this time I have an extremely simple driver with just these
functions..
-uep_match
-uep_attach
-uep_detach

..

Anyway, to get to my point, I read about lkm and thought man that sure would
be nice if I didn't have to reboot my machine every time I make a change to
my sources...

Anyway, I was getting
modload: entry point _uep_lkmentry not found in uep.o

every time I tried to load my module, and I thought for sure I was doing
something stupid, but it turns out that even the examples inside
/usr/share/lkm give the same error when I try to load them.

I can't find very much documentation on this, so I was hoping someone could
point me in the right direction..

FYI - I am of course running -current kernel and userland(as of maybe 2 days
ago).

Thanks,



Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-15 Thread Stuart Henderson
On 2009-12-15, Brynet bry...@gmail.com wrote:
 In this case, I found a site which seems to indicate a few models
 require a separate driver.. however it also indicates that later models
 use a TI-based chip, perhaps it might be possible to adapt the uticom(4)
 driver?

the uticom(4) driver doesn't currently support multiport cards.



Inside Out Networks Edgeport USB Serial Adapters

2009-12-14 Thread Brad DeMorrow
Hello all.

I was wondering if anyone has worked on or is working a driver for the USB
Serial Adapters made by the company Inside Out Networks called Edgeports?

I see the device(s) listed under /usr/src/sys/dev/usb/usbdevs file, but I
see no reference to them anywhere else...

I'd like to attempt to get this device working under openbsd if it's
possible, and was looking into what it would take to do so - I just wanted
to make sure that nobody else was doing the same thing so as not to
duplicate work.


P.S. If anyone is willing and has the time, could you please contact me
off-list about potentially being a sort of 'mentor' while I try to get this
device working?  I've read through some of the similar device drivers
(uticom, uchcom, ex..), but truth be told I'd feel better off if somone else
could provide some sort of guidance..

P.P.S I couldn't find support for the device in freebsd or netbsd, but linux
appears to have a driver for it.  The device also requires firmware be sent
to it for it to work, which appears to be GPL licensed from the manufacturer
- is this a problem?

Thank you all.
--Brad



Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-14 Thread Brad DeMorrow
I could have qualified the product(s) I am talking about better, I'm sorry.

The device that I am referring to is
http://www.digi.com/products/usb/edgeport.jsp

There are several variations of the product, but the ones that I am
interested in are the Edgeport/2+2i and the Edgeport/8 devices..
The first one listed as follows from openbsd -current (It detects nothing
really..)

ugen0 at uhub2 port 2 Inside Out Networks Edgeport/2+2i rev 1.00/1.00 addr
3

Again - Thank you all for your time.

--Brad



Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-14 Thread Aaron Mason
On Tue, Dec 15, 2009 at 9:44 AM, Brad DeMorrow bdemor...@gmail.com wrote:
 I could have qualified the product(s) I am talking about better, I'm sorry.

 The device that I am referring to is
 http://www.digi.com/products/usb/edgeport.jsp

 There are several variations of the product, but the ones that I am
 interested in are the Edgeport/2+2i and the Edgeport/8 devices..
 The first one listed as follows from openbsd -current (It detects nothing
 really..)

 ugen0 at uhub2 port 2 Inside Out Networks Edgeport/2+2i rev 1.00/1.00 addr
 3

 Again - Thank you all for your time.

 --Brad



Hi Brad,

Firstly, I steer clear of USB serial adaptors due to the unreliability
i have experienced from models I've used.

Secondly, if the firmware is GPL, this is a problem since GPL is not
compatible with BSD.  On top of that the firmware is a sort of binary
blob, which will never be used in any OpenBSD system.

Your best bet is a clean-room reverse engineer.

Sorry I couldn't be more helpful.

-- 
Aaron Mason - Programmer, open source addict
I've taken my software vows - for beta or for worse



Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-14 Thread Brynet
Aaron Mason
 On top of that the firmware is a sort of binary
 blob, which will never be used in any OpenBSD system.

Nonsense, binary firmware/microcode images are perfectly acceptable in
OpenBSD, so long as the redistribution terms are clearly defined and
suitable.

Take a look in /etc/firmware.

Binary-only *drivers* however are not acceptable, these would have to be
loaded into kernel space.. performing all sorts of black magic that
would complicate development.

In this case, I found a site which seems to indicate a few models
require a separate driver.. however it also indicates that later models
use a TI-based chip, perhaps it might be possible to adapt the uticom(4)
driver?

http://www.kroah.com/linux/usb/edgeport/

No clue.

-Bryan.



Re: Inside Out Networks Edgeport USB Serial Adapters

2009-12-14 Thread Theo de Raadt
 Aaron Mason
  On top of that the firmware is a sort of binary
  blob, which will never be used in any OpenBSD system.
 
 Nonsense, binary firmware/microcode images are perfectly acceptable in
 OpenBSD, so long as the redistribution terms are clearly defined and
 suitable.

That's completely true.  If the redistribution terms make the firmware
become just free data, then we can distribute it, and use it.

 Binary-only *drivers* however are not acceptable, these would have to be
 loaded into kernel space.. performing all sorts of black magic that
 would complicate development.

Completely true.

 In this case, I found a site which seems to indicate a few models
 require a separate driver.. however it also indicates that later models
 use a TI-based chip, perhaps it might be possible to adapt the uticom(4)
 driver?
 
 http://www.kroah.com/linux/usb/edgeport/

I don't know what that site means either.  Get it working, and get back
to us.