Implement USB to RS232 conversion under WinCE

Source: Internet
Author: User

A usb to RS232 converter can be used in wince to convert USB to RS232, that is, the usb host of the wince device is connected to the USB end of the USB to RS232 converter, the RS232 end of the USB to RS232 converter can be connected to the RS232 interface of the PC or the RS232 interface of other devices, in this way, the wince device and the PC end can communicate with each other through a serial port, because our system uses a USB to RS232 converter, to achieve this function, we need to do the following work.

 

1. there should be many types of USB to RS232 converters that support wicne, and the drivers should not be shared. Therefore, we need to select the USB to RS232 converter based on the project requirements, it is necessary to find the company that sells USB to RS232 converter to provide the driver of wince, in which we use USB to RS232 converter is ATC-810, the corresponding driver is ftdi_ser.dll.

2. Copy the ftdi_ser.dll driver to the Files folder of the BSP package.

3. Add the following content under platform. bib.

Add the following content to the wince5.0 system:

Ftdi_ser.dll $ (_ flatreleasedir)/ftdi_ser.dll NK sh

Add the following content to the wince6.0 system:

Ftdi_ser.dll $ (_ flatreleasedir)/ftdi_ser.dll NK Shk

4. Add the following registry information to platform. Reg:

;;;;;;;;;;;;; Add for USB to RS232 ;;;;;;;;;;;;;;;;;;;;;;;

[HKEY_LOCAL_MACHINE/Drivers/USB/clientdrivers/ftdi_device]

"Prefix" = "com"

"DLL" = "ftdi_ser.dll"

"Configdata" = HEX :/

, 00, 3f, 3f, 10, 27, 88,13, C4, 09, E2, 04,71, 38, 41, 9C, 80, 4E, C0, 34,00, 1a, 00, 0d ,/

, 00, D0, 80

; "Initialindex" = DWORD: 00000000; this is the registry value provided by the manufacturer. I changed it to 9, which is com9.

"Initialindex" = DWORD: 00000009

"Devicearrayindex" = DWORD: 00000000

"Latencytimer" = DWORD: 00000010

; "Latencytimer" = DWORD: 00000000

 

[HKEY_LOCAL_MACHINE/Drivers/USB/loadclients/1027_24577/default/ftdi_device]

"DLL" = "ftdi_ser.dll"

 

[HKEY_LOCAL_MACHINE/Drivers/USB/loadclients/default/255/ftdi_device]

"DLL" = "ftdi_ser.dll"

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/chinesedragon2010/archive/2010/09/11/5877114.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.