Page 1 of 1

usb driver while running naplink

Posted: Thu Mar 24, 2005 2:39 am
by MisterJP
Hello,

I have some trouble using an usb driver while naplink is running. The probe and connect functions are called without any problem, however I can not transfer anything to the device, when i try the iop freeze.
If i clear the iop and then load usbd.irx and the usb driver, i can access the device, but as naplink is not running anymore i do not see the printf messages (which does not help to debug).

Has anyone found a way to use an usb driver while naplink is running ?

Regards,
JP.

Posted: Thu Mar 24, 2005 6:45 am
by Oobles
I haven't seen that problem. But I think the general method is that if you're debugging USB devices use ps2link. If you're debugging Ethernet use naplink. Any reason why you can't use ps2link?

Posted: Thu Mar 24, 2005 7:01 am
by MisterJP
No reason, except that i do not have the network adapter :-)

Posted: Thu Mar 24, 2005 9:08 am
by neofar
I have similar problems with the usb_mass.irx.. but finally it works for me if I do this tasks:

1.- Turn on the console WITHOUT any usb pluged (pl2301 and key)
2.- plug in the USB key
3.- plug inf the pl2301

And this works perfectly, if I plug the USB key while the pl2301 is working sometime works.

othe thinks it's that I dont load the usbd.irx with naplink worknig there are a usb driver in the iop (I get an error if I try to reload another)

If you get an load/write error while are you working.. and don't know why its very probably that you have to start the proccess from the console off (pluggin out both devices)...

I you wont I can send you a sample that works for me, and will try

Posted: Fri Mar 25, 2005 3:50 am
by MisterJP
Thanks for your help, but unfortunately the trick doesn’t work. I tried all combination but got the same problem.
I think I will need a network adapter if I want to continue debugging the USB driver.

Thanks,
JP.

Posted: Fri Mar 25, 2005 7:53 am
by LionX
Note that you "can't" transfer any data to device untill you have return from the Connect(...) funtion.

take a look at my camera driver and you will see that i create a thread in the end of connect(...) funtion that will transfer data to the device after i reaturn from the connect() funtion.

Posted: Fri Mar 25, 2005 4:55 pm
by MisterJP
I looked at your camera driver and i tried to use the same trick, however it doesn't help.
In fact, everything works if i reset the iop before loading the driver but as i said, i then can't see the printf on the remote console. I guess the pl2301 driver or naplink does not like to share its usbd with another driver.

I notice that you can transfer (or at least call the functions to transfer) data to the device when you are in the Connect() function, but you can not expect the callback function to be called before returning from Connect(). I guess the transfers are queued by usbd and only sent when the Connect function returned ok.

By the way, your usb driver is very clear and helped me a lot.

Thanks,
JP.