Using Serial Ports

Serial ports are a communications technology that you can use to talk to peripheral devices attached to your device. The technology is tried and tested, and lots of specialist hardware sensors and accessories such as Global Positioning System (GPS) receivers communicate by using serial ports. .NET Compact Framework version 2.0 supports the SerialPort component, which was also introduced in version 2.0 of the full framework.The key port properties exposed are listed in Table 8-2.

Table 8-2. SerialPort Properties

Property

Description

PortName

This is the full name for the port without the trailing colon.

BaudRate

Physical baud rate in bits per second; this must match that used on the remote device.

StopBits

Number of stop-bits transmitted, ...

Get Microsoft® Mobile Development Handbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.