Is it possible to programmatically change the USB delay parameter & # 8596; Serial converter "BM"?

Is there any way to programmatically change the "BM parameter delay timer" of the USB serial adapter? It is necessary to work with the built-in xp windows. Could be .net 2.0 or a native Windows solution ...

enter image description here

+4
source share
3 answers

I think you are using FTDI USB to serial converter. Then you can use libftdi

And see Application Notes (especially AN232B-04), because they contain a lot of useful information.

+4
source

This is a specific driver. It is best to do what romkyns says and try to figure out where the driver stores this parameter. You may have to close and reopen the serial port after changing the setting, assuming that you can find out how it is stored and can change it.

+3
source

Starting in 2016, the advice in AN232B-04 may be deprecated due to changes in the Windows driver infrastructure. Currently, there is a requirement to sign all files in the driver package, which means that editing the values ​​in the inf / cat file when using another FTDI driver is not possible without re-signing the driver.

If you use libftdi, you can configure this value at runtime, according to the first answer. If you prefer to use your own FTDI driver and the standard Windows COM interface API, and you need to configure this value, you can still change it permanently and programmatically by editing the registry.

If you go along this route, you need to change the DWORD LatencyTimer value under the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\VID_0403+PID_6001+KBxxxxxxx\0000\Device Parameters . KBxxxxxxx in this example needs to be replaced with the serial number of your device. To change this value, you need higher privileges, for example, by creating a UAC prompt. You may need to restart the device driver at this point for the changes to take effect, for example, by disconnecting and rebooting the device.

0
source

Source: https://habr.com/ru/post/1401223/


All Articles