intrepidcs / libicsneo

An open source solution to integrate Intrepid Control Systems vehicle networking hardware with your application.
Other
37 stars 32 forks source link

Cannot re-open ValueCAN 4-2 #12

Open pierreluctg opened 5 years ago

pierreluctg commented 5 years ago

Using the libicsneo-examples project, re-opening a ValueCAN 4-2 device will fail.

$ ./libicsneocpp-example 
Running libicsneo v0.1.0 HEAD @ 8a77bf
Supported devices:
    neoOBD2 PRO
    neoOBD2 SIM
    neoVI FIRE
    neoVI FIRE 2
    neoVI ION
    neoVI PLASMA
    RADStar 2
    RADSupermoon
    ValueCAN 3
    ValueCAN 4-1
    ValueCAN 4-2
    ValueCAN 4-2EL
    ValueCAN 4-4
    VividCAN

Finding devices... OK, 1 device found
    ValueCAN 4-2 - V20974 @ Handle 10

Connecting to ValueCAN 4-2 V20974... OK
    Getting HSCAN Baudrate... FAIL
    Setting HSCAN to operate at 125kbit/s... FAIL
    Getting HSCAN Baudrate... (expected to be unchanged) FAIL
    Getting HSCANFD Baudrate... FAIL
    Setting HSCANFD to operate at 8Mbit/s... FAIL
    Getting HSCANFD Baudrate... (expected to be unchanged) FAIL
    Setting settings temporarily... FAIL
    Getting HSCAN Baudrate... FAIL
    Getting HSCANFD Baudrate... FAIL
    Setting settings permanently... FAIL

    Going online... OK
    Checking online status... OK
    Streaming messages in for 3 seconds... 
        Got 0 messages while polling
    Transmitting an extended CAN FD frame... OK
    Transmitting an ethernet frame on OP (BR) Ethernet 2... FAIL
    Going offline... OK
    Setting default settings... FAIL
    Disconnecting... OK

Press any key to continue...

$ ./libicsneocpp-example 
Running libicsneo v0.1.0 HEAD @ 8a77bf
Supported devices:
    neoOBD2 PRO
    neoOBD2 SIM
    neoVI FIRE
    neoVI FIRE 2
    neoVI ION
    neoVI PLASMA
    RADStar 2
    RADSupermoon
    ValueCAN 3
    ValueCAN 4-1
    ValueCAN 4-2
    ValueCAN 4-2EL
    ValueCAN 4-4
    VividCAN

Finding devices... OK, 1 device found
    ValueCAN 4-2 - V20974 @ Handle 10

Connecting to ValueCAN 4-2 V20974... FAIL
    ValueCAN 4-2 V20974 Error: Communication could not be established with the device. Perhaps it is not powered with 12 volts?

Press any key to continue...

opening the ValueCAN 4-2 device will keep failing with the same error until the device is unplugged and re-plugged.

Product Details:

MCHIP:  1.41
Licensed Serial Number : V20974
USB Serial Number : V20974
Hardware License : VCAN4-2
Bootloader : 3.0
Manufacture Revision : 3.0
Manufacture Date : 4/19/2018
SRAM : None
EEPROM : NA
PCB Serial: 
Main VNET HW Rev : : 0.0

CoreMini Running:0
CoreMini Version:21
CoreMini Engine Vers :1
CM Script Min Engine:0
HID diagnostic code:0
FPGA-SPI Version:0.0
Hardware issue detected:0
Hardware Bits:0
Core USB Detect:0
HID USB Detect:0
FPGA USB: Is Powered:1
FPGA USB: FpgaVers:255.255
FPGA USB: FpgaConnect:-1
TimeStamp:00 00:
CM CheckSum:00
FileSystem Cursors:00,00,00,00
NVM Memory:
00 : 00000000000000000000000000000000
10 : 00000000000000000000000000000000
20 : 00000000000000000000000000000000
30 : 0000000000000000

This issue is not affecting the ValueCAN3 or FIRE2.

hollinsky-intrepid commented 5 years ago

I have seen this issue while working on SocketCAN support. I will be looking into it ASAP!

pierreluctg commented 5 years ago

Thank you @hollinsky-intrepid

pierreluctg commented 5 years ago

Hi @hollinsky-intrepid can you provide a ETA for this issue? This is a big deal breaker for for using a ValueCAN4-2 on Linux right now.

Thank you

hollinsky-intrepid commented 5 years ago

@pierreluctg Are you connecting the 4-2 to a Linux VM?

I believe I've seen issues in a VM but have not seen it while connected directly to the Linux box.

pierreluctg commented 5 years ago

@hollinsky-intrepid, yes this was on a VM (VirtualBox).

pierreluctg commented 5 years ago

@hollinsky-intrepid everything seems to be working fine on a native Linux.

Can you help me figure out whats is causing the issue on a Linux VM (Windows host with Linux guest on VirtualBox)?

Thank you

pierreluctg commented 5 years ago

Using VirtualBox USB 3.0 (xHCI) Controller works perfectly.

Using USB 1.1 (OHCI) or USB 2.0 (EHCI) controllers is causing the issue reported here.

pierreluctg commented 5 years ago

@hollinsky-intrepid, let me know if you need more information for debug this issue or if this is not an issue from Intrepid point of view, feel free to close this issue.

thebuzzstop commented 4 years ago

This is now an issue for us Ford IVI-SW-TOOLS since we rely on Linux VM's for much of our development. @hollinsky-intrepid It has been over a year with no response. Can we please get someone to look at this?

Mark Sawyer Ford Software Developer msawye16@ford.com

hollinsky-intrepid commented 4 years ago

Hi Mark,

My apologies, I wasn't aware anyone was waiting on this! I will take another look at it.

--Paul

thebuzzstop commented 4 years ago

@hollinsky-intrepid Thank you Paul.

msawye16 commented 4 years ago

Hi Mark,

My apologies, I wasn't aware anyone was waiting on this! I will take another look at it.

--Paul

Hi Paul:

This is Mark from my Ford account. I have not seen any traffic on this issue. Is there work being done on it? Is there a time frame in which we can expect some kind of remedy?

Thanks, /mbs

hollinsky-intrepid commented 4 years ago

Hi Mark,

We've been doing some deep dives to find the root cause of this issue. The current suspect is VirtualBox's EHCI controller interfering at the USB protocol layer. Unfortunately it's part of the extension pack and not open source for us to inspect.

The VirtualBox xHCI controller works correctly. If it's usable in your setup, that would be an easy solution.

Alternatively, you could use the OHCI controller, wihch works for me on the latest firmware, though @pierreluctg said earlier that he was seeing issues with it, and it limits the device bandwidth to 12mbit/s.

So we can continue to look into the EHCI controller issues, perhaps we can get some information from your setup:

All the best, Paul

msawye16 commented 4 years ago

Hi Paul,

Thanks for getting back to me ...

I will get you the information requested ...

In the mean time:

Information regarding our configuration is forthcoming.

Thanks, /mbs

msawye16 commented 4 years ago

Paul:

Host OS Version

VirtualBox Version

Selected VirtualBox USB Controller

Guest OS Version(s)

thebuzzstop commented 4 years ago

@hollinsky Hi Paul:

It's been a while since I provided the information you requested. Any progress that I can report back to my team?

/mbs

msawye16 commented 4 years ago

@hollinsky-intrepid Hi Paul:

It's been a while since I provided the information you requested. Any progress that I can report back to my team?

/mbs