Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VHCI failure for OMRON PLC #56

Closed
cezuni opened this issue Jul 27, 2019 · 22 comments
Closed

VHCI failure for OMRON PLC #56

cezuni opened this issue Jul 27, 2019 · 22 comments
Assignees
Labels
future work help wanted Extra attention is needed

Comments

@cezuni
Copy link

cezuni commented Jul 27, 2019

VHCI fails for OMRON PLC. Detailed description is here: #52 (comment)

@cezuni cezuni added the help wanted Extra attention is needed label Jul 27, 2019
@cezuni
Copy link
Author

cezuni commented Jul 27, 2019

@halimselim : I tried your usbip server several times. All results were same that vhci failed after selecting configuration. In the window kernel log, IRP_MN_REMOVE_DEVICE was shown after selecting configuration. Maybe ORMON plc driver removed it. There were no warning or error in logs of usbip-win.

By the way, your server cannot be attached any more because your device was not detached by mistake before my client was to be reset. If a usbip connection is lost without detach, a stub server should seem to be reset manually.

@halimselim
Copy link

Thank you for testing, I rebinded the device. What do you suggest me to do ? Device driver works fine when connected to usb directly, but fails with usbip. And usbip shows no error as you say. Is there anything we could do ?

@cezuni
Copy link
Author

cezuni commented Jul 28, 2019

I try again to attach to your server.. and never forget to detach it.

We should check if usb compatible ids are same for both cases(via usbip-win or directly). Can you compare usb identifiers? For more details, please refer to
#25 (comment) .

@cezuni
Copy link
Author

cezuni commented Jul 28, 2019

Here's are logs from my testing: usbip_log.txt, debug_pdu.log

Your server returned -EPIPE(-32) for selecting configuration. Your server log may contain useful information. Can you share it?

@halimselim
Copy link

halimselim commented Jul 28, 2019

filtered server log (/var/log/syslog) is attached
log.txt

I can give ssh access to the server if anyone needs.

@cezuni
Copy link
Author

cezuni commented Jul 28, 2019

@halimselim : The server log also said that selecting conf failed with -EPIPE. Control port may be stalled. I need to check further that vhci handles correctly the result code.
BTW, file attachment would be better than inserting log entries as a comment text. This page will be too long if all logs are inserted as comments. 😄

@cezuni
Copy link
Author

cezuni commented Jul 29, 2019

@halimselim : Is PLC_NS driver correct ? The driver removes the usbip device after selecting configuration even if a vhci forcefully returns success code.

@halimselim
Copy link

halimselim commented Jul 29, 2019

If you connect to my local pc, I will plug in omron plc to the physical usb port. Then you will be able to compare the difference. Driver loads successfully.

@cezuni
Copy link
Author

cezuni commented Jul 29, 2019

@halimselim : I do not suspect the correctness of a PLC driver. I asked you that driver files to be installed are located in CXOne-Drivers2017/drivers/USB/8/PLC_NS/64bit folder of driver zip.

@halimselim
Copy link

Yes that's correct. I reinstalled to confirm.
windriver.txt

@cezuni
Copy link
Author

cezuni commented Jul 29, 2019

@halimselim : When a plc is directly attached without usbip-win, what are driver file details and compatible ids of the device? They can be found from device properties in the device manager.
Also I want to know "lsusb -v" results of the linux server.

@halimselim
Copy link

Here is lsusb -v result: lsusb_v.txt
I will go to office 8 hours later, only then I can directly attach to get those details.

@halimselim
Copy link

halimselim commented Jul 30, 2019

omrondriver.txt
and many more details are present

omrondriver

@cezuni
Copy link
Author

cezuni commented Jul 30, 2019

@halimselim : Sadly, compatible ids are same between a real device and a virtual device via usbip-win. I had asked also driver file details. Which drivers are loaded for a plc device ? That information resides in a driver tab of a properties window.

@halimselim
Copy link

omron2

@cezuni
Copy link
Author

cezuni commented Jul 30, 2019

@halimselim : Loaded drivers are also same..
Currently, I can't figure out the reason why a plc driver removes a virtual plc device if the device is created via usbip-win. Can you capture usb packets when a plc device is directly attached ? I had used Wireshark to capture.

@halimselim
Copy link

ws2.zip

@cezuni
Copy link
Author

cezuni commented Jul 30, 2019

@halimselim : Was ws2.pcapng in the zip file generated with a plc driver directly attached without usbip-win? But the wireshark log you've sent is exactly same with usbip-win log. Weird!!

@halimselim
Copy link

Yes it is the log of direct attach

@halimselim
Copy link

halimselim commented Jul 30, 2019

I know that eltima software works well with this plc. When it is installed it creates its own branch (Eltima Usb Stub) under Device Manager tree. But usbip is listed under System Devices branch. Could it be related ?
ps: virtualhere fails too with same code:10 error

@cezuni
Copy link
Author

cezuni commented Jul 30, 2019

@halimselim :

I know that eltima software works well with this plc. When it is installed it creates its own branch (Eltima Usb Stub) under Device Manager tree. But usbip is listed under System Devices branch. Could it be related ?

This means that device classes of both case are different: Eltima Usb Stub(custom device class) and System(usbip-win). In my opinion, such a difference does not matter. By the way, is it USB class(not system class) for usbip-win and directly attached case ?

Now, I should look into the beginning parts of usbip-win logs such as IRP_MN_QUERY_XXX related stuff. In fact, many bus queries have not been handled properly in usbip-win because there's no problem with unhandled queries. It can be a long journey. It may be better to use eltima.. 😢

@halimselim
Copy link

Yes Omron PLC appears under "Universal Serial Bus Controllers" in both cases. We will be watching the developments, thanks for your time.

@cezuni cezuni self-assigned this Jul 31, 2019
@cezuni cezuni changed the title VHCI failure for ORMON PLC VHCI failure for OMRON PLC Aug 1, 2019
@cezanne cezanne closed this as completed Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future work help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants