Fun, Learning, Friendship and Mutual Respect START  HERE


Unregistered
Go Back   HeliFreak > R/C Electronics Support > JLog - The JIVE logging stamp


JLog - The JIVE logging stamp JLog - The JIVE logging stamp - Official English Support Forum


Reply
 
LinkBack Thread Tools Display Modes
Old 01-16-2017, 06:32 PM   #1 (permalink)
Registered Users
 

Join Date: Mar 2009
Default S32 & Windows 10 driver error

I keep getting an error when trying to connect my S32 to my Windows 10 install. The device manager shows it as a USB Input Device under the Human Interface Devices section, but the properties show "The device cannot start (Code 10). So far it has connected one time.

This is on a virtual machine running on Parallels Desktop. I have never had any problems connecting other devices to the VM. It seems like it's either a driver issue or an OS issue. Any ideas on how to fix it? (And don't tell me to go buy a windows machine)

-Gordon
helinutgman is offline        Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 01-16-2017, 07:30 PM   #2 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

Hi!

This is a HID, yes, so driverless working.

Please read here: http://j-log.eu/s32/s32-en/s32terminal

Quote:
S32 on USB, – important note!

S32 as an USB device is a so-called HID (Human Interface Device). The advantage of a HID is that it does not require any drivers to be installed. (S32terminal uses only an API named “r2HID.DLL” which is used as a converting interface between Windows’ “USER32.DLL” and S32terminal.) A little disadvantage of HIDs is that only small data blocks can be used for transmission – no miracle because HIDs are used for pointing devices like a mouse. This is the reason why the time to update the S32 firmware through the terminal cannot be shorten to less than 2 minutes. (Under Windows 10 it is slower than under 7 and 8, – cause unknown..)

Since Windows 8 there is a special feature of the OS with regard to HIDs: A HID is disconnected by the OS after a few seconds if no communication with it takes place. Microsoft did this to save energy in portable, battery-powered PCs. If S32terminal has not yet started, but S32 is already plugged into the host’s USB port, then this would cause an annoying effect: The OS disconnects S32, S32 comes back immediately to re-connect. Result: Constantly connect/disconnect sound from Windows. – Therefore, S32 does not return to connect if the host deliberately had disconnected. As a sign of being “upset” by this S32 turns on its red LED. Now you start (finally ) S32terminal and plug S32 back to USB. ==> The startup of S32terminal is prevented if an already “piqued” S32 hangs, red LED on. The terminal sees the electrical connect but does not get any logical one, – it tries constantly, freezes, until S32 is disconnected. Windows remembers the S32 is connected, tells that the terminal on request, but the HID (S32) went to sleep.

Therefore (if Windows>7), first start the terminal, then connect S32 to USB!

If you do not stick to this rule, you will see (respectively hear).
First start the terminal, then connect S32 to USB. They find each other, be assured.
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-16-2017, 07:38 PM   #3 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Mar 2009
Default

Thanks for the quick reply Tom. I did see that info on the website and I followed the instructions to start the software before plugging in the S32. That is the scenario which produces the problem mentioned in the initial post. If I do it the other way, the software complains, so it must be this way. Also, there is no light on on the S32. When I plug it in, it sequences through the lights from red to blue and back down, then it flashes all of them, then they all go off. No more lights until I unplug and re-plug, then the same thing.
helinutgman is offline        Reply With Quote Quick reply to this message
Old 01-16-2017, 07:48 PM   #4 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

Following your description of the light show: USB is just power supplying the device but there is no connect from the signal perspective..

Are you sure that the USB connect belongs to the VM already and not still to the hypervisor host?
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-16-2017, 07:55 PM   #5 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

I never tried a Windows guest in a VM.

It could be that Win7 works better because the disconnect given by the guest (Win8 up) may be interpreted by the hypervisor host to take over.

Btw .NET is going open platform (ASP.NET), it principally works already under Linux, OS X, .. It's just tricky to install yet.
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-16-2017, 08:05 PM   #6 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

Most often a HID is a pointing device. The device comes to connect, a "peer" immediately starts to communicate to it, - because that peer is a component of the OS.

It's not different w/ S32, only the "peer" has to be started upfront. Actually, the peer is r2HID.dll, started by the click once application S32terminal. The DLL speaks to USER32.DLL - so the Win OS takes notice that there is communication ongoing - and does not disconnect to save energy.. What a stupid idea of the guys in Redmond..
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-16-2017, 09:18 PM   #7 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Mar 2009
Default

The USB device is connected to the windows VM when the lights behave like I said before. If I connect it to the Mac side, it shows a solid green light after boot up. Another piece of info, sometimes the yellow light blinks several times instead of all the lights flashing on and off. I'm still trying to figure out why it's not working, but I guess I can always just copy the files to a micro SD for now :-(.

I appreciate your quick replies and all your help.
helinutgman is offline        Reply With Quote Quick reply to this message
Old 01-16-2017, 09:56 PM   #8 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

That quick flashing orange LED means: I am the bootloader. Checked the "dead letterbox", the application (main part of the firmware) has not written a letter last time (power session) that it was alive. I'm waiting (and flashing) a bit if somebody connecting me through USB, then I will start the app anyway.

That happens if the bootloader was started but did not start the app then because it was stopped by an USB connect.

See this: http://j-log.eu/s32/s32-en/leds

I found a Windows VM, Win7 Professional. It runs under VMware Workstation, the host of that hypervisor is Win8.1. Wow is that slow compared to Linux.. It took an hour to upgrade to .NET 4.6.1..

Then the terminal was running.

Same behavior.., see below.

I will play a bit with it by a modified bootloader what is not "upset" by disconnect.

Tomorrow,.. (today), local time is already 4:54am again. Heading to zzzZZ...
Attached Thumbnails
Click image for larger version

Name:	VM-HIDs32.png
Views:	107
Size:	36.3 KB
ID:	689385  
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 10:09 AM   #9 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Mar 2009
Default

Tom, I think I may have figured out how to get it working (or maybe this is the way it is supposed to be done anyway?). If I power up the S32 with a battery (like a 2S pack) and let it boot, then connect the USB (with the terminal software already running), it will connect and I can update the firmware and change the settings.

So far this has worked 3 times in a row to connect the S32. Not fully tested, but much more successful than my previous attempts.

Regards,
Gordon
helinutgman is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 01:29 PM   #10 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

Makes me happy because I was about to say: I'm giving up.

My Win7 Enterprise SP1 in a VM is sooo slow..., eating too much of my time. (host is Win8.1, hypervisor is VMware Workstation 10 (I know.., old ))

Most users think that USB is just USB. That's not true. There are so many device classes and different protocols, transfer unit sizes etc.etc. - and on top dependency on the physical type of USB, 1.1, 2,.0, 3.0 ..

Now the virtualization comes on top:
- What type of USB hub has the host? Is the right driver used?
- What types of USB can the used hypervisor and its version passthrough to a VM?
- Is the right USB type set up in the VM (in the "frame" given for that by the hypervisor)?
- Last but not least: Do we have a driver in the guest OS for the virtual USB hub --> to be able to connect a virtual HID?

@1 I used a modified bootloader on S32, not being "upset" in case of disconnect by a host Win8 up (for energy saving). It reconnects again and again. That usually appears every 2 seconds ("cling clong ...").

@2 The passthrough by the hypervisor did not work. code 13 (att #1)

The web is full of these problems, the knowledge bases too, those from VMware, Apple, MS..
One advice was: remove the virtual hub from the VM in setup and add it again. That mostly helps.
It helped. Afterwards passthrough worked, no fall-back to the hypervisor host anymore as long as the VM is up.

I'm not sure right now if removing of that "upset function" in the bootloader is necessary for that. Will test it.

@3 Bingo! The problem has just moved... into the guest OS: no driver for virtual devices, especially not for USB devices.
Ok.., installed VMware Tools. That cured it for some devices (as audio) - but not for the VMware virtual USB hub.

Effect: Passthrough works and the HID device stays assigned to the VM. Only.., the guest does not have a driver for the USB hub (not speaking about the driverless HID, that just needs the hub, of course).
Thus, as soon as the guest is running - the HID stays assigned to the guest.
As soon as that happens, - S32 stops trying to connect than is no more getting to see a USB host (the host appears just dead because no driver for the virtual hub). So, from now on USB is only a power supply to S32, - therefore it starts the application in its firmware.

If S32 is powered before USB is connecting it: S32 is in the application (main) part of the firmware. If you connect now to USB the app recognizes it, writes a letter to the bootloader, puts it in the dead letterbox, restarts into the bootloader. Bootloader comes up (as if POR (power-on-reset)), reads the letter, checks USB and knows from the letter: somebody wants to communicate to me, so I will wait for him on USB... and goes in the corresponding USB service handler to serve the terminal.

----
I can give you the modified bootloader 1.7 (let's call it "1.7a") without being upset in case the USB host is disconnecting it to save energy.

(Attachments: screenshot from the situation when the passthrough did not work see in my post above. The forum sw denies another upload.)
Attached Thumbnails
Click image for larger version

Name:	USB2.png
Views:	105
Size:	37.0 KB
ID:	689474  
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 01:30 PM   #11 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Mar 2009
Default

Another piece of info for this: If I connect it to the Mac side through USB (no battery power), it will connect and the green light will come on. So it appears to connect to the Mac side successfully but that is not translated through to the Windows VM when I specify to connect to the VM.

But with the external battery connected first and then the USB, it seems to connect every time to the Windows 10 VM. This is using Parallels VM Software in a Windows 10 VM.

Regards,
Gordon
PS: Thank you again for all of your help. You really do put in a lot of effort to fix everyone's issues.

Last edited by helinutgman; 01-17-2017 at 01:37 PM.. Reason: Addtions
helinutgman is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 01:45 PM   #12 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

btw.. "City University of Hong Kong S32 HID":

http://www.linux-usb.org/usb.ids
Quote:
List:
0574 City University of Hong Kong
Quote:
S32:
Private Const VendorID As Integer = &H574
I knew that it will hit an already (or later) assigned VID, so I made a choice by "ching chang chong".
To pay up to $7,500 USD or more for a simple number that has no technical meaning.. forget about it, not for a RC product.
This cannot cause any problem, there is the PID also on top.
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 01:53 PM   #13 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

Quote:
But with the external battery connected first and then the USB, it seems to connect every time to the Windows 10 VM.
Strange because as long as the green LED lights up steadily - there is no difference to S32.
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 09:01 PM   #14 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

Hey, funny...

Found a VM, old as the coal, Windows Server 2003, 8G disk, 512MB RAM.

Opened it w/ VMware WS10, added the virtual USB controller.

Passthrough of the HID (JLog, umm.. S32) worked at the 1st attempt. S32 stayed connected, so the USB hub (driver) in the guest OS could just work w/ the virtual controller.

Tried to install the terminal package requiring .NET 35SP1 (no chance w/ .NET 4.6): CLR 4.0.3 was missing in the end (Common Language Runtime). CLR as single installation is tricky.. So I made a 3rd installer for the terminal requiring .NET 4.0 (not yet public).

...and it works! Stone age with modern times
(Hey, how the terminal surface looks like! memories.. )
Attached Thumbnails
Click image for larger version

Name:	S32terminal_Win2003VM_NET40.jpg
Views:	107
Size:	55.8 KB
ID:	689565  
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 09:07 PM   #15 (permalink)
Registered Users
 

Join Date: Sep 2004
Default

If you're interested in memories I have a copy of PC-DOS 1.0 or 1.1 around here somewhere. Don't know where I could find a 5.25" floppy drive to load it though. Things sure were much simpler back then....

73
Ace Dude is online now        Reply With Quote Quick reply to this message
Old 01-17-2017, 09:16 PM   #16 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

5.25"? How about a hard-sectored 8"?

73 es gn
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-17-2017, 09:27 PM   #17 (permalink)
Registered Users
 

Join Date: Sep 2004
Smile

My father may still have some 8" floppies laying around.... You know, for safe keeping!

73
Ace Dude is online now        Reply With Quote Quick reply to this message
Old 01-18-2017, 09:10 AM   #18 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

Gordon, if you read about my playing w/ a W2003 guest above: It works w/ the standard bootloader, the "getting upset" version, as well.
__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-18-2017, 09:59 AM   #19 (permalink)
Registered Users
 
Posts: 3,933
 

Join Date: Feb 2008
Default

fun must be

__________________
Tom (j-log.eu)
dl7uae is offline        Reply With Quote Quick reply to this message
Old 01-18-2017, 11:56 AM   #20 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Mar 2009
Default

Hmmmm, not sure what to make of that. Guess the older OS will work but Win10 will not. At least not in a VM.

Although it does work if I power it separately first ;-).

-Gordon
helinutgman is offline        Reply With Quote Quick reply to this message
Reply

Tags
code 10, j-log, s32




Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the HeliFreak forums, you must first register.
Please enter your desired user name, your REAL and WORKING email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself. Use a real email address or you will not be granted access to the site. Thank you.
Email Address:
Location
Where do you live? ie: Country, State, City or General Geographic Location please.
Name and Lastname
Enter name and last name here. (This information is not shown to the general public. Optional)
Helicopter #1
Enter Helicopter #1 type and equipment.
Helicopter #2
Enter Helicopter #2 type and equipment.
Helicopter #3
Enter Helicopter #3 type and equipment.
Helicopter #4
Enter Helicopter #4 type and equipment.

Log-in


Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Copyright © Website Acquisitions Inc. All rights reserved.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.

SEO by vBSEO 3.6.1