ADSL modem driver (speedtouch)

bridged with qdn.public.ddk.usb
Post Reply
XXX

ADSL modem driver (speedtouch)

Post by XXX » Mon Jul 22, 2002 8:00 am

Hi,

I have an USB speedtouch modem from alcatel and am trying to port a
linux/bsd driver to QNX. I'm completely new in USB driver developpement
and don't even really know the USB standard(!). So I have some trouble
to map the linux calls to the QNX one. I would really appreciate if
someone could give me some advices or links on "Howto's"...
In addition, I have an "old" version of QNX and wonder if there is a way
to get some samples of USB drivers on QNX or to update my USB DDK (my
version does not implement the usbd_setup_dontrol for example) with
Windows.

Thx for your response

PS: If someone already has a driver for this modem, I would appreciate
to use it... ;)

Kevin Chiles

Re: ADSL modem driver (speedtouch)

Post by Kevin Chiles » Wed Jul 24, 2002 6:39 pm

XXX <XXX@stna.dgac.fr> wrote:
Hi,

I have an USB speedtouch modem from alcatel and am trying to port a
linux/bsd driver to QNX. I'm completely new in USB driver developpement
and don't even really know the USB standard(!). So I have some trouble
to map the linux calls to the QNX one. I would really appreciate if
someone could give me some advices or links on "Howto's"...
In addition, I have an "old" version of QNX and wonder if there is a way
to get some samples of USB drivers on QNX or to update my USB DDK (my
version does not implement the usbd_setup_dontrol for example) with
Windows.
You should use the usbd_setup_vendor() for control transfers.

Christophe Guerber

Re: ADSL modem driver (speedtouch)

Post by Christophe Guerber » Sat Jul 27, 2002 2:17 am

Hi,

I call usbd_io with an IN bulk urb. This call returns without error (EOK).
But when I call the usbd_urb_status, it always reply EBUSY. Why and what
should I do then?
I tried to call usbd_io or usbd_urb_status until it changes but nothing
helped. I also tried with an OUT bulk io operation and it is the same...

Thx for your reply.

OS version: QNX 6.0 on x86 processor with an alcatel speedtouch USB ADSL
modem.

Code shall be "something like that", as far as I remember:
/*
* Find the device and the right endpoint descriptor, open the pipe
*/
if(!(myurb = usbd_alloc_urb(NULL)) || !(buf = usbd_allc(size)))
return -1;
if(usbd_setup_bulk(dev,myurb,URB_IN,buf,size)!=EOK)
return -1;
if(usbd_io(dev,mypipe,myurb,NULL,2000)!=EOK)
return -1;
if(usbd_urb_status(myurb,&status,&len)!=EOK) /* <= always return EBUSY */
return -1;
return len;


"Kevin Chiles" <kchiles@qnx.com> a écrit dans le message news:
ahms8l$mjm$1@nntp.qnx.com...
XXX <XXX@stna.dgac.fr> wrote:
Hi,

I have an USB speedtouch modem from alcatel and am trying to port a
linux/bsd driver to QNX. I'm completely new in USB driver developpement
and don't even really know the USB standard(!). So I have some trouble
to map the linux calls to the QNX one. I would really appreciate if
someone could give me some advices or links on "Howto's"...
In addition, I have an "old" version of QNX and wonder if there is a way
to get some samples of USB drivers on QNX or to update my USB DDK (my
version does not implement the usbd_setup_dontrol for example) with
Windows.

You should use the usbd_setup_vendor() for control transfers.

Christophe Guerber

Re: ADSL modem driver (speedtouch)

Post by Christophe Guerber » Sat Jul 27, 2002 12:57 pm

Ok I got it!
Out bulk io operations now succeed. But I'm still in trouble for in bulk
io's...
usbd_urb_status always returns EBUSY... It never calls my completion
callback.
Is there something special for this kind of io's?

QNX version is 6.1.0 on x86

"Kevin Chiles" <kchiles@qnx.com> a écrit dans le message news:
ahms8l$mjm$1@nntp.qnx.com...
XXX <XXX@stna.dgac.fr> wrote:
Hi,

I have an USB speedtouch modem from alcatel and am trying to port a
linux/bsd driver to QNX. I'm completely new in USB driver developpement
and don't even really know the USB standard(!). So I have some trouble
to map the linux calls to the QNX one. I would really appreciate if
someone could give me some advices or links on "Howto's"...
In addition, I have an "old" version of QNX and wonder if there is a way
to get some samples of USB drivers on QNX or to update my USB DDK (my
version does not implement the usbd_setup_dontrol for example) with
Windows.

You should use the usbd_setup_vendor() for control transfers.

Henry Van Dyke

Re: ADSL modem driver (speedtouch)

Post by Henry Van Dyke » Mon Jul 29, 2002 2:04 pm

Christophe Guerber (guerber@worldnet.fr) wrote:
: Hi,

: I call usbd_io with an IN bulk urb. This call returns without error (EOK).
: But when I call the usbd_urb_status, it always reply EBUSY. Why and what
: should I do then?
: I tried to call usbd_io or usbd_urb_status until it changes but nothing
: helped. I also tried with an OUT bulk io operation and it is the same...

: Thx for your reply.

: OS version: QNX 6.0 on x86 processor with an alcatel speedtouch USB ADSL
: modem.

: Code shall be "something like that", as far as I remember:
: /*
: * Find the device and the right endpoint descriptor, open the pipe
: */
: if(!(myurb = usbd_alloc_urb(NULL)) || !(buf = usbd_allc(size)))
: return -1;
: if(usbd_setup_bulk(dev,myurb,URB_IN,buf,size)!=EOK)
: return -1;
: if(usbd_io(dev,mypipe,myurb,NULL,2000)!=EOK)
: return -1;
: if(usbd_urb_status(myurb,&status,&len)!=EOK) /* <= always return EBUSY */
: return -1;
: return len;



You need to provide a callback function in the call to usbd_io().
When the USB stack completes your urb request you get notified
through the function you provide. In your callback function then
you can check the usbd_urb_status().

Calling usbd_urb_status() directly after usbd_io() returns EBUSY
because the stack hasn't completed the request yet.






: "Kevin Chiles" <kchiles@qnx.com> a écrit dans le message news:
: ahms8l$mjm$1@nntp.qnx.com...
: > XXX <XXX@stna.dgac.fr> wrote:
: > > Hi,
: >
: > > I have an USB speedtouch modem from alcatel and am trying to port a
: > > linux/bsd driver to QNX. I'm completely new in USB driver developpement
: > > and don't even really know the USB standard(!). So I have some trouble
: > > to map the linux calls to the QNX one. I would really appreciate if
: > > someone could give me some advices or links on "Howto's"...
: > > In addition, I have an "old" version of QNX and wonder if there is a way
: > > to get some samples of USB drivers on QNX or to update my USB DDK (my
: > > version does not implement the usbd_setup_dontrol for example) with
: > > Windows.
: >
: > You should use the usbd_setup_vendor() for control transfers.

Post Reply

Return to “qdn.public.ddk.usb”