Possible Bug in ZSTAR Demo's Virtual Serial Port Driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Possible Bug in ZSTAR Demo's Virtual Serial Port Driver

4,311 Views
seedpress
Contributor II

Possible Bug in ZSTAR Demo's Virtual Serial Port Driver

 

Our ZSTAR project has been stalled by an apparent bug in the ZSTAR Demo's Virtual Serial Port driver; hopefully someone here may be able to shed some light on this problem.

For several months we've been attempting to integrate the ZSTAR in the design of a new product. Suddenly, the ZSTAR Demo's Virtual Serial Port driver has stopped working. This failure had already occurred on several previous occasions, yet we had always been able to restore the driver's functionality by going to a Windows restore point, or by reinstalling the ZSTAR driver SEVERAL TIMES. Unfortunately,with this most recent driver failure, no amount of driver re-installs, nor anything else has restored functionality. THE DRIVER SEEMS TO BE PERMANENTLY BROKEN.

Here are some pertinent points:

1.We conclude that the ZSTAR's Virtual Serial Port driver has failed because whenever the Visual C++ GUI app RD3152MMA7260Q_SW.exe was run, and the appropriate com port selected, the program COULD NOT CONNECT to the ZSTAR Demo, and the following error was reported: "Please check the battery & serial cable then power down & power up your Triax Board. ATTEMPT #1/5 Character 5".

2.During all such failures of the Virtual Serial Port driver (as referenced above), no ZSTAR handshake request was successful from within Hyperterminal—as would be expected. Yet at the same time the Windows Device Manager claimed the Com Port WAS present, identified the connected device as the Triaxial ZSTAR, and reported that the com device was working properly. This in itself seems peculiar!

3.During all failures of the Virtual Serial Port driver, the ZSTAR mouse driver could still be successfully invoked.

4.All failures of the Virtual Serial Port driver were preceded by extended periods of time during which the Virtual Serial Port driver had worked as intended.

5.The Virtual Serial Port driver finally failed PERMANENTLY on a computer that was running Windows XP-SP2, our development platform. In order to see if the ZSTAR hardware itself were malfunctioning, we installed the ZSTAR drivers on another computer, which was running Windows Vista. All the original ZSTAR hardware and software worked fine on the new system. So, the ZSTAR hardware is not broken.

 

6.For various reasons we NEED to run the ZSTAR on our original XP system. Consequently, for the time being, our project is on hold.

 

 

Two questions for you: One--do you have any suggestions as to what might be causing this problem, and of course how to remedy it? Two--have others reported any similar problems with the ZSTAR Demo's Virtual Serial Port driver? Our search of the Freescale forums has turned up nothing.

We have considered just putting everything on another XP system, but how do we know that the same driver problem won't pop up in the future on the replacement computer?

The problem seems to be some sort of driver instability. At the very least, the driver is exhibiting inconsistent and unreliable behavior. We are considering the possibility that this driver problem may have its origin in the Windows registry, but so far we have not come up with anything definitive.

In passing, I might mention that we have tested many other pieces of software and hardware on the very same XP development platform that we are now using for our new ZSTAR project. Yet this ZSTAR Virtual Serial Port driver glitch is the first instance of any such problem.

Any help you can render would be greatly appreciated. Thank you for your attention,

Robert Hamilton

Design Engineer

 

 

 

 

 

 

Labels (1)
0 Kudos
6 Replies

1,121 Views
mayfly
Contributor III
Thanks!  It did the trick.  I have combined their/your steps with a couple of my notes and have enumerated them for conciseness below:

1. disconnect all ZSTAR devices
2. in folder C:\WINDOWS\system32\drivers\ delete usbser-zstar.sys
3. in folder C:\WINDOWS\inf\ find star2.inf (or zstar.inf whichever version exists)
4. in the same folder, a pair of oem??.inf and oem??.pnf exists, oem??.inf will have the same length and content as previous star2.inf. Find the right pair of oem??.inf and oem??.pnf and delete it.
5. open regedit.exe and delete [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZSTAR] key
6. delete [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_15a2&Pid_0120] key
   <Note: i had some problems removing the above key (I had to adjust the permissions in the advanced tab)>
7. Get a (good) version of "usbser.sys". 
   <Note: You can get a version by extracting a copy of "usbser.sys" from the "C:\WINDOWS\Driver Cache\i386\sp2.cab" CAB file.>
8. Edit the "zstar2.inf" file and replace all instances of "usbser-zstar.sys" in the text with "usbser.sys"
9. (optional) replace references to "zstar" in the "zstar2.inf" file with your application-specific naming
10. Place the rewritten " zstar2.inf", and the (good) version of "usbser.sys" in a new folder
11. reboot and, once the system has settled, plug your device in
12. when the driver dialog comes up, use your edited "zstar2.inf" and the (good) "usbser.sys" from the folder you put them in earlier
 
0 Kudos

1,121 Views
mayfly
Contributor III
Hi,

I don't have a solution, but I do have the same (exact) problem.  Anyone with any answers? 
0 Kudos

1,121 Views
MB
Contributor I
Hi,

I have exactly the same problem. On my development PC the ZSTAR2 runs fine. If I connect the ZSTAR2 USB module to a fresh installed PC (dell laptop - XPSP3) communication fails (run Triax Reloaded and it reports: "Could not find ZStar please check setup including batteries"). No luck with any terminal program or my own software either.

I tried the solutions described in this thread and some variations also... I desperatly need help to keep my project going...

Regards,

M.
0 Kudos

1,121 Views
seedpress
Contributor II

MB,

 

Sorry to have taken so long in posting a reply; believe me, I can well understand your frustration. Unfortunately, I do not have an immediate solution. I do have a few suggestions, however.

 

First, if you have not done so already, I would suggest submitting a service request, as I did when I began my own solution. The driver problem has apparently become a longstanding one now, and has propagated through to the second iteration of the ZStar Demo. I think the Freescale developers would do well to address this problem. It has become a serious blemish on an otherwise well-designed development platform.

 

Second, I would suggest downloading the source files, which are now available. Depending upon your level of programming expertise, you may find some clues there.

 

Third, have you considered trying to use the ZStar drivers that came with the ZStar1 (as opposed to those that are provided with the ZStar2--not sure they have changed, though)? I have both a ZStar1 and 2. Using the procedures I've detailed previously in this thread, my ZStar2 is working well in both Vista SP1 and XP SP2 with the old ZStar1 drivers. Also, the ZStar2 hardware is working now with the ZStar1 demo software, as well as with my own custom software, written in VB 2005. I have not yet tried the drivers that came with the ZStar2 hardware, nor the ZStar2 demo software.

 

In closing, a few  questions come to mind: What software are you running on your development PC? Is it the same, XP SP3, as you are running on your laptop? What do you you mean by  "a fresh installed PC?" Is  it XP-fresh-installed, or the demo/drivers for ZStar?

 

Good luck. Please post any progress here. I would be interested to hear what happens.

 

seedpress

 

 

0 Kudos

1,121 Views
MB
Contributor I

Seedpress,

 

Thanks for the reply! I managed to 'fix' the problem. I was getting so desperate after trying allmost everything. I tried the ZSTAR2 on XPsp2 and XPsp3, both worked okay except on this laptop (running XPsp3). Both winXPsp3 and the ZSTAR2 drivers where fresh installed on the laptop.

 

The laptop on which the drivers should run is an older one, it has USB1.x and no USB2.0 interface. So I got a USB2.0 PCMCIA card, inserted it. Windows immediatly recognized the PCMCIA card and its USB ports. Hereafter the ZSTAR drivers worked with the ZSTAR2 usb stick inserted into the PCMIA card's USB port

 

Next I removed the PCMCIA card, rebooten the laptop and inserted the ZSTAR into the laptop's native USB port and guess what.. it worked!! Appearently the installation of the PCMCIA USB port caused some drivers&settings to be shuffled into the right place...???

 

The root cause of this problem is unknown to me. Lets assume that the ZSTAR binary driver files are okay since they are a copy of the default windows usb-serial port drivers. That leaves us with the driver's .ini file or the USB software in the ZSTAR USB module I guess...

 

The problem is solved for this moment. I can continue the development. For deployment I have serious concerns - it is unclear to me on what hardware/os the ZSTAR2 is validated to work...

 

For the product I have two options, either a PDA(with USB master) or a laptop. Does anyone has experience getting the ZSTAR to work with a PDA with windows mobile? It should be possible since a default USB serial port driver is available for windows mobile also (USBSER.dll)

 

Regards.

 

/m.

 

0 Kudos

1,121 Views
seedpress
Contributor II
mayfly,

First the good news: I found a solution that worked--for me, at least. The bad news: You'll have to read all of the following. (Sorry for not posting this sooner.)

After getting no answer in this forum, I wrote up a service request.  And what follows was the Freescale expert's advice, along with my attempts to follow it, as well as my my own variation. Freescale's solution may work for you. If not, try my approach. In either case I would be interested in your own results.

1. Freescale's response:

Dear Robert Hamilton,

In reply to your Service Request SR 1-387093119 (see details below):

For some reason this happens while using Microsoft supplied CDC driver. The actual facts about this driver are as following:

Windows "supports" CDC class but there's no appropriate (or universal) .inf file in the standard installations. So you need to supply one. File usbser.sys is the original driver that supports CDC (you can find various versions of this file across Win2000, XP, XP SP1, XP SP2)

In addition, we've experienced several undocumented bugs and misbehaviour among the Windows versions just mentioned above. That's why we've "stolen" the best one (actually usbser-zstar.sys is just Microsoft's usbser.sys out of Win XP SP2) and provided that for ZSTAR.

Usually this procedure for driver clean up helps:

1. disconnect all ZSTAR devices
2. in folder C:\WINDOWS\system32\drivers\ delete usbser-zstar.sys
3. in folder C:\WINDOWS\inf\ find star2.inf (or zstar.inf whichever version exists)
4. in the same folder, a pair of oem??.inf and oem??.pnf exists, oem??.inf will have the same length and content as previous star2.inf. Find the right pair of oem??.inf and oem??.pnf and delete it.
5. open regedit.exe and delete [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ZSTAR] key
6. delete [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_15a2&Pid_0120] key
7. reboot

Then your computer should be free of usbser.sys driver installation for ZSTAR. You may try to clean install now. This always helped me. Note that some folders are system (invisible).

2. My reply:

Hello,

Thanks for your timely help. Sorry to have delayed responding.

You might be interested in the results of following your advice, which were in part successful:

I used your instructions exactly, and AT FIRST everything worked as intended. To my relief, the CDC driver was again functional; however, immediately after this successful re-install of the ZSTAR drivers, I decided (on instinct) to reboot the computer. Unfortunately, following this reboot, the ZSTAR CDC driver once again was rendered non-functional. Then, starting from scratch, I repeated your instructions--again and again. Sadly, on all those subsequent attempts nothing seemed to work. The CDC driver just wouldn't function! :smileysad:

Acting on a hunch, I repeated your instructions one last time, but in this final case I added a few extra steps: Inspired by your remark about the "stolen", renamed "usbser-zstar.sys" file, I first rewrote the " zstar2.inf" by replacing all instances of "usbser-zstar.sys" with "usbser.sys". Next I extracted a fresh copy of "usbser.sys" from the system CAB files. Finally, placing my rewritten " zstar2.inf", and the fresh copy of "usbser.sys" in a new folder, I re-installed the drivers--using these TWO NEW files, instead of your originals from the ZSTAR CD. FINALLY THE CDC DRIVER WAS WORKING AGAIN!!!, and has been doing so without mishap for about a week. Still, I'm holding my breath....

At this point I'm really not sure what's going on here; maybe Windoze just doesn't like two differently named drivers that are performing the same function?

I'll write back if the CDC driver bombs again!

Thanks for the pointers.

Bob Hamilton

ONE LAST NOTE:   This all happened in late Sept. of '07; as of March '08 the drivers and demo are still working--after the application of my own solution as detailed above. B.H. aka seedpress
0 Kudos