usb driver while running naplink

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
MisterJP
Posts: 5
Joined: Thu Mar 17, 2005 6:42 pm

usb driver while running naplink

Post 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.
Oobles
Site Admin
Posts: 347
Joined: Sat Jan 17, 2004 9:49 am
Location: Melbourne, Australia
Contact:

Post 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?
MisterJP
Posts: 5
Joined: Thu Mar 17, 2005 6:42 pm

Post by MisterJP »

No reason, except that i do not have the network adapter :-)
User avatar
neofar
Posts: 47
Joined: Wed Jan 21, 2004 2:40 am
Location: Spain
Contact:

Post 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
MisterJP
Posts: 5
Joined: Thu Mar 17, 2005 6:42 pm

Post 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.
LionX
Posts: 61
Joined: Mon Dec 27, 2004 11:40 am

Post 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.
MisterJP
Posts: 5
Joined: Thu Mar 17, 2005 6:42 pm

Post 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.
Post Reply