• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
April 24, 2024, 05:20:44 am

News:

SMF - Just Installed!


USB Device Restart/Enable/Disable

Started by hid1, May 17, 2010, 06:41:27 pm

Previous topic - Next topic

hid1

May 17, 2010, 06:41:27 pm Last Edit: May 19, 2010, 12:11:01 pm by hid1
Hello,
latest nrcomlib used, at Program Files\nrComm Lib\Demos\USBDeviceDemo\
usbdevicedemo.exe does not eject any USB devices.  
Custom HID devices or another. Absolutely not work.
tested on > Windows Vista

I need USB HID device eject and plug. (when devicefails)


Roman Novgorodov

Hello

This feature is intended for eject USB disks.
Like system well know function "Safely Remove Device" in tray box.
By the way Windows does not allow to unplug HID devices in  "Safely Remove Device".

We will try to find solution.

Roman Novgorodov
DeepSoftwae.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

hid1

Ok. I will try device based fail monitor to  reset usb HID device.

hid1

But programmatically disable or enable HID device like device manager right click, this is possible by nrhid ?

Roman Novgorodov

We will try to add such functionality. But I can't promise anything :-(

Roman
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

hid1

May 19, 2010, 12:06:47 pm #5 Last Edit: May 19, 2010, 12:11:24 pm by hid1
Ok. thanks.

Re-detect USB Device without unplugging, USB device enable/disable, Devcon.exe can do it.  I believe, nrUSB can also. But I don't know how?

For example I need restart usb transfers for my device devcon.exe restart USB\VID_XXXX*PID_XXXX*   This is ok with devcon. (XXX.. MY VID and MY PID) by  function DiRestartDevice? or another functions in nrwin32di unit?


http://www.eggheadcafe.com/software/aspnet/29682755/redetect-a-usb-device-wi.aspx

I've download Windows Driver KIT. devcon.exe source available. But I 'm not familiar for cpp

Roman Novgorodov

May 20, 2010, 07:32:25 am #6 Last Edit: May 20, 2010, 08:07:20 am by Roman Novgorodov
Hello

Thank you for information.

Did you try TnrUsb.Restart() method?

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

hid1

May 20, 2010, 08:52:15 am #7 Last Edit: May 20, 2010, 11:11:59 am by hid1
nrUSB1.Restart() method not available
and
nrUSB1.Reset do not reset the bus and data transfer.

My device is Custom HID device winusb driver not used.
My nrcomm lib  version nrcomm_pro_906 (latest which I know)

Program Files\nrComm Lib\Demos\USBDriverDemo used,
Device selected from device box and new added button pressed.

procedure TForm1.Button2Click(Sender: TObject);
begin
nrUSB1.Reset;
// cannot reset HID device data trasfer. when other app. uses device or not.

end;

Thank you for quick reply


I found smilar Delphi demos for any device. (HID etc. no problem)
http://www.yeahware.com/download/eject.zip
http://www.yeahware.com/download/enable.zip

http://www.yeahware.com/

Roman Novgorodov

Hello

Thank you for information.

Please try new version of demo from attachment.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

hid1