AN2385 Freescale Semiconductor / Motorola, AN2385 Datasheet

no-image

AN2385

Manufacturer Part Number
AN2385
Description
GPRS Wireless Internet Connectivity Using DragonBall and Palm OS Based PDAs Application Note
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
AN2385/D
Rev. 0, 11/2002
GPRS Wireless Internet
Connectivity Using
DragonBall™ and
Palm OS Based PDAs
By Lalan J. Mishra
Contents
Introduction . . . . . . . . . . . . 1
Dial-up vs. GPRS
GSM-GPRS Application . . . 2
Program Source Code . . . . 7
Setting Up and Running the
Guidelines for Porting . . . 18
Summary . . . . . . . . . . . . . 19
This document contains information on a product under development. Motorola reserves the right to change or
discontinue this product without notice. © Motorola, Inc., 2002. All rights reserved.
Connection . . . . . . . . . . 1
Application . . . . . . . . . 16
This paper describes and provides source code for a reference application, called GSM-
GPRS, which provides mobile Internet access on a personal digital assistant (PDA) based on
a DragonBall™ processor and the Palm OS operating system, via a Motorola general packet
radio service (GPRS) enabled phone, the Timeport™ 280. Also, the paper provides
guidelines for porting this application to other DragonBall-based PDA platforms.
1 Introduction
As GPRS-enabled wireless connectivity becomes more widely available, provided by a
growing family of wireless data- and multimedia-centric devices, consumers are likely to
trade in standalone devices for newer “always connected” offerings at increasing rates.
However, many of the features of future wireless devices can be supported today with
existing products.
For example, most PDAs support dial-up Internet access. PDAs can also run full HTML Web
browsers that are easily available at little or no cost. These browsers provide the ability to
surf any Web site, unlike the wireless application protocol (WAP) browsers available on
some mobile phones, which can access only WAP-enabled Web sites. All that is needed to
provide wireless Internet access on a standalone PDA is to connect the PDA to a mobile
phone with wireless data connectivity, and provide software to enable the two devices to
communicate. To establish the wireless data link between the PDA and an Internet service
provider (ISP), either conventional mobile phones or GPRS-enabled mobile phones can be
used. However, there is a marked difference between using a conventional mobile phone to
establish a dial-up connection with an ISP and using a GPRS-enabled phone that provides
“always on” connectivity for this purpose.
This paper illustrates the use of a DragonBall-powered Palm OS PDA with Motorola’s
Timeport™ 280 GPRS-enabled phone. The choice of these components is for illustration
only. The concept can be implemented on any PDA platform using any GPRS-enabled
phone.
2 Dial-up vs. GPRS Connection
This section describes the differences between using a dial-up connection and a GPRS
connection to connect to the Internet using a mobile phone.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com

Related parts for AN2385

AN2385 Summary of contents

Page 1

... Freescale Semiconductor, Inc. Application Note AN2385/D Rev. 0, 11/2002 GPRS Wireless Internet Connectivity Using DragonBall™ and Palm OS Based PDAs By Lalan J. Mishra This paper describes and provides source code for a reference application, called GSM- GPRS, which provides mobile Internet access on a personal digital assistant (PDA) based on Contents a DragonBall™ ...

Page 2

Freescale Semiconductor, Inc. GSM-GPRS Application Both dial-up and GPRS connections have hardware and software components associated with them. The Timeport™ 280 mobile phone has a built-in modem, and this modem is the major hardware component connecting the client (in this ...

Page 3

Freescale Semiconductor, Inc. Figure 1 illustrates the GUI command buttons. When a button is clicked, the PDA interacts with the mobile phone by sending modem AT commands. OFF Button When this button is clicked, the command AT+CKPD=e is sent. Figure ...

Page 4

Freescale Semiconductor, Inc. GSM-GPRS Application The generic form of key emulation AT commands is: character string showing the decimal ASCII value of the key being emulated. <CR> represents the 1-byte ASCII value of carriage return, which is 0x0D. For example, ...

Page 5

Freescale Semiconductor, Inc. Table 2. AT Commands for Modem Testing, Control, and Configuration (Continued) AT Commands AT+IPR = 57600 <CR> Sets the modem baud rate to 57600 bps. AT+IFC = 2, 2 <CR> Sets the modem to RTS-CTS based hardware ...

Page 6

Freescale Semiconductor, Inc. GSM-GPRS Application Figure 2. Execution State Diagram The sequence of AT commands (with 250 ms delay between consecutive commands) that is sent to the mobile phone device on clicking Go GPRS WWW is shown in Figure 3. ...

Page 7

Freescale Semiconductor, Inc. 4 Program Source Code The GSM-GPRS application is a single form (window) application. Event handling is limited to responding to button-click events, and therefore is very simple. The code execution flow through various functions is shown in ...

Page 8

Freescale Semiconductor, Inc. Program Source Code typedef struct { UInt8 replaceme; } StarterAppInfoType; typedef StarterAppInfoType* StarterAppInfoPtr; //-----------------------------------------------------------------------// //--------------------- Global Variables Follow -------------------------// Err err; UInt16 portId; //-----------------------------------------------------------------------// //----------------------------- Internal Constants ----------------------// #define appFileCreator 'STRT' #define appVersionNum #define appPrefID #define appPrefVersionNum ...

Page 9

Freescale Semiconductor, Inc. switch (cmd) { case sysAppLaunchCmdNormalLaunch: error = AppStart(); if (error) return error; FrmGotoForm(MainForm); AppEventLoop(); AppStop(); break; default: break; } return errNone; } //-----------------------------------------------------------------------// //-----------------------------------------------------------------------// // Function: // Objective: // Get the current application's preferences. // Called by: ...

Page 10

Freescale Semiconductor, Inc. Program Source Code // Write the saved preferences / saved-state information. // will be backed up during a HotSync. PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum, &prefs, sizeof (prefs), true); // Close all the open forms. SrmClose(portId); FrmCloseAllForms (); } ...

Page 11

Freescale Semiconductor, Inc. case MainForm: FrmSetEventHandler(frmP, MainFormHandleEvent); break; default: break; } return true; } return false; } //-----------------------------------------------------------------------// //-----------------------------------------------------------------------// // Function : MainFormHandleEvent // Objective: // This function is the event handler for the MainForm of // this application. // ...

Page 12

Freescale Semiconductor, Inc. Program Source Code //-----------------------------------------------------------------------// // Function : MainFormButtonHandler // Objective: // This function processes the events generated by the buttons on// // the MainForm when they are pressed. // Called by: // This function is called by ...

Page 13

Freescale Semiconductor, Inc. case MainPhoneOffHookGraphicButton:// Key "Talk" SrmSend(portId, &Talk, StrLen(Talk), &err); break; case MainKeyZeroButton: SrmSend(portId, &NumZero,StrLen(NumZero), &err); break; case MainKeyOneButton: SrmSend(portId, &NumOne, StrLen(NumOne), &err); break; case MainKeyTwoButton: SrmSend(portId, &NumTwo, StrLen(NumTwo), &err); break; case MainKeyThreeButton:// Key #3 SrmSend(portId, &NumThree, StrLen(NumThree), &err); ...

Page 14

Freescale Semiconductor, Inc. Program Source Code SysTaskDelay(TxDelay); SndPlaySystemSound(7 >> "AT+CGDCONT=1,." SrmSend(portId, &GprsInitMsgFour, SysTaskDelay(TxDelay); SndPlaySystemSound(7 >> "AT+CGQREQ=..." SrmSend(portId, &GprsInitMsgFive, SysTaskDelay(TxDelay); SndPlaySystemSound(7 >> "AT+CGQMIN=..." SrmSend(portId, &GprsInitMsgSix, SysTaskDelay(TxDelay); SndPlaySystemSound(7 >> "ATE0" SrmSend(portId, &GprsInitMsgThree, SysTaskDelay(TxDelay); SndPlaySystemSound(7); ...

Page 15

Freescale Semiconductor, Inc. //-----------------------------------------------------------------------// // Function : MainFormInit // Objective: // This function initializes the MainForm form. // Called by: // MainFormHandleEvent() //-----------------------------------------------------------------------// static void MainFormInit(FormPtr //-----------------------------------------------------------------------// //-----------------------------------------------------------------------// // Function : MainFormDoCommand // Objective: // This function performs ...

Page 16

Freescale Semiconductor, Inc. Setting Up and Running the Application //-----------------------------------------------------------------------// // Function : RomVersionCompatible // Objective: // This routine checks that a ROM version meets the // minimum requirement. // Called by: // StarterPalmMain() //-----------------------------------------------------------------------// static Err RomVersionCompatible(UInt32 requiredVersion, UInt16 ...

Page 17

Freescale Semiconductor, Inc. 5.1 Loading the Program The following program files should be loaded to the PDA: • Eudora.prc • Eudora_Web.prc • GPRS.prc These files can loaded using the HotSync operation or by any other means (such as IR beaming ...

Page 18

Freescale Semiconductor, Inc. Guidelines for Porting 5.3.1 Initiating a GSM Call Click on the numeric buttons in the sequence of the number to be dialed. When a numeric button is clicked, the corresponding number appears on the mobile phone’s screen. ...

Page 19

Freescale Semiconductor, Inc. In place of Metrowerks CodeWarrior for Palm OS, use a development tool designed for the target operating system. 7 Summary GSM-GPRS is an application to automate GPRS-based Internet access on mobile PDA. The application uses a simple ...

Page 20

... Motorola and the Stylized M Logo are registered in the U.S. Patent and Trademark Office. All other product or service names are the property of their respective owners. Motorola, Inc Equal Opportunity/Affirmative Action Employer. © Motorola, Inc. 2002 AN2385/D For More Information On This Product, Go to: www.freescale.com ...

Related keywords