setting baud rate on dial-up connection win32 - winapi

I am creating dial-up connection in code in Windows XP and Windows 7 (RasSetEntryProperties). The entries come up with the default baud rate of 19200.
Using Win32 how do I change the baud rate in both Windows XP and Windows 7?

SetCommState. Call GetCommState first so you can preserve other existing settings that you don't want to change.

Modify the DCB and MaxConnectSpeed in the modem registry entry BEFORE making the RAS entry solves this issue.

Related

How can i check that the application is compatible with windows 10

An application, consists basically on a communication between a microcontroller and a pc, is running perfectely on Windows 7 64 bits. Since i have windows 10 installed, the application doesn t work anymore. Even the serial communication isn t established. ( an error shown that the application can not establish the communication)
I have verified the microcontroller with other Terminal running on Windows and no Problem within. Also i think that the Problem could be on the Code, the application was created with visual Studio, well i don t have any experience with visual Studio,so that i would ask you if there is a way to check that this application for instance will not work on Windows 10!
Thank you in advance
You indicate that the application will run, therefore it is unlikely that the application is incompatible with Windows 10. You're getting an error saying that the application is unable to communicate with the serial port, so the application is opening. Most applications which flat out won't work with Win 10 use older, unsupported versions of .Net or expect a FAT filesystem and simply won't run.
This suggests that Windows 10 did not have a native driver for your serial port. This is not too shocking; the older pin serial ports currently see exclusive use and are replaced (for most users) by USB-connecting components. I would check the computer's Device Manager. If you don't see any serial ports there, or see them but with an error, Win 10 probably did not have the driver required. From there I would contact the motherboard or serial bus card manufacturer for updated drivers, if they exist.

VS Community 2015. Debugger cannot break into Windows 7 example driver. Serial connection

I am working on this example on writing a simple Windows driver and debugging it from VS:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh439665(v=vs.85).aspx
My Setup
Host: Windows 7 Physical system
Target: Windows 7 Physical system
Connection type: Serial cable (USB to serial in host, serial in
target)
Provisioning the target system is successful. Serial connection parameters are correct (tested the serial connection with different software). Driver is built and installed successfully in the target but "Break all" command does nothing. I am able to attach to a different process in the target.
I have seen similar questions and the usual response is to check for a mismatch between the connection parameters in the host and the target. I have checked this and the parameters are correct.
I would appreciate any advice.
Thanks!

Windows IoT - Bluetooth connection with Arduino

I was having some issues to connect my devices (Lumia 925 and Lumia 930) with Arduino, using Virtual Shields for Arduino. The app doesn't worked, frozed and crashed.
The main reason for that, was the baud rate of the bluetooth adaptor. Despite that the vendor's site tells that the correct baud rate is 9600, my code only worked when I put it in 34800 (i.e. shield.begin(34800);). I hope that this information help someone.
Some sites says that the correct voltage is 3.3V. My device only worked in 5V.
The app has been updated a couple times since October. Please try the updated Windows Store app also.

Windows 10: ERROR_NOT_FOUND when opening a virtual serial port even though it exists?

Our Delphi Win32 application has been successfully pairing Bluetooth devices (using the Windows Bluetooth API) with the computer and using the resulting serial port. After installing Windows 10, the virtual serial port resulting from the pairing cannot be opened. Our application can see the new com port but when it tries to open it, error 1168 (ERROR_NOT_FOUND) occurs.
I can see the com port has been created in Windows as well (associated with the same device serial number I am trying to connect to). The com port is the same as what my application has been trying to open.
Tried exiting my application and using a trusted terminal program (to guarantee that the port will be available). it can't open the port either.
It makes me wonder whether Windows 10 is doing some new, aggressive power saving in respect to the Bluetooth radio.
Upgraded a laptop from Win 7 to Win 10; same result. that's both computers upgraded to Win10 showing the same problem.
Made a C# app with Visual studio 2013; same result.
Any ideas why I would get error 1168 when trying to open the port?
Thank you!
I have been told Windows 10 has an all-new Bluetooth stack.
This new stack only supports SPP 1.2. We needed 1.1 supported.
Migrating to RFCOMM.

Preinstalling WinXP USB drivers to be able to connect device without interaction

We are a small hardware manufacturer. Most of our products use USB for programming the controllers used.
The current situation is that programming the hardware (part of the assembly processor) is rather labour intensive.
Each time a new USB device gets plugged in Windows prompts for a driver install. This means that for each new product we have to go through a process of "no, don't go to internet" --> "yes, search automatically" --> "done". We even have to do this twice for each product.
I have been experimenting with the Windows preinstaller (DPInst), but this seems to only facilitate a succesful "yes, search automatically" part.
Is there a way to have the drivers installed fully automatically after plugging in the USB device?
Kind Regards,
Ronald
I take it your devices have a unique USB serial number, and hence each one is detected as a new device that hasn't been seen before.
If so, then the solution is this, from http://www.lvr.com/usbfaq.htm:
During device testing, we attach many
devices that are identical except for
the serial numbers. How can I prevent
Windows from asking to install a new
driver every time a device is
attached?
The method described below causes
Windows 2000 and XP to ignore a
device's serial number. It's
recommended for test environments
only.
This registry key controls whether
Windows uses or ignores device serial
numbers:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags]
It's possible to ignore all serial
numbers, though this approach is NOT
recommended. To ignore all serial
numbers, in the above key, change this
value to zero:
GlobalDisableSerNumGen = 1
To ignore the serial number for an
individual device, create an entry
under the above ...\UsbFlags key. The
name must start with "IgnoreHWSerNum"
followed by the vendor and product ID
of the device. A value of 1 = "disable
the serial number."
Example (Vendor ID = 0925h, Product ID
= 016Ah):
IgnoreHWSerNum0925016A= 1
An alternative hardware/firmware solution is to disable the device USB serial number during production (e.g. with a link, possibly one made by a test fixture). Without a USB serial number, Windows will assign a pseudo serial-number to the device, based on its position in the connection tree. That wouldn't be likely to change during a production run, so all devices would then be treated as identical and Windows wouldn't bother with the new driver stuff.
I had the same problem 5 years ago.
The main problem is that the installation of USB drivers after Plug&Play of the coresponding device works under the LocalSystem account. To have no security problems Microsoft allows silent installation of drivers only signed by Microsoft. Starting with Windows Server 2003 there are documented way (see http://www.microsoft.com/whdc/driver/install/authenticode.mspx).
If you have a managed corporate environment (you can prepare computers which will use your Plug&Play devices), then there are a workaround which solves the problem on Windows XP. I suggested it 5 years ago for one of my customer. It works perfect since about 5 years in environment with some of 10000 Windows XP computers.
The idea for the solution is very easy: your drivers (for example the CAT file) must be signed with the signature which
has both 1.3.6.1.5.5.7.3.3 ("Code Signing") and 1.3.6.1.4.1.311.10.3.6 ("Windows System Component Verification") OIDs as Enhanced key usage (EKU) extension
the certificate or it's parent certificate must be installed in the Machine's Root (Trusted Root Certification) or AuthRoot (Third-Party Root Certification Authorities) certificate store
If you do this on a Windows XP computer, the operating system will interpret your driver like Microsoft signed driver.
Morver you shoud insert in the registry the path to the source of the driver.

Resources