Home
EmbeddedBlue eb500-SER
Contents
1. Click Save On the Run menu click Run This will display the Download Program dialog while downloading the program to the BASIC Stamp After the download is complete the BASIC Stamp application will transmit Hello World over the wireless link and HyperTerminal will display the received data Figure 12 COM Inbound Hyper Terminal DB Fie Edit View Call Transfer Help Da e SZ DA 2 Auto detect 9600 8 N 1 Figure 12 HyperTerminal Output Hello World EmbeddedBlue 500 SER User Manual Page 55 Communications Communicating between a PC with DBT 120 and a BOE In this exercise we will step through the process of communicating between a PC that has a D Link DBT 120 Bluetooth USB Adapter and an eb500 SER module inserted into a Board of Education To perform this exercise as documented you will need a D Link DBT 120 a Board of Education board and an eb500 SER module If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise On the PC the DBT 120 Bluetooth Software associates a COM port for establishing a connection from the PC to a remote Bluetooth device and a separate COM port for connections that are established from a remote Bluetooth device to the PC The Establishing a Connection section of this manual describes how to establish the connection between devices This exercise demonstrates how to communicate data between the PC and a remote eb500 SE
2. If you have already connected these two devices with security enabled then this step should be skipped Page 38 EmbeddedBlue 500 SER User Manual Establishing a Connection The actions in this step need to be performed only once for the eb500 SER After performing the actions in this step the connection security details will be stored on both the PC and the eb500 SER module Therefore future connections can be established to an eb500 SER by simply opening the associated COM port 1 Open the Bluetooth Devices dialog by double clicking on the Bluetooth tray icon This will display the Bluetooth Devices dialog 2 Click Add to open the Add Bluetooth Device Wizard The Windows XP SP2 Bluetooth Software requires that devices are added before they can be used 3 Click My device is set up and ready to be found and then click Next to locate the eb500 SER module connected to the Board of Education Provided the eb500 SER on the Board of Education is within range eb500 SER will be shown in the window 4 Select eb500 SER and click Next The passkey selection dialog will be shown The eb500 SER module enables security by default so the devices must verify passkeys to establish a trusted relationship before they can communicate 5 Select Use the passkey found in the documentation enter 0000 into the edit field and click Next This will establish a connection from the PC to the eb500 SER on the Board of Education and associate thi
3. SERIN 0 84 WAIT ACK CR Either an Err lt CR gt or a gt will be received SERIN 0 84 STR bBuffer 6 gt IF bBuffer 0 E THEN ErrorCode Wait ForConnection IF in5 0 THEN WaitForConnecti on Verify the connection is still up before each loop IF in5 0 THEN Connect GOSUB Beat IR Sensors BRANCH irBits Hold Turn_Right Turn Iert Move _Fwd Move_Fwd SEROUT 1 84 3 PULSOUT Motor LFwdFast PULSOUT RMotor RFwdFast GOTO Main Turn_Ri ght SEROUT 1 84 1 PULSOUT LMotor LFwdFast PULSOUT RMotor RRevFast GOTO Main Turn_Left SEROUT 1 84 2 Page 48 EmbeddedBlue 500 SER User Manual Communications PULSOUT LMotor LRevFast PULSOUT RMotor RFwdFast GOTO Main Hold GOTO Main EE Subroutines e eee ee ee eee eee ee eee eee Head IR Sensors FREQOUT LflrOut 1 38500 irLeft Lflrin FREQOUT RtlrOut 1 38500 irRight Rtl rin RETUR BadCommand DEBUG A bad command was received END ErrorCode bErrorCode bBuffer 4 DEBUG An error was received STR bErrorCode CR END On the File menu click Save As 4 Inthe File name box enter a file name to which to save the program just created For example MonkeySee bs2 5 Click Save Step 2 Create a Monkey Do Application for the Boe Bot In this step we will create a BASIC Stamp application that will receive information from the remote SumoBot and perform movements based on that inform
4. There are several pins that are important when performing the exercises in the Establishing a Connection and Communications sections of this manual Pin 3 of the eb500 SER module which aligns with the pin designated PO of the AppMod header is the UART data output pin EmbeddedBlue 500 SER User Manual Page 9 The Basics Pin 4 of the eb500 SER module which aligns with the pin designated P1 of the AppMod header is the UART data input pin Pin 8 of the eb500 SER module which aligns with the pin designated P5 of the AppMod header is the Connection Status pin A BASIC Stamp application can interrogate this pin to determine the connection status of the eb500 SER radio Pin 9 of the eb500 SER module which aligns with the pin designated P6 of the AppMod header is the Mode Control pin A BASIC Stamp application can drive this pin high to enter Data Mode or low to enter Command Mode Resetting the eb500 SER to the Factory Default Settings There are two different mechanisms to reset the eb500 SER module to the factory default settings Either by shorting the STATUS and MODE pins pin 8 and pin 9 and then applying power to the eb500 SER module or by issuing the reset command to the eb500 SER see the command set reference at the back of this manual for the syntax of the reset command Switching between Data Mode and Command Mode When a Connection command is issued the eb500 SER attempts to establish a connec
5. board and two eb500 SER modules If you are using any of the other supported Parallax boards you may need to Step 1 make adjustments to this exercise eb600 RS232 Adapter Setup In this step we will attach an eb500 SER module to the eb600 PC Adapter and apply power to the device Insert an eb500 SER module into the eb600 RS232 Adapter header assuring that Pin 1 of the eb500 SER module is inserted into Pin 1 of the header on the eb600 RS232 Adapter Connect the eb600 RS232 Adapter to a serial port on the PC using the provided straight through serial cable The PC serial port must be available for HyperTerminal use 3 Apply power to the eb600 RS232 Adapter Step 2 Se OOO E e HyperTerminal Setup In this step we will setup the Windows HyperTerminal application to establish a connection with the eb500 SER attached to the eb600 RS232 Adapter Open HyperTerminal This will display the Connection Description dialog In the Name box type the name of your connection For example eb600 Click OK This will display the Connect To dialog In the Connect using dropdown select the serial port to which you have connected the eb600 RS232 Adapter Click OK This will display the Properties dialog In the Bits per second dropdown select 9600 In the Data bits dropdown select 8 In the Parity dropdown select None In the Stop bits dropdown select 1 In the Flow control dropdown select None Click OK
6. connection off Configures the module so that other Bluetooth devices may not establish a connection i An optional parameter used to persist the new setting when the module is powered down Example gt set connectable off lt CR gt ACK lt CR gt gt Page 94 EmbeddedBlue 500 SER User Manual Command Get Set Encrypt Mode The set encrypt mode command provides control over whether transmitted data is encrypted or sent in the clear This setting is only in effect when security is set to either open or closed When security is turned off the transmitted data is never encrypted By default EmbeddedBlue modules use 56 bit encryption but 128 bit encryption is available upon request Contact A7 Engineering for more information about getting 128 bit encryption Syntax set encrypt on off lt CR gt Parameters on Configures the module so that transmitted data will be encrypted when security is set to either open or closed off Configures the module so that transmitted data will NOT be encrypted An optional parameter used to persist the new setting when the module is powered down Example gt set encrypt on lt CR gt ACK lt CR gt gt EmbeddedBlue 500 SER User Manual Page 95 Command Get Set Escape Character The set escape character command provides control over the character used in the Switch to Command Mode command to instruct the module to leave Data Mode and enter Command Mode The factory default esca
7. 500 SER User Manual Firmware Upgrade 13 Review the information shown on the Successful Upgrade dialog The firmware of your eb500 SER module has been upgraded If the Upgrade Failed dialog appears click Details to get additional information about the failure Ensure that the eb500 SER is correctly inserted into the eb600 RS232 Adapter that the eb600 RS232 Adapter is connected to the PC using the provided straight through serial cable and that you have selected the appropriate COM port in the EmbeddedBlue DFU wizard 14 Click Finish Step 5 Check the Firmware Version While it is not necessary to check the firmware version to complete the firmware upgrade process this step demonstrates how to check the version of firmware on your EmbeddedBlue module 1 Using a terminal emulator such as HyperTerminal establish a connection with the eb500 SER attached to the eb600 RS232 Adapter If you need assistance in the setup of HyperTerminal to communicate with your eb500 SER module please refer to the Establishing a Connection section of this manual under the topic Connecting a PC with an eb600 to a Board of Education Step 2 HyperTerminal Setup 2 Check the version information by issuing the version command To view the version information type ver all atthe gt prompt and press the return key Example gt ver all ACK Firmware Version 2 0 Firmware Build 247 Model Number eb500 Serial Number 1008 Manufactu
8. Basic Stamp Editor 2 Enter the following program code into the editor This application is available in electronic form on the accompanying CD in the Samples folder in the file GetAddress bs2 STAMP BS2 szData VAR BYTE 20 Wait for the eb500 radio to be ready PAUSE 1000 Get the eb500 Bluetooth Address SEROUT 1 84 get address CR SERIN 0 84 WAI T ACK CR Read the local address fromthe get command EmbeddedBlue 500 SER User Manual Page 21 Establishing a Connection SERIN 0 84 STR szData 17 SERIN 0 84 WAIT CR gt szData 17 0 DEBUG Local eb500 address STR szData 17 CR The BASIC Stamp application issues an eb500 SER Get Address command and then reads and displays the response in the debug window The response is the Bluetooth address of the local eb500 SER module On the File menu click Save As 4 Inthe File name box enter a file name to which to save the program just created For example GetAddress bs2 5 Click Save Step 3 Get the Address of the eb500 SER on the Board of Education Board In this step we will get the Bluetooth address of the eb500 SER module on the Board of Education board We will then use this address in the next step 1 Connect the Board of Education board serial port to the PC Apply power to the Board of Education board On the Run menu click Run The Bluetooth address for the eb500 SER on the Board of Education board is shown in th
9. EmbeddedBlue 500 SER User Manual Establishing a Connection Connecting a Board of Education to a Pocket PC 2003 device In this exercise we will step through the process of establishing a connection from an eb500 SER module attached to a Board of Education board to a Pocket PC 2003 device with integrated Bluetooth To perform this exercise as documented you will need a Pocket PC 2003 device a Parallax Board of Education and an eb500 SER module Depending on the specific Pocket PC model that you are using you may need to make minor adjustments to this exercise Step 1 3 Step 2 Obtain the Bluetooth Address of the Pocket PC In this step we will obtain the Bluetooth address of the Pocket PC Tap the Bluetooth icon in the system tray on the Today screen and select Bluetooth Settings This will display the Settings dialog Tap the Accessibility tab and note the Address shown in the Device Identification section of the dialog The device address will be used in the Basic application developed in the next step Tap OK to close the dialog Write a Basic Application to Connect to the Pocket PC In this step we will attach an eb500 SER module to the Board of Education and develop a Basic application to establish a connection with the Pocket PC Insert an eb500 SER module into the AppMod header of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header Connect
10. OK On the Call menu click Call This will establish a connection with the serial port Press the Enter key to send a carriage return to the eb500 SER module You should see a caret appear in HyperTerminal this is the prompt for the eb500 SER Step 3 Execute a few eb500 SER commands Page 8 In this step we use the connection that has been established to execute a few simple eb500 SER commands Using HyperTerminal get the version of the eb500 SER module by using the Version command Example gt ver all ACK Firmware Version 2 0 e EmbeddedBlue 500 SER User Manual The Basics Firmware Build 247 Model Number eb500 Serial Number 238 Manufacturer A7 Engineering gt 2 Using HyperTerminal get the address of the eb500 SER module by using the Get command Example gt get address ACK IER gt Experiment with other commands simply by typing them in to the HyperTerminal window The HLP command is a great place to start Command Mode The eb500 SER supports two main operating modes command mode and data mode Upon power up the eb500 SER enters command mode and is ready to accept serial commands The factory default communication parameters are 9600 Baud 8 Data Bits 1 Stop Bit No Parity and No Flow Control The eb500 SER supports a command to modify the baud rate In this mode there are a number of commands that can be sent to change the baud rate locate other devices that are in range che
11. THEN WaitForConnecti on HI GH 6 PAUSE 300 Wait for 20 seconds PAUSE 20000 Switch to Command Mode LOW 6 SERIN 0 84 WAI T CR gt Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 WAIT CR gt The BASIC Stamp application establishes a connection with the remote Bluetooth device waits twenty seconds switches back to command mode and then disconnects from the remote device On the File menu click Save As 4 Inthe File name box enter a file name to which to save the program just created For example Connect bs2 Click Save Apply power to the Board of Education board Apply power to the SumoBoard board EmbeddedBlue 500 SER User Manual Page 23 Establishing a Connection 8 On the Run menu click Run The Connection Status LED see Figure 1 on page 13 on both eb500 SER modules will turn on when a connection is established between the two eb500 SER modules 9 Disconnect the power from the Board of Education board 10 Disconnect power from the SumoBoard board Page 24 EmbeddedBlue 500 SER User Manual Establishing a Connection Connecting a PC with an eb600 to a Board of Education In this e xercise we will step through the process of establishing a connection between a PC that has an eb600 RS232 Adapter to an eb500 SER inserted into a Board of Education board To perform this exercise as documented you will need an eb600 RS232 Adapter a Board of Education
12. VAR Byte Wait for the eb500 radio to be ready PAUSE 1000 Use a secure passkey SEROUT 1 84 set passkey a7blue 500 CR SERIN 0 84 WAIT CR gt e EmbeddedBlue 500 SER User Manual Security Use encryption SEROUT 1 84 set encrypt on CR SERIN 0 84 WAIT CR gt Start with security closed GOSUB SetSecurityClosed DO Check for changes in the security mode line Only make a change if not currently connected IF nSecurityMode IN13 THEN IF IN5 0 THEN GOSUB ChangeSecurityMode ENDI F Tlf there is an active connection turn on the LED IF IN5 1 THEN HIGH 12 ELSE IF nSecurityMode 1 THEN The module is in open mode so blink the LED HIGH 12 PAUSE 500 LOW 12 PAUSE 500 ELSE The module is in closed mode so turn off the LED LOW 12 ENDI F ENDI F LOOP SetSecurityClosed Set visible off security closed SEROUT 1 84 set visible off CR SERIN 0 84 WAI T CR gt SEROUT 1 84 set security closed CR SERIN 0 84 WAI T CR gt Record the new mode and return nSecurityMode 0 RETURN SetSecurityQOpen Set visible on security open SEROUT 1 84 set visible on CR EmbeddedBlue 500 SER User Manual Page 71 Security SERIN 0 84 WAIT CR gt SEROUT 1 84 set security open CR SERIN 0 84 WAIT CR gt Record the new mode and return nSecurityMode 1 RETURN ChangeSecurityMode IF nSecurityMode 0 THEN GOSUB SetSecurityOpen E
13. ae ees 85 EmbeddedBlue 500 SER User Manual Page i Table of Contents Get Security Mode ss ican eee eel tee ahr ee Ee 86 Get Visible Mod 2i 3 nites ts enee Miata Ah edna Ad a ei aia desea Ed ed 87 Elle ebessen atten gs alee cae dea tee at era i tae te i eo ad fated edi he la mis dee 88 List Prusted DeviGes deet desse dE dE dEr ieee et cate Nene ie 89 List Visible Diego d kas tee Ad acter geesde leede 90 Reset Factory Defaults ors ceaccecessatecivs che E E EE E ead ige beads a ieee de ete 91 Returnito Data Oe EE 92 Set Balid Rate sits cate ttisher oe teeta et paces a ee eh dele dE ae aida a ed 93 set Connectabl Meel nce asians ee ie an age een aera 94 Set Encrypt Mile tee ice gege eg aha aie cede de Adah ee hea ead ee eee eee 95 Set Escape Charactenanc aici dan anatomist 96 Set BN e sir arte ech debe ede rae lat eam he ela Cha ca lea Ain amt a elect 97 DER Niege sxc thers es a EE teeta caer sip EE 98 SeUPasskey ssc ea tie ee aii eit ae idee ei etn 99 GE Securty MOUS eege ge EEN ede pate ace ede peace ge EE dee 100 Set Visible Mee sirien hren geen e geet a even Ae 101 switch to Command Mode iniisa aa aaa Aen ele abe ee easel ete 102 N ORSIOMN EE 103 Firmware Upgrades ctccce sscceideccecivecetsandeette devecccctaestencatdectecsreccueastcetueds suencuarsdecteaasddecueusreetduesteceuar decoare 105 Upgrading the eb500 SER Firmware cette ee enne ee ee eeeeeeeeeeeeenieeeeesiieeeeeseeeeesieeeeeeaa 105 Error Codes EE 109 Te
14. and the Board of Education Using HyperTerminal get the address of the eb500 SER module that is connected to the Board of Education board by using the eb500 SER LIST VISIBLE serial command By issuing the LIST VISIBLE command the eb500 SER connected to the eb600 lists other Bluetooth devices that are in range and visible Please note that this operation will take 30 seconds to complete To obtain the address type 1st visible atthe gt prompt and press the return key Example gt lst visible ACK OOO CSAs EE D gt Using HyperTerminal establish a connection with the eb500 SER that is connected to the Board of Education board by using the eb500 SER CONNECT serial command To establish a connection type con followed by a space followed by the address returned in the previous action followed by a carriage return The Connection Status LED Figure 1 on both eb500 SER modules will turn on when a connection is established Page 26 EmbeddedBlue 500 SER User Manual Establishing a Connection Example gt con 00 0C 84 00 07 D7 ACK gt Disconnect power from both the eb600 PC Adapter and the Board of Education boards The removal of power resets the eb500 SER so that when power is restored the eb500 SER will boot into command mode EmbeddedBlue 500 SER User Manual Page 27 Establishing a Connection Connecting a PC with a DBT 120 to a Board of Education In this exercise we will step through the process of
15. be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch into data mode When switching into data mode a 300ms timeout is required to give the module enough time to make the change Wait ForConnecti on IF in5 0 THEN WaitForConnecti on HI GH 6 PAUSE 300 DEBUG Connection established CR Send Hello World ten times FOR nCount 1 to 10 SEROUT 1 84 Hello World CR PAUSE 1000 NEXT Switch to Command Mode LOW 6 SERIN 0 84 WAIT CR gt Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 wait CR gt DEBUG Disconnected CR The application establishes a connection with the remote eb500 SER device transmits Hello World ten times switches back to command mode and then disconnects from the remote device The first call to SEROUT is used when the eb500 SER is in command mode and instructs the eb500 SER to establish a connection with the device specified Once a connection is established the eb500 SER is in data mode which causes further calls to SEROUT to be sent to the remote device Page 54 EmbeddedBlue 500 SER User Manual Communications On the File menu click Save As This will display the Save As dialog In the File name box enter a file name to which to save the program just created For example HelloWorld bs2
16. common and useful configurations All source code shown in these exercises is available in electronic form on the accompanying CD in the Samples folder using the filename used in this manual Additional samples will be made available on the A7 Engineering website at http Awww a7eng com Connecting two eb500 SER Modules In this exercise we will step through the process of establishing a connection between an eb500 SER inserted into a Board of Education and an eb500 SER inserted into a SumoBoard To perform this exercise as documented you will need a Board of Education board a SumoBoard and two eb500 SER modules If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise Step 1 Insert the eb500 SER Modules into the BOE and SumoBoard Boards In this step we will insert the eb500 SER modules into the Board of Education BOE and SumoBoard boards 1 Insert an eb500 SER module into the AppMod header of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header 2 Insert an eb500 SER module into the AppMod header of the SumoBoard board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header Step 2 Write a BASIC Stamp Application to Get the eb500 SER Address In this step we will write a BASIC Stamp application to interrogate an eb500 SER for its unique Bluetooth address Open the
17. couple of seconds and then reconnect the power 2 Reset the eb500 SER attached to the Board of Education board to place the eb500 SER into command mode To reset the eb500 SER attached to the Board of Education board disconnect the power wait a couple of seconds and then reconnect the power The Reset push button on the Board of Education board will NOT reset the eb500 SER 3 Using HyperTerminal acquire the device address of the eb500 SER connected to the eb600 PC Adapter by using the eb500 SER GET ADDRESS serial command Please note the device address as it will be used in the BASIC Stamp application developed in the following actions By issuing the GET ADDRESS command the eb500 SER connected to the eb600 will return its own device address To obtain the device address type get address at the gt prompt and press the return key Example gt get address ACK 00s 0C gA e 00207 SDE E 4 Using the BASIC Stamp Editor on the File menu click New This will create a new project window within the BASIC Stamp Editor EmbeddedBlue 500 SER User Manual Page 53 Communications 5 Enter the following program code into the editor replacing the device address with the device address obtained from the GET ADDRESS command issued above This application is available in electronic form on the accompanying CD in the Samples folder in the file HelloWorld bs2 STAMP BS2 nCount VAR BYTE Wait for the eb500 radio to
18. file Connect bs2 STAMP BS2 Wait for the eb500 radio to be ready PAUSE 1000 EmbeddedBlue 500 SER User Manual Page 39 Establishing a Connection 7 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch to data mode Wait ForConnecti on IF in5 0 THEN WaitForConnecti on HI GH 6 PAUSE 300 Wait for 20 seconds PAUSE 20000 Switch to Command Mode LOW 6 SERIN 0 84 WAI T CR gt Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 WAIT CR gt The BASIC Stamp application establishes a connection with the PC device waits twenty seconds switches back to command mode and then disconnects from the PC On the File menu click Save As In the File name box enter a file name to which to save the program just created For example Connect bs2 Click Save Step 5 Connect the eb500 SER on the Board of Education to the PC 1 Apply power to the Board of Education board Power can be applied by attaching a 9 Volt battery or the AC Adapter provided by Parallax On the Run menu click Run The Connection Status LED see Figure 1 on page 13 on the eb500 SER module will turn on when a connection is established Additionally on the My Bluetooth Places window in the Additional Information column the text Connected will be shown while a connection exists bet
19. is the value that is transmitted when a remote device performs an Inquiry and then requests the device name If you look for local Bluetooth devices from a PC or PDA this is the value that will be displayed to the user Syntax set name value lt CR gt Parameters value A new device name This value can be up to 32 characters in length and may contain any valid ASCII character i An optional parameter used to persist the new setting when the module is powered down Example gt set name eb500 lt CR gt ACK lt CR gt gt Page 98 EmbeddedBlue 500 SER User Manual Command Get Set Passkey The set passkey command sets the passkey that is used when establishing a connection with security set to open The passkey is set to 0000 by default but this value should be changed to enhance security It is recommended that you use a passkey that is 8 to 16 digits long Syntax set passkey value lt CR gt Parameters value A new passkey value that is between 1 and 16 digits long i An optional parameter used to persist the new setting when the module is powered down Example gt set passkey MyNewKey lt CR gt ACK lt CR gt gt EmbeddedBlue 500 SER User Manual Page 99 Command Get Set Security Mode The set security mode command sets the module s current security mode setting When security is turned off the module will allow connections to be established by any Bluetooth device When security is set to open the re
20. returns the address of the local EmbeddedBlue device Syntax get address lt CR gt Returns The unique address of the local EmbeddedBlue device used to identify the module when making connections In Bluetooth terminology this is the Bluetooth Device Address Example gt get address lt CR gt ACK lt CR gt COS OC SA OO Ora Ce gt Page 80 EmbeddedBlue 500 SER User Manual Command Get Get Connectable Mode The get connectable mode command returns the connectable mode setting of the local EmbeddedBlue device Syntax get connectable lt CR gt Returns The current connectable mode setting of the local EmbeddedBlue device In Bluetooth terminology the returned value reflects the current setting for page scan on The device will accept connections off The device will NOT accept connections Example gt get connectable lt CR gt ACK lt CR gt on lt CR gt gt EmbeddedBlue 500 SER User Manual Page 81 Command Get Get Encrypt Mode The get encrypt mode command returns the current encryption setting of the module This setting controls whether the module encrypts transmitted data when security is set to either open or closed By default EmbeddedBlue modules use 56 bit encryption but 128 bit encryption is available upon request Contact A7 Engineering for more information about getting 128 bit encryption Syntax get encrypt lt CR gt Returns The current encrypt mode setting of the module on If secur
21. the Board of Education board serial port to the PC Open the BASIC Stamp Editor Enter the following program code into the editor replacing the Bluetooth device address with the device address of the Pocket PC which we obtained in the previous step This application is available in electronic form on the accompanying CD in the Samples folder in the file Connect bs2 STAMP BS2 Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAI T ACK CR Wait for the connection to be established and switch to data mode Wait ForConnecti on IF in5 0 THEN WaitForConnecti on HI GH 6 PAUSE 300 Wait for 20 seconds PAUSE 20000 EmbeddedBlue 500 SER User Manual Page 43 Establishing a Connection 7 Switch to Command Mode LOW 6 SERIN 0 84 WAIT CR gt Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 WAIT CR gt The BASIC Stamp application establishes a connection with the remote Bluetooth device waits twenty seconds switches back to command mode and then disconnects from the remote device On most Pocket PC 2003 devices the Bluetooth software closes the connection after a short period of time if there is not an application running on the device to receive the data over the connection Therefore after the twenty second wait the application checks to see if there is still a val
22. the dialogs of the wizard It is recommended that you use the default settings of the install wizard Step 2 eb600 RS232 Adapter Setup In this step we will attach an eb500 SER module to the eb600 PC Adapter and apply power to the device 1 Insert an eb500 SER module into the eb600 RS232 Adapter header assuring that Pin 1 of the eb500 SER module is inserted into Pin 1 of the header on the eb600 RS232 Adapter 2 Connect the eb600 RS232 Adapter to a serial port on the PC using the provided straight through serial cable 3 Apply power to the eb600 RS232 Adapter Step 3 eb500 SER Module Setup In this step we will configure the eb500 SER module to communicate with the EmbeddedBlue DFU Wizard If your eb500 SER module is already configured to communicate at 9600 baud you may proceed to the next step EmbeddedBlue 500 SER User Manual Page 105 Firmware Upgrade 3 Step 4 gt anon 11 12 Using a terminal emulator such as HyperTerminal establish a connection with the eb500 SER attached to the eb600 RS232 Adapter If you need assistance in the setup of HyperTerminal to communicate with your eb500 SER module please refer to the Establishing a Connection section of this manual under the topic Connecting a PC with an eb600 to a Board of Education Step 2 HyperTerminal Setup Set the baud rate of the eb500 SER module to 9600 baud by issuing the set baud rate command To set the baud rate type set bau
23. the first time that a remote device connects with the EmbeddedBlue module When security is set to closed only connections from trusted devices will be allowed and no new devices may become trusted Closed security is the most restrictive setting and therefore the most secure The last element of Bluetooth security is confidentiality Once a link with a trusted device has been established it may be important to know that the data being transmitted cannot be intercepted by a third party All transmitted data can be encrypted by configuring the encrypt setting to on This only has an effect when security is set to either open or closed The EmbeddedBlue module supports 56 bit encryption by default but 128 bit encryption is available Due to export restrictions to certain countries firmware supporting 128 bit encryption is only available with proper approval from A7 Engineering EmbeddedBlue 500 SER User Manual Page 5 Bluetooth Overview This page intentionally left blank Page 6 EmbeddedBlue 500 SER User Manual The Basics The Basics Most of the complexity of working with Bluetooth has been encapsulated in the EmbeddedBlue module in order to make it easier to use The specific application profile that is supported is SPP or the Serial Port Profile This is the most popular and convenient protocol for many embedded applications of Bluetooth since it emulates a simple serial port link between devices Once the connection is s
24. the passkey found in the documentation enter 0000 into the edit field and click Next This will establish a connection from the PC to the eb500 SER on the Board of Education and associate this connection with a specific COM port Please note both the Outgoing and Incoming COM ports shown The Microsoft Bluetooth software associates a specific COM port for a connection from the PC to an eb500 SER Applications such as HyperTerminal use this COM port to establish a connection and communicate with an eb500 SER from the PC Remember this COM port is used to establish a connection from the PC to the eb500 SER A different COM port is used when a connection is established from the eb500 SER to the PC Click Finish This will complete the wizard and close the Add Bluetooth Device Wizard Step 4 HyperTerminal Setup ote SO OO WE CH In this step we will setup the Windows HyperTerminal application to establish a connection with the eb500 SER on the Board of Education Open HyperTerminal This will display the Connection Description dialog In the Name box type the name of your connection For example eb500 SER BOE Click OK This will display the Connect To dialog In the Connect using dropdown select the serial port to which the Microsoft Bluetooth software associated with the connection from the PC to the eb500 SER on the Board of Education The COM port associated with the connection was discovered in the previous step C
25. to give the module enough time to make the change Wait ForConnecti on IF in5 0 THEN WaitForConnecti on HI GH 6 PAUSE 300 DEBUG Connection established CR SEROUT 1 84 This string is sent in data mode CR Switch to Command Mode LOW 6 SERIN 0 84 WAI T CR gt DEBUG In Command Mode CR Get local eb500 Bluetooth Address SEROUT 1 84 get address CR SERIN 0 84 WAI T ACK CR Read the local address fromthe get command SERIN 0 84 STR szData 17 SERIN 0 84 WAIT CR gt szData 17 0 DEBUG Local eb500 address STR szData 17 CR Return to Data Mode HI GH 6 PAUSE 300 SEROUT 1 84 My eb500 address is STR szData CR Switch to Command Mode LOW 6 SERIN 0 84 WAI T CR gt DEBUG In Command Mode CR Disconnect from remote device SEROUT 1 84 dis CR SERIN 0 84 WAIT CR gt DEBUG Disconnected CR Page 12 EmbeddedBlue 500 SER User Manual Hardware Connections Hardware Connections The eb500 SER module is designed to interface with a 5V CMOS signal environment It supports a power supply of 5 12V and can be connected directly to boards supporting the Parallax AppMod header When inserting the eb500 SER module into any of the supported Parallax boards it is important that Pin 1 of the eb500 SER module marked with a white dot and a square Figure 1 is inserted into the VSS pin of the AppMod header on the Parallax boa
26. to on and that security is set either to off or open In closed security mode only devices that have already established a trusted relationship will be allowed to connect When try to connect from an EmbeddedBlue device with 1 0 firmware to one with 2 0 firmware the connection attempt times out and then fails with Error 2 Why Version 1 0 firmware did not support passkey security and trusted relationships which is enabled as the default in version 2 0 firmware To connect from a version 1 0 device you will need to disable security on the version 2 0 device with the set security off command am transmitting large packets of data between two Parallax BASIC Stamp Modules using two eb500 SER s Now and then notice that some data seems to be lost What is going on Bluetooth is a reliable point to point protocol much like TCP IP If transmitted data is lost or corrupted over the air it will automatically and seamlessly be retransmitted As long as the eb500 SER status line tells you that there is a valid connection you can be confident that all data will be delivered properly The most likely cause of this data loss involves the way that serial data is handled in the BASIC Stamp application The BASIC Stamp devices implement a UART in software and therefore will miss data that arrives while not executing a SERIN command Refer to the BASIC Stamp User s Guide for more details used the set visible command to make the eb500 SER modu
27. within the BASIC Stamp Editor Enter the following program code into the editor replacing the device Bluetooth address with the device address obtained from the Hardware tab of the Device Properties section of the Bluetooth Configuration dialog on the PC This application is available in electronic form on the accompanying CD in the Samples folder in the file HelloWorld bs2 Page 58 EmbeddedBlue 500 SER User Manual Communications 33 34 STAMP BS2 nCount VAR BYTE Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch into data mode When switching into data mode a 300ms timeout is required to give the module enough time to make the change Wait ForConnecti on IF in5 0 THEN WaitForConnecti on HI GH 6 PAUSE 300 DEBUG Connection established CR Send Hello World ten times FOR nCount 1 to 10 SEROUT 1 84 Hello World CR PAUSE 1000 NEXT Switch to Command Mode LOW 6 SERIN 0 84 WAI T CR gt Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 wait CR gt DEBUG Disconnected CR The BASIC Stamp application establishes a Bluetooth connection with the PC transmits Hello World ten times switches back to command mode and then disconnects from the remote device Th
28. 00 SER 3 Click OK This will display the Connect To dialog 4 In the Connect using dropdown select the serial port to which you have connected the eb600 interface board EmbeddedBlue 500 SER User Manual Page 7 The Basics Se NS CH 12 14 15 16 17 18 19 20 21 22 Click OK This will display the properties dialog In the Bits per second dropdown select 9600 In the Data bits dropdown select 8 In the Parity dropdown select None In the Stop bits dropdown select 1 In the Flow control dropdown select None Click OK This will establish a connection to the serial port assuming that no other devices are using the serial port If another device is using the serial port disconnect the other device using the associated application or choose a different serial port to connect the eb500 SER On the Call menu click Disconnect This will disconnect the connection just established so that we can modify the connection properties as follows On the File menu click Properties This will display the properties dialog On the Settings tab click ASCII Setup This will display the ASCII Setup dialog Check the Send line ends with line feeds checkbox Check the Echo typed characters locally checkbox Check the Append line feeds to incoming line ends checkbox Check the Wrap lines that exceed terminal width checkbox Click OK This will return to the properties dialog Click
29. AppMod compatible 20 pin 0 1 header Antenna Internal surface mount Bluetooth Support Version 1 2 compliant with profiles GAP SDP and SPP Firmware Upgradeable via PC application with eb600 adapter Table 2 eb500 SER Operating Parameters EmbeddedBlue 500 SER User Manual Page 111 Technical Specifications Dimensions The dimensions of the eb500 SER are shown below in Table 3 Please reference Figure 18 to locate the referenced dimension on the eb500 SER C D n gp pp qu3 q Di 3 c h E lt wo Hua ze MAM MADE IN USA 02003 Figure 18 eb500 SER Dimensions Dimension inches mm A 2 75 69 85 B 2 40 60 96 C 1 30 33 02 D 1 60 40 64 E 0 10 2 54 F 0 125 3 20 Table 3 eb500 SER Dimensions Page 112 EmbeddedBlue 500 SER User Manual Technical Specifications Pinout The eb500 SER module features a 20 pin connector with 0 1 spacing for direct connection to a Parallax AppMod header Currently seven of the pins are in use The other pins are reserved for future use Pin Parallax Pin Function Description Usage CN 1 GND GND Ground Required CN 2 GND GND Ground Required CN1 3 PO TX Serial Transmit line from eb500 SER Required CN1 4 P1 RX Serial Receive line to eb500 SER Required Bluetooth connection status CNIS pa SAUS 0 not connected 1 connected SSES Command data mode toggle CN1 9 P6 Mode 0 com
30. As This will display the Save As dialog In the File name box enter a file name to which to save the program just created For example HelloWorld bs2 Click Save On the Run menu click Run This will display the Download Program dialog while downloading the program to the BASIC Stamp After the download is complete the BASIC Stamp application will transmit Hello World over the wireless link and HyperTerminal will display the received data Figure 12 on page 55 EmbeddedBlue 500 SER User Manual Page 63 Communications Communicating between a Pocket PC 2003 and a BOE In this exercise we will step through the process of communicating between a Pocket PC 2003 device with integrated Bluetooth and an eb500 SER module inserted into a Board of Education To perform this exercise as documented you will need a Pocket PC 2003 device a Board of Education and an eb500 SER module Depending on the specific Pocket PC model that you are using you may need to make minor adjustments to this exercise Step 1 Transmit Data from the Pocket PC to the BASIC Stamp 10 11 12 In this step we will create a BASIC Stamp application to read data from the eb500 SER and display the data in the BASIC Stamp Editor Debug window We will then download and run the application The application for the Pocket PC is too verbose to include in this manual therefore the application along with the source code is available on the accompanying C
31. Blue 500 SER User Manual Communications Step 3 Download the Applications to the Robots Dm Jm mF mb zz 9 In this step we will download the applications we just created to the respective robots Click the MonkeySee bs2 tab in the BASIC Stamp Editor Connect the SumoBoard board serial port to the PC Apply power to the SumoBoard board On the Run menu click Run On the Debug Terminal 1 dialog click Close Disconnect the power from the SumoBoard board Disconnect the SumoBoard board serial port from the PC Click the MonkeyDo bs2 tab in the BASIC Stamp Editor Connect the Board of Education board serial port to the PC 10 Apply power to the Board of Education board 11 On the Run menu click Run 12 Disconnect the Board of Education board serial port from the PC Step 4 Run the Monkey See Monkey Do Applications In this step we will run the Monkey See Monkey Do applications Apply power to the SumoBoard board Make the Boe Bot robot mimic the movements of the SumoBot by putting your hand in front of the SumoBot IR sensors As you move your hand left right and forward the SumoBot will follow your hand and the Boe Bot will mimic the same movements EmbeddedBlue 500 SER User Manual Page 51 Communications Communicating between a PC with an eb600 and a BOE In this exercise we will step through the process of communicating between a PC that has a an eb600 RS232 Adapter and an eb500 SER module in
32. D in the Samples folder To modify the Pocket PC application you will need eMbedded Visual C 4 0 with Service Pack 2 and the SDK for Windows Mobile 2003 based Pocket PCs Connect the Board of Education serial port to the PC Open the BASIC Stamp Editor Enter the following program code into the editor The application is available in electronic form on the accompanying CD in the Samples folder in the file ReceivePPC bs2 STAMP BS2 szData VAR BYTE 20 Wait for the eb500 radio to be ready PAUSE 1000 Main SERIN 0 84 STR szData 20 CR DEBUG STR szData CR GOTO Main On the File menu click Save As In the File name box enter a file name to which to save the program just created For example ReceivePPC bs2 Click Save Apply power to the Board of Education board On the Run menu click Run This will display the Download Progress dialog while downloading the program to the BASIC Stamp After the download is complete the Debug Terminal 1 dialog will be shown On the Pocket PC tap the Bluetooth icon in the system tray on the Today screen and select Bluetooth Settings This will display the Settings dialog Scroll to the right tap the Serial Port tab and note the Outbound COM port The Outbound COM port will be used in the Pocket PC application later in this step Download the PPCTxToEB Pocket PC application to the Pocket PC 2003 device Run the PPCTxToEB Application Figure 13 Page 64 EmbeddedBlue 500 S
33. ER User Manual Communications APPC Tx to EB E 4 119 Bluetooth Outbound COM Port Connect Hella World Hello World 123 1 2 3 4 5 6 7 8 9 ol le tab ajwfie r tly lulifolp t i cap alelgl loin dell Got z x c v b nfm 7 cufad x Ss te I Figure 13 PPCTxToEB Pocket PC Application 13 In the Bluetooth Outbound COM Port dropdown select the COM port number that matches the Bluetooth Outbound COM Port which we previously discovered 14 Tap the Connect button This will display the Bluetooth Browser dialog Figure 14 EF Bluetooth Console 7 w 5 15 ok Bluetooth Browser Select a Bluetooth device eb500 View 2 Ej Figure 14 Pocket PC Bluetooth Browser Dialog EmbeddedBlue 500 SER User Manual Page 65 Communications 15 16 17 Tap eb500 SER in the Bluetooth Browser dialog to establish a connection with the eb500 SER on the Board of Education If there are no devices shown in the Bluetooth Browser dialog tap the refresh icon to search for your Bluetooth device A connection will be established with the device and the PPCTxToEB application will be shown again Enter some text and tap Send This will transmit the ASCII text over the wireless link The BASIC Stamp application will then receive these characters and display them in the BASIC Stamp Editor Debug window You can also tap the Hello World button to have the application fill the edit box w
34. EmbeddedBlue eb500 SER User Manual March 26 2007 The information contained in this document is subject to change without notice This document is for informational purposes only A7 ENGINEERING INC AND ITS STAFF MAKE NO WARRANTIES OF ANY KIND FOR THE CORRECTNESS COMPLETENESS INTERPRETATION OR USE OF THE INFORMATION CONTAINED HEREIN It is the user s responsibility to comply with all applicable copyright laws A7 Engineering may have patents patent applications trademarks copyrights or other intellectual property rights covering subject matter in this document Except as expressly provided in any written agreement from A7 the furnishing of this document does not give you any license to these patents trademarks copyrights or other intellectual property Copyright 2007 A7 Engineering Inc All rights reserved A7 A7 Engineering bridging your world and EmbeddedBlue are either trademarks or registered trademarks of A7 Engineering Inc in the United States and or other countries Other brand product and company names may be the trademarks of their respective owners AT s products are not intended for use in life support or safety critical applications Table of Contents Table of Contents use ee i EE 1 Manual Conventions vic i veering uge dae ave a ENEE SEENEN SE Eed 1 Getting More Informations mses iieiaeie airia NE E E ENEE 2 BIUCtoothl OverVi Waaa aar ae er aea aar re a Se rinan en EENS EE 3 What
35. IN Code Request dialog since we have not connected to this device in the past Enter the Bluetooth PIN Code for the eb500 SER The factory default passkey is 0000 The eb500 SER module enables security by default so the devices must verify passkeys to establish a trusted relationship before they can communicate Note about terminology The DBT 120 software uses the term PIN Code as a substitute to the eb500 SER s Passkey These two terms refer to the same idea of using a secret code to establish a connection Step 5 Connect the eb500 SER on the Board of Education to the PC 1 Apply power to the Board of Education board Power can be applied by attaching a 9 Volt battery or the AC Adapter provided by Parallax On the Run menu click Run The Connection Status LED see Figure 1 on page 13 on the eb500 SER module will turn on when a connection is established Additionally on the My Bluetooth Places window in the Additional Information column the text Connected will be shown while a connection exists between the eb500 SER and the PC Page 34 EmbeddedBlue 500 SER User Manual Establishing a Connection Connecting a PC with XP SP2 to a Board of Education In this exercise we will step through the process of establishing a connection from a PC with a Bluetooth USB adapter that is running Windows XP SP2 to an eb500 SER module in pass through mode To perform this exercise as documented you will need a PC run
36. LSE GOSUB SetSecurityClosed ENDI F RETURN END The application waits for the Stamp I O line P13 to be pulled high as shown in Figure 17 Once line P13 is high the eb500 SER module goes into a more vulnerable mode it becomes visible and switches to open security enabling new trusted relationships When in open security mode the LED will blink By pulling P13 low again as shown in Figure 16 the eb500 SER will return to closed security mode and visibility will be turned off Vdd P13 470 Q P12 470 Q N LED Vss Figure 17 Open Security Mode Circuit Diagram 4 On the File menu click Save As In the File name box enter a file name to which to save the program just created For example Security bs2 6 Click Save Page 72 EmbeddedBlue 500 SER User Manual Security 7 Apply power to the Board of Education board 8 On the Run menu click Run This will display the Download Progress dialog while downloading the program to the BASIC Stamp A device that implements strong security is most vulnerable when allowing devices that have not yet been trusted to connect verify their passkey and become trusted There is nothing inherently unsafe about this process however it is a time when intruders have the most opportunity to compromise the device There are two main concerns when security is set to open The first is that if a weak passkey is set an intruder may be able to guess the passkey and therefore gain access to th
37. Manual Page 103 Command Get This page intentionally left blank Page 104 EmbeddedBlue 500 SER User Manual Firmware Upgrade Firmware Upgrade From time to time A7 Engineering provides new versions of firmware that provide enhancements to the product A7 Engineering also provides an EmbeddedBlue DFU utility which provides the mechanism to upgrade the firmware in the eb500 SER module The latest version of the EmbeddedBlue DFU utility and firmware for the eb500 SER module may be obtained from the A Engineering web site at www a7eng com Upgrading the eb500 SER Firmware This procedure will step you through the process of upgrading the firmware of the eb500 SER module To upgrade the firmware of your eb500 SER you will need an eb600 a PC running Windows XP with Service Pack 2 the EmbeddedBlue DFU utility and the firmware upgrade file a DFU file obtained from the A7 Engineering web site Step 1 Install the EmbeddedBlue DFU Utility In this step we will install the EmbeddedBlue DFU utility onto your PC To execute this step you must have previously downloaded the EmbeddedBlue DFU utility from the A7 Engineering web site If you have previously installed the EmbeddedBlue DFU utility you may proceed to the next step 1 Navigate to the folder where you downloaded the EmbeddedBlue DFU utility and double click on the EmbeddedBlueDFU exe 2 Step through the install wizard supplying the requested information on each of
38. PC device waits twenty seconds switches back to command mode and then disconnects from the PC On the File menu click Save As In the File name box enter a file name to which to save the program just created For example Connect bs2 7 Click Save Step 4 Establishing trust between the PC and the eb500 SER module In this step we will establish a trusted relationship between the PC and the eb500 SER module Verifying passkeys is required when performing the initial connection on two devices that require security If you have connected these two devices once with security enabled then this step should be skipped The actions in this step need to be performed only once for the eb500 SER After performing the actions in this step the connection security details will be stored on both the PC and the eb500 SER module Therefore future connections can be established to an eb500 SER by simply opening the associated COM port EmbeddedBlue 500 SER User Manual Page 33 Establishing a Connection Open the Bluetooth Devices dialog by double clicking on the Bluetooth tray icon This will display the Bluetooth Devices dialog Click Find Bluetooth Devices to locate the eb500 SER module connected to the Board of Education board Provided the eb500 SER on the Board of Education board is within range eb500 SER will be shown in the window Right click on the eb500 SER and click Connect A7 Serial Port This will bring up the Bluetooth P
39. R The D Link DBT 120 Bluetooth USB Adapter software must be fully installed prior to establishing a connection The PC settings shown in this exercise are based upon the software provided with the D Link DBT 120 Bluetooth USB Adapter Step 1 Transmit Data from the PC to the BASIC Stamp In this step we will create a BASIC Stamp application to read data from the eb500 SER and display the data in the BASIC Stamp Editor Debug window We will then download and run the application 1 Connect the Board of Education board serial port to the PC Open the BASIC Stamp Editor Enter the following program code into the editor This application is available in electronic form on the accompanying CD in the Samples folder in the file Receive bs2 STAMP BS2 bData VAR BYTE Wait for the eb500 radio to be ready PAUSE 1000 Main SERIN 0 84 STR bData 1 DEBUG STR bData 1l GOTO Main The application waits for an individual byte of data to arrive and then displays the byte in the debug window and then repeats this process 4 On the File menu click Save As In the File name box enter a file name to which to save the program just created For example Receive bs2 Click Save Apply power to the Board of Education board On the Run menu click Run This will display the Download Progress dialog while downloading the program to the BASIC Stamp After the download is complete the Debug Terminal 1 dialog will be shown Page 56 Embedde
40. Run This will display the Download Progress dialog while downloading the program to the BASIC Stamp After the download is complete the Debug Terminal 1 dialog will be shown 9 Establish a connection from the PC to the Board of Education Please see the section titled Connecting a PC with XP SP2 to a Board of Education for information on establishing a connection EmbeddedBlue 500 SER User Manual Page 61 Communications 10 Using HyperTerminal type a series of characters These characters will be transmitted over the wireless link read by the BASIC Stamp application and then displayed in the debug window Step 2 Transmit Data from the eb500 SER to the PC In this step we will create a BASIC Stamp application to transmit data from the eb500 SER to the PC where we will use HyperTerminal to display the data received 1 Open HyperTerminal on the port for inbound Bluetooth connections Please see the section titled Communicating between a PC with DBT 120 and a BOE for information on configuring HyperTerminal for the inbound Bluetooth port 2 Using the BASIC Stamp Editor on the File menu click New This will create a new project window within the BASIC Stamp Editor 3 Enter the following program code into the editor replacing the device Bluetooth address with the device address obtained from the Hardware tab of the Device Properties section of the Bluetooth Configuration dialog on the PC This application is available
41. Save Apply power to the Board of Education board On the Run menu click Run Establish a connection from the PC to the Board of Education Please see the section titled Connecting a PC with an eb600 to a Board of Education on page 25 for information on establishing the connection Using HyperTerminal type a series of characters These characters will be transmitted over the wireless link read by the BASIC Stamp application and then displayed in the debug window Figure 11 Page 52 EmbeddedBlue 500 SER User Manual Communications Local BT HyperTerminal File Edit view Call Transfer Help Com Port Baud Rate Parity De S3 09 e Wf d fee Data Bits Flow Control erg I DIRI RTS S RX DSR CTS gt Ist ACK 00 02 5B 0A AS AS ae DH 02 5b 0a a5 a5 this is a test application I can type whatever I want and it will be sent Connected 0 04 25 yT100 9600 8 N 1 SCROLL CAPS NUM coll Ceptue Macros j as Clear che Figure 11 HyperTerminal Input and Debug Output Step 2 Transmit Data from the BASIC Stamp to the PC In this step we will create a BASIC Stamp application to send data out the eb500 SER to the PC where we will use HyperTerminal to display the data received by the eb500 SER module attached to the eb600 on the PC 1 Reset the eb500 SER attached to the eb600 PC Adapter to place the eb500 SER into command mode To reset the eb500 SER attached to the eb600 PC Adapter disconnect the power wait a
42. This will establish a connection with the serial port On the Call menu click Disconnect This will disconnect the connection just established so that we can modify the connection properties in the following actions EmbeddedBlue 500 SER User Manual Page 25 Establishing a Connection 13 14 15 16 17 18 19 20 21 On the File menu click Properties This will display the Properties dialog On the Settings tab click ASCII Setup This will display the ASCII Setup dialog Check the Send line ends with line feeds checkbox Check the Echo typed characters locally checkbox Check the Append line feeds to incoming line ends checkbox Check the Wrap lines that exceed terminal width checkbox Click OK This will return to the Properties dialog Click OK On the Call menu click Call This will establish a connection with the serial port Step 3 Board of Education eb500 SER Setup 2 In this step we will attach an eb500 SER module to the Board of Education board and apply power to the device Insert an eb500 SER module into the AppMod header of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header Apply power to the Board of Education board Power can be applied by attaching a 9 Volt battery or the AC Adapter provided by Parallax Step 4 Establish a Connection In this step we will establish a connection between the PC
43. XP SP2 to a Board of Educaton 35 Connecting a Board of Education to a PC with XP GP 38 Connecting a Pocket PC 2003 device to a Board of Education 0 c ce cececeeeeeeeeeeeeeeteeeeetnieeeeetieeeerens 41 Connecting a Board of Education to a Pocket PC 2003 device sssseesesssrrsseerrsserrrssrtrrssrtrnssrrnssrees 43 e lu due E 47 Communicating between Two eb500 SER Modules A 47 Communicating between a PC with an eb600 and a DOE 52 Communicating between a PC with DBT 120 and a BOE 0 00 ec eeeeeeeeeneee ee tene eter teneeeeeeteeeereneeeeees 56 Communicating between a PC with XP SP2 and a BOE ee eeteee ee taeeeeetnneeeeeeneeeeees 61 Communicating between a Pocket PC 2003 and a BOE ee etteeeeeteeeeetieeeeetneeeeees 64 SO CUMIN sonia cece ache EE EEN 69 Strong Security on a Board of Education 69 COMMANG Set E 75 Command ELE 75 Command Error Handling in BASIC Stamp Applications nsesenneennnenseeeenenrrnnsreeetrnnrnnsrrrtrrnnrnnsnreereenn 76 Oale Ee E E A A EE A arava teak ae nates eRe aa alae 77 Delete Trusted Deyita iseer aeii i ENEE eege EEN Ei a EES 78 RISET IAE A EAA T A A O T E AE E EA 79 EEN lo KSEE ee E dE Eege Ee 80 Get Connectable Mode merei nee in ete ues ee deen reed eden ion eet lene 81 Get Encrypt Mode iwi acca ciel aude ae el etd a eine dee 82 Get Escape Character ugereegt i aie ieee adn ea Aere 83 Get Link TIM OUl eege Ee ee add ne ies eee AE oie 84 Get N men taor tsa tie a he ei ae add eet avail ae
44. ablish a trusted relationship between the PC and the eb500 SER module Verifying passkeys is required when performing the initial connection on two devices that require security If you have connected these two devices once with security enabled then this step should be skipped The actions in this step need to be performed only once for the ebS500 SER After performing the actions in this step the connection security details will be stored on both the PC and the eb500 SER module Therefore future connections can be established to an eb500 SER by simply opening the associated COM port 1 Open the Bluetooth Devices dialog by double clicking on the Bluetooth tray icon This will display the Bluetooth Devices dialog 2 Click Add to open the Add Bluetooth Device Wizard The Windows XP SP2 Bluetooth Software requires that devices are added before they can be used 3 Click My device is set up and ready to be found and then click Next to locate the eb500 SER module connected to the Board of Education board Provided the eb500 SER connected to the Board of Education board is within range eb500 SER will be shown in the window EmbeddedBlue 500 SER User Manual Page 35 Establishing a Connection 4 Select eb500 SER and click Next The passkey selection dialog will be shown The eb500 SER module enables security by default so the devices must verify passkeys to establish a trusted relationship before they can communicate Select Use
45. andard Bluetooth v1 1 or v1 2 device Devices can be dynamically discovered and connected in an ad hoc manner Manual Conventions Below is a list of typographical conventions used in this manual Text in this font e Is used to show data that is sent to the eb500 SER e Inside a gray box is used to show data that is sent from the eb500 SER Text in this font e Its used to show source code In the command set section of this manual e Required parameters and placeholders appear in standard lowercase type e Placeholders appear in italics For example if address shows up in a syntax line the actual address of the device must be entered e Required parameter options are separated by a vertical bar e Optional parameters are enclosed in brackets EmbeddedBlue 500 SER User Manual Page 1 Introduction Getting More Information The Bluetooth website www bluetooth com contains the Bluetooth specification profiles and other documents relevant to Bluetooth General information regarding the eb500 SER module EmbeddedBlue and other Bluetooth products from A7 Engineering can be found on the A7 website at www a7eng com Parallax provides technical support through email support parallax com an online group http forums parallax com and by telephone It is recommended that you use email as the first line of support because common questions can be answered quickly and in greater detail in this manner Questions that
46. anies have put a lot of effort into coexistence solutions for these two standards and are very committed to ensuring that these devices work well together While 802 11b was designed solely for data communications Bluetooth takes things quite a bit further A key component of the Bluetooth standard is its notification and service discovery mechanism This allows Bluetooth devices to identify themselves and describe their capabilities to other Bluetooth devices in the area For instance the Dial Up Networking profile defines how discoverability can be used to locate and connect to other devices such as a cellular phone that supports the same profile The profile then describes how to dial the phone connect to either analog or data services and control the connection Page 4 EmbeddedBlue 500 SER User Manual Bluetooth Overview seamlessly This combination of dynamic discovery of services and built in definitions of the services goes well beyond anything offered by the 802 11b protocol Security Bluetooth security is defined by three main elements availability access and confidentiality It is important to distinguish between these elements because Bluetooth security is also highly configurable so that it can meet the needs of devices in many different scenarios An understanding of the basics will provide the knowledge that you need to choose a security strategy for your device The first important element of Bluetooth security is availa
47. ation 1 On the File menu click New This will create a new project window within the BASIC Stamp Editor 2 Enter the following program code into the editor This application is available in electronic form on the accompanying CD in the Samples folder in the file MonkeyDo bs2 STAMP BS2 hese ee 1 0 Deiinitlonsl e ee eee ee ee ee eee LMot or CON 15 RMot or CON 14 BEER Canet oniel ee LFwdFast CON 1000 LRevFast CON 500 RFwdFast CON 500 EmbeddedBlue 500 SER User Manual Page 49 Communications RRevFast CON 1000 EE Variablesl eee eee eee ee ee eee eee CmdData VAR BYTE EE Il nitialization eee eee ee ee ee eee Initialize Wait for the eb500 radio to be ready PAUSE 1000 Set the initial state to hold CmdData 3 EE Main Codel e eee eee eee eee eee eee eee Main Wait for a command SERIN 0 84 DEC1 CmdData Process the command BRANCH CmdData Hold Turn_Right Turn_left Move Fwd Tf the command was invalid just loop again GOTO Main Move Fwd PULSOUT LMotor LFwdFast PULSOUT RMotor RFwdFast GOTO Main Turn_Ri ght PULSOUT Motor LFwdFast PULSOUT RMotor RRevFast GOTO Main Turn_Left PULSOUT LMotor LRevFast PULSOUT RMotor RFwdFast GOTO Main Hold GOTO Main On the File menu click Save As In the File name box enter a file name to which to save the program just created For example MonkeyDo bs2 5 Click Save Page 50 Embedded
48. ation The Connection Status LED Figure 1 on the eb500 SER module will turn on when a connection is established By default the eb500 SER is in data mode On the Call menu click Disconnect This will close the connection with the eb500 SER on the Board of Education EmbeddedBlue 500 SER User Manual Page 37 Establishing a Connection Connecting a Board of Education to a PC with XP SP2 In this exercise we will step through the process of establishing a connection from an eb500 SER module inserted into a Board of Education BOE to a PC that is running Windows XP SP2 and has a Bluetooth USB Adapter To perform this exercise as documented you will need a PC running Windows XP SP2 a Bluetooth USB Adapter a Parallax Basic Stamp module a Parallax Board of Education and an eb500 SER module If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise On the PC the Microsoft Bluetooth Software associates a COM port for establishing a connection from the PC to a remote Bluetooth device and a separate COM port for connections that are established from a remote Bluetooth device to the PC This exercise demonstrates establishing a connection from a remote eb500 SER to the PC When a remote Bluetooth device establishes a connection with the PC the connection is established with the Bluetooth USB Adapter and the software running on the PC To gain access to the data an application such a
49. bility If a device cannot be seen or connected with it is obviously quite secure Bluetooth defines both of these features as part of the security model and they are exposed by the EmbeddedBlue device through the set visible and set connectable commands This is a very coarse level of control but it is also quite effective and can be used in combination with other security features The second and most complex element of Bluetooth security is access control This type of security is only relevant when the module is connectable and is designed to provide protection in this case The general idea is that remote devices must become trusted before they will be allowed to connect and communicate with the EmbeddedBlue module In order to become trusted a remote device must present a passkey that matches the stored local passkey This only needs to be done once as both devices will remember their trusted status and allow future connections with that specific device without exchanging passkeys again The EmbeddedBlue module uses the set security command to configure access control There are three possible settings for security off open and closed When security is turned off connection attempts will be allowed from all remote devices When security is set to open connections are only allowed from trusted devices but new devices can become trusted by presenting the correct passkey Forming a trusted relationship is carried out automatically in this mode
50. blished with the DBT 120 Bluetooth USB Adapter software running on the PC To gain access to the data an application such as HyperTerminal must open the COM port associated with the connection established from the remote device In the Communications section we will step through this process The D Link DBT 120 Bluetooth USB Adapter software must be fully installed prior to establishing a connection The PC settings shown in this exercise are based upon the software provided with the D Link DBT 120 Bluetooth USB Adapter Step 1 DBT 120 Setup In this step we will attach the DBT 120 USB Adapter to the PC The software for the DBT 120 should already be setup 1 Connect the DBT 120 to an available USB port on the PC following the instructions provided with the DBT 120 Bluetooth USB Adapter Step 2 Obtain the Bluetooth Address of the PC In this step we will obtain the Bluetooth address of the DBT 120 USB Adapter attached to the PC 1 Open My Bluetooth Places by double clicking on the desktop icon 2 Right click on My Device and click Properties This will display the Bluetooth Configuration dialog 3 Select the Hardware tab and note the Device Address shown in the Device Properties section of the dialog The device address will be used in the BASIC Stamp application developed in the next step 4 Click Cancel This will close the Bluetooth Configuration dialog Step 3 Write a BASIC Stamp Application to Connect to the PC In this st
51. chnical Specifications iieiea eea aaaea aa raa eaaa EEN 111 Operating Parameters aranma re tie A AE A a Meet ded a A er aa 111 Dimensions EE 112 POUE a E a A A a EEE ay 113 Frequently Asked Questions sssnsssssunnseunreunreunnnunnnunnnuunnnunnnunnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn anneanne nnmnnn anneanne 115 Contact Information esch eebe EESEE neinean anieri aene ieee aian eege EA Eain AE EA Eai ai aa 117 Page ii EmbeddedBlue 500 SER User Manual Table of Figures Table of Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 BDS00 SER EEN 13 Basie otamp Activity BOard EE 14 Board of Education Been teg teen Bees Ga el Se ee ee 15 BS2p Demo Boarder teste ede eet leaned elle diese elas 16 BS2p24 40 Demo Board iva ierg heEEE NEEN n 17 Javelin Stamp Demo Board 18 SUMOB OAM Gs EE 19 Super Carrier leegen deer ee Sege 20 eb500 SER Bluetooth Address Output 22 Pocket PC Bluetooth Authorization Request Dialog 45 HyperTerminal Input and Debug Output 53 HyperTerminal Output Hello World 55 PPCTXxToEB Pocket PC Applcaton nennt 65 Pocket PC Bluetooth Browser Dialog 65 PPCRxFromEB Pocket PC Application c cccccceeceeeeeceececeeeeeseeecaeeeeeeeeesecsencaeeeeeeeeeseeseaeess 68 Closed Security Mode Circuit Diagram cece terete etter seer tien
52. ck the firmware version etc All commands are sent using visible ASCII characters 123 is 3 bytes 123 Upon the successful transmission of a command the ACK string will be returned If there is a problem in the syntax of the transmission then a NAK string is returned After either the ACK or NAK a carriage return lt CR gt character is returned When a prompt lt CR gt followed by a gt is returned it means that the eb500 SER radio is in the idle state and is waiting for another command White space is used to separate arguments of the command and a carriage return lt CR gt ASCII 13 is used to mark the end of the command Data Mode Once the eb500 SER radio is connected to another Bluetooth device the eb500 SER automatically switches into data mode All data transmitted while in this mode will be sent to the remote device and therefore NO further commands can be sent until the eb500 SER radio is disconnected or switched back to command mode by use of the mode control UO line or the Switch to Command Mode sequence The connection status line of the eb500 SER module can be monitored to determine if there is an active connection Additionally whenever a connection is present the Connection Status LED on the eb500 SER module will be on UO Lines The eb500 SER module features a 20 pin header for connecting to the Parallax AppMod header A full device pinout is available in the Technical Specifications section of this manual
53. d 9600 at the gt prompt and press the return key Example gt set baud 9600 ACK E Close the terminal emulator Run the EmbeddedBlue DFU Wizard In this step we will step through the EmbeddedBlue DFU Wizard and upgrade the firmware of the eb500 SER module Launch the EmbeddedBlue DFU Wizard From the Start menu select All Programs then A7 Engineering then EmbeddedBlue DFU The first page of the wizard is the introduction page click Next to continue On the Connection Type dialog select COM port RS 232 Click Next The wizard will now search for available COM ports Select the COM port to which the eb600 RS232 Adapter is connected Click Next On the Upgrade File dialog click Browse to navigate to the file containing the firmware upgrade On the Select EmbeddedBlue Firmware File dialog select the file containing the firmware upgrade a DFU file Click Select On the Upgrade File dialog click Next This will display the Ready to Upgrade dialog Review the information shown on the Ready to Upgrade dialog Click Next This will display the Upgrade in Progress dialog and the upgrade process will begin When the upgrade is complete the Successful Upgrade dialog will appear vou must not stop the upgrade process or remove power from the eb500 SER module until the upgrade is complete If the upgrade process is interrupted the eb500 SER module may become non functional Page 106 EmbeddedBlue
54. d to each other because they are both capable of providing networking on the 2 4GHz consumer frequency band Many of the differences between these two technologies can be traced to the fact that networking was not the primary design goal for Bluetooth as it was for Wi Fi With a greater transmission range about 100 meters indoors and larger bandwidth about 11Mbps Wi Fi is typically the better choice for wireless LANs and Internet connectivity Bluetooth on the other hand was designed for driverless cordless connectivity between devices Because Bluetooth transmitters are smaller in size have lower power demands a more limited range 10 100 meters and narrow bandwidth 1Mbps they are better suited for use in embedded and mobile devices that exchange smaller amounts of information while conserving power and space While their functionality does not compete directly 802 11b and Bluetooth do compete for the airwaves Since they both operate on the 2 4GHz band of the ISM radio spectrum these two wireless technologies may interfere with each other Bluetooth devices minimize interference by employing a frequency hopping spread spectrum scheme that changes the frequency used about 1600 times per second Unfortunately since Wi Fi uses a direct sequence spread spectrum method this also means that Bluetooth transmissions will collide with those of any nearby 802 11b devices and slow Wi Fi data transmission rates The Bluetooth SIG and its member comp
55. dBlue 500 SER User Manual Communications 9 10 Establish a connection from the PC to the Board of Education Please see the section titled Connecting a PC with a DBT 120 to a Board of Education on page 28 for information on establishing a connection Using HyperTerminal type a series of characters These characters will be transmitted over the wireless link read by the BASIC Stamp application and then displayed in the debug window Step 2 Transmit Data from the BASIC Stamp to the PC 11 12 In this step we will create a BASIC Stamp application to send data out the eb500 SER to the PC where we will use HyperTerminal to display the data received by the DBT 120 Bluetooth USB Adapter Reset the eb500 SER attached to the Board of Education board to place the eb500 SER into command mode To reset the eb500 SER attached to the Board of Education board disconnect the power wait a couple of seconds and then reconnect the power The Reset push button on the Board of Education board will NOT reset the eb500 SER Close HyperTerminal Close the BASIC Stamp Editor Debug dialog Open My Bluetooth Places by double clicking on the desktop icon This will display the My Bluetooth Places dialog Click View or modify configuration This will display the Bluetooth Configuration dialog Select the Local Services tab and note the COM Port for the Bluetooth Serial Port service You may have to scroll to the right to see the COM P
56. devices to the PC Click OK This will display the Properties dialog In the Bits per second dropdown select 9600 In the Data bits dropdown select 8 In the Parity dropdown select None In the Stop bits dropdown select 1 In the Flow control dropdown select None Click OK This will establish a connection with the DBT 120 Bluetooth USB Adapter software This does NOT establish a connection with the remote Bluetooth device In the next steps we will write a BASIC Stamp application to run on the Board of Education Board which will connect the eb500 SER to the DBT 120 and provide the serial connection over Bluetooth On the Call menu click Disconnect This will disconnect the connection just established so that we can modify the connection properties in the following actions On the File menu click Properties This will display the Properties dialog On the Settings tab click ASCII Setup This will display the ASCII Setup dialog Check the Send line ends with line feeds checkbox Check the Echo typed characters locally checkbox Check the Append line feeds to incoming line ends checkbox Check the Wrap lines that exceed terminal width checkbox Click OK This will return to the Properties dialog Click OK On the Call menu click Call This will establish a connection with the DBT 120 Bluetooth USB Adapter Software Using the BASIC Stamp Editor on the File menu click New This will create a new project window
57. e debug window Figure 9 On the Debug Terminal 1 dialog click Close Disconnect the power from the Board of Education board Disconnect the Board of Education board serial port from the PC y Debug Terminal 1 Com Port Baud Rate Parity zt z 3600 z None D Data Bits Flow Control 1m I DIR SP ATS Be Jor E Rx DSR CTS Capture Macros Pause Clear Figure 9 eb500 SER Bluetooth Address Output Page 22 EmbeddedBlue 500 SER User Manual Establishing a Connection Step 4 Connect the eb500 SER on the SumoBoard to the eb500 SER on the BOE In this step we will develop and run a BASIC Stamp application on the SumoBoard to establish a connection with the Board of Education 1 Using the BASIC Stamp Editor on the File menu click New This will create a new project window within the BASIC Stamp Editor 2 Enter the following program code into the editor replacing the Bluetooth device address with the device address of the eb500 SER on the Board of Education board which we obtained in the previous step This application is available in electronic form on the accompanying CD in the Samples folder in the file Connect bs2 STAMP BS2 Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch to data mode Wait ForConnecti on IF in5 0
58. e 500 SER User Manual Page 101 Command Get Switch to Command Mode The switch to command mode command instructs the EmbeddedBlue module to enter Command Mode Syntax lt 2 second pause gt esc sequence lt 2 second pause gt Parameters esc sequence Three consecutive instances of the escape character The factory default escape character is the plus sign A different escape character can be set by using the Set Escape Character command Example gt con 00 0C 84 00 07 D7 lt CR gt Command Mode ACK lt CR gt gt This text is sent in data mode lt CR gt Data Mode lt 2 second pause gt lt 2 second pause gt lt CR gt gt get addr lt CR gt ACK lt CR gt Command Mode OOSOCes4 2003 OS CS gt ret lt CR gt ACK lt CR gt Data Mode gt This text is sent in data mode lt CR gt lt 2 second pause gt lt 2 second pause gt lt CR gt Command Bdis lt CR gt Mode ACK lt CR gt E Page 102 EmbeddedBlue 500 SER User Manual Command Get Version The version command returns the current firmware version of the EmbeddedBlue module Syntax ver all lt CR gt Parameters all An optional parameter used to return the build number model number serial number and manufacturer Example gt ver all lt CR gt ACK lt CR gt Firmware Version 2 0 lt CR gt Firmware Build 247 lt CR gt Model Number eb500 lt CR gt Serial Number 1008 lt CR gt Manufacturer A7 Engineering lt CR gt gt EmbeddedBlue 500 SER User
59. e Forum htto Awww a7eng com support forum forum htm Sales Email sales a7eng com A7 Engineering Inc 12127 Kirkham Road Suite 101 Poway CA 92064 Tel 858 391 1960 Fax 619 956 0082 EmbeddedBlue 500 SER User Manual Page 117
60. e device This can be largely avoided however by first choosing a strong passkey and second by only placing the device into open security mode temporarily in a safe environment and then returning to closed security mode The second concern is that an intruder pulls sensitive information out of the air that either is directly useful or allows trusted access to the device This is only possible during a small window of time when an untrusted device is first connected and becomes trusted so this process should be carried out in a safe environment if possible Once a device is considered trusted no information that could be used by an intruder to gain access to the device is transmitted over the air If encryption is enabled as well then no information including the data sent over the air is vulnerable to an intruder By default EmbeddedBlue modules use 56 bit encryption for all data when enabled Step 3 Connecting a PC with XP SP2 to a BOE in open security In this step we will run the application we wrote in the previous section which initially runs in closed security mode with visibility set to off Stamp I O line P13 can be pulled high to change into open security mode with visibility on At this point connect your PC with XP SP2 to the remote Bluetooth device and become trusted After returning to closed security mode with visibility turned off only trusted devices the PC can connect to the remote Bluetooth device 1 Disconnect the
61. e ee teeeeeniieeeeeteeeeeetnieeeetaa 70 Open Security Mode Circuit Diagram cccceceeeee teeter aa nar A NAE AEAEE REE KE aat 72 b500 SER Dimensions KREE ianei NA NAE E AinK OEA ANNANN E ENEE KEEN ENEE EEN 112 EmbeddedBlue 500 SER User Manual Page iii Table of Tables Table of Tables Table 1 eb500 SER Error Codes sssossneesnnnrensseesttrntttetttttt tnnt tnnttet EEA EAAS EESEEEAEEES AEE EEEAEEAEN Eet EEEn Raen ennnen 109 Table 2 eb500 SER Operating Parameters ccccccececeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeaeeeseeeaeeeseneaeeeseenaeeeeteaeees 111 Table 3 eb500 SER Dimmensions siitiaina ai e e a e a a aer aaia 112 Table 4 eb500 SER Pinout Description 113 Page iv EmbeddedBlue 500 SER User Manual Introduction Introduction Congratulations on your purchase of the EmbeddedBlue eb500 SER serial Bluetooth module The eb500 SER is an add on component to the Parallax BS2 BS2e BS2sx BS2p BS2pe and Javelin Stamp microcontroller modules enabling wireless communications with other Bluetooth devices including cellular phones handheld computers PCs and other serial port adapters Hobbyists developers and OEMs can take advantage of advanced wireless connectivity with this easy to use module The eb500 SER module provides a point to point connection much like a standard serial cable Connections are made dynamically and can be established between two eb500 SER modules or an eb500 SER module and a st
62. e first call to SEROUT is used when the eb500 SER is in command mode and instructs the eb500 SER to establish a connection with the device specified Once a connection is established the eb500 SER is in data mode which causes further calls to SEROUT to be sent to the remote device On the File menu click Save As This will display the Save As dialog In the File name box enter a file name to which to save the program just created For example HelloWorld bs2 EmbeddedBlue 500 SER User Manual Page 59 Communications 35 Click Save 36 On the Run menu click Run This will display the Download Program dialog while downloading the program to the BASIC Stamp After the download is complete the BASIC Stamp application will transmit Hello World over the wireless link and HyperTerminal will display the received data Figure 12 on page 55 Page 60 EmbeddedBlue 500 SER User Manual Communications Communicating between a PC with XP SP2 and a BOE In this exercise we will step through the process of communicating between a PC that has a Bluetooth USB adapter that is running Windows XP SP2 and an eb500 SER module connected to a Board of Education To perform this exercise as documented you will need a PC running Windows XP SP2 a Bluetooth USB adapter a Board of Education BOE and an eb500 SER module If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise On
63. elect Explore a Bluetooth device and tap Next This will display the next page of the Connection Wizard Tap in the Device box This will display the Connection Wizard Bluetooth Browser dialog containing a list of found devices Tap eb500 SER This will display the next page of the Connection Wizard In the Service Selection box select A7 Serial Port Tap Next This will create a shortcut for the service Tap Finish This will display the Bluetooth Manager dialog with the shortcut created in the window eb500 SER A7 Serial Port Establish a Connection In this step we will establish a connection from the Pocket PC to the eb500 SER Tap and hold the shortcut created in the previous step eb500 SER A7 Serial Port EmbeddedBlue 500 SER User Manual Page 41 Establishing a Connection 2 Select Connect This will establish a connection with the eb500 SER on the Board of Education The Connection Status LED see Figure 1 on page 13 on the eb500 SER module will turn on when a connection is established 3 Tap Active Connections This will display the Bluetooth Manager Active Connections page showing the status of your active Bluetooth connections 4 Tap My Shortcuts Tap and hold the shortcut created in the previous step eb500 SER A7 Serial Port Select Disconnect This will close the connection with the eb500 SER on the Board of Education board The Connection Status LED on the eb500 SER module will turn off Page 42
64. ep we will attach an eb500 SER module to the Board of Education board and develop a BASIC Stamp application to establish a connection with the PC 1 Insert an eb500 SER module into the AppMod connector of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header Connect the Board of Education board serial port to the PC Open the BASIC Stamp Editor Page 32 EmbeddedBlue 500 SER User Manual Establishing a Connection 4 Enter the following program code into the editor replacing the Bluetooth device address with the device address of the PC which we obtained from the Hardware tab of the Device Properties section of the Bluetooth Configuration dialog in the previous step This application is available in electronic form on the accompanying CD in the Samples folder in the file Connect bs2 STAMP BS2 Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch to data mode Wait ForConnecti on IF in5 0 THEN WaitForConnecti on HIGH 6 PAUSE 300 Wait for 20 seconds PAUSE 20000 Switch to Command Mode LOW 6 SERIN 0 84 WAI T CR gt Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 WAIT CR gt The BASIC Stamp application establishes a connection with the
65. ers factory Resets all settings to factory defaults Example gt rst factory lt CR gt ACK lt CR gt gt EmbeddedBlue 500 SER User Manual Page 91 Command Get Return to Data Mode The return to data mode command instructs the module to enter Data Mode when there is an active connection Syntax ret lt CR gt Example gt ret lt CR gt ACK lt CR gt gt Page 92 EmbeddedBlue 500 SER User Manual Command Get Set Baud Rate The set baud rate command sets the baud rate for communications with the local EmbeddedBlue module Syntax set baud rate lt CR gt Parameters rate The baud rate value Valid baud rates are 9600 default 19200 38400 57600 115200 and 230400 Once the baud rate has been set applications such as HyperTerminal must also be configured to the same baud rate to continue communicating with the eb500 SER An optional parameter used to persist the new setting when the module is powered down Example gt set baud 19200 lt CR gt ACK lt CR gt gt EmbeddedBlue 500 SER User Manual Page 93 Command Get Set Connectable Mode The set connectable mode command provides control over whether the local EmbeddedBlue module will accept connections from other Bluetooth devices In Bluetooth terminology this command controls the setting for page scan Syntax set connectable on off lt CR gt Parameters on Configures the module so that other Bluetooth devices may establish a
66. establishing a connection from a PC that has a D Link DBT 120 Bluetooth USB Adapter to an eb500 SER module inserted into a Board of Education BOE board To perform this exercise as documented you will need a D Link DBT 120 a Board of Education board and an eb500 SER module If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise On the PC the DBT 120 Bluetooth Software associates a COM port for establishing a connection from the PC to a remote Bluetooth device and a separate COM port for connections that are established from a remote Bluetooth device to the PC This exercise demonstrates establishing a connection from the PC to a remote eb500 SER The next exercise will demonstrate establishing a connection from a remote eb500 SER to the PC The D Link DBT 120 Bluetooth USB Adapter software must be fully installed prior to establishing a connection The PC settings shown in this exercise are based upon the software provided with the D Link DBT 120 Bluetooth USB Adapter Step 1 DBT 120 Setup In this step we will attach the DBT 120 USB Adapter to the PC The software for the DBT 120 should already be setup 1 Connect the DBT 120 to an available USB port on the PC following the instructions provided with the DBT 120 Bluetooth USB Adapter Step 2 Board of Education eb500 SER Setup In this step we will attach an eb500 SER module to the Board of Education board and apply powe
67. et up it is a simple matter to communicate between the endpoints of that connection using familiar and well supported programming constructs as will be shown by the numerous programming examples throughout this manual PC Prototyping One of the best ways to learn about anything new is through hands on experimentation To make this easy with the eb500 SER the following sample will enable you to communicate directly from your PC to the radio module To perform this exercise as documented you will need one eb600 RS232 interface board one eb500 SER module and a PC with an available serial port Step 1 Insert the eb500 SER Module into the eb600 RS232 interface board In this step we will attach an eb500 SER module to the eb600 RS232 interface board and apply power to the device 1 Insert an eb500 SER module into the eb600 PC Adapter header assuring that Pin 1 of the eb500 SER module is inserted into Pin 1 of the header on the eb600 PC Adapter 2 Connect the eb600 PC Adapter to a serial port on the PC using the provided straight through serial cable The PC serial port must be available for HyperTerminal use 3 Apply power to the eb600 PC Adapier Step 2 HyperTerminal Setup In this step we will setup the Windows HyperTerminal application to establish a connection with the eb500 SER module 1 Open HyperTerminal This will display the Connection Description dialog 2 Inthe Name box type the name of your connection e g eo5
68. f the other supported Parallax robots you may need to make adjustments to this exercise Step 1 Create a Monkey See Application for the SumoBot In this step we will create a BASIC Stamp application that will use the infrared sensors of the SumoBot to follow an object and transmit its movements to a remote eb500 SER 1 Open the BASIC Stamp Editor 2 Enter the following program code into the editor replacing the Bluetooth device address with the device address of the eb500 SER inserted into the Boe Bot robot This application is available in electronic form on the accompanying CD in the Samples folder in the file MonkeySee bs2 STAMP BS2 1 0 Line 5 provides the connection status PUT 5 EE 1 0 Deiinitlonsl e eee eee eee ee ee eee LMotor CON 13 RMotor CON 12 LflrQut CON 4 Lflrin VAR Inll RtlrOQut CON 15 RtIrin VAR 1nl4 EE Constants 2 eee ee eee eee eee eee eee eee eee LFwdFast CON 1000 LRevFast CON 500 RFwdFast CON 500 RRevFast CON 1000 EmbeddedBlue 500 SER User Manual Page 47 Communications EE Variables 22 e eee eee eee eee eee eee eee irBits VAR NIB irLeft VAR irBits Bitl irRight VAR irBits Bito lastir VAR NIB bBuffer VAR BYTE 4 bErrorCode VAR BYTE EE I nitialization eee eee ee ee ee eee Wait for the eb500 radio to be ready PAUSE 1000 Connect Connect to Monkey Do SEROUT 1 84 con 00 0C 84 00 07 D7 CR
69. he Board of Education using HyperTerminal This step relies on the connection information created previously 1 On the Call menu click Call This will establish a connection with the eb500 SER on the Board of Education board The Connection Status LED see Figure 1 on page 13 on the eb500 SER module will turn on when a connection is established 2 On the Call menu click Disconnect This will close the connection with the eb500 SER on the Board of Education EmbeddedBlue 500 SER User Manual Page 31 Establishing a Connection Connecting a Board of Education to a PC with a DBT 120 In this exercise we will step through the process of establishing a connection from an eb500 SER module inserted into a Board of Education BOE board to a PC that has a D Link DBT 120 Bluetooth USB Adapter To perform this exercise as documented you will need a D Link DBT 120 a Board of Education board and an eb500 SER module If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise On the PC the DBT 120 Bluetooth Software associates a COM port for establishing a connection from the PC to a remote Bluetooth device and a separate COM port for connections that are established from a remote Bluetooth device to the PC This exercise demonstrates establishing a connection from a remote eb500 SER to the PC When a remote Bluetooth device establishes a connection with the PC the connection is esta
70. i on HIGH 6 PAUSE 300 DEBUG Connection established CR Send Hello World ten times Page 66 EmbeddedBlue 500 SER User Manual Communications FOR nCount 1 to 10 SEROUT 1 84 Hello World CR PAUSE 1000 NEXT Switch to Command Mode LOW 6 SERIN 0 84 WAI T CR gt Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 wait CR gt DEBUG Disconnected CR The BASIC Stamp application establishes a connection with the Pocket PC transmits Hello World ten times switches back to command mode and then disconnects from the remote device The first call to SEROUT is used when the eb500 SER is in command mode and instructs the eb500 SER module to establish a connection with the device specified Once a connection is established the eb500 SER is in data mode which causes further calls to SEROUT to be sent to the remote device On the File menu click Save As In the File name box enter a file name to which to save the program just created For Example HelloWorld bs2 Click Save On the Pocket PC tap the Bluetooth icon in the system tray on the Today screen and select Bluetooth Settings This will display the Settings dialog Scroll to the right tap the Serial Port tab and note the Inbound COM port The Inbound COM port will be used in the Pocket PC application later in this step Download the PPCRxFromEB application to the Pocket PC Run the PPCRxFromEB ap
71. ices from a PC or PDA this is the value that will be displayed to the user Syntax get name lt CR gt Example gt get name lt CR gt ACK lt CR gt eb500 lt CR gt gt EmbeddedBlue 500 SER User Manual Page 85 Command Get Get Security Mode The get security mode command returns the modules current security mode setting When security is turned off the module will allow connections to be established by any Bluetooth device When security is set to open the remote Bluetooth device is required to provide a valid passkey before a connection can be established When security is set to closed only existing trusted devices are allowed to establish connections For maximum security it is recommended that the module be operated in closed mode whenever possible Note The Security mode is not applicable if connectable mode is set to off Syntax get security lt CR gt Returns The current security mode setting of the module off The module will allow any Bluetooth device to establish a connection open The module will allow any Bluetooth device that provides the correct passkey to establish a connection closed The module will only allow trusted devices to establish a connection Example gt get security lt CR gt ACK lt CR gt open lt CR gt gt Page 86 EmbeddedBlue 500 SER User Manual Command Get Get Visible Mode The get visible mode command returns the modules current visibility setting This setting cont
72. ick on the eb500 SER and click Connect A7 Serial Port This will bring up the Bluetooth PIN Code Request dialog since we have not connected to this device in the past 4 Enter the Bluetooth PIN Code for the eb500 SER The factory default passkey is 0000 The eb500 SER module enables security by default so the devices must verify passkeys to establish a trusted relationship before they can communicate Note about terminology The DBT 120 software uses the term PIN Code as a substitute to the eb500 SER s Passkey These two terms refer to the same idea of using a secret code to establish a connection Step 4 Establish a Connection Using the DBT 120 Bluetooth Software In this step we will establish a connection from the PC to the eb500 SER module inserted into the Board of Education board The actions in this step need to be performed only once for the eb500 SER After performing the actions in this step the connection details will be stored on the PC Therefore future connections can be established to an eb500 SER by simply opening the associated COM port 1 Open My Bluetooth Places by double clicking on the desktop icon 2 Click Find Bluetooth Devices to locate the eb500 SER module connected to the Board of Education Provided the eb500 SER on the Board of Education is within range eb500 SER will be shown in the window 3 Right click on eb500 SER and click Discover Available services The A7 Serial Port service wi
73. id connection before switching to Command Mode If there is no connection the eb500 SER is already in Command Mode On the File menu click Save As In the File name box enter a file name to which to save the program just created For example Connect bs2 Click Save Step 3 Establish a Connection In this step we will establish a connection from the Board of Education board to the Pocket PC Turn on the Pocket PC 2003 device Tap the Bluetooth icon and select Bluetooth Manager This will display the Bluetooth Manager dialog Tap the Active Connections tab Apply power to the Board of Education board Power can be applied by attaching a 9 Volt battery or the AC Adapter provided by Parallax Using the Basic Stamp Editor on the Run menu click Run Depending on your current Pocket PC Bluetooth configuration the Authorization Requested Dialog may appear Figure 10 If this dialog appears tap Accept to accept the connection The Connection Status LED see Figure 1 on page 13 on the eb500 SER module will turn on when a connection is established On the Pocket PC the connection will be shown in the Incoming Connections section of the Active Connections tab on the Bluetooth Active Connections dialog Page 44 EmbeddedBlue 500 SER User Manual Establishing a Connection a Authorization Requ ar d 2 14 fok Bluetooth Authorization Requested Serice Remote Device EB500 How to use this screen Authorizat
74. ill take these devices to new levels of productivity and functionality and enable a whole new class of devices designed with communications and connectivity in mind The Bluetooth Special Interest Group SIG defines Bluetooth a bit more broadly as the worldwide specification for small form factor low cost radio solutions that provide links between mobile computers mobile phones other portable devices and connectivity to the Internet In defining Bluetooth the SIG has taken a very different approach than the IEEE 802 11 Committees did Rather than build Bluetooth as an adjunct to TCP IP it was defined as a standalone protocol stack that includes all layers required by an application This means that it encompasses not only wireless communications but also service advertisement addressing routing and a number of application level interfaces referred to as profiles Bluetooth is based on a frequency hopping spread spectrum FHSS modulation technique The term spread spectrum describes a number of methods for spreading a radio signal over multiple frequencies either simultaneously direct sequence or in series frequency hopping Wi Fi devices are based on direct sequence spread spectrum transmission which uses multiple channels simultaneously While this technique increases the speed of transmission for example in Wi Fi from 1 5MHz to 11MHz it is more susceptible to interference from other radio sources as well as being a greater source of i
75. imeout An optional parameter used to abort the connection request after the specified number of seconds The maximum value is 120 seconds Example gt con 00 0C 84 00 05 29 lt CR gt ACK lt CR gt gt EmbeddedBlue 500 SER User Manual Page 77 Command Get Delete Trusted Device The delete trusted device command removes the remote device from trusted status and prevents it from being able to connect with the EmbeddedBlue device when security is set to closed A delete can be performed for either a single device by passing its device address or for all trusted devices by specifying the keyword all Syntax del trusted all address lt CR gt Parameters all This parameter is used to remove all devices from trusted status address The Bluetooth address of the device that should be removed from trusted status The Bluetooth device address is the 48 bit IEEE address which is unique for each Bluetooth unit The format of a Bluetooth device address is a series of six hexadecimal byte values separated by colons i e 00 0C 84 00 05 29 Example gt del trusted 00 0C 84 00 05 29 lt CR gt ACK lt CR gt gt Page 78 EmbeddedBlue 500 SER User Manual Command Get Disconnect The disconnect command closes the connection with the remote Bluetooth device Syntax dis lt CR gt Example gt dis lt CR gt ACK lt CR gt gt EmbeddedBlue 500 SER User Manual Page 79 Command Get Get Address The get address command
76. in electronic form on the accompanying CD in the Samples folder in the file HelloWorld bs2 STAMP BS2 nCount VAR BYTE Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch into data mode When switching into data mode a 300ms timeout is required to give the module enough time to make the change Wait ForConnecti on IF in5 0 THEN WaitForConnecti on HI GH 6 PAUSE 300 DEBUG Connection established CR Send Hello World ten times FOR nCount 1 to 10 SEROUT 1 84 Hello World CR PAUSE 1000 NEXT Switch to Command Mode LOW 6 SERIN 0 84 WAIT CR gt Page 62 EmbeddedBlue 500 SER User Manual Communications Disconnect fromthe remote device SEROUT 1 84 dis CR SERIN 0 84 wait CR gt DEBUG Disconnected CR The BASIC Stamp application establishes a Bluetooth connection with the PC transmits Hello World ten times switches back to command mode and then disconnects from the remote device The first call to SEROUT is used when the eb500 SER is in command mode and instructs the eb500 SER to establish a connection with the device specified Once a connection is established the eb500 SER is in data mode which causes further calls to SEROUT to be sent to the remote device On the File menu click Save
77. involve Parallax products and their use with the eb500 SER module should be directed to Parallax technical support A7 Engineering provides technical support for EmbeddedBlue products through an online discussion forum at www a eng com support forum forum htm When you visit the forum you can search through previously asked questions for information or post new ones The forum is monitored by A7 Engineering employees so that your question will be answered in a thorough and timely manner If your question involves sensitive information you can request private support by sending an email to support a7eng com A7 Engineering also provides professional design services on a contract basis to anyone requiring assistance with their design and or development of Bluetooth products For further information visit the A7 Engineering website www a eng com services services htm Page 2 EmbeddedBlue 500 SER User Manual Bluetooth Overview Bluetooth Overview What is Bluetooth To put it simply Bluetooth is a technology standard for electronic devices to communicate with each other using short range radio It is often referred to as a cable replacement technology because it is commonly used to connect things such as cameras headsets and mobile phones that have traditionally been connected by wires Bluetooth is much more than simply a way to cut the cord between today s existing electronic devices It is an enabling technology that w
78. ion is required to allow the above mentioned device access to the specified service Tap Accept to allow the device to connect or Deny to reject the connection request Ej Figure 10 Pocket PC Bluetooth Authorization Request Dialog EmbeddedBlue 500 SER User Manual Page 45 Establishing a Connection This page intentionally left blank Page 46 EmbeddedBlue 500 SER User Manual Communications Communications This section contains a number of exercises that demonstrate methods of communicating over a Bluetooth wireless connection with the eb500 SER The scenarios described are not meant to form an exhaustive list but rather illustrate a number of more common and useful configurations All source code shown in these exercises is available in electronic form on the accompanying CD in the Samples folder using the filename used in this manual Communicating between Two eb500 SER Modules In this exercise we will step through the process of communicating wirelessly between two eb500 SER modules one inserted into a Boe Bot robot and the other inserted into a SumoBot robot We will program the SumoBot to use its infrared sensors to follow an object and then transmit its movements to the Boe Bot The Boe Bot will use the received information to mimic the movements of the SumoBot To perform this exercise as documented you will need a Boe Bot a SumoBot and two eb500 SER modules If you are using any o
79. is Bluetooth sieo nrimaa e Ee E EA Melee nec Ee Panen TOTA teed 3 What 1 a rot ler ee Eed aug etna ne E AE Sa ad EA Ee E eee 3 Bluetooth and WI FI euer ioe i esa e a Eder a a needs 4 SOCUIILY AA E E EE een deena E A See Mae Mie E 5 The BaSi TEE 7 PG Prototyping EE 7 Command Mode 2sgeeies Hie ae en eee deed ee AAEE EA A AR 9 Date MOG ET 9 VO BEE 9 Resetting the eb500 SER to the Factory Default Settings c ee eeceeeeeneeeeeeeneeeeeeenteeeeeeneeeeeenaeeeenenaes 10 Switching between Data Mode and Command Mode 10 Hardware Connect ONS a e r r ege gheegen de eege ee eege deed EEN 13 Basic Stamp Activity Board EE 14 Board Of Education e ET 15 BS2p Demo BOA rererer Tepper Seege deeg d e eieiei edd 16 BS2p24 40 Demo Beer ae a aaa aaa e a a a aaas Seed taaa a aeaa 17 Javelin Stamp Demo Board ae a a aa aaa aa a than a a deed 18 SUMOBOA A e a aaa aaa aaa sheet a a aaa silt aa aa aeaa aa a a A a a E Butte dedue 19 S per Camer Board ET 20 Establishing a Connector deeg dee eegeegetee e daaa eaa deaet iaae daaa eaa ceanaedudendeuscerdoacsecniesieddedens 21 Connecting two eb500 SER Modules A 21 Connecting a PC with an eb600 to a Board of Education eseesseseeeseeeresseerrsstrnsetrrssttrnsntennssrrnnnsseen 25 Connecting a PC with a DBT 120 to a Board of Educaton ec ececeeeeeteeeeeeeeeeeeeeenieeeeetneeeeetieeeeeees 28 Connecting a Board of Education to a PC with a D I 120 entree ee teeeeeeteeeeeeneeeeee 32 Connecting a PC with
80. issues an eb500 SER Connect command waits for the ACK lt CR gt response from the eb500 SER then waits for the error string or the prompt gt to be returned from the eb500 SER It then checks the first bye of the data returned to determine if an error has occurred If an error has occurred the code jumps to the error handler code where an error string along with the error number is shown in the debug window of the Basic Stamp Editor Connect to remote Bluetooth device SEROUT 1 84 con 00 0C 84 00 07 D8 CR SERIN 0 84 WAI T ACK CR Either an Err lt CR gt or a gt will be received SERIN 0 84 STR bBuffer 6 gt IF bBuffer 0 E THEN ErrorCode a Progam Logic ErrorCode bErrorCode bBuffer 4 DEBUG Error STR bErrorCode CR END Page 76 EmbeddedBlue 500 SER User Manual Command Get Connect The connect command establishes a connection to another Bluetooth device The connect command may be canceled before a connection is established by issuing a carriage return to the EmbeddedBlue device It can take up to four seconds to cancel the connection request Syntax con address timeouf lt CR gt Parameters address The Bluetooth address of the remote device The Bluetooth device address is the 48 bit IEEE address which is unique for each Bluetooth unit The format of a Bluetooth device address is a series of six hexadecimal byte values separated by colons i e 00 0C 84 00 05 29 t
81. ith the text Hello World Tap the Disconnect button to close the Bluetooth connection Step 2 Transmit Data from the BASIC Stamp to the Pocket PC In this step we will create a BASIC Stamp application to send data out the eb500 SER to the Pocket PC We will then download and run the application The application for the Pocket PC is too verbose to include in this manual therefore the application along with the source code is available on the accompanying CD in the Samples folder To modify the Pocket PC application you will need eMbedded Visual C 4 0 with Service Pack 2 and the SDK for Windows Mobile 2003 based Pocket PCs Using the BASIC Stamp Editor on the File menu click New This will create a new project window within the BASIC Stamp Editor Enter the following program code into the editor replacing the device address with the device address obtained from the Pocket PC This application is available in electronic form on the accompanying CD in the Samples folder in the file HelloWorld bs2 STAMP BS2 nCount VAR BYTE Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch into data mode When switching into data mode a 300ms timeout is required to give the module enough time to make the change Wait ForConnecti on IF in5 0 THEN WaitForConnect
82. ity is now off and security is closed Remember that when security is closed no other devices are allowed to become trusted The LED on the Board of Education breadboard will mimic the connection LED on the eb500 SER module When there is a connection between the PC and the remote Bluetooth device the LED will be on Likewise it will be off when there is no connection By pulling Stamp I O line P13 high the eb500 SER module will go back into open security mode with visibility set to on At this point other devices can become trusted Note that when the eb500 SER is connected changing the voltage on line P13 does NOT toggle between the security settings Page 74 EmbeddedBlue 500 SER User Manual Command Get Command Set The EmbeddedBlue command set is comprised of visible ASCII characters Therefore a command can be issued from a terminal application such as HyperTerminal or directly from a custom application program written in a programming language such as C or Visual Basic running on a PC using the eb600 PC adapter From a BASIC Stamp application these commands can be issued by using the PBASIC SERIN and SEROUT commands Command Basics Commands may only be sent to the module when it is in Command Mode White spaces are used to separate parameters of the command and a carriage return is used to mark the end of the command Upon receipt of a command the eb500 SER begins to parse the parameters If the syn
83. ity is set to open or closed transmitted data will be encrypted off Transmitted data will NOT be encrypted Example gt get encrypt lt CR gt ACK lt CR gt on lt CR gt SE Page 82 EmbeddedBlue 500 SER User Manual Command Get Get Escape Character The get escape character command returns the current character used in the Switch to Command Mode command to instruct the EmbeddedBlue device to leave Data Mode and enter Command Mode Syntax get escchar lt CR gt Example gt get escchar lt CR gt ACK lt CR gt lt CR gt gt EmbeddedBlue 500 SER User Manual Page 83 Command Get Get Link Timeout The get link timeout command returns the amount of time in seconds it takes for the local EmbeddedBlue device to notice that the connection has been broken if the remote device disappears This timeout also has an effect on how robust the communications link is to interference If this value is set very low the link may be lost if interference picks up for several seconds such as when a heavy burst of 802 11 traffic is encountered Syntax get linktimeout lt CR gt Example gt get Linktimeout lt CR gt ACK lt CR gt 5 lt CR gt gt Page 84 EmbeddedBlue 500 SER User Manual Command Get Gei Name The get name command returns the name of the local device This is the value that is transmitted when a remote device performs an Inquiry and then requests the device name If you look for local Bluetooth dev
84. le not visible to other devices but when perform a scan from my PC still see the device Why Most of the PC Bluetooth implementations cache device scan results to save time If you located the eb500 SER module before making it invisible the PC will remember the device even though it can no longer be seen These results are typically only cached until the Bluetooth stack is reset so if you reboot the PC or remove and reinsert the dongle you should no longer see the device EmbeddedBlue 500 SER User Manual Page 115 Frequently Asked Questions This page intentionally left blank Page 116 EmbeddedBlue 500 SER User Manual Contact Information Contact Information Parallax provides technical support through email an online group and by telephone It is recommended that you use email as the first line of questioning because common questions can be answered quickly and in greater detail in this manner Website www parallax com Support Email support parallax com Online Group http forums parallax com Sales Email sales parallax com Parallax Inc 599 Menlo Drive Suite 100 Rocklin CA 95765 Tel 888 512 1024 Fax 916 624 8003 A7 Engineering has created the EmbeddedBlue product line of easy to use wireless solutions for 8 and 16 bit embedded systems In addition A7 provides several levels of support for OEM product integration certification and even custom solutions Website www a Zeng Com Onlin
85. lick OK This will display the Properties dialog In the Bits per second dropdown select 9600 In the Data bits dropdown select 8 In the Parity dropdown select None In the Stop bits dropdown select 1 In the Flow control dropdown select None Click OK This will establish a connection with the eb500 SER on the Board of Education On the Call menu click Disconnect This will disconnect the connection just established so that we can modify the connection properties in the following actions Page 36 EmbeddedBlue 500 SER User Manual Establishing a Connection 13 14 15 16 17 18 19 20 On the File menu click Properties This will display the Properties dialog On the Settings tab click ASCII Setup This will display the ASCII Setup dialog Check the Send line ends with line feeds checkbox Check the Echo typed characters locally checkbox Check the Append line feeds to incoming line ends checkbox Check the Wrap lines that exceed terminal width checkbox Click OK This will return to the Properties dialog Click OK Step 5 Establish a Connection from the PC Using HyperTerminal In this step we will establish a connection from the PC to the eb500 SER on the Board of Education using HyperTerminal This step relies on the connection information created previously in Step 3 On the Call menu click Call This will establish a connection with the eb500 SER on the Board of Educ
86. ll be shown in the window 4 Right click on A7 Serial Port and click Connect to Bluetooth Serial Port This will establish a connection from the PC to the eb500 SER on the Board of Education board and associate this connection with a specific COM port If the A7 Serial Port dialog is shown click OK Right click on A7 Serial Port on eb500 SER and click Properties This will display the Bluetooth Properties dialog 7 Inthe Port dropdown which is disabled please note the COM port shown The DBT 120 Bluetooth software associates a specific COM port for a connection from the PC to an eb500 SER Applications such as HyperTerminal use this COM port to establish a connection and communicate with an eb500 SER from the PC Remember this COM port is used to establish a connection from the PC to the eb500 SER A different COM port is used when a connection is established from the eb500 SER to the PC Click OK Select A7 Serial Port and click Disconnect Bluetooth Serial Port This will disconnect the wireless connection to the eb500 SER on the Board of Education board EmbeddedBlue 500 SER User Manual Page 29 Establishing a Connection Step 5 E DAO O 12 14 15 16 17 18 19 20 Page 30 HyperTerminal Setup In this step we will setup the Windows HyperTerminal application to establish a connection with the eb500 SER on the Board of Education board Open HyperTerminal This will display the Connection De
87. mand 1 data Required CN1 20 VCC VCC Power Required Table 4 eb500 SER Pinout Description EmbeddedBlue 500 SER User Manual Page 113 Technical Specifications This page intentionally left blank Page 114 EmbeddedBlue 500 SER User Manual Frequently Asked Questions Frequently Asked Questions Question Answer Question Answer Question Answer Question Answer Question Answer Question Answer How do obtain eMbedded Visual C 4 0 to develop Pocket PC applications The eMbedded Visual C 4 0 development tool is available from Microsoft In addition you will need eMbedded Visual C 4 0 SP2 and the SDK for Windows Mobile 2003 based Pocket PCs These tools can be downloaded free of charge from the Microsoft Windows Mobile web site http www microsoft com windowsmobile Why is my eb500 SER not displayed when try to discover it from my PC or Pocket PC Verify that the eb500 SER module is properly powered It is likely you will discover the eb500 SER on the first attempt however because Bluetooth discovery is not deterministic discovery on the first attempt is not guaranteed On the PC or Pocket PC use the refresh option to search for devices again Verify that the visible mode setting in the eb500 SER is set to on can discover my eb500 SER but why am I unable to establish a connection Verify that the connectable mode setting in the eb500 SER is set
88. mote Bluetooth device is required to provide a valid passkey before a connection can be established When security is set to closed only existing trusted devices are allowed to establish connections For maximum security it is recommended that the module be set to closed mode whenever possible Syntax set security off open closed lt CR gt Parameters off Turns security off allowing any Bluetooth device to establish a connection open Configures the module to require other devices to provide the correct passkey before establishing a connection closed Configures the module to only allow trusted devices to establish a connection KR An optional parameter used to persist the new setting when the module is powered down Example gt set security open lt CR gt ACK lt CR gt gt Page 100 EmbeddedBlue 500 SER User Manual Command Get Set Visible Mode The set visible mode command provides control over whether the module can be seen by other Bluetooth devices In Bluetooth terminology this command controls the setting for inquiry scan Syntax set visible on off lt CR gt Parameters on Configures the module so that other Bluetooth devices can detect its presence off Configures the module so that other Bluetooth devices can NOT detect its presence i An optional parameter used to persist the new setting when the module is powered down Example gt set visible on lt CR gt ACK lt CR gt gt EmbeddedBlu
89. nd local passkeys do not match 8 Connection attempt failed because the remote device does not support the Serial Port Profile 9 An unexpected error occurred when deleting trusted devices 10 Unable to add a new trusted device This error will occur if you attempt to have more than twenty five simultaneously trusted devices 11 Trusted device not found This error occurs when the trusted device address is not recognized 12 Command not valid during startup This error occurs when a command has been issued before the EmbeddedBlue module is fully powered up and initialized Table 1 eb500 SER Error Codes EmbeddedBlue 500 SER User Manual Page 109 Error Codes This page intentionally left blank Page 110 EmbeddedBlue 500 SER User Manual Technical Specifications Technical Specifications Operating Parameters The operating parameters of the eb500 SER are shown below in Table 2 Transmit Power 6dBm max Open Field Range eb500 SER surface mount antenna gt 100 meters 328 feet Actual range is dependent upon location and environment Receiver Sensitivity 85dBm Operating Temp 15 to 70 C Supply Power 5 to 12VDC Current 115 2kbps data transfer 35mA Consumption 38 4kbps data transfer 30mA 9 6kbps data transfer 25mA connected and idle 8mA no connection 3mA Interfaces 5V TTL UART or RS232 with optional eb600 adapter Baud rate 9 6k 230 4k Connector One 10x2
90. ning Windows XP SP2 a Bluetooth USB adapter a Parallax Board of Education and an eb500 SER module If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise On the PC the Microsoft Bluetooth Software associates a COM port for establishing a connection from the PC to a remote Bluetooth device and a separate COM port for connections that are established from a remote Bluetooth device to the PC This exercise demonstrates establishing a connection from the PC to a remote eb500 SER The next exercise will demonstrate establishing a connection from a remote eb500 SER to the PC Step 1 Bluetooth USB Adapter Setup In this step we will attach the Bluetooth USB Adapter to the PC Windows XP SP2 should automatically detect and configure the adapter for use 1 Connect the Bluetooth USB Adapter to an available USB port on the PC Step 2 Board of Education eb500 SER Setup In this step we will attach an eb500 SER module to the Board of Education board and apply power to the device 1 Insert an eb500 SER module into the AppMod header of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header 2 Apply power to the Board of Education board Power can be applied by attaching a 9 Volt battery or the AC Adapter provided by Parallax Step 3 Establishing trust between the PC and the eb500 SER module In this step we will est
91. nterference to the surrounding area In contrast Bluetooth utilizes the frequency hopping method of spread spectrum which uses multiple radio channels to reduce interference and increase security The signal is rapidly switched from channel to channel many times per second in a pseudo random pattern that is known by both the sender and receiver s This provides robust recovery of packet errors caused by interference from another radio source at a particular frequency Also data is generally more secure because it is not possible to receive more than a fraction of the data unless the hopping pattern is known Bluetooth utilizes frequency hopping in the 2 4GHz radio band and hops at a relatively fast pace with a raw data rate of about 1 Mbps This translates to about 700 kbps of actual useful data transfer The eb500 SER module supports a maximum sustained bidirectional data rate of 230 4kbps What is a Profile Bluetooth devices can support interoperability with one or more types of devices In order for two Bluetooth devices to communicate with each other they must share at least one common profile If want a Pocket PC to communicate with my EmbeddedBlue radio need to make sure that they both support the same profile EmbeddedBlue devices support the Serial Port Profile SPP which is one of the earliest and most widely supported profiles EmbeddedBlue 500 SER User Manual Page 3 Bluetooth Overview The main elements of the Bluetoo
92. oard contains an AppMod header and supports a direct connection with the eb500 SER module On the SumoBoard the AppMod header is labeled X10 When inserting the eb500 SER module into the SumoBoard AppMod header assure that you insert Pin 1 of the eb500 SER module marked with a white dot and a square into the VSS pin of the AppMod header as pictured in Figure 7 EmbeddedBlue 500 SER User Manual Page 19 Hardware Connections Super Carrier Board Figure 8 Super Carrier Board prior to installing the eb500 SER module into the AppMod header please ensure that the Stamp IO line P5 is not configured as an output Failure to do so may result in damage to the eb500 SER module The Super Carrier Board contains an AppMod header and supports a direct connection with the eb500 SER module On the Super Carrier Board the AppMod header is labeled X1 When inserting the eb500 SER module into the Super Carrier Board AppMod header assure that you insert Pin 1 of the eb500 SER module marked with a white dot and a square into the VSS pin of the AppMod header as pictured in Figure 8 Page 20 EmbeddedBlue 500 SER User Manual Establishing a Connection Establishing a Connection This section contains a number of exercises that demonstrate methods of establishing Bluetooth wireless connections with the eb500 SER The scenarios described are not meant to form an exhaustive list but rather illustrate a number of more
93. ocal eb500 Bluetooth Address SEROUT 1 84 get address CR SERIN 0 84 WAIT ACK CR Read the local address fromthe get command SERIN 0 84 STR szData 17 SERIN 0 84 WAI T CR gt szData 17 0 DEBUG Local eb500 address STR szData 17 CR Return to Data Mode SEROUT 1 84 ret CR SERIN 0 84 WAIT CR gt Send data through eb500 SEROUT 1 84 My eb500 address is STR szData CR Switch to Command Mode PAUSE 2000 SEROUT 1 84 SERIN 0 84 WAI T CR gt DEBUG In Command Mode CR Disconnect from remote device SEROUT 1 84 dis CR SERIN 0 84 WAIT CR gt DEBUG Disconnected CR The following BASIC Stamp application uses the mode control I O line of the eb500 SER module to switch between data mode and command mode Switching between data mode and command mode via the mode control I O line is preferred as it is faster than the serial method This application is available in electronic form on the accompanying CD in the Samples folder in the file CmdModeHard bs2 STAMP BS2 szData VAR BYTE 20 Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAIT ACK CR Wait for the connection to be established and switch into data mode EmbeddedBlue 500 SER User Manual Page 11 The Basics When switching into data mode a 300ms timeout is required
94. ort column of the table This COM port is the serial communications port that the DBT 120 Bluetooth software has associated for connections that are established from a remote Bluetooth device This COM port can be used to communicate with the eb500 SER from applications such as HyperTerminal when connections are established from remote Bluetooth devices to the PC Select the Hardware tab and note the Device Address shown in the Device Properties section of the dialog The device address will be used in the BASIC Stamp application developed in later actions On the Bluetooth Configuration dialog click Cancel This will close the Bluetooth Configuration dialog Close the My Bluetooth Places window Open HyperTerminal This will display the Connection Description dialog In the Name box type the name of your connection For example eb500 SER Click OK This will display the Connect To dialog EmbeddedBlue 500 SER User Manual Page 57 Communications 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 In the Connect using dropdown select the serial port to which the DBT 120 Bluetooth software associated with the connection from the eb500 SER on the Board of Education board to the PC This is the COM port that we previously noted as being the COM port that is used to communicate with the eb500 SER when connections are established from remote Bluetooth
95. pe character is the plus sign Syntax set escchar character lt CR gt Parameters character The character the module should recognize as the escape character used in the Switch to Command Mode command i An optional parameter used to persist the new setting when the module is powered down Example gt set escchar amp lt CR gt ACK lt CR gt gt Page 96 EmbeddedBlue 500 SER User Manual Command Get Set Link Timeout The set link timeout command sets the amount of time it takes for the local EmbeddedBlue module to notice that the connection has been broken if the remote device disappears This timeout also has an effect on how robust the communications link is to interference If this value is set very low the link may be lost if interference picks up for several seconds such as when a heavy burst of 802 11 traffic is encountered In Bluetooth terminology this command controls the setting for link supervisor timeout Syntax set linktimeout timeout lt CR gt Parameters timeout The time in seconds it takes for the module to notice that a connection has been broken The default value is 5 The maximum value is 40 seconds An optional parameter used to persist the new setting when the module is powered down Example gt set linktimeout 10 lt CR gt ACK lt CR gt gt EmbeddedBlue 500 SER User Manual Page 97 Command Get Gei Name The set name command sets the name of the local device This
96. plication Figure 15 EmbeddedBlue 500 SER User Manual Page 67 Communications 10 11 12 13 14 PPCRxFromEB Z7 d i QD Bluetooth Inbound COM Port Figure 15 PPCRxFromEB Pocket PC Application In the Bluetooth Inbound COM Port dropdown select the COM port number that matches the Bluetooth Inbound COM Port which we discovered in a previous action Tap the Connect button Apply power to the Board of Education board Using the BASIC Stamp Editor on the Run menu click Run This will display the Download Progress dialog while downloading the program to the BASIC Stamp After the download is complete the BASIC Stamp application will establish a connection with the Pocket PC Depending on your current Pocket PC Bluetooth configuration the Authorization Request Dialog may appear see Figure 10 on page 45 If this dialog appears tap Accept to accept the connection Once the connection is established the BASIC Stamp application will transmit Hello World over the wireless link and the Pocket PC application will display the received data On the Pocket PC tap the Disconnect button to close the connection Page 68 EmbeddedBlue 500 SER User Manual Security Security This section contains a number of exercises that demonstrate various security scenarios that can be implemented when using the eb500 SER module The scenarios described are not meant to form an exhaustive list but rather illus
97. r and supports a direct connection with the eb500 SER module On the BS2p24 40 Demo Board the AppMod header is labeled X1 When inserting the eb500 SER module into the BS2p24 40 Demo Board AppMod header assure that you insert Pin 1 of the eb500 SER module marked with a white dot and a square into the VSS pin of the AppMod header as pictured in Figure 5 EmbeddedBlue 500 SER User Manual Page 17 Hardware Connections Javelin Stamp Demo Board Figure 6 Javelin Stamp Demo Board prior to installing the eb500 SER module into the AppMod header please ensure that the Stamp IO line P5 is not configured as an output Failure to do so may result in damage to the eb500 SER module The Javelin Stamp Demo Board contains an AppMod header and supports a direct connection with the eb500 SER module On the Javelin Stamp Demo Board the AppMod header is labeled X1 When inserting the eb500 SER module into the Javelin Stamp Demo Board AppMod header assure that you insert Pin 1 of the eb500 SER module marked with a white dot and a square into the VSS pin of the AppMod header as pictured in Figure 6 Page 18 EmbeddedBlue 500 SER User Manual Hardware Connections SumoBoard Figure 7 SumoBoard A prior to installing the eb500 SER module into the AppMod header please ensure that the Stamp IO line P5 is not configured as an output Failure to do so may result in damage to the eb500 SER module The SumoB
98. r to the device 1 Insert an eb500 SER module into the AppMod header of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header 2 Apply power to the Board of Education board Power can be applied by attaching a 9 Volt battery or the AC Adapter provided by Parallax Step 3 Establishing trust between the PC and the eb500 SER module In this step we will establish a trusted relationship between the PC and the eb500 SER module Verifying passkeys is required when performing the initial connection on two devices that require security If you have connected these two devices once with security enabled then this step should be skipped The actions in this step need to be performed only once for the eb500 SER After performing the actions in this step the connection security details will be stored on both the PC and the eb500 SER module Therefore future connections can be established to an eb500 SER by simply opening the associated COM port 1 Open the Bluetooth Devices dialog by double clicking on the Bluetooth tray icon This will display the Bluetooth Devices dialog 2 Click Find Bluetooth Devices to locate the eb500 SER module connected to the Board of Education board Provided the eb500 SER on the Board of Education board is within range eb500 SER will be shown in the window Page 28 EmbeddedBlue 500 SER User Manual Establishing a Connection 3 Right cl
99. rds A full device pin out is available in the Technical Specifications section of this manual La a a K e WW a 5 3 ax LO 48 A t 6 Li Connection Figure 1 eb500 SER Module Status LED Pin 1 Marked by White Dot and Square EmbeddedBlue 500 SER User Manual Page 13 Hardware Connections Basic Stamp Activity Board Figure 2 Basic Stamp Activity Board prior to installing the eb500 SER module into the AppMod header please ensure that the Stamp IO line P5 is not configured as an output Failure to do so may result in damage to the eb500 SER module The Basic Stamp Activity Board contains an AppMod header and supports a direct connection with the eb500 SER module On the Basic Stamp Activity Board the AppMod header is labeled X7 When inserting the eb500 SER module into the Basic Stamp Activity Board AppMod header assure that you insert Pin 1 of the eb500 SER module marked with a white dot and a square into the VSS pin Pin 1 of the AppMod header as pictured in Figure 2 Page 14 EmbeddedBlue 500 SER User Manual Hardware Connections Board Of Education Board Figure 3 Board of Education Board A prior to installing the eb500 SER module into the AppMod header please ensure that the Stamp IO line P5 is not configured as an output Failure to do so may result in damage to the eb500 SER module The Board Of Education BOE contains an AppMod header and support
100. rer A7 Engineering gt 3 Close the terminal emulator EmbeddedBlue 500 SER User Manual Page 107 Firmware Upgrade This page intentionally left blank Page 108 EmbeddedBlue 500 SER User Manual Error Codes Error Codes While using the eb500 SER you may encounter an error Below is a listing of all eb500 SER error codes with a description of what causes the error to occur Error Code Description 1 General connection failure 2 Connection attempt failed This error occurs when attempting to connect with an invalid Bluetooth address or a device that is not available 3 Command not valid while active This error occurs when there is an active connection and a command is issued that is not valid while connected with a remote device 4 Command only valid while active This error occurs when there is not an active connection and a command is issued that is only valid while connected with a remote device 5 An unexpected request occurred This error occurs when the remote device makes an invalid request This is typically seen with older Bluetooth devices that may have errors in their firmware 6 Connection attempt failed due to a timeout 7 Connection attempt was refused by the remote device This error typically occurs when the security settings of the remote and local device are incompatible It can also occur when establishing a connection with security set to open if the remote a
101. rols whether the module can be seen by other Bluetooth devices Syntax get visible lt CR gt Returns The current visible mode setting of the module In Bluetooth terminology the returned value reflects the current setting for inquiry scan on The module is visible to other devices off The module is NOT visible to other devices Example gt get visible lt CR gt ACK lt CR gt on lt CR gt gt EmbeddedBlue 500 SER User Manual Page 87 Command Get Help The help command returns a listing of the EmbeddedBlue commands and a brief description of each command Syntax hlp commana lt CR gt Parameters command The EmbeddedBlue command name con del dis get Ist rst set and ver for which to return help Examples gt hlp lt CR gt ACK lt CR gt Help Information lt CR gt gt gt hlp con lt CR gt ACK lt CR gt Help Information on the Connect Command lt CR gt gt Page 88 EmbeddedBlue 500 SER User Manual Command Get List Trusted Devices The list trusted devices command returns a list of all the devices that are allowed to connect when security is set to closed The maximum number of devices that can be trusted at any given time is twenty five so this command will return a list of between zero and twenty five addresses When security is set to open new devices can be added to this list by presenting the proper passkey while establishing a new connection Syntax Ist trus
102. s HyperTerminal must open the COM port associated with the connection established from the remote device In the Communications section we will step through this process Step 1 Bluetooth USB Adapter Setup In this step we will attach the Bluetooth USB Adapter to the PC Windows XP SP2 should automatically detect and configure the adapter for use 1 Connect the Bluetooth USB Adapter to an available USB port on the PC Step 2 Obtain the Bluetooth Address of the PC In this step we will obtain the Bluetooth address of the Bluetooth USB Adapter attached to the PC 1 Open the Bluetooth Devices dialog by double clicking on the Bluetooth tray icon This will display the Bluetooth Devices dialog 2 On the Hardware tab select Generic Bluetooth Radio and click on the Properties button This will display the Generic Bluetooth Radio Properties dialog 3 Select the Advanced tab and note the Address shown in the Radio Information section of the dialog The device address will be used in the BASIC Stamp application developed in the next step 4 Click OK This will close the Generic Bluetooth Radio Properties dialog 5 Click OK This will close the Bluetooth Devices dialog Step 3 Establishing trust between the PC and the eb500 SER module In this step we will establish a trusted relationship between the PC and the eb500 SER module Verifying passkeys is required when performing the initial connection on two devices that require security
103. s a direct connection with the eb500 SER module On the Board of Education the AppMod header is labeled X1 When inserting the eb500 SER module into the Board of Education AppMod header assure that you insert Pin 1 of the eb500 SER module marked with a white dot and a square into the VSS pin of the AppMod header as pictured in Figure 3 EmbeddedBlue 500 SER User Manual Page 15 Hardware Connections BS2p Demo Board Figure 4 BS2p Demo Board A prior to installing the eb500 SER module into the AppMod header please ensure that the Stamp IO line P5 is not configured as an output Failure to do so may result in damage to the eb500 SER module The BS2p Demo Board contains an AppMod header and supports a direct connection with the eb500 SER module On the BS2p Demo Board the AppMod header is labeled X7 When inserting the eb500 SER module into the BS2p Demo Board AppMod header assure that you insert Pin 1 of the eb500 SER module marked with a white dot and a square into the VSS pin of the AppMod header as pictured in Figure 4 Page 16 EmbeddedBlue 500 SER User Manual Hardware Connections BS2p24 40 Demo Board Figure 5 BS2p24 40 Demo Board prior to installing the eb500 SER module into the AppMod header please ensure that the Stamp IO line P5 is not configured as an output Failure to do so may result in damage to the eb500 SER module The BS2p24 40 Demo Board contains an AppMod heade
104. s connection with a specific COM port 6 Please note both the Outgoing and Incoming COM ports shown The Microsoft Bluetooth software associates a specific COM port for a connection from the PC to an eb500 SER Applications such as HyperTerminal use this COM port to establish a connection and communicate with an eb500 SER from the PC Remember this COM port is used to establish a connection from the PC to the eb500 SER A different COM port is used when a connection is established from the eb500 SER to the PC 7 Click Finish This will complete the wizard and close the Add Bluetooth Device Wizard Step 4 Write a BASIC Stamp Application to Connect to the PC In this step we will attach an eb500 SER module to the Board of Education board and develop a BASIC Stamp application to establish a connection with the PC 1 Insert an eb500 SER module into the AppMod connector of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header Connect the Board of Education board serial port to the PC Open the BASIC Stamp Editor 4 Enter the following program code into the editor replacing the Bluetooth device address with the device address of the PC which we obtained from the Hardware tab of the Device Properties section of the Bluetooth Configuration dialog in the previous step This application is available in electronic form on the accompanying CD in the Samples folder in the
105. scription dialog In the Name box type the name of your connection For example eb500 SER BOE Click OK This will display the Connect To dialog In the Connect using dropdown select the serial port associated with the DBT 120 Bluetooth connection discovered in the previous step Click OK This will display the Properties dialog In the Bits per second dropdown select 9600 In the Data bits dropdown select 8 In the Parity dropdown select None In the Stop bits dropdown select 1 In the Flow control dropdown select None Click OK This will establish a connection with the eb500 SER on the Board of Education board On the Call menu click Disconnect This will disconnect the connection just established so that we can modify the connection properties in the following actions On the File menu click Properties This will display the Properties dialog On the Settings tab click ASCII Setup This will display the ASCII Setup dialog Check the Send line ends with line feeds checkbox Check the Echo typed characters locally checkbox Check the Append line feeds to incoming line ends checkbox Check the Wrap lines that exceed terminal width checkbox Click OK This will return to the Properties dialog Click OK EmbeddedBlue 500 SER User Manual Establishing a Connection Step 6 Establish a Connection Using HyperTerminal In this step we will establish a connection from the PC to the eb500 SER on t
106. serial cable from the Board of Education board 2 Recycle the power on the Board of Education by unplugging the power cable and plugging the cable in 3 Pull Stamp I O line P13 high on the Board of Education board by implementing the circuit shown in Figure 17 This puts the eb500 SER module in open security mode with visibility on Note the blinking LED which informs us we are vulnerable to other devices becoming trusted with the eb500 SER if they have the correct passkey 4 Connect your PC with XP SP2 to the remote Bluetooth device See the section named Connecting a PC with XP SP2 to a Board of Education for more information Upon successful connection the PC and eb500 SER will establish a trusted relationship You will need the passkey from the BASIC Stamp application written in the previous section The application changed the passkey to a more secure passkey from the default of 0000 by using the command set passkey 5 Disconnect the PC and the remote Bluetooth device 6 Pull Stamp line P13 low to return to closed security with visibility off Notice the security status LED on the breadboard will be off EmbeddedBlue 500 SER User Manual Page 73 Security 7 Connect to the eb500 SER module from the PC with XP SP2 referring to the section named Connecting a PC with XP SP2 to a Board of Education for more information The PC can now connect and disconnect with the remote Bluetooth device in a secure manner since visibil
107. serted into a Board of Education BOE board To perform this exercise as documented you will need to have two serial ports available on your PC an eb600 PC Adapter a Board of Education board and two eb500 SER modules One serial port will be used to connect the PC to the Board of Education serial port The other serial port will be used to connect to the eb600 PC Adapter If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise Step 1 Transmit Data from the PC to the BASIC Stamp a MN o 10 In this step we will create a BASIC Stamp application to read data from the eb500 SER and display the data in the BASIC Stamp Editor Debug window We will then download and run the application Connect the Board of Education board serial port to the PC Open the BASIC Stamp Editor Enter the following program code into the editor This application is available in electronic form on the accompanying CD in the Samples folder in the file Receive bs2 STAMP BS2 bData VAR BYTE Wait for the eb500 radio to be ready PAUSE 1000 Main SERIN 0 84 STR bData 1 DEBUG STR bData 1l GOTO Main The application waits for an individual byte of data to arrive and then displays the byte in the debug window and then repeats this process On the File menu click Save As In the File name box enter a file name to which to save the program just created For example Receive bs2 Click
108. tax of the command is correct the eb500 SER returns an ACK string not the ACK character 0x06 otherwise a NAK string is returned Following the ACK or NAK string is a carriage return OxOD character If an error occurs while processing the command an error string is returned followed by a carriage return followed by the prompt gt character If the command executed successfully the module will issue the prompt gt character Please see the Error Codes section for a description of the error codes The following example shows the basic structure of a command A prompt gt is issued by the EmbeddedBlue module A command followed by a carriage return is sent to the module The module responds with either an ACK or NAK string followed by a carriage return If an error occurs the module responds with an Err string followed by a space followed by an ASCII string numeric value followed by a carriage return A prompt gt is then issued by the module gt command lt CR gt ACK NAK lt CR gt Err number lt CR gt gt EmbeddedBlue 500 SER User Manual Page 75 Command Get Command Error Handling in BASIC Stamp Applications The BASIC Stamp has a software based UART meaning it does not buffer incoming serial data Therefore the checking of errors from the issuing of an eb500 SER command must be performed immediately after the issuing of the command otherwise the data may be lost Below is a sample of BASIC Stamp code that
109. ted lt CR gt Returns List of the trusted device addresses These devices are the only ones that are allowed to connect with this module when security is set to closed Example gt lst trusted lt CR gt ACK lt CR gt COS OC E o DI UE 29 lt CR gt 00s BC S57 EES gt EmbeddedBlue 500 SER User Manual Page 89 Command Get List Visible Devices The list visible devices command returns a listing of all the devices that are currently in range and visible The command may be canceled before the timeout is reached by sending an additional carriage return to the module Syntax Ist visible timeouf lt CR gt Parameters timeout An optional parameter used to abort the list request after the specified number of seconds The default value is 30 The maximum value is 120 seconds Returns The addresses of the Bluetooth devices that are in range and visible Example gt lst visible lt CR gt ACK lt CR gt 0020C 84700 058 2 ISCIR DI EOE CE E BOLT gt Page 90 EmbeddedBlue 500 SER User Manual Command Get Reset Factory Defaults The reset factory defaults command restores all module settings to factory defaults This includes the baud rate parameter which may cause serial communications to be lost after the command is issued To reestablish communications with the module simply adjust the baud rate on the microprocessor serial port to match the module default rate of 9600bps Syntax rst factory lt CR gt Paramet
110. th stack are shown Applications in the figure to the right As with a typical diagram of the TCP IP stack there are a number of details that E are hidden by the apparent simplicity of the stack Specifically there are a number of profiles that sit SPP Serial Port Profile RFCOMM Bluetooth Profiles roughly on top of the L2CAP layer that provide much of the power and also the complexity of the Bluetooth protocols These profiles are the primary entry into the stack for an application Essentially they define the set of services that are available to that application Currently there are more than 25 different profiles defined or in the process of being defined by the Bluetooth SIG With so much variety acquiring an in depth understanding of Bluetooth is not a trivial task However the abstraction by a single profile can provide an application the use of the profile without such detailed knowledge HCI Host Controller Interface Link Manager Protocol There are a number of profiles that are exposed in very familiar forms The eb500 SER module for instance implements the SPP profile which enables it to appear like a traditional serial port This virtually eliminates the need for the user to have specific Bluetooth knowledge and allows the radios to be integrated into applications very quickly Baseband and Physical Transport Bluetooth and Wi Fi Bluetooth and Wi Fi are often compare
111. the PC the Microsoft Bluetooth Software associates a COM port for establishing a connection from the PC to a remote Bluetooth device and a separate COM port for connections that are established from a remote Bluetooth device to the PC The Establishing a Connection section of this manual describes how to establish the connection between devices This exercise demonstrates how to communicate data between the PC and a remote eb500 SER Step 1 Transmit Data from the PC to the eb500 SER In this step we will create a BASIC Stamp application to read data from the eb500 SER and display the data in the BASIC Stamp Editor Debug window We will then download and run the application 1 Connect the Board of Education board serial port to the PC Open the BASIC Stamp Editor Enter the following program code into the editor This application is available in electronic form on the accompanying CD in the Samples folder in the file Receive bs2 STAMP BS2 bData VAR BYTE Wait for the eb500 radio to be ready PAUSE 1000 Main SERIN 0 84 STR bData 1 DEBUG STR bData 1l GOTO Main The application waits for an individual byte of data to arrive and then displays the byte in the debug window and then repeats this process 4 On the File menu click Save As In the File name box enter a file name to which to save the program just created For example Receive bs2 Click Save Apply power to the Board of Education board On the Run menu click
112. tion to the device with the address specified in the command Once a connection is established the eb500 SER switches into data mode At this point all data sent to the eb500 SER is transmitted to the remote Bluetooth device over the wireless link It is possible to switch from data mode to command mode issue commands and then return to data mode while maintaining a connection The eb500 SER allows you to switch between data mode and command mode by issuing the Switch to Command Mode and Return to Data Mode commands or by driving the MODE control I O line P6 of the eb500 SER module The following BASIC Stamp application uses the Switch to Command Mode and Return to Data Mode serial commands to switch between data mode and command mode This application is available in electronic form on the accompanying CD in the Samples folder in the file CmdModeSoft bs2 STAMP BS2 szData VAR BYTE 20 Wait for the eb500 radio to be ready PAUSE 1000 Connect to the remote device SEROUT 1 84 con 00 0C 84 00 05 29 CR SERIN 0 84 WAI T ACK CR Wait for the connection to be established Wait ForConnection IF in5 0 THEN WaitForConnecti on DEBUG Connection established CR SEROUT 1 84 This string is sent in data mode CR Switch to Command Mode PAUSE 2000 SEROUT 1 84 SERIN 0 84 WAI T CR gt Page 10 EmbeddedBlue 500 SER User Manual The Basics DEBUG In Command Mode CR Get l
113. trate a number of more common and useful configurations All source code shown in these exercises is available in electronic form on the accompanying CD in the Samples folder using the filename used in this manual Strong Security on a Board of Education Cellular phones are typically configured for strong Bluetooth security because not only do they allow you to make phone calls but they often contain sensitive contact information as well In this exercise we will demonstrate how to use the eb500 SER module to implement the strong Bluetooth security model used on cellular phones To perform this exercise as documented you will need a PC running Windows XP SP2 a Bluetooth USB adapter a Board of Education two 4700 resistors yellow violet brown one LED and one eb500 SER module If you are using any of the other supported Parallax boards you may need to make adjustments to this exercise Step 1 Setup the circuit on the Board of Education In this step we will assemble a circuit on the Board of Education breadboard that will visibly display the current security mode connection status and allow the security mode to be changed 1 Disconnect the power from the Board of Education board If you are using a Board of Education Rev C you can simply set the 3 position switch to position 0 For all other boards you should remove the power source from the board EmbeddedBlue 500 SER User Manual Page 69 Security 2 Assemble the circ
114. uit shown in Figure 16 on the Board of Education breadboard Step 2 Page 70 P13 P12 Vss Vss Figure 16 Closed Security Mode Circuit Diagram Configure Bluetooth security through a BASIC Stamp application In this step we will write a BASIC Stamp application that allows you to change the current Bluetooth security settings by pulling UO line P13 on the BASIC Stamp either high or low We will then download and run the application Note about passkeys Passkeys should be created with the same idea in mind as creating a password for your own personal use Some tips include using at least eight characters including a combination of uppercase letters lowercase letters symbols and numbers The more characters and different types of characters you use the more secure your passkey will be Additionally its recommended not to use words that can be found in the dictionary as this allows for a common dictionary attack to easily crack your passkey This BASIC Stamp application changes the passkey of the eb500 SER module You will need to make note of the passkey as it will be needed in the next step when we connect the PC to the eb500 SER Connect the Board of Education serial port to the PC Open the BASIC Stamp Editor Enter the following program code into the editor The application is available in electronic form on the accompanying CD in the Samples folder in the file Security bs2 STAMP BS2 PBASIC 2 5 nSecurityMode
115. ween the eb500 SER and the PC Page 40 EmbeddedBlue 500 SER User Manual Establishing a Connection Connecting a Pocket PC 2003 device to a Board of Education In this exercise we will step through the process of establishing a connection from a Pocket PC 2003 device with integrated Bluetooth to an eb500 SER module inserted into a Board of Education board To perform this exercise as documented you will need a Pocket PC 2003 device a Parallax Board of Education and an eb500 SER module Depending on the specific Pocket PC model that you are using you may need to make minor adjustments to this exercise Step 1 Board of Education eb500 SER Setup 2 In this step we will attach an eb500 SER module to the Board of Education board and apply power to the device Insert an eb500 SER module into the AppMod connector of the Board of Education board assuring that Pin 1 of the eb500 SER module is inserted into the VSS pin of the AppMod header Apply power to the Board of Education board Power can be applied by attaching a 9 Volt battery or the AC Adapter provided by Parallax Step 2 Pocket PC 2003 Setup Step 3 1 In this step we will setup the Pocket PC for connecting to the eb500 SER Tap the Bluetooth icon in the system tray on the Today screen and select Bluetooth Manager This will display the Bluetooth Manager dialog On the New menu select Connect This will display the first page of the Connection Wizard S
Download Pdf Manuals
Related Search
Related Contents
Istruzioni per l`uso Viking DEDO127/130 User's Manual SixTRAK® Combination I/O Module StarTech.com 50FIBLCMT5 fiber optic cable Philips Senseo HD7840/01 coffee maker Xerox Guia do usuário Promopar - Controllux Section Heading Page 取扱説明書 - サンコーミタチ Copyright © All rights reserved.
Failed to retrieve file