Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

Table of Contents

Low-Level Communications

Exploring Palm OS®

About This Document

Intended Audience

Additional Resources

Part I: Serial Communication

1 Introduction to Serial Communications

Serial Communications Overview

Serial Communications Components

Byte Ordering

2 The Serial Manager

Steps for Using the Serial Manager

Opening a Port

Closing a Port

Configuring the Port

Sending Data

Receiving Data

Serial Manager Tips and Tricks

3 The Serial Link Protocol

The Serial Link Protocol

SLP Packet Structures

Transmitting an SLP Packet

Receiving an SLP Packet

The Serial Link Manager

Using the Serial Link Manager

4 Serial Manager Reference

Serial Manager Data Structures

DeviceInfoType

SrmOpenConfigType

SrmRfCommOpenParamsType

Serial Manager Constants

Port Constants

Serial Capabilities Constants

Serial Settings Constants

SrmCtlEnum

Status Constants

Line Error Constants

Serial Manager Functions

SrmClearErr

SrmClose

SrmControl

SrmExtOpen

SrmGetDeviceCount

SrmGetDeviceInfo

SrmGetStatus

SrmOpen

SrmPrimeWakeupHandler

SrmReceive

SrmReceiveCheck

SrmReceiveFlush

SrmReceiveWait

SrmReceiveWindowClose

SrmReceiveWindowOpen

SrmSend

SrmSendCheck

SrmSendFlush

SrmSendWait

SrmSetReceiveBuffer

SrmSetWakeupHandler

Serial Manager Application-Defined Functions

WakeupHandlerProcPtr

5 Serial Link Manager

Serial Link Manager Functions

SlkClose

SlkCloseSocket

SlkFlushSocket

SlkOpen

SlkOpenSocket

SlkReceivePacket

SlkSendPacket

SlkSetSocketListener

SlkSocketPortID

SlkSocketSetTimeout

Part II: Infrared Communication (Beaming)

6 Introduction to Infrared Communication (Beaming)

7 The IrDA Protocol Stack

8 Using the IrDA Protocols

The IrLAP Protocol Layer

The IrLMP Protocol Layer

The IrLMP Sequenced Packet Interface

The IrLMP Datagram Interface

Discovering IrDA Devices

The TinyTP Protocol Layer

The TinyTP Sequenced Packet Interface

The TinyTP Stream Interface

Getting and Providing Information About IrDA Services

Structure of the IAS Database

Getting Information about IrDA Services

Providing Information About Offered IrDA Services

9 IrDA Reference

IrDA Constants

IASAttribTypeType

IASCharSetType

IrDA Protocol Identifier Constants

IrDA Socket Address Family Constant

IrLmpDiscoveryMethodType

IAS Constants

setsockopt() commands

Special IrDA Device Addresses

Special IrLMP SAP Values

IrDA Data Types and Structures

IASAttribValueType

IASObjectType

IASQueryType

IrLapDeviceAddrType

IrLmpDeviceInfoType

IrLmpSAPType

sockaddr_irda

IrDALib Functions

IASGetValueByClass

IASRegisterObject

IASRegisterService

IASUnregisterObject

IrDADiscoverDevices

Part III: Bluetooth

10 The Palm OS Bluetooth System

Capabilities of the Palm OS Bluetooth System

Bluetooth System Components

Bluetooth Library

Bluetooth Exchange Library

Bluetooth Stack Library

Bluetooth Devices

Bluetooth HCI Transport Modules

Hardware Device Drivers

Profiles

Usage Scenarios

Authentication and Encryption

Device Discovery

Telephony and Bluetooth

Dial-up Networking Profile

Headset Profile

Hands-Free Profile

Personal-Area Networking

Radio Power Management

11 Developing Bluetooth-enabled Applications

Overview of the Bluetooth Library

Compatibility

The Management Entity

Opening the Library

Polling for Management Entity Events

Finding Nearby Devices

Creating ACL Links

Working With Piconets

Closing the Management Entity

Bluetooth Sockets

L2CAP

RFCOMM

SCO

BSD Sockets

Creating a Socket

Restrictions

Service Discovery

Service Records

Creating Persistent Services

Dealing with Bluetooth Shutdown

12 Bluetooth Exchange Library Support

Detecting the Bluetooth Exchange Library

Using the Exchange Manager With Bluetooth

Bluetooth Exchange URLs

Obtaining the URL of a Remote Device

ExgLibGet() and ExgLibRequest()

13 Bluetooth Reference

Bluetooth Structures and Types

BtLibClassOfDeviceType

BtLibDeviceAddressType

BtLibDeviceAddressTypePtr

BtLibFriendlyNameType

BtLibFriendlyNameTypePtr

BtLibL2CapChannelIdType

BtLibL2CapPsmType

BtLibLanguageBaseTripletType

BtLibManagementEventType

BtLibProfileDescriptorListEntryType

BtLibProtocolDescriptorListEntryType

BtLibProtocolEnum

BtLibRfCommServerIdType

BtLibSdpAttributeDataType

BtLibSdpAttributeIdType

BtLibSdpRecordHandle

BtLibSdpRemoteServiceRecordHandle

BtLibSdpUuidSizeEnum

BtLibSdpUuidType

BtLibServiceDescriptionType

BtLibServiceExecutionParamsType

BtLibServicePreparationParamsType

BtLibServiceRegistrationParamsType

BtLibSocketConnectInfoType

BtLibSocketEventType

BtLibSocketListenInfoType

BtLibSocketRef

BtLibStringType

BtLibUrlType

sockaddr_bth

Bluetooth Constants

Bluetooth Data Element Sizes

Bluetooth Data Element Types

Bluetooth Device Names

Bluetooth Disconnection Codes

Bluetooth Error Codes

Bluetooth Module Names

BSD Sockets Constants

Character Encoding Constants

L2Cap Constants

Language ID Constants

Management Event Status Codes

Miscellaneous Bluetooth Constants

Attribute Identifier Constants

Protocol UUIDs

RfComm Constants

Service Class UUIDs

Service Description Flags

BtLibAccessibleModeEnum

BtLibConnectionRoleEnum

BtLibGeneralPrefEnum

BtLibGetNameEnum

BtLibLinkModeEnum

BtLibLinkPrefsEnum

BtLibManagementEventEnum

BtLibProtocolEnum

BtLibSdpUuidSizeEnum

BtLibSocketEventEnum

BtLibSocketInfoEnum

Universal Service Attribute IDs

Bluetooth Application Launch Codes

sysBtLaunchCmdDoServiceUI

sysBtLaunchCmdDescribeService

sysBtLaunchCmdExecuteService

sysBtLaunchCmdPrepareService

Bluetooth Functions and Macros

BtLibAddrAToBtd

BtLibAddrBtdToA

BtLibCancelInquiry

BtLibClose

BtLibDiscoverDevices

BtLibGetGeneralPreference

BtLibGetRemoteDeviceName

BtLibGetRemoteDeviceNameSynchronous

BtLibL2CapHToNL

BtLibL2CapHToNS

BtLibL2CapNToHL

BtLibL2CapNToHS

BtLibLinkConnect

BtLibLinkDisconnect

BtLibLinkGetState

BtLibLinkSetState

BtLibMEEventName

BtLibOpen

BtLibPiconetCreate

BtLibPiconetDestroy

BtLibPiconetLockInbound

BtLibPiconetUnlockInbound

BtLibRegisterService

BtLibRfCommHToNL

BtLibRfCommHToNS

BtLibRfCommNToHL

BtLibRfCommNToHS

BtLibSdpCompareUuids

BtLibSdpGetPsmByUuid

BtLibSdpGetRawDataElementSize

BtLibSdpGetRawElementType

BtLibSdpGetServerChannelByUuid

BtLibSdpHToNL

BtLibSdpHToNS

BtLibSdpNToHL

BtLibSdpNToHS

BtLibSdpParseRawDataElement

BtLibSdpServiceRecordCreate

BtLibSdpServiceRecordDestroy

BtLibSdpServiceRecordGetAttribute

BtLibSdpServiceRecordGetNumListEntries

BtLibSdpServiceRecordGetNumLists

BtLibSdpServiceRecordGetRawAttribute

BtLibSdpServiceRecordGetSizeOfRawAttribute

BtLibSdpServiceRecordGetStringOrUrlLength

BtLibSdpServiceRecordMapRemote

BtLibSdpServiceRecordSetAttribute

BtLibSdpServiceRecordSetAttributesForSocket

BtLibSdpServiceRecordSetRawAttribute

BtLibSdpServiceRecordsGetByServiceClass

BtLibSdpServiceRecordStartAdvertising

BtLibSdpServiceRecordStopAdvertising

BtLibSdpUuidInitialize

BtLibSdpVerifyRawDataElement

BtLibSecurityFindTrustedDeviceRecord

BtLibSecurityGetTrustedDeviceRecordInfo

BtLibSecurityNumTrustedDeviceRecords

BtLibSecurityRemoveTrustedDeviceRecord

BtLibSetGeneralPreference

BtLibSocketAdvanceCredit

BtLibSocketClose

BtLibSocketConnect

BtLibSocketCreate

BtLibSocketEventName

BtLibSocketGetInfo

BtLibSocketListen

BtLibSocketRespondToConnection

BtLibSocketSend

BtLibStartInquiry

Part IV: Networking and Sockets

14 Introduction to Sockets on Palm OS

Overview

Unsupported Sockets Features

AF_UNIX and PF_UNIX Unsupported

No socketpair() Function

No UNIX-Style Asynchronous Features

Architecture of the Sockets Support System

Protocol Mapping

15 Sockets & Network Support Reference

Overview

Structures and Types

addrinfo

hostent

netent

protoent

servent

sockaddr

sockaddr_in

socklen_t

Functions and Macros

accept

bind

connect

endhostent

endnetent

endprotoent

endservent

freeaddrinfo

freehostent

gai_strerror

getaddrinfo

gethostbyaddr

gethostbyname

gethostbyname2

gethostent

getipnodebyaddr

getipnodebyname

getnameinfo

getnetbyaddr

getnetbyname

getnetent

getpeername

getsockname

getprotobyname

getprotobynumber

getprotoent

getservbyname

getservbyport

getservent

getsockopt

hstrerror

htonl

htons

inet_addr

inet_aton

inet_lnaof

inet_makeaddr

inet_netof

inet_network

inet_ntoa

inet_ntop

inet_pton

listen

ntohl

ntohs

recv

recvfrom

recvmsg

select

send

sendmsg

sendto

sethostent

setnetent

setprotoent

setservent

setsockopt

shutdown

socket

Part V: WiFi

16 Introduction to Wireless Networking

Overview

WiFi Concepts

Locating and Opening a WiFi Interface

Getting Information About the WiFi Interface

Determining Supported Encryption Modes

Getting the Interface Status

Identifying the Currently Connected Network

Determining Supported Channels and Transmission Rates

Getting the Signal Strength

Finding an Access Point or Ad-hoc Network

Active Scanning

Passive Scanning

Obtaining Scan Results

Configuring Encryption

Connecting To a Network

Managing a Wireless Connection

Disconnecting From a Network

Creating an Ad-hoc Network

17 WiFi Reference

Overview

WiFi Constants

Channel Constants

Connection Status Constants

Event Type Constants

Power Mode Constants

RSSI Update Mode Constants

Scan Result Capability Constants

Security Capability Constants

Transmission Rate Flags

WEP Flag Constants

WiFi Data Structures and Types

WifiEventType

WifiScanResultsType

IOCTL Commands

WIOCCONNECT

WIOCCREATEIBSS

WIOCDISCONNECT

WIOCGETBSSID

WIOCGETCHANNEL

WIOCGETCURRENTRSSI

WIOCGETMACADDR

WIOCGETPOWERMODE

WIOCGETRATES

WIOCGETRSSIUPDATE

WIOCGETSCANRESULTS

WIOCGETSECCAPS

WIOCGETSSID

WIOCGETSTATUS

WIOCGETWEPFLAGS

WIOCJOIN

WIOCPASSIVESCAN

WIOCSCAN

WIOCSETDEFAULTKEY

WIOCSETKEY

WIOCSETPOWERMODE

WIOCSETRATES

WIOCSETRSSIUPDATE

WIOCSETSECMODE

WIOCSETWEPFLAGS

Part VI: IOS STDIO

18 Using IOS STDIO

Introducing IOS STDIO

Synchronization Issues

Polling STREAMS File Descriptors

Using a PollBox to Monitor Multiple File Descriptors

19 IOS STDIO Reference

Overview

IOS STDIO Data Structures and Types

cc_t

iovec

PollBox

pollfd

speed_t

strbuf

tcflag_t

termios

IOS STDIO Constants

Character Control Mode Constants

Input Control Mode Constants

Ioctl Command Constants

Local Mode Constants

Modulation Speed Constants

NCC Constant

Output Control Mode Constants

Poll Mask Constants

Functions

IOSClose

IOSFastIoctl

IOSFattach

IOSFdetach

IOSFnctl

IOSGetmsg

IOSGetpmsg

IOSIoctl

IOSOpen

IOSPipe

IOSPoll

IOSPutmsg

IOSPutpmsg

IOSRead

IOSReadv

IOSWrite

IOSWritev

PbxAddFd

PbxCreate

PbxDestroy

PbxPoll

PbxRemoveFd

PbxRun

Application-Defined Functions

PbxCallback

20 Driver Attributes API

Driver Attribute Constants

Driver Class Constants

Driver Attribute Functions

IOSGetNumDrivers

IOSGetDriverAttributesByIndex

IOSGetDriverAttributesByName

IOSGetDriverDescriptionByIndex

IOSGetDriverDescriptionByName

IOSGetDriverNameByIndex

21 Driver Installation API

IOS Installation Functions

IOSInstallDriver

IOSRemoveDriver

Glossary