|
Having worked on interfaces to several bus systems, but not USB, I've found the relevant specs essential. I'm not saying you have to read the whole thing but when the software gets tough its good to be able to look at the spec and compare with what your code is doing, or not doing. I found someone had coded to cope with the situation when everything happened ideally, no bus conflicts, no unresolved addresses, no planning for when a thread to receive wasn't available etc. At times it was only by reading the bus spec I could find out what should have been coded for. For instance I found an unreliable bus system on the test rig was due to no pull up resistors on the data lines, something I found in the spec, and something somebody had spent a long time trying to resolve with a debugger.
|
|
|
|
|
EDIT - Thanks to everyone that replied. I have found a better solution than an INF file.
My company has an existing software-only driver. The 32-bit version is being installed using InstallShield. Unfortunately for me, the company wants to get away from InstallShield as the product in question is going to be part of a customer's own installation. The build system here produces the 64-bit signed driver, and I am tasked with creating a .inf file to install this driver. I've been reading Microsoft documents about .inf files (until my eyes are bleeding) and all of this documentation seems to be centered around the Windows Driver Development Kit. I believe that this kit generates a .inx file which is really the .inf file. However, all I need to do is create a .inf file that will do the job.
When right-clicking on the .inf file and selecting Install, the install process is spectacularly silent about anything that is happening (right or wrong). So it is very difficult to determine what is happening.
Some of my problems include the following:
1. The driver is already signed, so I find it unlikely that I will need a CatalogFile. Will the .inf file work without a defined CatalogFile?
2. It seems that a software-only driver needs to have some dummy device installed, and (from the InstallShield results) I see this dummy device in HKLM\CurrentControlSet\Enum\Root\LEGACY_DRIVER_NAME. This is somehow linked to service entry in HKLM\CurrentControlSet\services\driver_name which points to the actual driver executable in \Windows\System32\drivers. I'm getting lost trying to define this dummy device.
3. I am successful installing the service, and I find it in the registry, but the install process never copies my driver into the drivers directory, so it appears to die before it gets that far.
4. I keep reading about a CoInstaller, but I get the feeling that it is not exactly necessary. Is this correct?
What I need is a clue. I haven't defined the dummy driver entry which is where I need the help. I've also made the assumption that the install directory where the .inf file is executed from is the root of the SourceDisk. Here's what I have in my .inf file so far:
This was edited to include a missing quote.
[Version]
Signature = "$CHICAGO$"
Class = LegacyDriver
ClassGuid = {8ECC055D-047F-11D1-A537-0000F8753ED1}
Privider = %US%
DriverVer = 12/16/2012, 5.1.0.126
[vstor2-mntapi20-sharedCopyFiles]
%DriverExeName%
[SourceDiskNames.amd64]
1 = %DiskDesc%,,,\AMD64
[SourceDiskFiles.amd64]
%DriverExeName% = 1
[DestinationDirs]
DefaultDestDir = 12
[vstor2-mntapi20-sharedInstall.NTamd64]
CopyFiles = vstor2-mntapi20-sharedCopyFiles
[vstor2-mntapi20-shared.NTamd64.Services]
AddService = vstor2-mntapi20-shared,, vstor2-mntapi20-sharedServiceInst
[DefaultInstall.NTamd64]
CopyFiles = vstor2-shared-sharedCopyFiles
[DefaultInstall.NTamd64.Services]
AddService = vstor2-mntapi20-shared,, vstor2-mntapi20-sharedServiceInst
[vstor2-mntapi20-sharedServiceInst]
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 2 ; SERVICE_AUTO_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
DisplayName = vstor2-mntapi20-shared
ServiceBinary = %12%\%DriverExeName%
[Strings]
US = "Company Name"
DiskDesc = "Install Directory"
DriverExeName = "vstor2-mntapi20-shared.sys"
Fletcher Glenn
modified 20-Mar-13 13:10pm.
|
|
|
|
|
What about a silent install? Could you do a silent installshield install that does what you want? The customer's own install could then launch it silently.
That might be easier than doing what you are trying to do....
|
|
|
|
|
That's a very good suggestion. However, since I posted my question I have become aware of the sc.exe command that can be used to directly install a software-only driver. This solves my problem. Thanks for your help.
Fletcher Glenn
|
|
|
|
|
fglenn wrote: (until my eyes are bleeding)
You should have tried writing an inf file for NT4......
fglenn wrote: generates a .inx file
No, YOU write an inf file.
fglenn wrote: he install process is spectacularly silent
Taka a look at the system file setupapi.log, there you will see al the output.
fglenn wrote: . The driver is already signed, so I find it unlikely that I will need a CatalogFile. Will the .inf file work without a defined CatalogFile?
You can sign just the driver binary (normlly done for boot start devices) or you can sign the binary inf cat file combo.
You have a few isues with the inf file, vstor2-mntapi20-shared isnt declared for example. Run Chkinf on it (in the WDK tools\chkinf dir), it will check the file for you and report any errors.
==============================
Nothing to say.
|
|
|
|
|
Does anyone know a converter with this capability. I am looking for a USB to serial converter or chip (like FTDI, Prolific, Microchip) that is capable of doing 5 Baud.
thanks
PKNT
|
|
|
|
|
5 baud? Thats very slow. Do the standard USN to serial cables go this low?
==============================
Nothing to say.
|
|
|
|
|
Why are you trying to go that slow? ...you can simply oversample a slow incoming signal btw (turn it into a high rate signal), but you have to make sure you have DC coupling wherever the slow signal is coming into, not sure if USB is AC or DC coupled. If it happens to be AC coupled, the slow DC rates are going to get filtered out by the coupling capacitor.
|
|
|
|
|
Hi Kiran,
I ran into the same problem some time back, a communication link had a 5-baud initialization sequence where communication parameters were negotiated. Unfortunately we did not find any UART that supported this reliably. So our solution was to use a GPIO pin combined with a UART, implement the 5-baud initialization by sampling the GPIO input and after the negotiation switched the GPIO to high-Z and enabled the UART, now with a supported, high baud rate.
Hope this helps.
|
|
|
|
|
I'm building a PIC24 project.
I'm putting some C routines into an ASM project.
I'm getting seven errors.
The first six are all apparently interrput handler conflicts. Here they are (condensed and abbreviated for clarity)...
multiple definition of `_U1RXInterrupt'
multiple definition of `_U2RXInterrupt'
multiple definition of `_U3RXInterrupt'
multiple definition of `_OscillatorFail'
multiple definition of `_AddressError'
multiple definition of `_StackError'
multiple definition of `_MathError'
I'm getting one last error that is totally new to me, this one...
Link Error: Could not allocate section .nbss, size = 20004 bytes, attributes = bss near
Link Error: Could not allocate data memory
I really need
U1RXInterrupt and
U3RXInterrupt for my assembly language routines.
Can someone tell me how to get the C compliler and MpASM to cooperate and let me have those two ?
I can take out the other interrupts from my assembly language with some text editing.
Your advice and guidance will be greately appreciated.
|
|
|
|
|
I reckon the problem stems from your program's design - that is to say, I've heard of mixing asm and C code for decades. I don't recall ever seeing someone put c code into an asm project - it's always the other way around. Regardless of compiler/system, gcc/tc/vs and mips/x86/arm/sparc etc, etc
I'll have another play with it when it's finished installing again.
Make it work. Then do it better - Andrei Straut
|
|
|
|
|
If You figure this one out you have my endorsement !
I'm still studying the PDF file that explains the design
|
|
|
|
|
Mmmm, what version of MPLAB if it's MPLAB X is a <<very bad="" word="">> to set up the project but once you have it is quite good I am told, I have not gone there myself I tend to use MPLAB 8.80. My advice is to download a demo project from Microchip and have a play. If there demo starts to go wrong then them on their board (online, they are quite good usually only had yell once!)
You are sure that the assembly is 100% valid on the 24F as there differences in there can't really remember Best of luck!
|
|
|
|
|
Hi
I'm working on improving a GUI on an application, I have a tabconrol with many pages, I want to put a background Image instead of the unique color which appear behind, I didn't find any property to do it .. Is there any way ??
your help is really appreciated,
thanks
|
|
|
|
|
Pick one forum and stick with that forum please.
|
|
|
|
|
Hi Sorry I reposted because I found that I did the first in the wrong place
|
|
|
|
|
So lately I'm having a weird problem with my USB ports. I'll try to explain.
I keep hearing that sound like someone's putting in a flash drive & removing it. Over & over & over. Also, when I look in Windows Explorer, I see a number of "Removable Drives". They must be some kind of virtual drive because I certainly don't have that many pysical drives. They were there when I bought the PC.
At any rate, this problem isn't happening all the time. It just randomly starts. When it's happening, the list of drives in Windows Explorer disappears and reappears at a fast rate in sync with the sound I described.
This is a fairly new PC, and I use AVG and Malware Bytes and scan regularly.
I have a wireless keyboard & mouse, a wireless headset, a printer, and 2 monitors plugged into the USB ports.
I have no clue how to figure out what's wrong. Any hardware people wanna point me in the right direction.
If it's not broken, fix it until it is
|
|
|
|
|
I'm not a hardware-person, but.. if you open the "properties" screen of "my computer", go to "Advanced settings", then to the "Hardware" tab and press the button "Device manager" (or somthing similar, using a silly localized/non English version of Windows atm), you'd launch an app that shows a tree with all the hardware. Try to find the USB-node, and see if Windows tries adding a piece of hardware - there'd be a node appearing and disappearing in sync with the sound.
If you do find one, disable it.
If that fails, download TweakUI and disable every drive that you're not currently using.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Does your computer have a media card reader? If so, that's probably where all those drives are coming from. Each one of those card types has an allocated virtual drive to load to.
Now, to get to your actual problem, it sounds like you're having a problem with some USB peripheral, the drives appearing and disappearing is probably just a symptom of the real problem (i.e. it keeps trying to refresh). The problem can really be anything USB (including your keyboard or mouse) or even one of the USB chips that's malfunctioning (or the power to it is dropping below whatever is it's minimum).
To troubleshoot:
- Disconnect ALL external USB items and see if problem appears.
- Try to find old style keyboard and mouse to drive.
- Disable the media card reader on the device manager if there.
- Start in safe mode and see if problem occurs there.
- If problem still persists... you'll need more experienced help (need to check voltage levels to USB chips, may be problem with motherboard or powersupply... more likely motherboard since the power to the chips should be going through a regulator on the motherboard).
|
|
|
|
|
Thanks, I'll try all this
If it's not broken, fix it until it is
|
|
|
|
|
Hi, I have a sample OSR USB board and I have written a sample driver for this USB board.
I have built this driver and able to install.
But I am not able to debug this driver using Windbg since it is kernel driver.
OS: Win7
#include ntddk.h
DRIVER_UNLOAD DriverUnload;
void DriverUnload(PDRIVER_OBJECT pDriverObject)
{
DbgPrint("Driver Unload\n");
}
NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath)
{
pDriverObject->DriverUnload = DriverUnload;
DbgPrint("Driver Entry : Hello Windows Device Driver World!\n");
return STATUS_SUCCESS;
}
Can anybody help me in debugging my driver?
|
|
|
|
|
In system config on the target you need to enable kernel debug specifying firewire of serial.
Hook the target to the host with tht relevant cable.
Turn off the target.
Run windbg on the host and set it to kernel debug on the relevant interface (firewire or serial).
Restart the target and it should connect and you will see a lot of debug data.
You then set the path in windbg for the symbols and code for your driver (and use the global microsoft symbol server for their code, search in help for symsrv), then you can set breakpoints and step through your code.
==============================
Nothing to say.
|
|
|
|
|
So you are a supposedly Senior Software developer, yet you cant read simple documentation, for which there is plenty available, and then, when I give you the answer you dont ever bother responding.
What a joke you are!
==============================
Nothing to say.
|
|
|
|
|
In Windows 7 there is a sequence of mouse clicks on various icons which will display the buffer size of a given Com Port.
I can't remember that sequence at this moment.
(It's almost always 4096, for whatever reasons may exist)
If possible, I want to change it to 1024 (as a user; not in software)
For the moment, can someone help my failing brain with the secret sequence of clicks and icons that display the port buffer size of the USB BlueTooth adapter ?
|
|
|
|
|
Hi all,
I have a Win 7 64bit hp 8570w laptop. I've set the screen server to be active in 5 minutes. Other power management settings are as follows.
Dim the display - 5 minutes
Turn off the display - 10 minutes
Put the computer to sleep - 30 minutes
However, like around 2 minutes after I didn't use the laptop, it goes to sleep mode. Any idea why really happen that?
If required more information please let me know.
Thanks in advance
If you've never failed... You've never lived...
|
|
|
|