Home

Easy Bluetooth (#30085)

image

Contents

1. 63 store 63 Force Master Role a FEDERE EDU FP EPOR EPER DOE FP ER OPER URED 64 Set Default Line Poli6y 64 Get Default Link 65 d us 65 ROT OOM te 66 Set DelaulP a a 66 Get Default Link Timeoultl J nnn 66 Set Default Link Latency 67 Get Default Link Latency ueniet tic tes ce tee c Ca tete t Cei tote puede 67 SDP Record Handling 67 Eriable SDP dct A 68 Delete All SDP 8 68 Store Generic SDP 860Id 69 Other Gomltidlidss aucune deco 69 pill M heii 69 Device Ready oo cM M 70 RoboTech Bluetooth Serial Module 4 User Manual Ver 1 2 Test 00 00 8 70 u u T L u k uu 70 Ma ho
2. 71 PASC 72 N DVA cil turer Sut at caida d 72 73 AGE GOSS aici ci __ _____________ _ ___ 73 Genen sor COdBS assente iw 74 RFCOMM Error Codes a 76 RFCOMM Release RedasOLFt iiic cid nain bra ide kn oda aoa abd da a de nx bd aon da 76 19 6 oo anasu LUCR CC A CU E DU 77 78 Resa Vr eX Mela ua SPARE 78 GE us cer OR 78 PROVISION ISION Ys bates abd 79 RoboTech Bluetooth Serial Module 5 User Manual Ver 1 2 Product Description The RoboTech Bluetooth Serial Module is an effective and low cost solution to free your hardware applications from wires Main features are Compliant with the Bluetooth 2 0 Specification Certified as an end product no additional Bluetooth qualification is needed when using this module Backwards compatible to Bluetooth 1 x versions Class 2 operation nominal range up to 30m Low power consumption UART Command Data Port supports for up to 921 6k baud rate Profiles GAP SDAP SPP Integrated chip antenna Support for Adaptive Frequency Hopping AFH and 802 11 co existence Small size 29x29mm R
3. Opcode Value GAP_REMOTE_DEVICE_NAME 0x02 GAP READ LOCAL NAME 0x03 GAP WRITE LOCAL NAME 0x04 GAP READ LOCAL BDA 0x05 GAP SET SCANMODE 0x06 GAP GET FIXED PIN 0x16 GAP SET FIXED PIN 0x17 GAP GET PIN 0x75 GAP GET SECURITY MODE 0x18 GAP SET SECURITY MODE 0x19 GAP REMOVE PAIRING 0 1 GAP_LIST_PAIRED_DEVICES 0 1 GAP ENTER SNIFF MODE 0x21 GAP EXIT SNIFF MODE 0x37 GAP_ENTER_PARK_MODE 0x38 GAP_EXIT_PARK_MODE 0x39 GAP_ENTER_HOLD_MODE GAP_SET_LINK_POLICY 0x3B GAP_GET_LINK_POLICY Ox3C GAP POWER SAVE MODE CHANGED 0x3D GAP ACL ESTABLISHED 0x50 GAP ACL TERMINATED 0x51 SPP SET PORT CONFIG 0x07 SPP GET PORT CONFIG 0x08 SPP PORT CONFIG CHANGED 0x09 SPP ESTABLISH LINK 0x0A SPP LINK ESTABLISHED OxOB SPP INCOMMING LINK ESTABLISHED 0x0C SPP RELEASE LINK 0x0D SPP_LINK_RELEASED OxOE SPP SEND DATA OxOF SPP INCOMING DATA 0x10 SPP TRANSPARENT MODE 0x11 SPP_CONNECT_DEFAULT_CON 0x12 SPP_STORE_DEFAULT_CON 0x13 SPP_GET_LIST_DEFAULT_CON 0x14 SPP DELETE DEFAULT CON 0x15 SPP SET LINK TIMEOUT 0x57 SPP GET LINK TIMEOUT 0x58 SPP PORT STATUS CHANGED OxSE SPP GET PORT STATUS 0x40 RoboTech Bluetooth Serial Module User Manual Ver 1 2 23 Opcode Value SPP PORT SET DTR 0x41 SPP PORT SET RTS 0x42 SPP PORT BREAK 0x43 SPP_PORT_OVERRUN_ERROR 0x44 SPP_PORT_PARITY_ERROR 0x
4. TD ACCES DO GOSUB GETVAL GOSUB DISPLAY PAUSE 5 LOOP Ty bi rrr As TAS rege TE Se to GETVAL SERIN RX Baud Temp cul Texts that value in Temp Copyright O Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 9 of 11 RETURN DIS D RETURN PLAY EBUG HOM eal Byte DEC Temp CLREOL CR Displays the decimal value for Temp Load BOE2 EasySEND bs2 SSTA 8 892 J 2 5 Load on the transmitting unit in the AppNote connects to the remote Bluetooth module via serial connection Easy Bluetooth to Easy An File EasySEND bs2 Purpose Bluetooth Communcation lt xampl address is given to the remo te module that the transmitting unit uses to establish connection after the connection aspe EBUG 5 seconds ttempted then a counter variable is sent and incremented by 1 in a repeat loop and then will DI the counter valu Author Parallax Technical Support Declarations Lu Y HE RX PIN 2 TX PIN 0 counter VAR Byte Place the values for each part of the address in the constants below whereas the first part of the address will be placed in addyl and the second in addy2 for example the address A1 B2 C3 D4 E5 F6 w
5. _ ____ BdAddr The Bluetooth device address of the remote device 6 byte Description This command is used to send a PIN code to the RBT 001 module as response to a GAP GET PIN indication REQ GAP GET PIN I 7 Pinlength Data BdAddr The Bluetooth device address of the remote device 6 byte Pinlength Length of pin code in bytes 1 byte Range 0x00 0x10 0x00 indicates that the Host does not allow the authentication of the ACL link Pincode PIN code used when the two Bluetooth devices are paired The Pinlength bytes maximum length of a PIN code is 128 bits 16 bytes pr s Data Status ERROR 1 byte ERROR INVALID NO OF PARAMETERS ERROR PINCODE LENGTH Get Security Mode Description Reads the current security mode of the Bluetooth device PacketT ype GAP_GET_SECURITY_MODE DataLength 0 eq RoboTech Bluetooth Serial Module User Manual Ver 1 2 32 Data Status ERROR_OK 1 byte ERROR INVALID NO PARAMETERS Mode The current Bluetooth security mode 1 byte 0x01 Security mode 1 0x02 Security mode 2 0x03 Security mode 3 0x83 Security mode 3 with link level encryption Set Security Mode Description Changes the current security mode of the Bluetooth device The security mode is stored in NVS and restored during power up PacketType GAP_SET_SECURITY_MODE DataLength Data The current Bluetooth security mode 0x01 Security mode 1 0x02 Securit
6. 33 ist Paired n A A C RE 34 Air interface Low Power 22 1 1100 34 35 Enter Park 35 Exi Parie 36 Enter Hold A S u A ASA abe Ri 36 SetLink 37 37 Power Save Mode Changed r 38 Device Low Power scat oed ecc sai n 38 Disable Transport Way Gr ie ve aee edd the 38 7 6 25 pibus XI FARMER EXER EXER ERR aaa aes 39 39 oH 39 Serial port profile einen ea 40 Open Close dn 40 Reading changing current port 40 Set Port Config Rr 40 iei seo c HAMM RURAL DUUM GNE MM D MM MNA 41 xsderenieutdiszime irc 42 Reading changing current port 4 43 ee 43 Sei eee eT EHE EHI D DRE EFE rM ES 44 Se E 45 Set BREAK RIO T ETHER 45
7. 54 55 Set Link MMGOUE 55 C BN MINIS 55 Service discovery application profile 5 56 SDAP Connection ae LENSES Set ap tun da Ra xem ad ea ra 56 PEE 56 DISEODDSCE soot 57 Connection mad datant atum dd lea 57 SDAP Service Discovery pd tracta tec Sete ped pu dnd ddp de pod pa 57 57 S e VICS 58 Service HedtlesL casco c pet CE 59 Bedllesl iier v D UL E p cta aeu EA 59 omisi MEE e V 61 Change 61 Change UART Setting eo tus qa disc REI D Se Le 61 Read Operation Mode RR Ier ein eee 62 62 SIGE a A Gua as 62 Get Ports MH 63 Restore Factory
8. RoboTech Bluetooth Serial Module 52 User Manual Ver 1 2 Daalen Data LocalPort Local RFCOMM port number Range 1 30 1 byte Command Mode 0 Transparent Mode 1 Default Connection Connect Default Connection Description Connects the RBT 001 to a stored connection Either a single or all connections can be established PacketType SPP CONNECT DEFAULT CON DataLength Data Index Index in the default connection storage Range 0x00 to 0x06 If index 1 byte is set to all default connections will be established Data Status ERROR OK 1 byte ERROR SPP AUTOMATIC CONNECTIONS PROGRESSING ERROR LIMIT ERROR SPP DEFAULT CONNECTION NOT STORED Store Default Connection Data Index Index in the default connection storage Range 0x00 to 0x06 1 byte LocalPort Local RFCOMM port number Range 1 30 1 byte RFCOMM port number on remote device 1 byte RemoteBdAddress The BdAddress of the remote device 6 bytes TransparentMode Which transparent mode to enter when the connection is established 1 byte 0x00 Transparent mode off 0x01 Transparent mode on only for point to point If multipoint connections exist the RBT 001 will not enter transparent mode RoboTech Bluetooth Serial Module User Manual Ver 1 2 53 Data Status 1 R OK 1 byte R LIMIT R SPP INVALID PORT R SPP MULTIPLE TRANSPARENT R SPP PORT BUSY Get List of Default
9. onewojny 9poiN L Jejse w Jaysey Jejseyw yaUuodid opeuiojny uoN e S 17 RoboTech Bluetooth Serial Module User Manual Ver 1 2 Idle Automatic and Idle Non automatic After boot up reset or after successfully releasing the last link the RBT 001 stays within one of the Idle states In case the Automatic Operation bit is set to it is also called Idle Automatic Otherwise the state is called Idle Non Automatic In both modes the device is able to accept incoming links or the application can use the command interface to actively inquire or establish a link The difference between Automatic On and Off just shows up at an incoming connection Incoming Link at Idle Automatic In case the RBT 001 is not connected to any other device and gets an incoming link request it will L ask for authentication or pin code exchange L accept the link notify the application by an indicator turn off scanning disabling page scan and inquiry scan switch UART to Transparent Mode 1 3 2 2 Idle Automatic is optimised for cable replacement applications not requiring any interaction with the RBT 001 to accept an incoming link As the RBT 001 automatically switches to transparent mode the application can start sending Raw data immediately after
10. P CFM SPP SET PORT CONFIG REQ SPP GET PORT CONFIG me CFM SPP GET PORT CONFIG Set Port Config Description Write the configuration for the SPP port These are virtual settings for the air connection not the settings for the RBT 001 UART Note The baudrate in this configuration has no impact on the throughput on the Bluetooth link itself or the RBT 001 It is not used by the RFCOMM layer DataLength 60000 Data LocalPort Local RFCOMM port number Range 1 30 1 byte BaudRate Baudrate 1 byte 0x00 2400 baud 0x01 4800 baud 0x02 7200 baud 0x03 9600 baud 0x04 19200 baud 0x05 38400 baud 0x06 57600 baud 0x07 115200 baud 0x08 230400 baud Note The baudrate in this configuration has no impact on the throughput on the Bluetooth link itself or the RBT 001 It is not used by the RFCOMM layer The parameter might be used as informative parameter on the application level Portsettings Bitfield 000000XX Number of databits 00 5 bits 1 byte 01 6 bits 02 7 bits 0328 bits 7 58 1 1 5 Bitfield 0000 000 Parity 0 No parity 1 Parity RoboTech Bluetooth Serial Module 40 User Manual Ver 1 2 Bitfield 00 0000 ParityType XX00000 FlowControl Bitfield 0000000 XonXoffOnInput 0 Disable 1 byte 1 Enable Bitfield 000000 0 XonXoffOnOutput 0 Disable 1 Enable Bitfield 00000 00 RtrOnInput 0 Disable 1 Enable Bitfield 000 0000 RtcOnInput 0 Disable
11. 00 Reserved 22 0066 0x00 Reserved 23 0067 0068 RfcommLa 0 0000 Configures the default poll period of master to no tency slave 0x0000 No requirement default 40slots 0x0002 0x0190 Valid link latency 24 0069 006C 0x00000000 Reserved 25 006d UartParity 0x00 Parity setting for the hardware UART interface yes Bit 0x00 No Parity 0x01 Even Parity 0x02 Odd Parity 26 006E UartStopBit 0x00 Stop bit settings for the hardware UART interface yes 0x00 1 Stop bit 0x01 2 Stop bits RoboTech Bluetooth Serial Module 14 User Manual Ver 1 2 SW Reset No Address Parameter Default Value Description required 27 006F UartSpeed 0x03 Speed of the Hardware UART interface yes 2400 0x00 4800 0x01 7200 0x02 9600 0x03 19200 0x04 38400 0x05 57600 0x06 115200 0x07 230400 0x08 460800 0x09 921600 0x0A 28 0070 00AE RemoteDe 0x00 0x00 Default connections database to be connected no vices during boot up or by sending a command 29 OOAF OxFF Reserved 30 00BO OxFF Reserved 31 00B1 OxFF Reserved 32 00B2 00B3 OxFFFF Reserved 33 0084 OxFF Reserved 5 34 00 5 00 8 OxFFFF Reserved 35 00B9 00BC B OxFFFF Reserved 36 00 0 00 Filler 1 OxFF OXFF Filler not used 37 OOEF 011E Service OxFF OxFF SDP Security info storage no Records 38 011 F 0346 CoreNvs OxFF OxFF Link key storage 24 keys no
12. 1 2 47 Establish Release SPP link to a remote device This section describes the basic functionality of creating a full SPP link to a remote device Basically only one single command is needed to create the connection The command Establish Link requires the BD_Addr and the RFComm port of the remote device determined out of the Inquiry and the SDAP connection The command and event flow can be found within the following flowchart The command will first be confirmed by a standard confirmation package Afterwards the RBT 001 will start to page and try to connect to the remote device The SPP_Link_Establishment indicator returns an error code reporting the success of the link establishment Host RBT 001 REQ SPP_ESTABLISH_LINK gt lt SPP ESTABLISH LINK d IND SPP LINK ESTABLISHED RFCOMM DATA transfer Normal or transparent depending on how port is opened RFCOMM DLC link REQ SPP_RELEASE_LINK EI lt SPP RELEASE LINK IND SPP LINK RELEASED RFCOMM closed from either side or connection lost Establish Link Establish a DLC link to remote Bluetooth device PacketT ype REQ SPP_ESTABLISH_LINK DataLength Data LocalPort Local port number Range 1 30 1 byte BdAddr Bluetooth device address for the remote device 6 byte RemotePortNumber Remote device RFCOMM port number 1 byte Must be found using SDAP Description Confirm that the DLC link establishm
13. 49 in 34 41 x 45 65 T i x 12 51 mm rr en E eet Application Ideas TIL nnn vesten Control Boe Bot via Bluetooth from a Cell Phone or another Bluetooth module Communicate with a device or project wirelessly m Easy Bluetooth www vee ar com lt 2 Packing List RBT 001 Module 10 with connector Module pre assembled with RTB 001 Copyright O Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 1 of 9 Quick Start Circuit for the BASIC Stamp 2 and Board of Education There are a few steps to take to install an Easy Bluetooth module creating a Bluetooth connection on a PC operating with Windows XP and finally writing a program for the BASIC Stamp 2 Once you are done you will have a working Easy Bluetooth module communicating with the PC via Bluetooth Installing the Easy Bluetooth Module 1 Carefully open the Easy Bluetooth package and check that the two small boards are properly plugged into each other as shown in Figure 1 2 Now plug the Easy Bluetooth module into the AppMod header of the Board of Education insert the module in the left row of the AppMod Header and notice there are labels on the module that indicate correct pin placement Rx uses PO Tx uses P2 Vss with Vss and Vdd with Vdd Visually confirm the module is inserted correctly using Figure 2 before powering 3 Connect a communication cable and power supply to the Board of Education and turn t
14. 78 1 byte 0 2402 MHz 78 2480 MHz 255 Hopping in connection state RoboTech Bluetooth Serial Module User Manual Ver 1 2 70 x Q ModulationPayload Defines one byte of payload repeated through packet if byte Test 1 else ignored Options 0 Whitening is disabled for transmit 1 byte 1 Whitening is enabled for transmit 2 255 Reserved for future use PaCtrl Reserved for future use byte ModulationCtrl Modulation Control 1 byte No modulation Access code only 68 us TX data every 1250 us Bluetooth DH1 packet with defined payload Bluetooth DM1 packet 17 bytes Bluetooth DH1 packet 27 bytes Invalid Invalid Bluetooth HV3 packet 30 bytes Invalid Bluetooth AUXI packet 29 bytes 10 Bluetooth DM3 packet 121 bytes 11 Bluetooth DH3 packet 183 bytes 12 Invalid 13 Invalid 14 Bluetooth DMS packet 224 bytes 15 Bluetooth DH5 packet 339 bytes ModulationPattern Defines Access Code modulation if ModulationCtrl 1 else 8 bytes ignored Confirms the request above RF_TEST_MODE Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS Read RSSI Description This command will read out the current RSSI value for given link a remote device PacketType READ RSSI 6 Data BdAddress Bluetooth Address of the remote device for which to read out the 6 byte current RSSI value Data Statu
15. LinkKeys 39 0347 0355 OxFF OxFF Reserved 40 0356 0367 OxFF OxFF Reserved 41 0368 037F Filler2 OxFF OxFF Filler not used 42 0380 137F SdpRecord OxFF OxFF SDP record storage no S 43 1380 1 FFF OxFF OxFF Reserved Automatic operation on off The Automatic operation flag is checked after Reset Boot up and on incoming links According to this flag the firmware will initiate automatic steps Automatic Operation On Automatic Operation Off L Connect to Default connections stored in NVS L Switch UART to Transparent Mode after first incoming link Transparent Slave L No automatic steps after Reset Boot up RoboTech Bluetooth Serial Module User Manual Ver 1 2 15 Force Master on off This flag improves multipoint operation of the RBT 001 In normal operation the RBT 001 will be slave for any incoming link which limits the number of incoming connects to 2 devices In case the Force Master Bit in the NVS is set to On the RBT 001 will request a role switch on any incoming link to become Master Force Master On L Request Role Switch on incoming link to become Bluetooth Master Link will be dropped if role switch not successful Force Master Off L Accept incoming link as slave Default connections stored in NVS In case the automatic operation bit is set to On the default connections database is checked for any valid entry If a valid entry is found the RBT 001 tries three
16. Web Site www parallax com Office 916 624 8333 Z Forums forums parallax com Fax 916 624 8003 aN r1 Sales sales parallax com Sales 888 512 1024 Technical support parallax com Tech Support 888 997 8267 Easy Bluetooth 30085 The Easy Bluetooth is a RoboTech RBT 001 Bluetooth serial module with an adapter specifically designed to be used with the Parallax Board of Education AppMod Header or breadboard In addition the Easy Bluetooth can plug into any 0 1 inch spacing development platform which allows it to be breadboard friendly and also easy to implement into a soldering application The module has two parts the RBT 001 module and the SIP with voltage regulator PCB With the on board regulator the module can be connected to voltages higher than 3 3 VDC such as the Board of Education regulated supply 5 VDC without worry of damaging the unit while the RX and TX can utilize serial communication at CMOS and TTL levels Features 1 x amp 2 0 Bluetooth Compliant Class 2 Operation nominal range up to 30 meters 10 SIP package for breadboard perfboard or Board of Education AppMod Header On board regulator for safe operations across various voltages CMOS amp TTL Compatible Key Specifications Power requirements 3 3 to 5 5 VDC Communication UART Command Data Port supports for up to 921 6k baud Operating temperature 32 to 113 F 0 to 45 C Dimensions 1 40 x 1 79 x
17. byte F E E E E E E E RoboTech Bluetooth Serial Module User Manual Ver 1 2 50 Incoming Data Incoming data on a DLC link from a remote Bluetooth device Data LocalPort Local RFCOMM port number Range 1 30 1 byte PayloadSize Number of data bytes to send 2 bytes Valid range is 1 to 330 bytes PayloadData The data to send lt PayloadSize gt bytes Sending Receiving data on a SPP link Transparent mode For connections with high data rate requirement a transparent mode can be used for data transfer When using transparent mode data are sent can be sent full duplex with no framing The SPP TRANSPARENT MODE request must be sent to switch to transparent mode To stop the data transfer a UART BREAK signal must be sent from the application the RBT 001 will then leave transparent mode Host RBT 001 REQ SPP ESTABLISH LINK gt SPP_ESTABLISH_LINK IND SPP LINK ESTABLISHED REQ SPP TRANSPARENT MODE SPP_TRANSPARENT_MODE Transparent mode entered after sending cfm RFCOMM DATA transfer transparent with no framing RFCOMM DLC link UART BREAK signal leaves controlled close Transparent mode UART BREAK signal IND SPP_TRANSPARENT_MODE COMMAND MODE REQ SPP RELEASE LINK CFM SPP RELEASE LINK RFCOMM DLC link Released IND SPP LINK RELEASED rtt RoboTech Bluetooth Serial
18. device CFM INQUIRY Inquiry Data Length Duration of inquiry 1 byte Range 0x01 0x30 1 28s 61 44s NumResponses Maximum number of responses byte Range 0x00 OxFF 0x00 Unlimited number of responses Mode General Inquiry 0x00 Byte Limited Inquiry 0x01 Data Status ERROR_OK 1 byte ERROR_DURATION_OUT_OF_RANGE ERROR_INVALID_MODE ERROR_INVALID_NO_OF_PARAMETERS Device Found Indicates that a device has been found DataLength Data BdAddr Bluetooth device address of the found device 6 bytes DeviceClass Class of the found device 3 byte RoboTech Bluetooth Serial Module User Manual Ver 1 2 26 Getting user friendly name of remote Bluetooth Device Host RBT 001 REQ REMOTE_DEVICE_NAME CFM REMOTE_DEVICE_NAME Remote Device Name Request the user friendly name from a known remote Bluetooth device PacketType GAP_REMOTE_DEVICE_NAME DataLength BdAddr Bluetooth device address for the remote device 6 byte em Oyy Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR TIMEOUT BdAddr Bluetooth device address for the remote device 6 byte NameLength Number of bytes in device name byte DeviceName The user friendly name of the remote device Length bytes NULL terminated Maximum length is 40 bytes RoboTech Bluetooth Serial Module User Manual Ver 1 2 27 Reading the user friendly name of the local device Host RBT 001 REQ READ_LO
19. 001 will send a SPP Port Status Changed Indicator to its application PacketType REQ SPP PORT FRAMING ERROR DataLength 1 Local port number Range 1 30 1 byte RoboTech Bluetooth Serial Module User Manual Ver 1 2 46 Description Confirm to the request above PacketType CFM SPP_PORT_FRAMING_ERROR DataLength 1 Data Status ERROR_OK 1 byte ERROR_SPP_INVALID_PORT ERROR_SPP_PORT_NOT_OPEN i Local RFCOMM port number Range 1 30 1 byte Port Status Changed Send from the RBT 001 when remote device has changed the port IND SPP_PORT_STATUS_CHANGED DataLength 4 Data LocalPort Local RFCOMM port number Range 1 30 1 byte PortStatus Bitfield 0000000 DTR 0 Low 1 1 High Bitfield 000000 0 RTS 0 Low 1 High Bitfield 00000X00 DSR 0 Low 1 High Bitfield 0000X000 CTS 0 Low 1 High Bitfield 000 0000 Overrun Error 0 No Error 1 Overrun Error Bitfield 00 00000 Parity Error 0 No Error 1 Parity Error Bitfield 0 000000 Framing Error 0 No Error 1 Framing Error Bitfield X0000000 DLC established 0 No DLC 1 DLC is available BreakLength The length in ms of a break detected by the remote device Range 0 3000 2 bytes The value 0 is used to indicate that no break has been detected The break length is sent in 200 ms units on the air interface RoboTech Bluetooth Serial Module User Manual Ver
20. No parity 1 Parity a Bitfield 00XX0000 ParityType Bite 0 002 FlowControl Bitfield 0000000X XonXoffOnInput 0 Disable _ Bitfield 000000 0 XonXoffOnOutput 0 Disable pe eer ee Bitfield 00000 00 RtrOnInput 0 Disable EN C GS NEN EN Bitfield 0000X000 RtrOnOutput 0 Disable C Bitfield 000 0000 RtcOnInput 0 Disable p Jc sae Bitfield 00X00000 RtcOnOutput 0 Disable 0 iae ______ E 22022 E Biel XonChar Char used for Xon if Xon Xoff flowcontrol is used 1 byte XoffChar Char used for Xoff if Xon Xoff flowcontrol 15 used byte Changed Sent from the RBT 001 when remote device has changed the port configuration IND SPP PORT CONFIG CHANGED Local RFCOMM port number Range 1 30 1 byte BaudRate Baudrate 1 byte 0x00 2400 baud 0x01 4800 baud 0x02 7200 baud 0x03 9600 baud 0x04 19200 baud 0x05 38400 baud 0x06 57600 baud 0x07 115200 baud 0x08 230400 baud Portsettings Bitfield 000000XX Number of databits 00 5 bits 1 byte 01 6 bits 02 7 bits 03 8 bits Bitfield 00000 00 Number of stopbits 1 1 5 RoboTech Bluetooth Serial Module User Manual Ver 1 2 42 Bitfield 0000 000 Parity 0 No parity 1 Parity NE Bitfield 00 0000 ParityType Reened Cd FlowControl Bitfield 0000000 XonXoffOnInput 0 Disable 1 byte 1 Enable Bitfield 000000 0 XonXoffOnOutput 0
21. RELEASE LINK Daalen 77 7 Data Status ERROR OK 1 byte ERROR NO CONNECTION ERROR SPP INVALID PORT ERROR SPP PORT NOT OPEN Local RFCOMM port number Range 1 30 1 byte RoboTech Bluetooth Serial Module User Manual Ver 1 2 49 Link Released Description Indicates that a DLC link is released The link release may have been initiated locally or remote or could be caused by a loss of link disturbance dead device PacketType SPP_LINK_RELEASED DataLength Data Reason Refer to section RFCOMM Release Reasons on page 76 1 byte BEN NEN Local RFCOMM port number Range 1 30 1 byte Sending Receiving data on a SPP link Normal mode In the normal mode data are transferred in packets with normal framing Host RBT 001 REQ RFCOMM SEND DATA CFM RFCOMM SEND DATA IND RFCOMM INCOMING DATA Send Data If not switched to transparent data have to be sent to a remote device using this command The local RFComm Port is used to address the remote device Send data on a SPP link to remote Bluetooth device Data LocalPort Local RFCOMM port number Range 1 30 1 byte PayloadSize Number of data bytes to send 2 bytes Valid range is 1 to 330 bytes PayloadData The data to send lt PayloadSize gt bytes Confirm to the request above ERRO RO RO E TO SEND RO ENTLY NO BUFFE RO ECTION RO PP INVALID PORT RO E PORT NOT OPEN Local RFCOMM port number Range 1 30
22. State The new state of the SDP record 1 byte 0x00 Disable the record 0x01 Enable the record The identifier received when the record was stored in the RBT 001 1 byte Confirms the request above CFM ENABLE_SDP_RECORD 2 Data Status ERROR_OK 1 byte ERROR_ILLEGAL_STATE_VALUE ERROR IDENTIFIER OUT OF RANGE ERROR RECORD ALREADY IN SELECTED STATE ERROR IDENTIFIER NOT IN USE ERROR INVALID NO OF PARAMETERS Identifier The identifier received when the record was stored in the RBT 001 1 byte Delete All SDP Records This command is used to delete all stored SDP records in the RBT 001 n PacketType REQ DELETE SDP RECORDS DataLength C Description Confirms the request above PacketType DELETE_SDP_RECORDS DataLength 1 Data Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS RoboTech Bluetooth Serial Module User Manual Ver 1 2 68 Store Generic SDP Record Description This command will create a new service record in the local SDP database stored in the NVS PacketType STORE_SDP_RECORD DataLength 5 lt SdpRecordLength gt Data LocalPort The local RFCOMM port used by this service Range 1 to 30 1 byte Authentication 0x00 No authentication requirements 1 byte 0x02 Authentication is only required for this profile for incoming connections 0x20 Authentication is only required for this profile for outgoing connections 0x22 Authentication is required for this profile for c
23. command is used to change the default link policy The default link policy is set during connection setup The default link policy setting is stored in NVS REQ SET_DEFAULT_LINK_ POLICY DataLength 2 Data LinkPolicy Bitfield 2 byte 0x0001 Master slave switch allowed 0x0002 Hold mode allowed 0x0004 Sniff mode allowed 0 0008 Park mode allowed RoboTech Bluetooth Serial Module 64 User Manual Ver 1 2 Description Response to the request above PacketT ype SET_DEFAULT_LINK_POLICY DataLength ft Data Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS ERROR ILLEGAL LINK POLICY Get Default Link Policy This command is used to read the default link policy setting from NVS DataLength 002 Dalengh _ 2 Data LinkPolicy Bitfield 2 byte 0x0001 Master slave switch allowed 0x0002 Hold mode allowed 0x0004 Sniff mode allowed 0x0008 Park mode allowed Set Event Filter Description This command is used to set the event filter The setting is stored in NVS PacketType SET_EVENT_FILTER DataLength Data Filter 0x00 All events reported 1 byte 0x01 No ACL Link Indicators default 0x02 No events reported UART break still generated and detected 0x03 No events generated UART break not generated or detected full cable replacement Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR LIMIT RoboTech Bluetooth Serial Module User Manual Ver 1 2
24. for a given service by 4 bytes SDAP_ATTRIBUTE_REQUEST AttributesLength Number of 16 bit UUID s in attributeld list Note Must be less than 1 byte 86 elements Attributes List of requested attributes for the requested services The attribute lt 2 AttributesLength list is a list of 16 bit UUID s for the requested attributes gt bytes CM eee Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS ERROR_UNKNOWN_ERROR ERROR_RESULT_TOO_LARGE Length of the result of the search Maximum 330 bytes 2 byte Result of the search RoboTech Bluetooth Serial Module User Manual Ver 1 2 60 Configuration Change NVS UART Speed Description This command will change the UART speed stored in NVS The new UART speed will be used after a reset CHANGE_NVS_UART_SPEED DataLength Data UartSpeed The UART speed to be stored in NVS 1 Byte 0x00 2400 0x01 4800 0x02 7200 0x03 9600 0x04 19200 0x05 38400 0x06 57600 0x07 115200 0x08 230400 0x09 460800 921600 Data Status ERROR_OK 1 byte ERROR_UART_SPEED_OUT_OF_RANGE ERROR_INVALID_NO_OF_PARAMETERS Change UART Settings Description This command will change the UART settings stored in NVS The new UART settings will be used after a reset CHANGE_UART_SETTINGS DataLength Data PartityBit 0x00 None 1 Byte 0x01 Even 0x02 Odd StopBits 0x00 One Stop bit 1 Byte 0x01 Two Stop bits Data Status ERROR OK 1 byte ERROR PARITY BIT OUT OF RA
25. modules After delay turn BOE1 and BOE2 on simultaneously The connection takes a few moments but there should be visual confirmation that the connection is successful by the green blinking LED on the modules Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 7 of 11 Step 12 Open Terminal Window Open a terminal window in the BASIC Stamp editor ctrl d and select the COM port BOE1 was programmed on use the default settings in the terminal window Y Debug Terminal Com Port Baud Rate Parity Data Bits Flow Control x RIS None cows gt seo 8 u z em Macros Pause Clear Echo Off Resources and Downloads Source code available from the Parallax web site Device Information Theory of Operation This is a simple demo to illustrate the communication between two Easy Bluetooth modules on Board of Education using a BASIC Stamp 2 instead of a PC dongle The Dongle used in this example is for configuration purposes Once the communication link has been established one could simply rearrange the information for a number of applications robotic control wireless communication addressable wireless protocols and so on Enjoy and feel free to share your projects on the Parallax Support Forums This examples uses Bluetooth to send a variable counter from one to the other which then displays t
26. name optional Press the button on the bottom of the device keyboards and mice only D Add only Bluetooth devices that vou trust Add Bluetooth Device Wizard Select the Bluetooth device that you want to add New device 4 Ifyou don t see the device that you want to add make sure that it is turned on Follow the setup instructions that came with the device SeachAgan J and then click Search Again Search Again Add Bluetooth Device Wizard Do you need a passkey to add your device To answer this question refer to the Bluetooth section of the documentation that came with your device If the documentation specifies a passkey use that one Choose a passkey for me 7 Let me choose my own passkey Don t use a passkey n You should always use passkey unless your device does not support one We recommend using a passkey that is 8 to 16 digits long The longer the passkey the more secure it will be see Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 5 of 11 Click Finish to complete the setup of the BOE1 Easy Bluetooth module Note Make a note or write down the Outgoing and Incoming COM ports that the Bluetooth uses they can be used later with the Easy Bluetooth for communication with various applications like Hyper Terminal or the Terminal Window in the BASIC Stamp editor Step 7 Obtain Recipient Modules De
27. oet OVelrup hne peek e e kn E n ke EE naa Canama asa 46 Gel Partly ETTOU erdt cn EDAD S xe LN spe ca xe Caec tide pP Ie is canes 46 M A E A ena DM RAE 46 Port Status Changed coste et pl iugi 47 Establish Release SPP link to a remote 48 Establish EU soni au odit rpm So teste eo nacer ant ta ced 48 EMK Establi Shea scire dirae paced ee aa Sk 49 Incoming Link Established 49 RoboTech Bluetooth Serial Module 3 User Manual Ver 1 2 Release 20 2 1 1 6 49 Link aa tht 50 Sending Receiving data on a SPP link Normal 50 Senc DAla dne Mice dace Maca acra Mcd d 50 incoming Data P 51 Sending Receiving data on a SPP link Transparent mode 51 NGOS LIE 52 Conneclloe assassin dotata ON 53 Connect Default Comme n le uv Mia tet US 53 Store Default 53 Get List of Default Connections 54 Delete Defaut
28. receiving the notification Incoming Link in Idle Non Automatic In case the RBT 001 is not connected to any other device and gets an incoming link request it will L ask for authentication or pin code exchange L accept the link L notify the application by an indicator L change state to Single Slave After link establishment the command interface is still active delivering incoming data using the Incoming Data Indicator To send data the command SPP Send Data needs to be used Idle Non automatic is optimised for multi profile applications which need to manage multiple links or different profiles at the same time As the RBT 001 stays in command mode the application still has full control over the RBT 001 to establish links or do configurations In case Transparent Mode would be beneficial for some data transfer it can be reached anytime by sending the Transparent Mode command Piconet Master In Piconet Master the RBT 001 is in a link with one or more devices as Bluetooth Master The Bluetooth specification describes the Master as the controlling device for the piconet The Master defines the hopping sequence and manages the connection to each slave In general a Bluetooth device will be master of the link when it initiated the link using the paging procedure A device accepting an incoming link is called slave However every RoboTech Bluetooth Serial Module 18 User Manual Ver 1 2 Bluetooth device is able
29. remote device for the 29190 for the given services in the search i ESE services in the search pattern PacketType SDAP_SERVICE_REQUEST DataLength 2 2 SearchPatternLength Data SearchPatternLength Number of 16 bit UUID s in Search pattern List Note Must be less 1 bytes than 86 elements SearchPattern List of the requested services The search pattern list is a list of 16 lt 2 SearchPatternLen bit UUID s of the requested services gth gt bytes Confirms the request above Ci Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR UNKNOWN ERROR ERROR RESULT TOO LARGE Ge l Number of 32 bit service record handles returned from remote 1 Ge l device Result The received 32 bit service record handles from the remote device lt 4 Length gt bytes Attribute Request Instead of browsing the whole list of services within the remote database it is also possible to search only for specific attributes within a chosen entry This command is based on the attribute connection handle of that specific entry Connection handles can be retrieved by the SDAP Service Search Command RoboTech Bluetooth Serial Module 59 User Manual Ver 1 2 Description This command is used to get the given attributes for a given service record handle PacketType _ SDAP_ATTRIBUTE_REQUEST DataLength 5 2 AttributesLength Data Handle The 32 bit service record handle returned
30. times to connect to each device stored in the database Default connection transparent On Off Each default connection can be configured to switch the UART to Transparent Mode or to Command Mode after link establishment In case the transparent flag is set the RBT 001 will switch to Transparent Mode once the link is established NOTE The transparent flag can only be activated if only one default connection is stored in the database Operation States As combination out of the different parameters and usage scenarios the following states can be defined for the RBT 001 The parameters and possibilities for this states are summarized in the following Table Overview of Operation States An example on how to read the Table E g Scatternet Master assuming default NVS settings L In Scatternet Master the device is in command mode listening to commands L The automatic flag in NVS has no influence The device is discoverable and connectable for other devices L The device is Master for x slaves and slave to 1 Master It is possible to search for other devices but it is not possible to be connected from another device RAW data traffic is not possible L No Incoming link possible In case the command interface is used to establish a link to another device the device stays in Scatternet Master L A UART BREAK has no influence on the functionality Sending the command Transparent Mode is not applicable for this mode
31. will try to interpret all data sent over the UART to a known command The commands have to be sent in a specific package format The interface is based on an event mechanism Any command sent will be confirmed by the appropriate confirmation event Unexpected events e g incoming links will be reported by indication events Please refer to the following section for a complete list of commands and their usage Transparent Mode In case the RBT 001 has established a link to only one remote device and no configuration commands have to be sent to the RBT 001 Command Mode the UART interface can be switched to Transparent mode This means data are directly routed to the Bluetooth link and not interpreted Also incoming data are not indicated as events they are sent as RAW data to the UART Leaving transparent mode As the RBT 001 does not listen to commands UART Break has to be used to tell the device to leave the transparent mode RoboTech Bluetooth Serial Module 12 User Manual Ver 1 2 Bluetooth mode The operation of the RBT 001 can be divided into different states Each state represents special situations and describes the behaviour of the module The operation states are influenced by a few features stored in the NVS Non Volatile Storage Depending on those the device will come up to different modes and act according to those settings NVS Settings influencing the operation state Before actually describing the diff
32. 0x08 Connection Timeout 0x09 Max Number Of Connections Number Of SCO Connections Device 0x0B ACL connection already exists 0x0C Command Disallowed 0x0D Host Rejected due to limited resources OxOE Host Rejected due to security reasons OxOF Host Rejected due to remote device is only a personal device 0x10 Host Timeout 0x11 Unsupported Feature or Parameter Value 0x12 Invalid Command Parameters 0x13 Other End Terminated Connection User Ended Connection 0x14 Other End Terminated Connection Low Resources 0x15 Other End Terminated Connection About to Power Off 0x16 Connection Terminated by Local Host 0x17 Repeated Attempts 0x18 Pairing Not Allowed 0x19 Unknown LMP PDU Unsupported Remote Feature 0x1B SCO Offset Rejected 0x1C SCO Interval Rejected 0x1D SCO Air Mode Rejected Ox1E Invalid LMP Parameters Ox1F Unspecified Error 0x20 Unsupported LMP Parameter Value 0x21 Role Change Not Allowed 0x22 LMP Response Timeout 0x23 LMP Error Transaction Collision 0x24 LMP PDU Not Allowed 0x25 Encryption Mode Not Acceptable RoboTech Bluetooth Serial Module User Manual Ver 1 2 73 0 26 Unit Key Used 0x27 QoS is Not Supported 0x28 Instant Passed 0x29 Pairing with Unit Key Not Supported 2 Different Transaction Collision 0x2B Reserved 0 2 QoS Unacceptable Parameter 0x2D QoS Rejected Ox2E Channe
33. 1 Enable Bitfield 00 00000 RtcOnOutput 0 Disable 1 Enable XonChar Char used for Xon if Xon Xoff flowcontrol is used 1 byte XoffChar Char used for Xoff if Xon Xoff flowcontrol is used 1 byte Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ERROR ERROR_UNSPECIFIED_ERROR ERROR_SPP_INVALID_PORT ERROR_SPP_PORT_NOT_OPEN ERROR_UART_SPEED_OUT_OF_RANGE Local port number Range 1 30 1 byte Bitfield 0000 000 RtrOnOutput 0 Disable 1 Enable Get Port Config Description Read the configuration for the SPP port This is virtual settings for the air connection not settings for the RBT 001 serial port REQ SPP_GET_PORT_CONFIG Local port number Range 1 30 1 byte Confirm to the request above CFM SPP_GET_PORT_CONFIG 7 Data Status ERROR_OK 1 byte ERROR UNSPECIFIED ERROR ERROR SPP INVALID PORT ERROR SPP PORT NOT OPEN RoboTech Bluetooth Serial Module User Manual Ver 1 2 41 Port Config PacketT ype DataLength Local RFCOMM port number Range 1 30 1 byte BaudRate Baudrate 1 byte 0x00 2400 baud 0x01 4800 baud 0x02 7200 baud 0x03 9600 baud 0x04 19200 baud 0x05 38400 baud 0x06 57600 baud 0x07 115200 baud 0x08 230400 baud Portsettings Bitfield 000000XX Number of databits 00 5 bits 1 byte 01 6 bits 02 7 bits 03 8 bits Bitfield 00000X00 Number of stopbits 1 1 5 Bitfield 0000 000 Parity 0
34. 45 SPP_PORT_FRAMING_ERROR 0x46 SDAP_CONNECT 0x32 SDAP_DISCONNECT 0x33 SDAP_CONNECTION_LOST 0x34 SDAP_SERVICE_BROWSE 0x35 SDAP_SERVICE_SEARCH 0x36 SDAP_SERVICE_REQUEST Ox1E SDAP_ATTRIBUTE_REQUEST OxSF CHANGE NVS UART SPEED 0x23 CHANGE_UART_SETTINGS 0x48 SET PORTS TO OPEN 0x22 GET PORTS TO OPEN Ox1F RESTORE_FACTORY_SETTINGS Ox1A STORE_CLASS_OF_DEVICE 0x28 FORCE_MASTER_ROLE 0x1D READ OPERATION MODE 0x49 WRITE OPERATION MODE 0 4 SET DEFAULT LINK POLICY 0 4 GET_DEFAULT_LINK_POLICY 0x4D SET_EVENT_FILTER Ox4E GET EVENT FILTER Ox4F SET DEFAULT LINK TIMEOUT 0x55 GET DEFAULT LINK TIMEOUT 0x56 SET DEFAULT LINK LATENCY 0x63 GET DEFAULT LINK LATENCY 0x64 SET PCM SLAVE CONFIG 0x74 ENABLE_SDP_RECORD 0x29 DELETE_SDP_RECORDS 0 2 STORE_SDP_RECORD 0x31 RESET 0x26 RBT 001 READY 0x25 TEST MODE 0x24 WRITE ROM PATCH 0x47 READ RSSI 0x20 RF TEST MODE Ox4B DISABLE TL 0x52 RoboTech Bluetooth Serial Module User Manual Ver 1 2 24 Opcode Value TL_ENABLED 0x53 AWAIT_INITIALIZATION_ EVENT 0x66 ENTER BLUETOOTH MODE 0x66 READ NVS 0x72 WRITE NVS 0x73 Data length Number of bytes in the Packet data area The maximum size is 333 bytes Packet data The data fields hold binary data hence both 0x02 STX and 0x03 ETX are allowed as data Checksum This is a simple Block Check Character BCC checksum of the bytes from Packet type to and including data length The BCC checksum is cal
35. 65 Get Event Filter This command reads the current event filter setting PacketT ype REQ GET_EVENT_FILTER DataLength Response to the request above CFM GET_EVENT_FILTER l Data Filter 0x00 All events reported 1 byte 0 01 No ACL Link Indicators default 0x02 No events reported UART break still generated and detected 0x03 No events generated UART break not generated or detected full cable replacement Set Default Link Timeout Description This command is used to change the default link supervision timeout The default link supervision timeout is set during connection setup The default link supervision timeout setting is stored in NVS REQ SET_DEFAULT_LINK_TIMEOUT 2 Data LinkTimeout The link supervision timeout in slots 0 625ms The default value 2 byte stored in the NVS after a factory reset is 20s 0x0000 No link supervision timeout the timer is disabled 0x0190 OxFFFF Valid timeout range slots 0x7D00 The default value 20s Description Response to the request above PacketType CFM SET_DEFAULT_LINK_TIMEOUT Data Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS ERROR ILLEGAL LINK TIMEOUT Get Default Link Timeout Description This command is used to read the default link supervision timeout setting from NVS PacketType GET_DEFAULT_LINK_TIMEOUT DataLength Data LinkTimeout The link supervision timeout in slots 2 byte 0x0000 No li
36. C s s Confirm to the request above PackerType GAP_READ_LOCAL_BDA DataLength Data Status ERROR OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR UNKNOWN ERROR BdAddr Bluetooth device address for the local device 6 byte Changing Scanmode Connectability and Discoverabilit Connectability and Discoverability is set with this single request Host RBT 001 REQ SET SCANMODE CFM SET SCANMODE IND SET SCANMODE 60 seconds RoboTech Bluetooth Serial Module User Manual Ver 1 2 29 Set Scan Mode Description Change the Bluetooth scan mode Automatic limited discoverable mode automatically toggles between general and limited inquiry scanning This mode defined by the Bluetooth GAP profile specification refer to part K 1 section 6 2 1 The automatic Limited discoverable mode times out after 60 sec At this point the RBT 001 sends the GAP SET SCANMODE indication and resets page and inquiry scan settings to the value that was stored before the automatic limited discoverable mode was entered The Connectability mode and discoverability modes are stored in NVS and restored during startup An exception are the limited discoverable mode and automatic limited discoverable modes are selected in this case neither connectability mode or discoverability mode are stored in NVS REQ SET SCANMODE 2 Data Connectability 0x00 Not connectable 1 byte 0x01 Connectable 0x81 Connectable using Int
37. CAL_NAME CFM READ_LOCAL_NAME Read Local Name Description Request the user friendly name for the local Bluetooth device PacketT ype GAP_READ_LOCAL_NAME DataLength Ba Ne Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR UNKNOWN ERROR NameLength Number of bytes in device name 1 byte DeviceName The user friendly name of the local device NameLength bytes The string is NULL terminated Max length is 40 bytes Changing the user friendly name of the local device Host RBT 001 REQ WRITE LOCAL NAME WRITE_LOCAL_NAME Write Local Name Description Change the user friendly name for the local Bluetooth device The name is stored in NVS PacketType GAP_WRITE_LOCAL_NAME DataLength 1 NameLength Data NameLength Number of bytes in device name DeviceName The user friendly name of the local device Length bytes String must be NULL terminated Max length is 40 bytes RoboTech Bluetooth Serial Module User Manual Ver 1 2 28 Description Confirm to the request above PacketT ype GAP_WRITE_LOCAL_NAME Data Status ERROR_OK 1 byte ERROR NAME TOO LONG ERROR INVALID NO OF PARAMETERS Heading the Bluetooth device address of the local device Host RBT 001 REQ READ LOCAL BDA CFM READ LOCAL BDA Read Local Bluetooth Address Read the Bluetooth device address of the local Bluetooth device DataLength O 0 e _ T C
38. Connection in which the transparent flag is set to Ox01 Leaving Transparent Master initiated by a UART break will lead into Piconet Master state Since the RBT 001 can not send any events or react on incoming commands scanning is switched off and therefore the RBT 001 is not discoverable or connectable for other devices Single Slave The Bluetooth specification defines a Bluetooth slave as the device which is connected by another device and adjusting to the timing of that device Master The slave synchronizes to the clock of Master and to its hopping sequence In an active link the master polls each slave by default every 40 slots to keep them synchronized but also to allow the slave to send data By default the RBT 001 accepts any incoming link Depending on the configuration of Security level Set Security Mode and the Service Database entry the device will ask for authentication The RBT 001 can be assumed to be in Single Slave after one of the following actions appeared L The RBT 001 accepted an incoming link and reports it by the SPP Link Established Indicator while the Automatic Operation flag is set to 0 00 Non automatic L The host sends a UART Break to a RBT 001 in Transparent Slave In theory there s also the possibility for Single Slave in case the RBT 001 actively establishes a link to another device which requests a role switch In this case the initiating device will be slave Since the role switch is n
39. Connections Request a list of the default connections stored in NVS SPP GET LIST DEFAULT CON DataLength 1 Index in the default connection storage Range 0x00 to 0x06 1 byte Confirm to the request above PacketType SPP_GET_LIST_DEFAULT_CON DataLength 11 Data Status ERROR_OK 1 byte ERROR_LIMIT Index Index in the default connection storage Range 0x00 to 0x06 1 byte EntryStatus Bitfield 0000000 0 Entry is not stored 1 byte 1 Entry is stored Bitfield 000000 0 0 Command mode 1 Transparent mode 2 Bitfield xxxxxx00 Reserved RemoteBdAddress The BdAddress of the remote device 6 bytes LocalPort Local port number Range 1 30 1 byte RFCOMM port number on remote device 1 byte Delete Default Connection Deletes a stored default connection in NVS REQ SPP_DELETE_DEFAULT_CON DataLength 1 Index in the default connection storage Range 0x00 to 0x06 1 byte RoboTech Bluetooth Serial Module User Manual Ver 1 2 54 Confirm to the request above PacketType SPP_DELETE_DEFAULT_CON DataLength 1 Data Index Index in the default connection storage Range 0x00 to 0x06 1 byte Status 0x00 OK 1 byte Link supervision Timeout Set Link Timeout Description This command is used to change the current ACL link supervision timeout This command will affect all DLC s established to the specified device REQ SPP_SET_LINK_TI
40. D_NO_OF_PARAMETERS ERROR_LINKKEY_DOES_NOT_EXISTS List Devices Hequest a listo paired devices fromNVS a list of paired devices from NVS 22 2722 eS DataLength 0 o O em OOO Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS DeviceCount Number of devices in the list of paired devices 1 byte If 0 the device is not paired to any other devices The maximum number of paired devices is 7 BdAddresses The list of paired devices 6 byte DeviceCount Air interface Low Power Modes A Bluetooth link is a based on a physically synchronized connection which means that the devices can only communicate after successful synchronization For this each package also includes some synchronization information Also a specific polling scheme is in place to keep synchronization if no traffic is necessary As the slave has to actively listen to packages from the master there are different methods to decrease the necessary active receive slots on devices The ability to switch to those specific modes is controlled by the Link Policy To make sure both devices support the low power mode requested Link Policy can be set first It will only be successful if both sides support it Enter Sniff Mode Command to enter the sniff mode The command includes the maximum and minimum value for the sniff interval After sending the command Master and slave will calculate a reasonable sniff time and will switch i
41. Disable 1 Enable Bitfield 00000 00 RtrOnInput 0 Disable 1 Enable Bitfield 0000 000 RtrOnOutput 0 Disable 1 Enable Bitfield 000 0000 RtcOnInput 0 Disable 1 Enable Bitfield 00 00000 RtcOnOutput 0 Disable 1 Enable Bici XX000000 XonChar Char used for Xon if Xon Xoff flowcontrol is used 1 byte XoffChar Char used for Xoff if Xon Xoff flowcontrol is used 1 byte Reading changing current port status SPP link allows signaling of Modem status and line status over the Bluetooth link The commands for changing Modem Line status will only have effect if the SPP link is available Local Remote Host RBT 001 RBT 001 Host REQ SPP_SET_DTR is i ye CFM SPP SET DTR Pi IND SPP PORT STATUS CHANGED _ REQ SPP GET PORT STATUS SPP GET PORT STATUS Get Port Status Description Get the current state of the modem status and line status This command resets the value to 0 of the following members of the port status OverrunError ParityError FramingError BreakLength The value of DSR and CTS are only changed when new values are received from the remote device PacketType SPP GET PORT STATUS DataLength Local RFCOMM port number Range 1 30 1 byte RoboTech Bluetooth Serial Module User Manual Ver 1 2 43 Confirm to the request above CFM SPP_GET_PORT_STATUS 5 Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ERROR ERROR_SPP_INVALID_PORT ERR
42. IND DEVICE_READY DataLength 1 Length Data Length Number of bytes in software version string 1 byte version ASCII string containing the software version e g 0210 indicating lt Length gt bytes that the software version is version 2 10 Test Mode Description This command will activate the test mode To exit the test mode a reset of the device must be performed If local loopback mode is activated all data send to the device though the UART are send back to the host The device can only leave local loopback mode by performing a hardware reset PacketType TEST MODE DataLength Data Mode The Bluetooth test mode to enter 1 byte 0x01 Enable Bluetooth test mode 0x02 Enable local loopback mode DataLength 2 Data Status ERROR OK 1 byte ERROR ILLEGAL TESTMODEB ERROR UNKNOWN ERROR ERROR INVALID NO OF PARAMETERS HF TEST MODE Description This command will activate the RF test mode To exit the test mode a reset of the device must be performed The transmitter test must be stopped before a new test with changed parameters can be started RF TEST MODE DataLength Data Test Test Scenario 1 byte 0x00 Stop transmit 0x01 Burst transmit take payload from this command 0x02 Burst transmit use PRBS 9 sequence 0x03 Continuos transmit sends all 1 if ModulationPayload is nonzero otherwise all 0 0x04 Hopping receive 0x05 continuos receive at fixed channel Channel Channel number 0
43. MEL Data ___ __ ___ ___ ______ _ _ _______ ___ ResetOnOff DATA 0 On off toggle w Reset button RequestConnect DAWA Sum 1 6 ConnectionGranted pia gem 0 2 0 06 RequestCommand DAMA SEE 0 S 0 6 ServoSpeeds DAIWA Swit 0 4 06 Copyright Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 9 of 9 ROBO gt srl Edutainment Robots and more RoboTech Bluetooth Serial Module RBT 001 User Manual Ver 1 2 Sede Operativa Main Office RoboTech srl Via Boccioni 1 Via Mazzini 82 56037 Peccioli ITALY 19038 Sarzana SP ITALY Tel 39 0587 672027 P IVA VAT Number IT 01185460118 Fax 39 0587 670936 E mail info RoboTechsrl com http www RoboTechsrl com Copyright 2004 2006 RoboTech srl All rights reserved RoboTech srl assumes no responsibility for any errors which may appear in this manual Furthermore RoboTech srl reserves the right to alter the hardware software and or specifications detailed herein at any time without notice and does not make any commitment to update the information contained herein RoboTech srl products are not authorized for use as Critical components in life support devices or systems The Bluetooth trademark is owned by the Bluetooth SIG Inc USA and is licensed to RoboTech srl All other trademarks listed herein are owned by their respective owners RoboTech Bluetooth Serial Module 1 User Manual Ver 1 2 Table of Conten
44. MEOUT Data BdAddr The Bluetooth address of the remote device of the ACL link for 6 bytes which the Link Supervision Timeout is changed LinkTimeout The link supervision timeout in slots 0 625ms 2 byte 0x0000 No link supervision timeout the timer is disabled 0x0190 OxFFFF Valid timeout range slots 0x7D00 The default value 20s Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ERROR ERROR INVALID NO OF PARAMETERS ERROR NO CONNECTION ERROR ILLEGAL LINK TIMEOUT BdAddr The Bluetooth address of the remote device of the ACL link for 6 bytes which the Link Supervision Timeout is changed Get Link Timeout Description This command is used to get the current link supervision timeout setting for the given ACL link SPP GET LINK TIMEOUT DataLength Data BdAddr The Bluetooth address of the remote device of the ACL link for 6 bytes which the Link Supervision Timeout is requested RoboTech Bluetooth Serial Module User Manual Ver 1 2 55 LinkTimeout The link supervision timeout in slots 0 625ms 2 byte 0x0000 No link supervision timeout the timer is disabled 0x0190 OxFFFF Valid timeout range in slots Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ERROR ERROR_INVALID_NO_OF_PARAMETERS ERROR_NO_CONNECTION BdAddr The Bluetooth address of the remote device of the ACL link for 6 bytes which the Link Supervision Timeout is requested Service discovery application profile SDAP The RB
45. Module 51 User Manual Ver 1 2 If the link is lost the RBT 001 will issue a BREAK signal and send the SPP LINK RELEASED message Host RBT 001 REQ SPP ESTABLISH LINK lt SPP_ESTABLISH_LINK lt IND SPP_LINK_ESTABLISHED REQ SPP_TRANSPARENT_MODE gt CFM SPP_TRANSPARENT_MODE transparent mode entered RFCOMM DATA transfer transparent with no framing UART BREAK signal RFCOMM closed from remote device or link lost IND SPP_TRANSPARENT_MODE RE IND SPP LINK RELEASED For SPP links established from remote device a SPP LINK ESTABLISHED indication will be sent to the application upon reception of the first data Again the SPP TRANSPARENT MODE request can be used to switch to transparent mode Host RBT 001 IND SPP LINK ESTABLISHED Incoming DLC link REQ SPP_TRANSPARENT_MODE and data CFM SPP_TRANSPARENT_MODE RFCOMM DATA transfer transparent with no framing Transparent Mode Switch to transparent mode on a SPP link to remote Bluetooth device REQ SPP_TRANSPARENT_MODE DataLength 1 LocalPort Local RFCOMM port number Range 1 30 1 byte Confirm to the request above PacketType CFM SPP_TRANSPARENT_MODE DataLength 2 Data Status ERROR_OK 1 byte ERROR SPP PORT NOT OPEN ERROR SPP INVALID PORT ERROR SPP MULTIPLE CONNECTIONS ERROR NO CONNECTION NE LocalPort Local RFCOMM port number Range 1 30 1 byte
46. NGE ERROR STOP BITS OUT OF RANGE ERROR INVALID NO OF PARAMETERS RoboTech Bluetooth Serial Module User Manual Ver 1 2 61 Read Operation Mode This command will read out the current operation mode DataLength 0 0 ma Ne Confirms the request above gt EA PacketType CFM READ_OPERATION_MODE DataLength Data Status ERROR_OK 1 byte ERROR INVALID NO PARAMETERS Mode 0x00 Automatic Operation OFF 1 Byte 0x01 Automatic Operation ON Write Operation Mode This command will change the operation mode stored in NVS The new setting will take effect after a reset Datalength Data Mode 0x00 Automatic Operation OFF 1 Byte 0x01 Automatic Operation ON Description Confirms the request above PacketType READ_OPERATION_MODE DataLength Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR INVALID MODE Set Ports To Open Description This command will change which RFCOMM ports the RBT 001 will open both at startup and runtime The value gets effective immediately and is stored within the NVS to be restored after reset 4 Data PORTS This field is a 32 bit mask indicating which ports the 4 Bytes RBT 001 has to open Bit 30 and 31 must be set to 0 Bit 0 is RFCOMM port 1 and bit 29 is port 30 e g if this field has the value 0x00000007 port 1 to 3 will be opened other ports will be closed if open Description Confirms the request above Pa
47. OR_SPP_PORT_NOT_OPEN LocalPort Local RFCOMM port number Range 1 30 1 byte PortStatus Bitfield 0000000 DTR 0 Low 1 byte 1 High Bitfield 000000X0 RTS 0 Low 1 High Bitfield 00000X00 DSR 0 Low 1 High Bitfield 0000X000 CTS 0 Low 1 High Bitfield 000 0000 Overrun Error 0 No Error z Overrun Error Bitfield 00X00000 Parity Error 0 No Error 1 Parity Error Bitfield 0 000000 Framing Error 0 No Error 1 Framing Error Bitfield X0000000 DLC established 0 No DLC 1 DLC is available Break The length in ms of the detected break The value 0 is used to indicate that no Length break has been detected 2 bytes Set DTR Description This command sets the state of the DTR bit Since RFCOMM acts as a null modem where DTR and DSR are connected the remote device will see this as a change of the state of the DSR signal In case the remote device is a RBT 001 this remote RBT 001 will send a SPP Port Status Changed Indicator to its application PacketT ype REQ SPP_PORT_SET_DTR DataLength 2 Data LocalPort Local port number Range 1 30 1 byte State 0 False 1 True Confirm to the request above SPP_PORT_SET_DTR 2 Data Status ERROR_OK 1 byte ERROR_ILLEGAL_STATE ERROR_SPP_INVALID_ ERROR_SPP_PORT_NO 4221 Local port number Range 1 30 1 byte RoboTech Bluetooth Serial Modul
48. Range 1 30 1 byte RoboTech Bluetooth Serial Module User Manual Ver 1 2 45 Set Overrun Error Description This command is used to indicate that the host has detected an overrun error In case the remote device is a RBT 001 this remote RBT 001 will send a SPP Port Status Changed Indicator to its application PacketT ype REQ SPP_PORT_OVERRUN_ERROR DataLength 1 Local RFCOMM port number Range 1 30 1 byte Description Confirm to the request above PacketType CFM SPP_PORT_OVERRUN_ERROR DataLength 1 Data Status ERROR_OK 1 byte ERROR SPP INVALID PORT ERROR SPP PORT NOT OPEN EE Local RFCOMM port number Range 1 30 1 byte Set Parity Error Description This command is used to indicate that the host has detected a parity error In case the remote device is a RBT 001 this remote RBT 001 will send a SPP Port Status Changed Indicator to its application REQ SPP PORT PARITY ERROR DataLength 1 Local port number Range 1 30 1 byte Description Confirm to the request above PacketType CFM SPP_PORT_PARITY_ERROR DataLength 1 Data Status ERROR_OK 1 byte ERROR_SPP_INVALID_PORT ERROR SPP PORT NOT OPEN Local RFCOMM port number Range 1 30 1 byte Set Framing Error Description This command is used to indicate that the host has detected a framing error In case the remote device is a RBT 001 this remote RBT
49. RoboTech Bluetooth Serial Module 16 User Manual Ver 1 2 51 ddS euo Ajuo pue euo J eq Ajuo 2 SI s AB s JO Jequunu Z gt X gt jo anjena e L gt XS5 JO e upes eBeJojs ejjejoA uou 5 uo Buipuedeg peuinsse Bumes eBeJojs ay ui p 3 JejeureJed uo Buipuedeq KNOTS e e s o jueugedsuei SJ JSEN Z jueJedsuei JejseiA youseyeos 1 SEIA Jejse N yeweyeos Jejsey X Jejse A juejedsuei SEN 3 X o Jejse A JO SE 1900214 ejBuis J8jse q vada eye ejes 9 jueJedsue pues aye 5 Bul ejeis Jeye ejes pues AjoAnoe louu 91ol 99uuoo Ambul S OSIA D 10 91413304 ejos ujoojenig g8Iaeioeuuon 8IqeeAoosiQ
50. T 001 implements the service discovery application profile SDAP and makes service discovery very simple Host dongle REQ SDAP_CONNECT gt Dong tes a SDP connec tion CFM SDAP CONNECT Connec tion ted tart browsin g REQ SDAP SERVICE BROWSE Perform se th remote SDP datab SDAP_SERVICE BROWSE Host receives tl result needs additi parameters REQ SDAP_SERVICE_SEARCH search in the remote SDP database SDAP_SERVICE_SEARCH Host has finished the SDP h REQ SDAP DISCONNECT gt Disconne ct remoti device CFM SDAP_DISCONNECT SDAP Connection Handling Connect Description Creates an SDP connection to a remote device Only one SDP connection can be active PacketType SDAP_CONNECT DataLength BdAddr The Bluetooth address of the remote device to connect to 6 bytes RoboTech Bluetooth Serial Module 56 User Manual Ver 1 2 Description Confirms the request above PacketType SDAP_CONNECT 1 Data Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS ERROR_CONNECTION_FAILED Disconnect 00 Description Confirms the request above PacketType SDAP DISCONNECT DataLength 1 Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS Connection Lost Description Notification sent to the application when a loss o
51. TS signal pin to wake up the host The RTS CTS signals are connected in a NULL Modem fashion i e crossed meaning that RTS on the Host is connected to CTS on the RBT 001 and vice versa Therefore the host would need to be able to monitor its CTS input or has to use a separate hardware pin In case the RBT 001 has to be triggered by the host the RTS pin is used as the hardware Wake Up signal Disable Transport Layer Description This Command disables the transport layer and thereby allowing power saving PacketT ype DISABLE TL Duengh 0 O RoboTech Bluetooth Serial Module 38 User Manual Ver 1 2 Description Response to the request above PacketType CFM DISABLE_TL DataLength 1 Data Status ERROR_OK 1 byte ERROR COMMAND DISALLOWED Description This indication is sent when the transport layer is re enabled Transport layer is re enabled by pulling RTS signal of the host or an event is ready to be sent from the RBT 001 to the host normally due to an air interface event PacketType IND TL ENABLED DataLength 1 Data Status ERROR_OK 1 byte ACL indications If the Event Filter is set to Report all events the RBT 001 indicates any established and terminated ACL link to the host This feature enables the user to monitor the Bluetooth physical interface In case the establishment failed the indicators report the reason for terminating or not establishing the link The ACL error events can
52. Tech Bluetooth Serial Module User Manual Ver 1 2 76 Bibliography L RoboTech RBT 001 Datasheet National Semiconductor LMX9830 Software Users Guide L Bluetooth SIG Specification of the Bluetooth System L Bluetooth SIG Bluetooth Assigned Numbers https www bluetooth org foundry assignnumb document assigned numbers RoboTech Bluetooth Serial Module User Manual Ver 1 2 77 Certifications Bluetooth The RBT 001 module has passed the Bluetooth Qualification Certification process and has been fully qualified as end product with QPID B0313300 CE The RBT 001 module complies with the requirements of the R amp TTE Directive 99 05 CE EN 60950 1 2001 LV Art 3 1a 99 05 CE ETSI EN 301 489 03 V1 4 1 3 16 99 05 CE EN 300 328 V1 6 1 EN 300 328 2 V1 2 1 ERM Art 3 2 99 05 CE RoboTech Bluetooth Serial Module 78 User Manual Ver 1 2 Revision History Revision PDF Date Revisions Comments 1 0 31 Oct 06 Initial release 1 1 24 Nov 06 Changed maximum Voltage DC input Added Powering with Voltage DC Input above 3 3V Added RS232 adapter board schematic 1 2 01 Sep 07 Updated Powering with Voltage DC Input above 3 0V Added Certifications RoboTech Bluetooth Serial Module User Manual Ver 1 2 79 Web Site www parallax com Office 916 624 8333 NA 2 Forums forums parallax com Fax 916 624 8003 N Sales s
53. able for SERIN functionality buffer 1 etc However should be used in SERIN commands with variations Buffer Start char Message Index valu Command Argument 1 return data 1 Argument 2 return data 2 For standard array indexing message index Receive Clear Wait for the 001 radio to be ready Connection packet wait for connection request Connect v1 3 4 14 2010 Page 8 of 9 CASE DD Disconnect LOW LED DEBUG CR Disconnected GOSUB Reply GOTO Program Start CASE 11 Servo DEBUG CR Servo GOSUB Set_Servo Speed GOSUB Reply CASE ELSE Uo buffer2 SEE GOSUB Reply ENDSELECT Resume If Message not rcvd try again PULSOUT 13 tLeft Servo control pulses RUS Ohr 12 jsubgjanE SERIN BT RX BT SPEED 10 Resume Get next command 2 buffer3 buffer4 PULSOUT 13 tLeft Servo control pulses again IPSO 32 LOOP Reply msglIndex msgIndex 1 Increment message index for reply bufferl msgIndex Next message from PC has to use reply s buf 1 SEROUT BT TX BT SPEED STR buffer 15 5 a m Em ss Servo Speed Maps to 650 to 850 with 750 stopped tLeft buffer3 650 Decode servo speed tRight buffer4 650 RETURN
54. ales parallax com Sales 888 512 1024 Technical support parallax com Tech Support 888 997 8267 AppNote Easy Bluetooth to Easy Bluetooth Communication By popular demand this is an application note to explain how to connect two Easy Bluetooth modules together to communicate In this example one Easy Bluetooth is communicating to another Easy Bluetooth sending bytes of data as a variable counter This example is pretty simplistic but can be modified to send more complex data packets PC that I used is running WinXP Pro so all the instructions will be for XP if you Vista or Win7 can refer to the user guide or control panel to configure m O Bluetooth Allows wireless communication between microcontrollers Addressable modules to identify a Bluetooth module Build in error correction within Bluetooth protocol Ability to communicate with a Bluetooth dongle on a PC up to 10 meters Features Application Ideas e Multi controller wireless communication Control one robot with another one without the use of a PC Wireless data transfers Materials Used Part Description Quantity 30085 Easy Bluetooth Module 2 28803 BOE Full Kit USB 2 750 00009 7 5V 1 A power supply 2 DBT 120 D Link Bluetooth Dongle 1 Materials noted with a star are not carried by Parallax Inc and will need to be obtained through separate means The Bluetooth dongle is used for configuration pu
55. be found in Table ACL Error Codes on page 73 ACL Established This indication is sent to the host when an ACL link is established IND GAP_ACL_ESTABLISHED DataLength 7 Data BdAddr The Bluetooth address of the remote device 6 bytes Status See ACL Error Codes on page 73 1 byte ACL Terminated Description This indication is sent to the host when an ACL link is terminated PacketT ype IND GAP_ACL_TERMINATED DataLength Data BdAddr The Bluetooth address of the remote device 6 bytes Status See ACL Error Codes on page 73 1 byte RoboTech Bluetooth Serial Module 39 User Manual Ver 1 2 Serial port profile SPP An active SPP link appears as a virtual serial port connection between two devices As any other serial connection it has different settings for that virtual serial port The following settings enable the host to change specific port settings on that virtual port The reference for all commands is the local RFcomm port the link has been set up with All commands in this section are only handled at application level and have no direct impact on the Bluetooth link The RBT 001 implements the serial port profile SPP and offers a very simple interface for RFCOMM communication Open Close an RFCOMM port The device will automatically open all configured ports to open at start up Reading changing current port configuration Host RBT 001 REQ SPP SET PORT CONFIG
56. c x lt T gt nc x 3 4 Rx lt 7 Tx Tx 5 Rx Module Dimensions 1 40 in 34 41 mm 1 79 in 45 65 mm Bluetooth Easy gt www vee ar com lt 2 2 Copyright Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 5 of 9 Troubleshooting From time to time there may be some snags that can cause what would seem like malfunctions in the module If you experience any of the symptoms listed below here are some quick fixes to try 01 Will not connect to Easy Bluetooth module 1 Verify that the Bluetooth device has been properly installed via the Device Manager there may be drivers needed depending on the type of Bluetooth dongle module you are using Q2 Bluetooth port isn t available for selection in the new DEBUG window A2 Be sure that the com port is included in the port search for the BASIC Stamp editor for details on how to do this please refer to the BASIC Stamp Help file in the editor version 2 5 or later Q3 Will not power up A3 Verify that the module is connected correctly and that Vdd and Vss have not been swapped Q4 Receiving Easy Bluetooth connection LED green blinks but no information is displayed on the DEBUG screen A4 If the receiving modules LED is blinking then there is a completed connection and the setting in the debug window is not set properly Verify that the correct com port and baud rate is sele
57. cketType PORTS TO OPEN DataLength 1 Data Status ERROR_OK 1 byte ERROR INVALID PORT ERROR INVALID NO OF PARAMETERS RoboTech Bluetooth Serial Module User Manual Ver 1 2 62 Get Ports Open Description This command will get the value of which RFCOMM ports the RBT 001 will open both at start up and runtime GET_PORTS_TO_OPEN Daalengh O Da Data Status ERROR OK 1 byte ERROR INVALID NO OF PARAMETERS This field is a 32 bit mask indicating which RFCOMM ports the PORTS 4 Bytes RBT 001 has to open Bit 30 and 31 must be set to 0 Bit 0 is RFCOMM port 1 and bit 29 is port 30 e g if this field has the value 0x00000007 port 1 to 3 will be opened Hestore Factory Settings Description This command will restore the RBT 001 configuration in NVS to factory settings The factory settings are similar to all default settings listed in the table on page 13 The RBT 001 needs to be restarted in order to let the changes take effect No commands that write to NVS should be sent to the device in between RESTORE FACTORY SETTINGS REQ and CFM When CFM is sent all the factory settings are completed PacketType RESTORE_FACTORY_SETTINGS Daalen Dua Data Status ERROR OK 1 byte ERROR INVALID NO OF PARAMETERS Store Class of Device Description This command will store the class of device for the RBT 001 in NVS The proper value for the class of device parameter is specified by the Bluetoo
58. cted in the terminal window If com port does not come up please see A2 above Q5 What if I don t have a Board of Education with an AppMod Header can the Easy Bluetooth be used with the HomeWork Board or a breadboard A5 Yes you may There are 4 connections needed to correctly connect the Easy Bluetooth module to a microcontroller the Rx Tx Vss ground and Vdd 5VDC Here is an example that connects the Easy Bluetooth module to the HomeWork Board but could as easily be another type of controller with the provided connections Here are two pictures with the connections made to a HomeWork Board Please keep in mind the connections match the example program provided H EN aa 12 Pn spes Easy Bluetooth Easy Bluetooth module back connection Easy Bluetooth module front connection Example Application This example application uses the RoboTech SRL GUI interface to control a Boe Bot robot via Bluetooth Copyright Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 6 of 9 note to mention is that this application uses standard operational Boe Bot so please operational Boe Bot ready while completing this example For help building a fully operational Boe Bot please refer to Robotics with the Boe Bot Text To install the GUI software complete the following steps 1 Install the Easy Bluetooth PC software from the Easy Bluet
59. cture Each command also called Request will be acknowledged with the appropriate status event also called Confirm Unexpected events like incoming link establishment data are also sent as events but signed with a different package type called Indicator Please see the section Commands in Command Mode on page 6 for the detailed description of the command interface Since the RBT 001 acts like a gateway between the Bluetooth Link and the UART interface the UART connection should use 4 wire hardware handshaking for optimal buffer handling The RBT 001 uses the RTS lines to indicate low buffers and reacts on the CTS from the host immediately stopping sending packages to the host In case the host microcontroller is not able to provide hardware handshaking the UART should be used in Command Mode only since the device would not be able to indicate full buffers by using the RTS signal In the same way the host needs to provide enough buffer space to be able to handle the incoming data since it s not able to stop the flow from the RBT 001 RoboTech Bluetooth Serial Module 11 User Manual Ver 1 2 Command mode and Transparent mode Command Mode The RBT 001 offers a wide range of commands to configure the hardware and the Bluetooth operation As the command set is on top of the profiles Bluetooth operational commands are reduced to high level commands controlling general Bluetooth operation In Command Mode the RBT 001
60. culated as the low byte of the sum of all bytes E g if the sum of all bytes are 0x3724 the checksum is 0 24 End delimiter The char is used as end delimiter ETX 0x03 Retransmission The connection is considered Error free hence no need for implementing time outs and retransmissions Flow control A transparent data mode is supported for RFCOMM communication When using this transparent mode full hardware handshake is advised When not in transparent mode the protocol principle of REQ CFM limits the need of buffer capacity As IND s can come out of REQ CFM sequence and is unconfirmed the user device has to be able to read these data fast enough have enough buffer capacity Byte Order The byte order of the protocol is Little Endian if nothing else is specified RoboTech Bluetooth Serial Module 25 User Manual Ver 1 2 Commands Command Mode The RBT 001 implements a complete command set for bluetooth operation and local configuration The command set is based on a request confirm scheme meaning any command will be confirmed by an appropriate event including the same opcode Searching for remote devices The RBT 001 implements the basic Bluetooth functionalities GAP and offers simple interfaces for locating other Bluetooth devices Inquiry and name discovery and easy configuration of the local Bluetooth device Host RBT 001 REQ INQUIRY IND DEVICE_FOUND For each found
61. e User Manual Ver 1 2 44 Set RTS Description This command sets the state of the RTS bit Since RFCOMM acts as a null modem where RTS and CTS are connected the remote device will see this as a change of the state of the CTS signal In case the remote device is a RBT 001 this remote RBT 001 will send a SPP Port Status Changed Indicator to its application PacketT ype REQ SPP_PORT_SET_RTS DataLength 2 Data LocalPort Local RFCOMM port number Range 1 30 1 byte State 0 False 1 True Confirm to the request above CFM SPP_PORT_SET_RTS Data Status ERROR_OK 1 byte ERROR_ILLEGAL_STATE ERROR_SPP_INVALID_ ERROR SPP PORT NO poo WES Local RFCOMM port number Range 1 30 1 byte Set BREAK Description This command indicates that the host has detected a UART BREAK over the virtual serial link In case the remote device is a RBT 001 this remote RBT 001 will send a SPP Port Status Changed Indicator to its application REQ SPP PORT BREAK 2 ee n __________ Data LocalPort Local RFCOMM port number Range 1 30 1 byte BreakLength The length of the break in ms Range 0 3000 2 bytes The break length is sent in 200 ms units on the air interface stored in a 4 bit parameter Confirm to the request above SPP_PORT_BREAK Data Status ERROR_OK 1 byte ERROR_SPP_INVALID_PORT ERROR SPP PORT NOT OPEN 4227 Local port number
62. e tu Unde UE 26 Getting user friendly name of remote Bluetooth 27 Remote Device 27 RoboTech Bluetooth Serial Module 2 User Manual Ver 1 2 Reading the user friendly name of the local 28 tein Pere tee Teeter erent 28 Changing the user friendly name of the local 28 Wriite LocaliNalfle u uuu yunan 28 Reading the Bluetooth device address of the local device 29 Read Local Bluetooth Address ohh n HU rb idee d naa aus 29 Changing Scanmode Connectability and Discoverability 29 Ser Seat MOOS as ebur 30 Sel Scan Mode Indication eo e Re dieta e uv Mia teu ius 30 Bluetooth 31 Get Fixed PIN A Lob cg dun d OL o DU PORA CA a us 31 Set Fixed PIN uu anasu Du am asas u aaa 31 FGCU GST c nerd erret Der va Dre ete Durum Devi eive Dus 32 Get Security Mode E M 32 Set Security Mode PEPPER 33 idis s OC 33 Remove
63. en shown All other devices BOE1 using EasyR Add Remove Properties BOE2 using EasyBT OK Cancel Click OK to close the Bluetooth Device window Step 9 Program Editing Using the address of EasyR 00 17 0 01 56 65 open the example code EasySEND BS2 in the BASIC Stamp Editor then use the address to change the value in the example code Place the values for each part of the address in the constants below whereas the first part of the address will be placed in addy1 and the second in addy2 for example the address A1 B2 C3 D4 E5 F6 would be edited to look like the following CON 1 lt A1 from A1 B2 C3 D4 E5 F6 goes here addy2 CON B2 B2 from A1 B2 C3 D4 E5 F6 goes here addy3 C3 C3 from A1 B2 C3 D4 E5 F6 goes here addy4 CON 04 lt D4 A1 B2 C3 D4 E5 F6 goes here addy5 CON 5 lt E5 from A1 B2 C3 D4 E5 F6 goes here addy6 CON 6 lt F6 A1 B2 C3 D4 E5 F6 goes here Once the changes have been made with the correct address download the program to BOE2 and move the power to position 0 Step 10 Download to BOE1 Connect BOE1 to PC turn power switch to 1 and open example code EasyR BS2 Download the example program to the BS2 on BOE1 and turn off the BOE1 close any open DEBUG windows in the editor Step 11 Reset BOE1 amp BOE2 Leave power off on BOE1 and BOE2 for at least 30 seconds Disable and unplug the Bluetooth dongle that was used to setup the
64. ent is X initiated Note This confirm does NOT indicate link establishment but only that link establishment is in progress When link establishment response is received from the core a SPP_LINK_ESTABLIHED indication is sent from the RBT 001 Data Status ERROR OK 1 byte ERROR SPP PORT BUSY ERROR SPP PORT NOT OPEN ERROR SPP INVALID PORT ERROR SPP AUTOMATIC CONNECTIONS PROGRESSING 1 byte RoboTech Bluetooth Serial Module 48 User Manual Ver 1 2 Link Established Indication of establishment of a locally requested DLC link DataLength Data Status Refer to RFCOMM Error Codes section e en BdAddr Bluetooth device address for the remote device 1 1 Incoming Link Established In case a remote device creates a link to the RBT 001 the device will indicate the successful link establishment by sending the Incoming Link Established Indicator The packet includes the BD_Addr of the remote device and the local RFComm Port it is connected to Indication of establishment of a remotely requested DLC link Data BdAddr Bluetooth device address for the remote device 6 byte Local port number Range 1 30 1 byte Release Link pr Local RFCOMM port number Range 1 30 byte Description Confirm that the release is initiated When the release is complete a SPP LINK RELEASED indication is sent from the 001 PacketType SPP
65. erent states we should have a look on the parameters which influence the behaviour of the RBT 001 The following parameters are stored in NVS and are checked during boot up RBT 001 System Parameters NVS EEPROM Memory Map SW Reset No Address Parameter Default Value Description required 1 0000 0005 BD_Addr lt empty gt Bluetooth Device Address no LAP Isb LAP LAP UAP NAP msb Required for Bluetooth mode 2 0006 0x00 Reserved 3 0007 Unit OxFF Used by BT core generated during pairing pro no KeyPresent cedure 4 0008 0017 UnitKey OxFF OxFF Used by BT core generated during pairing pro no cedure 5 0018 Device OxFF Length of Parameter 6 Devicename no Name Length 6 0019 0040 Device OxFF 0xFF Friendly Name of the Bluetooth Device no Name 7 0041 Country 0x00 Used by BT core yes Code 8 0042 PinLength 0x04 The length of parameter 9 PinCode In case no set to 0 the RBT 001 will request pin from host 9 0043 0052 PinCode 0000 Fixed PinCode used for pairing with other no devices 10 0053 0055 ClassOfDe 0x000000 The Class of Device describes general function no vice ality of the Bluetooth Device and is transmitted during the Inquiry process 11 0056 SppPorts 0x00000001 Bitmask defining the RFCOMM channels to no ToOpen open For each channel one RFCOMM instance will be created 12 005A Preferred 0x00 Preferred Master forces the device
66. erlaced Scanning Discoverability 0x00 Non discoverable 1 byte 0x01 General discoverable 0x81 General discoverable using Interlaced Scanning 0x02 Limited discoverable 0x82 Limited discoverable using Interlaced Scanning 0x03 Automatic limited discoverable mode 0x83 Automatic limited discoverable mode using Interlaced Scanning Confirm to the request above CFM GAP_SET_SCANMODE Data Status ERROR_OK 1 byte ERROR_INVALID_CONNECTABILITY_PARAMETER ERROR_INVALID_DISCOVERABILITY_PARAMETER ERROR_INVALID_NO_OF_PARAMETERS ERROR_UNKNOWN_ERROR Set Scan Mode Indication Description Indication send from the device when automatic limited discoverable mode has ended PacketT ype IND GAP_SET_SCANMODE DataLength 1 Data Status ERROR_OK 1 byte ERROR UNKNOWN ERROR RoboTech Bluetooth Serial Module User Manual Ver 1 2 30 Bluetooth Security Bluetooth security is part of the Generic Access Profile GAP It is controlled by L Security Mode o Security Mode 1 No Security the device never will ask for authentication or pairing o Security Mode 2 The level of security Authorization Authentication Encryption is determined by the setting in the service database entries Each entry can have different security requirements authentication necessary for SDAP links o Security Mode 3 Authentication already necessary on Link Manager level SDAP links already require authentica
67. ess a double speed of each action For example Press Up Arrow release to make the Boe Bot move faster forward Copyright Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 7 of 9 Uoc 1 0 IDetimitiome BT RX PIN 2 0 5 constans E BT SPEED CON 84 SUE E VAR Word tRight VAR Word temp VAR Word j Buffer array not declared as buffer VAR Word 5 It can still be accessed as buffer 0 u of WAIT buffer0 VAR Byte bufferl VAR Byte buffer2 VAR Byte buffer3 VAR Byte buffer4 VAR Byte buffer VAR buffer0 msgIndex VAR Byte j rxc VAR Byte Y oem Program Start LOW LED DEBUG CLS PAUSE 1000 msglIndex 0 buffer0 SFF bufferl msgindex buffer2 SCC buffer3 100 buffer4 100 GOSUB Set Servo Speed ime ICR 4 ERIN BT RX SPEED oF amine ose SELECT buffer2 CASE SCC HIGH LED msglIndex 0 DEBUG Connected GOSUB Reply Copyright Parallax Inc WAITSTR buffer 3 Easy Bluetooth 30085 RX of the TX of the Indicator Easy Bluetooth Easy Bluetooth ED for Bluetooth Connection Left Servo control pulse durations Right Servo control pulse durations Temp vari
68. f the Local Service Discovery Database By default the service database contains one entry configured at RFComm port 1 for a Serial Port Profile with Authentication and Encryption enabled If the application needs to offer a second service to another device this service has to be entered within the service database and if required the RFComm port has to be opened The service entry in general includes information about the name of the service which appears on a remote device after browsing the port number and security settings RoboTech Bluetooth Serial Module 67 User Manual Ver 1 2 Each registered service entry itself be enabled or disabled This allows to different services registered to one specific RFComm port enabling and disabling them by needs The command set includes just one command to store any SDP record available within the Service Database called Store Generic SDP Record Each record includes the profile specific settings needed The service records are stored in a database like system within the NVS so they are still available after reset The storage of an entry is confirmed by the RBT 001 with a specific record identifier This identifier is needed for the Enabling or Disabling command to address those specific entries Enable SDP Record Descriptio This command is used to enable disable stored SDP records in the n RBT 001 REQ ENABLE_SDP_RECORD DataLength 2 Data
69. f the SDP connection is detected PacketType SDAP CONNECTION LOST DataLength SDAP Service Discovery The SDAP Service Browse can be used to get the RFComm Port Numbers of all or only specific Service Classes The search mechanism is based on the 16bit UUID for the services The actual list of UUIDs can be found within the Bluetooth Assigned Numbers Document of the Bluetooth SIG Service Browse This command is used to browse the service record of the remote device REQ o O PacketType REQ SDAP_SERVICE_BROWSE DataLength 2 Data BrowseGroupID The requested browse group 16 bit UUID 2 bytes The UUID has to be byte swapped within the command RoboTech Bluetooth Serial Module 57 User Manual Ver 1 2 Data Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS ERROR_RESULT_TOO_LARGE ERROR_TRUNCATED_ANSWER NoOfServices Number of services found on remote device 1 byte For each service The browse group UUID that the service belongs to 2 bytes ServiceID The service UUID 2 bytes PortNr RFCOMM port number byte NameLength The number of bytes in the service name byte ServiceName The name of the service NameLength bytes Service Search The SDAP Service Search command offers the ability to search for specific attributes for a service The attribute IDs can be found at the Bluetooth SIG website under Bluetooth Assigned numbers NOTE As an exception to all other commands this co
70. ff Mode Sniff interval 1 second 5 6 mA Isc TLDIS Scanning No Active Link TL Disabled 3 0 43 mA lidie Scanning Disabled TL Disabled 100 1 Based on UART Baudrate 921 6kbit s 2 VCC 3 3V Ambient Temperature 25 C 3 Average values excluding Leds TL Transport Layer RoboTech Bluetooth Serial Module 8 User Manual Ver 1 2 Powering with Voltage DC Input above 3 0V If the Host circuitry works with a voltage above 3 0V a regulator is needed to provide the correct Voltage DC Input level to the RBT 001 module keeping the best RF performance Furthermore the RBT 001 module s inputs must be lowered to acceptable levels Just for instance a simple schematic considering a Host circuitry working from 3 3VDC to 5VDC is reported here below Ut VCC 3 0V 150mA VDC IN ONOFF BYPASS RoboTech Bluetooth Serial Module 9 User Manual Ver 1 2 RS232 adapter board schematic yoo pT His 6 pin m pP 4 4 mo 476 R2 686 10 RoboTech Bluetooth Serial Module User Manual Ver 1 2 UART Interface The main communication interface between the RBT 001 and the host is the UART Interface The UART interface between host and RBT 001 needs to be connected in Null Modem configuration meaning RTS CTS and TX RX are crossed Figure 1 UART Null Modem connection The command interface is based on a command event based stru
71. hat value of the counter in the DEBUG terminal severing the Bluetooth communication will stop the counting in the terminal window Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 8 of 11 Precautions Do not use the Bluetooth communication signal as the sole safety switch Always keep safety in mind when using wireless controlled devices cautious of the distance needed controlling something wireless the distance is approx 30m Source Code There are two pieces of sample code that go with the AppNote EasySEND BS2 and EasyR BS2 Download EasyBluetoothx2demo zip file from Parallax web site and load the following examples in the appropriate BOE setups BASIC Stamp 2 Program Load BOE1 EasyR bs2 SSTAMP BS2 V SiS 2 55 File EasyR bs2 Purpose Load on the receiving unit in the AppNote Easy Bluetooth to Easy Bluetooth Communcation example waits for a value counter to be sent via Bluetooth connection and then will display the value on the DEBUG screen Author Parallax Technical Support 12 Declarar ois By 2 TX PIN 0 emp VAR Byte ra 55 CASE BS2 BS2E BS2PE Baud CON 84 XS BASES PIE EE SPD Baud CON 240 CASE BS2PX Baud CON 396 ENDSELECT Ee on WA Program
72. he power switch to location 1 Figure 1 Figure 2 Creating new Bluetooth Connection 1 Be sure that the Bluetooth dongle that you installed on your PC is working correctly and is turned on see Bluetooth Dongle user manual for specific instructions to ensure proper operation a Open Control Panel click Printer and Other Hardware and then click Bluetooth Devices If in Classic View double click Bluetooth Devices Copyright O Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 2 of 9 b Click Add c Check My Device is set up and ready to be found in the Add Bluetooth Device Wizard and click Next d Select EasyBT from the displayed Bluetooth devices and click Next Select Use the passkey found the documentation and enter the Passkey Code 0000 zero four times and click Next f Bluetooth Manager should display and designate an Outgoing and Incoming COM port for the Easy Bluetooth device make a note of the COM ports because these are the ports you will use to communicate with the Easy Bluetooth g Select Finish to complete the Bluetooth device configuration 2 close the Bluetooth Devices window click OK A test for the BASIC Stamp 2 microcontroller 1 The Easy Bluetooth communicate at numerous baud rates and with many different microcontrollers This example uses the AppMod Header on the Board of Education the BASIC S
73. io CODEC type is out of range 0x34 ERROR ILLEGAL AUDIO AIR FORMAT The given Audio Air format is out of range 0x35 ERROR SDP RECORD TOO LONG The SDP record is too long 0x36 ERROR SDP FAILED TO CREATE RECORD The SDP server failed to create the SDP record 0x37 ERROR SET VOLUME FAILED The selected codec does not support volume control 0x38 ERROR ILLEGAL PACKET TYPE The packet type specified in the request is not valid 0x39 ERROR INVALID CODEC SETTING The codec slave setting is invalid RFCOMM Error Codes Error Macro Description code 0x00 RFCS NO ERROR No error 0x01 RFCS INVALID DLC The DLC does not exist 0x02 RFCS INVALID PORT The port does not exist 0x03 RFCS DLC ESTABLISH FAILED The DLC establishment failed 0x04 RFCS ACCESS REJECTED SECM did not authorize access to the requested service DLC 0x05 RFCS INVALID CONNECTION There does not exist a DLC L2CAP connection to the device OxFF RFCS UNSPECIFIED ERROR Not used HFCOMM Release Reasons Error Macro Description code 0x00 RFCR DLC DISC LOCAL DEVICE The local device has disconnected the DLC 0x01 RFCR DLC DISC REMOTE DEVICE The remote device has disconnected the DLC 0x02 RFCR DLC DISC ACL FAILURE ACL link failure link supervision timeout 0x03 RFCR DLC DISC LOWER LAYER Lower layer e g L2CAP has disconnected the DLC Robo
74. l Classification Not Supported Ox2F Insufficient Security 0x30 Parameter out of Mandatory Range 0x31 Reserved 0x32 Role Switch Pending 0x33 Reserved 0x34 Reserved Slot Violation 0x35 Role Switch Failed Generic error codes Error Macro Description code 0x00 ERROR OK No error 0x01 ERROR INVALID NO OF PARAMETERS The number of bytes in the request does not correspond to the protocol specification 0x02 ERROR DURATION OUT OF RANGE The given duration value is not valid according to the specification 0x03 ERROR INVALID MODE The selected mode is not valid according to the specification 0x04 ERROR TIMEOUT A timeout occurred 0x05 ERROR UNKNOWN ERROR An unknown error occurred 0x06 ERROR NAME TOO LONG The number of bytes in the name string is longer than the maximum specified value 0x07 ERROR INVALID DISCOVERABILITY PARAMETER The given discoverability parameter does not contain a valid value according to the specification 0x08 ERROR INVALID CONNECTABILITY PARAMETER The given connectability parameter does not contain a valid value according to the specification 0x09 ERROR INVALID SECURITY MODE The given security mode is not a valid Bluetooth security mode 0x0a ERROR LINKKEY DOES NOT EXISTS No link key exists for the given Bluetooth address 0 ERROR CONNECTION FAILED The connection setup failed due to unknown reas
75. l for compatibility Configuration of mobile phone is not supported by Parallax Technical Support Device Information Theory of Operation Bluetooth is an open wireless protocol for exchanging data over short distances from fixed and mobile devices creating Personal Area Networks PANs It was originally conceived as a wireless alternative to RS232 data cables It can connect several devices overcoming problems of synchronization There are various versions of Bluetooth communication and the Easy Bluetooth is compatible with versions 1 x and 2 0 Precautions The Easy Bluetooth uses the microwave radio frequency spectrum in the 2 4 GHz to 2 4835 GHz range Maximum power output from this Bluetooth radio 2 5 mW Class 2 devices are considered less of a potential hazard than mobile phones Pin Definitions and Ratings Pin Name Function 1 Vss Ground 2 RX Receive Serial Communication CMOS amp TTL Level Compatible 3 TX Transmit Serial Communication CMOS amp TTL Level Compatible 4 NC Not Connected 5 NC Not Connected 6 NC Not Connected 7 NC Not Connected 8 NC Not Connected 9 Not Connected 10 Vdd 3 3 to 5 VDC 5 5 max voltage Communication Protocol UART Command Data Port supports up to 921 6k non inverted baud Copyright Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 4 of 9 Connection Diagram Vdd 3 3 VDC lt Vdd lt 5 VDC 2 d n
76. lave will lose its active member address and will not longer be part of the piconet It will be kept synchronized by beacons within the specified interval range RoboTech Bluetooth Serial Module User Manual Ver 1 2 35 Description This command is used to request park mode a given link with user specified parameters PacketType GAP ENTER PARK MODE DataLength 1 Data BdAddr The Bluetooth address of the remote device of which to put the link 6 bytes in park mode BeaconMaxInterval Acceptable longest length of the interval between beacons 2 bytes BeaconMinInterval Acceptable shortest length of the interval between beacons 2 bytes et O Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ERROR ERROR INVALID NO OF PARAMETERS ERROR NO CONNECTION Exit Park Mode Description This command is used to exit a current a command ts used to ext mode on a given link PacketType IREO e s GAP_EXIT_PARK_MODE DataLength BdAddr The Bluetooth address of the remote device of which to exit the 6 bytes current park mode 222 2202 Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ ERROR ERROR INVALID NO OF PARAMETERS ERROR NO CONNECTION Enter Hold Mode Description This command is used to request Hold mode on a given link with user specified parameter __________ parameters PacketType GAP_ENTER_HOLD_MODE DataLength 10 Data BdAddr The Blue
77. licy settings for the link RoboTech Bluetooth Serial Module User Manual Ver 1 2 37 Data ERROR_OK ERROR_UNSPECIFIED_ERROR ERROR_INVALID_NO_OF_PARAMETERS ERROR_NO_CONNECTION LinkPolicy Bitfield 2 byte 0x0001 Master slave switch allowed 0x0002 Hold mode allowed 0x0004 Sniff mode allowed 0x0008 Park mode allowed Power Save Mode Changed Description This indication is sent to the host when changes the power save mode on a link occur PacketType GAP_POWER_SAVE_MODE_CHANGED Daalengh Data Status ERROR_OK 1 byte ERROR_ATTEMPT_FAILED ERROR_UNSPECIFIED_ERROR BdAddr The Bluetooth address of the remote device for which the power save 6 bytes mode has changed on the link Mode 0x00 Active mode Left power save mode 1 byte 0x01 Hold mode Hold mode entered 0x02 Sniff mode Sniff mode entered 0x03 Park mode Park mode entered Device Low Power Modes In certain applications the RBT 001 will be used most of the time in a waiting status meaning it is waiting for being connected or listening to commands To reduce power consumption of the system the RBT 001 supports a specific Wake up functionality The RBT 001 supports to disable the UART transport layer command Disable Transport Layer to switch off the command interpreter and all hardware components not needed for the current operation The interface can be reactivated again by either side by using hardware pins The RBT 001 uses the R
78. lowing model Start Packet Type Op Data delimiter identification code length sum Packet Data delimiter 1 byte 1 byte 1 2 1 byte lt Data length gt 1 byte byte bytes bytes Checksum Start delimiter The start delimiter indicates the RBT 001 the beginning of a new package The STX char is used as start delimiter STX 0x02 Packet type identification This byte identifies the type of packet The following types are valid Code Packet Type Description 0x52 Request A request sent to the Bluetooth module R REQ All request are answered by exactly one confirm 0x43 Confirm The Bluetooth modules confirm to a request request answered by exactly one confirm 0x69 Indication Information sent from the Bluetooth module that is not a IND direct confirm to a request 0x72 Response An optional response to an indication RES This is used to respond to some type of indication messaged All other values are reserved Opcode The opcode is a command specifier Each command is represented by this one byte identifier as in the following table Opcode Value INQUIRY 0x00 GAP DEVICE FOUND 0x01 RoboTech Bluetooth Serial Module 22 User Manual Ver 1 2
79. maltlic 18 Incoming Link at Idle 18 Incoming Link in Idle 2 2 444444040000 18 dte MEM 18 pere ONE IDE er ie E 19 Transparent Master 19 mE 20 Sol VC u e 20 Transparent SIAN Cees 20 UART Protocol Principles sic de oe eee A a Be M Aa M te le 22 o bie 22 ee ee ae een ee eee eer 22 Packet type identification dc reapse en ctn deeds 22 CDC OG MEE 22 c cu A M A Mere ee ce BU MM A TE NEES A 25 Packer dala a rre Mm D 25 ee ca P MIR 25 Pen 25 n n D DU 25 POW Seele ED 25 Byte Odes ur 25 Commands Command 26 Searching for remote 26 aa aaa aaa asqa aasan aaa astan 26 C ied tue Red
80. mmand does NOT required byte swapped parameters So the UUIDs have to be filled in as defined in Bluetooth SIG Bluetooth Assigned Numbers https www bluetooth org foundry assignnumb document assigned numbers Description This command is used to search for services in the service record of the remote device PacketType REQ SDAP SERVICE SEARCH DataLength 2 2 SearchPatternLength 2 AttributesLength AttributesLength Number of 16 bit UUID s in attributeld list Note Must be less than 1 byte 86 elements Attributes List of requested attributes for the requested services The attribute list is a list of 16 bit UUID s for the requested attributes Data SearchPatternLength Number of 16 bit UUID s in Search pattern List Note Must be less 1 bytes than 86 elements SearchPattern List of the requested services The search pattern list is a list of 16 bit UUID s of the requested services RoboTech Bluetooth Serial Module 58 User Manual Ver 1 2 CM Mf Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS ERROR_UNKNOWN_ERROR ERROR_RESULT_TOO_LARGE 558 l Length of the result of the search Maximum 330 bytes 2 558 l Result Result of the search Length bytes Service Request Each Service Entry has a unique number called Service Record Handle This command is used to get the record handle for stored entries for specific UUIDs Description This command is used the service record handles from a
81. nk supervision timeout the timer is disabled 0x0190 OxFFFF Valid timeout range in slots RoboTech Bluetooth Serial Module User Manual Ver 1 2 66 Set Default Link Latency Description This command is used to change the default SPP link latency The default link latency is set during SPP connection setup The default link latency setting is stored in NVS The link latency is used to calculate a poll interval for the ACL link The calculated poll interval may be bigger than the latency specified because of e g another ACL link SET_DEFAULT_LINK_LATENCY Data Latency The link latency in slots 2 byte 0x0000 No link latency requirement default 0x0002 0x0190 Valid link latency In case 0x0000 is set the link latency is managed by the master typically 40 slots 0x0028 25ms in a point to point connection are used Data Status ERROR OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR LIMIT Get Default Link Latency This command is used to read the default link latency setting from NVS C C CCC C O PacketType REQ GET_DEFAULT_LINK_LATENCY Dmalengh O 77 Data Latency The link latency in slots 2 byte 0x0000 No link latency requirement default 0x0002 0x0190 Valid link latency In case 0x0000 is set the link latency is managed by the master typically 40 slots 0x0028 25ms in a point to point connection are used SDP Record Handling The RBT 001 allows the modification o
82. nnection to a default connection which is not stored 0x26 ERROR SPP AUTOMATIC CONNECTIONS PROGRESSING Trying to start connecting to default connections when default connection establishment is already progressing 0x27 ERROR UNSPECIFIED ERROR Other error 0x28 ERROR IDENTIFIER NOT IN USE Trying to enable a SDP record which is not stored Wrong identifier 0x29 ERROR INVALID SUPPORTED FAXCLASS VALUE Faxclass parameter must be 0 or 1 0x2a ERROR TOO MANY SUPPORTED FORMATS The given number of supported formats excesses the specified maximum number of supported formats 0x2b ERROR TOO MANY DATASTORES The given number of data stores excess the specified maximum number of data stores 0x2C ERROR FAILED Attempt to change low power mode failed 0 2 ERROR ILLEGAL LINK POLICY The given link policy value is out of range 0 2 ERROR PINCODE LENGTH The pin code length field is zero or too large Ox2F ERROR PARITY BIT OUT OF RANGE The given parity check is out of range RoboTech Bluetooth Serial Module User Manual Ver 1 2 75 Error Macro Description code 0x30 ERROR_STOP_BITS_OUT_OF_RANGE The given number of stop bits is out of range 0x31 ERROR ILLEGAL LINK TIMEOUT The given link timeout value is out of range 0x32 ERROR COMMAND DISALLOWED The command is not allowed 0x33 ERROR ILLEGAL AUDIO CODEC The given Aud
83. nto Sniff mode RoboTech Bluetooth Serial Module 34 User Manual Ver 1 2 Description This command is used to request sniff mode a given link with user specified parameters PacketType GAP_ENTER_SNIFF_MODE DataLength 14 eee er 5 ee ee ee Data BdAddr The Bluetooth address of the remote device of which to put the link 6 bytes in sniff mode SniffMaxInterval Maximum sniff interval in slots 2 bytes SniffMinInterval Minimum sniff interval in slots 2 bytes SniffAttempt Number of slots the slave must listen beginning at the sniff slot 2 bytes even if it does not receive a packet with its own AM SniffTimeout Number of additional slots the slave must listen if it continues to 2 bytes receive only packets with its own AM address Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ ERROR ERROR INVALID NO OF PARAMETERS ERROR NO CONNECTION Exit Sniff Mode Description This command is used to exit a current sniff mode on a 12 command is used to ext a sniff mode on a given tink link PacketType 22 22 5205 220775 SE GAP_EXIT_SNIFF_MODE Daalen Data BdAddr The Bluetooth address of the remote device of which to exit the 6 bytes current sniff mode s to the request above 2 22 22 __ _____ o o Data Status ERROR_OK 1 byte ERROR UNSPECIFIED ERROR ERROR INVALID NO OF PARAMETERS ERROR NO CONNECTION Enter Park Mode In Park Mode the s
84. oHS compliant Radio Type Approved for Europe and Japan RoboTech Bluetooth Serial Module 6 User Manual Ver 1 2 Technical specifications Physical dimensions and pin assignment 29mm R7 R4 29 mm DE J1 R5 C28 Ooo R16 D1 k 2 0 mm pitch connector VCC RX TX RTS CTS GND Pin number Pin name Description 1 VCG Voltage DC input Typical 3VDC 2 RX Serial Port Receive Data level 3 TX O Serial Port Transmit Data TTL level 4 RTS O Serial Port Request To Send active low 5 CTS Serial Port Clear To Send active low 6 GND Ground RoboTech Bluetooth Serial Module 7 User Manual Ver 1 2 Recommended Operating Conditions Symbol Parameter Min Typ Max Unit VCC Voltage DC Input 2 5 30 33 V Ta Ambient Operating Temperature Range 0 25 45 1 Recommended maximum 3 0V for best RF performance Digital DC Characteristics Symbol Parameter Condition Max dn togat mout votago igh v Vit Logical 0 Input Voltage Low E o s ay p V Logical 1 Output Current 22 10 lo Logical 0 Output Current id 10 mA Power Supply Requirements Parameter RXSL Receive Data in SPP Link Slave 26 mA IRXM Receive Data in SPP Link Master 23 mA IsnM Sni
85. onnections in both directions Encryption 0x00 No encryption requirements 1 byte 0x04 Encryption is only required for this profile for incoming connections 0x40 Encryption is only required for this profile for outgoing connections 0x44 Encryption is required for this profile for connections in both directions SdpRecordLength The number of bytes in the SDP record 2 bytes SdpRecord The SDP record data formatted as lt uint16 Attributeld lt SdpRecord SdpDataElement AttributeData uint16 Attributeld Length Bytes SdpDataElement AttributeData The maximum length for each service is 255 bytes Confirms the request above STORE_SDP_RECORD 2 Data Status ERROR OK 1 byte ERROR INVALID SDP RECORD ERROR MAXIMUM NO OF SERVICE RECORDS REACHED ERROR WRITING TO NVS Identifier A unique identifier which must be used when dynamic enabling disabling 1 byte the record Other Commands Heset RBT 001 Host Dongle REQ RESET gt t IND DONGLE READY Description This command will perform soft reset of the RBT 001 The RBT 001 will send a DEVICE READY indication when it has performed the reset PacketType RESET Daalen o O Dua RoboTech Bluetooth Serial Module User Manual Ver 1 2 69 Device Ready Description The device will send this indication to the host when the device is fully initialized and ready to receive commands from the host
86. ons 0 0 ERROR_TRUNCATED_ANSWER The returned number of services is too large to be handled by the RBT 001 The answer is truncated 0 0 ERROR RESULT LARGE The SDP result from the remote device is too large to be handled by the RBT 001 due to ram limitations 0x0e ERROR NOT POSSIBLE TO ENTER TESTMODE It is currently not possible to enter the selected test mode RoboTech Bluetooth Serial Module User Manual Ver 1 2 74 Error Macro Description code Ox0f ERROR_ILLEGAL_TESTMODE The given test mode is not a valid test mode according to the specification 0x10 ERROR RESET TO NSC BDADDRESS The RBT 001 will change the Bluetooth address to the NSC address 0 11 ERROR_UART_SPEED_OUT_OF_RANGE The selected UART speed value is not valid according to the specification 0 12 ERROR_INVALID_PORT The given port value is larger than the maximum specified value 0x13 ERROR ILLEGAL STATE VALUE The given state value is not a valid state according to the specification 0x14 ERROR IDENTIFIER OUT OF RANGE The given identifier is larger than the maximum specified value 0x15 ERROR RECORD ALREADY IN SELECTED STATE The service record is already enabled disabled 0x16 ERROR INVALID AUTHENTICATION VALUE The given a
87. ooth Serial Module 20 User Manual Ver 1 2 data after incoming link has been established Since in many cases the RBT 001 just replaces a former cable connection the Transparent Mode on the UART allows implementation without any software change on the data transmissions Transparent Slave means the device is slave on the Bluetooth link and the UART is switched to Transparent Mode The RBT 001 can be assumed to be in Transparent Slave state after on of the following actions appeared L the RBT 001 accepted an incoming link in Idle Automatic in which the Automatic Flag is switched to On L the host sent command Transparent Mode while the RBT 001 is in Single Slave state Leaving Transparent Slave initiated by a UART break will lead into Single Slave state Since the RBT 001 can not send any events or react on incoming commands scanning is switched off and therefore the RBT 001 is not discoverable or connectable for other devices RoboTech Bluetooth Serial Module 21 User Manual Ver 1 2 UART Protocol Principles The RBT 001 can be controlled with simple commands on the UART interface The commands have to be sent within a special package format The following sections describe the format of the command set packages Framing The connection is considered Error free But for packet recognition and synchronization some framing is used All packets sent in both directions are constructed after the fol
88. ooth Software zip file with all the default and install locations as prompted by the installer At the end of the installations you will find a new program folder Easy Bluetooth under the Parallax Inc main folder named with a sub folder named BoeBot Remote Control in your Start Menu Select BoeBot Remote Control application from the sub folder listed in the previous step Click Options and select the COM port that was previously established with the Bluetooth configuration Download the program below using the BASIC Stamp Editor ctrl r to the BASIC Stamp 2 and then download the program below to the BASIC Stamp 2 using Run gt Run or crtl Disconnect the Boe Bot from PC Click Connect in the BoeBot Remote Control application to gain control of the Boe Bot BASIC Stamp 2 Program red Easy Bluetooth bs2 Purpose Control a Boe Bot with a GUI interface Author Technical Support amp RoboTech SRL Jeta Startede RAP reS 00 9 Updated N A SSTAMP 52 SPBASIC 2 5 This program is what is loaded into the BASIC Stamp prior to using the GUI interface from RoboTech SLR It allows a Boe Bot to be controlled via a GUI interface Controls are as followed Up Arrow Forward Down Arrow Backwards Left Arrow Left Turn Right Arrow Right Turn Space Bar Stop You can press and hold and release an arrow key for 2 seconds to acc
89. ooth dongle if you have one or enable the compatible Bluetooth device Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 3 of 11 Step 4 Connect BOE1 Use one of the USB cables and power supplies to power and connect to the PC Move the power switch to position 1 Step 5 Open Control Panel Control P 33 3 Q d Pe me RP Bb Pecessb ty Add Addor Advermitrative Adobe Gamma Ado Options Beinen Open the control panel of the and open Bluetooth Devices Bluetooth Devices Step 6 Establish a Bluetooth COM Devices Options COM Ports Hardware Click Add to setup the COM ports on the first Bluetooth module on BOE1 Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 4 of 11 Check My Device is set and ready to be found box and click Next Select the EasyBT module from the device window and click Next Check the Use the passkey found in the documentation Passkey 0000 passkey is zero x4 Click Next Add Bluetooth Device Wizard Welcome to the Add Bluetooth Device Wizard Before proceeding refer to the Bluetooth section of the device documentation Then set up your device so that your computer can find it Tum it on Make it discoverable visible Give it a
90. ot reported to the command interface and therefore can t be proven this scenario shall not be discussed in this document In Single slave the RBT 001 still listens to commands on the UART The device will be discoverable and connectable for other devices Scatternet Slave An advanced but not most efficient connection state is the Scatternet Slave In this mode the RBT 001 is slave to two different masters This means the RBT 001 needs to switch between two different synchronization states over time serving each Master only for a limited time While it is synchronized to Master 1 it is not able to listen to Master 2 therefore might miss the poll packages The RBT 001 can be assumed to be in Scatternet Slave after the following action appeared L The RBT 001 accepted an incoming link as Single Slave reported by SPP Link Established Indicator The RBT 001 is able to manage such a link without issues However since the switching between two piconets consumes significant bandwidth Piconet Master or at least Scatternet Master should be used instead which for example can be reached by setting the Force Master Flag within the NVS Force Master Role In Scatternet Slave discoverability and connectability are switched off Transparent Slave A typical scenario for the RBT 001 is the cable replacement in which the RBT 001 just waits for an incoming connection and the host connected over starts transmitting RoboTech Bluet
91. ould be edited to look like the following addyl CON 5 1 Al from A1 B2 C3 D4 E5 F6 goes here y addy2 SB2 B2 from 1 2 3 04 5 6 goes here addy3 CONES CS lt G3 tom 514351551 goes here addy4 D4 lt D4 from A1 B2 C3 D4 E5 F6 goes here y addy5 CON SE5 lt E5 from A1 B2 C3 D4 E5 F6 goes here addy6 CON SF6 F6 from A1 B2 C3 D4 E5 F6 goes here Place the address for the receiving Easy Bluetooth modules below the address for the Easy Bluetooth module used in the example is 00 17 A0 01 56 65 addyl CON 500 addy2 CON 17 addy3 CON SAO addy4 501 addy5 56 addy6 CON 565 SELECT 55 CASE BS2 BS2E BS2PE Baud CON 84 CASH INS PP MEME E Baud CON 240 Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 10 of 11 CASE 52 Baud CON 396 ENDSELECT iw Ita dirus Program Ue Que Abe De dro Qe quu Program Start DEBUG CLS PAUSE 3000 6155 Ra iti one SEROUT TX Baud 502 952 504 08 00 64 01 addy6 addy5 addy4 addy3 addy2 addy1 01 03 PAUSE 5000 DEBUG CR Entering Transparent mode CR Entering Transparent mode SEROUT TX Baud 502 552 511 501 500 564 501 5031 PAUSE 3000 Transmitting counter variable to remote Bluetooth device and
92. rposes Copyright O Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 1 of 11 Assembly Instructions Step 1 Unpack amp Check Unpack and verify all parts are accounted for 2 x Easy Bluetooth Modules 2 x BOE Full Kit USB 2x Board of Education e 2xBS2 e 2xUSB Cable e 2x 10 pack wire e 2x Rubber Feet 2 x 7 5VDC 1A Power Supply Bluetooth dongle is not included but still needed obtain a dongle or compatible module for configuration purposes Step 2 Assemble 1 BOE Place one set of rubber feet on the Board of Education using the white circles as the guide for placement Remove the BS2 from the anti static foam and place it in the BOE as shown Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 2 of 11 Use of the Easy Bluetooth modules and install the module on the AppMod header Notice the orientation of the module when installed the SIP will use the left side of the AppMod header Once you have completed the assembly you should have a BOE with a Easy Bluetooth installed similar to the following Step 3 Repeat x 1 and Add Bluetooth Dongle Repeat step 2 with the other components to assemble the other BOE with Easy Bluetooth setup After this step you should have 2 assembled Board of Education setups BOE1 and BOE2 Make a note or mark each setup with BOE1 2 Connect the Bluet
93. s ERROR OK 1 byte ERROR UNKNOWN ERROR ERROR INVALID NO OF PARAMETERS RSSI The RSSI value 1 byte Range 0x01 Too High 0x00 Good OxFF Too Low RoboTech Bluetooth Serial Module User Manual Ver 1 2 Read NVS Description This command can be used to read from the eeprom NVS in the RBT 001 module Data Address The address 2 bytes Length The number of bytes that should be read 1 byte Data Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS Address The address 2 bytes Length The number of bytes that has been read 1 byte Data The data lt Length gt bytes Write NVS Description This command can be used to write data to the NVS in the RBT 001 module Packet ype WRITE_NVS DataLength 3 Length Data Address The address 2 bytes Length The number of bytes that should be written 1 byte Data The data lt Length gt bytes 4 ee eC Data Status ERROR_OK 1 byte ERROR INVALID PARAMETERS Address The address 2 bytes Length The number of bytes that has been written 1 byte RoboTech Bluetooth Serial Module User Manual Ver 1 2 72 ErrorCodes ACL Error Codes Error Code Description 0x01 Unknown HCI Command 0x02 No Connection 0x03 Hardware Failure 0x04 Page Timeout 0x05 Authentication Failure 0x06 Key Missing 0x07 Memory Full
94. tamp 2 at 9600 baud 2 The easiest way to see in your code if a Bluetooth connection has been established is to wait for a byte to be received You can copy the program below into the BASIC Stamp Editor to ensure a proper connection 55 52 SPBAS INC 2 5 RX CON 2 Receive Pin TX CON 0 Transmit Pin Baud CON 84 19600 Baud combyte VAR Byte Communication Byte DEBUG Use This Screen for Display CR DO Wait for a first byte indicating an active Bluetooth connection SERIN RX Baud combyte DEBUG combyte LOOP 3 Download the program using Run gt Run ctrl from the BASIC Stamp Editor 4 Keep Current DEBUG Screen open and open another DEBUG Screen ctrl d from the BASIC Stamp Editor and select TX COM that the Bluetooth module refer to COM ports during Bluetooth installation is using you should now have 2 DEBUG Terminal windows open Click in the white area of the DEBUG window of DEBUG Terminal 2 and press any key if all the steps were correctly done the same key will be sent back to the DEBUG Terminal 1 window Copyright O Parallax Inc Easy Bluetooth 30085 v1 3 4 14 2010 Page 3 of 9 Resources and Downloads You may download the RBT 001 user manual example source codes PC applications and mobile phone application from www parallax com Mobile phone must be compatible with the JSR 82 Java API usually all Nokia and Sony Ericsson phone are compatible but check users manua
95. th SIG STORE CLASS OF DEVICE DataLength ClassOfDevice The class of device value to be stored in NVS 3 bytes RoboTech Bluetooth Serial Module User Manual Ver 1 2 63 Description Confirms the request above PacketT ype STORE_CLASS_OF_DEVICE DataLength Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS Force Master Role The Force Master Role is initiated only after boot up or reset The role is stored as parameter within NVS If Force Master is activated the RBT 001 tries to switch its role to master if connected from another device For this the RBT 001 is sending a Master Slave switch request after link establishment to the remote device If the switch is successful the link setup will be continued and the RBT 001 is open for other incoming connections If the switch fails the link will be dropped This functionality allows Access Point like applications on the RBT 001 Description This command will change the preferred role of the RBT 001 e g to force master role at any connections The RBT 001 must be reset to let the changes take effect REQ FORCE MASTER ROLE DataLength 1 Data Role 0x00 Don t care about role 1 bytes 0x01 Force master role at connection setup Description Confirms the request above PacketType CFM FORCE_MASTER_ROLE Data Status ERROR_OK 1 byte ERROR_INVALID_ROLE ERROR_INVALID_NO_OF_PARAMETERS Set Default Link Policy Description This
96. tion Service requests Device always asks for authentication L Service Database Entry only for Security Mode 2 o Each entry can specify the settings for authentication and encryption The RBT 001 by default is in Security Mode 2 Get Fixed PIN Reads the current fixed pin code from NVS PacketType GAP_GET_FIXED_PIN DataLength Data Status ERROR_OK 1 byte ERROR_INVALID_NO_OF_PARAMETERS Pinlength Length of pin code in bytes 1 byte 0x00 No Fixed pin RBT 001 will send Pin request indicator in case a pin is required Range 0x01 0x10 Pincode PIN code used when the two Bluetooth devices are paired The Pinlength bytes maximum length of a PIN code is 128 bits 16 bytes Set Fixed PIN Stores a new fixed pin code in NVS Data Pinlength Length of pin code in bytes 1 byte Range 0x01 0x10 Pincode PIN code used when the two Bluetooth devices are paired The Pinlength bytes maximum length of a PIN code is 128 bits 16 bytes RoboTech Bluetooth Serial Module 31 User Manual Ver 1 2 Description Response to the request above PacketT ype SET FIXED PIN DataLength Data Status ERROR_OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR PINCODE LENGTH PIN request Description This event is used to inform the Host when a PIN code is requested during authentication of an ACL link This event is only generated if the length of the Fixed pin parameter stored in the NVS is set to 0
97. to request to a change of role also called role switch during link setup therefore this general rule may not apply in 100 of the cases The RBT 001 can be assumed as master of the Bluetooth link and to be in Piconet Master when L the command interface has been used to actively establish one or more links by using one of the following commands Establish Link Connect to Default Connection a default connection has been established after power up or Reset L the RBT 001 accepted an incoming link while the Force Master bit in NVS was set to 0x01 Force Master Role After successfully establishing a link the RBT 001 will stay in Command Mode The benefit of being master instead of slave is that the RBT 001 is actively managing the link to all devices so can assign each device the bandwidth it requires With this the RBT 001 is able to support up to 7 active links Scatternet Master In case a Bluetooth device is master for one or several slaves and in parallel slave to one master the connection scenario is called scatternet The RBT 001 is able to be master to one or multiple slaves and in addition can be slave to maximum one master Within the RBT 001 scenario this state is called Scatternet Master The RBT 001 can be assumed to be in this state after one of the following connection situations L The RBT 001 accepts an incoming link as Piconet Master while the Force Master bit is set to 0x00 L The de
98. to switch to yes MasterRole Master Role after being connected The device will reject the link if command could not be exe cuted RoboTech Bluetooth Serial Module 13 User Manual Ver 1 2 SW Reset No Address Parameter Default Value Description required 13 005B Automatic 0x01 Configures the general behavior of the device yes Operation 0x00 Automatic OFF Non automatic 0x01 Automatic ON Automatic 14 005C PageScan 0x01 Configures the connectability of the device no Mode 0x00 not connectable 0x01 normal scan 0x81 interlaced scan faster connection time 15 005D Inquiry 0x01 Configures the discoverability of the device no ScanMode 0x00 not discoverable 0x01 normal scan 0x81 interlaced scan faster response time 16 005E Security 0x02 Configures Service Level Security Mode no Mode 17 005F 0060 Default 0x000F Configures the default link policy for incoming no LinkPolicy links 18 0061 EventFilter 0x01 Configures the level of events reported to the no host 0x00 No filter all events reported 0x01 ACL events filtered only API events reported 0x02 All events filtered only UART breaks indi cated 0x03 All events filtered including UART break 19 0062 OxFF Reserved i 20 0063 0064 LinkTime 0x7D00 Configures the default link supervision timeout in no out slots 0 625ms used for incoming and outgoing links 21 0065 0
99. to the DEBUG terminal DO counter counter 1 PAUSE 500 DEBUG counter LOOP Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 11 of 11
100. tooth address of the remote device of which to put the link 6 bytes in Hold mode HoldMaxInterval Maximum length of the Hold interval for which the Host may 2 bytes actually enter into the hold mode after negotiation with the remote device HoldMinInterval Minimum length of the Hold interval for which the Host may 2 bytes actually enter into the hold mode after the negotiation with the remote device RoboTech Bluetooth Serial Module User Manual Ver 1 2 36 EM es Data Status ERROR_OK 1 byte ERROR UNSPECIFIED ERROR ERROR INVALID NO OF PARAMETERS ERROR NO CONNECTION Set zii Policy This command is used to change the current link policy setting for the gente link PacketType GAP_SET_LINK_POLICY DataLength Data BdAddr The Bluetooth address of the remote device of which to change the 6 bytes link policy settings for the link LinkPolicy Bitfield 2 byte 0x0001 Master slave switch allowed 0x0002 Hold mode allowed 0x0004 Sniff mode allowed 0 0008 Park mode allowed Data Status ERROR_OK 1 byte ERROR_UNSPECIFIED_ERROR ERROR INVALID NO OF PARAMETERS ERROR NO CONNECTION ERROR ILLEGAL LINK POLICY Get Link Policy Description This command is used to get the current link policy setting for the gente link PacketType GAP_GET_LINK_POLICY DataLength Data BdAddr The Bluetooth address of the remote device of which to get the 6 bytes current link po
101. ts Product bbb dide t uqa cba 6 Technical Sp cifications naor m TE 7 Physical dimensions and pin 7 Recommended Operating Conditions a 8 Digital DC CharacterisllGS uuu uuu 8 Power Supply Requirements 8 Powering with Voltage DC Input above 3 0 9 232 a nd Ende 10 UART Interface ctio ep Doce rece Eme em Ce mn mime 11 Command mode and Transparent mode a 12 Ie roTn elus inodo METER P 12 Transparent cte deed ed edet eredi 12 u 12 Bluetoothi modeen cia eee Oren tira LM AM A E A dur 13 NVS Settings influencing the operation state 13 Automatic operation eto d eie usd ded ia aM Uu e e iS 15 19 qoe a 16 Default connections stored in 5 gt 16 Default connection transparent On Off 16 Operation SEATS rotat 16 Idle Automatic and Idle Non auto
102. uthentication value is not a valid value according to the specification 0x17 ERROR_INVALID_ENCRYPTION_VALUE The given encryption value is not a valid value according to the specification 0x18 ERROR_MAXIMUM_NO_OF_SERVICE_RECORDS_REACHED The maximum number of service records which the RBT 001 is able to store is reached 0x19 ERROR_WRITING_TO_NVS An error occurred while writing to flash The service record may not be stored Oxla ERROR_INVALID_ROLE The given role value is not a valid value according to the specification 0 1 ERROR_LIMIT Limits exceeded Parameter s violates limits 0 1 ERROR UNEXPECTED Unexpected at this moment 0 1 ERROR_UNABLE_TO_SEND Could not send at this moment no reason specified 0 1 ERROR CURRENTLY NO BUFFER Currently no room in buffer try again later Oxlf ERROR NO CONNECTION Trying to use an inexistent connection 0x20 ERROR SPP INVALID PORT Port number out of range 0x21 ERROR SPP PORT NOT OPEN Port is closed 0x22 ERROR SPP PORT BUSY Connection establishment on a PORT that has a connection 0x23 ERROR SPP MULTIPLE CONNECTIONS Transparent mode attempted while more than 1 connection active 0x24 ERROR SPP MULTIPLE TRANSPARENT Trying to store a default connection when a transparent default connection is already stored or trying to store a transparent default connection when another connection is already stored 0x25 ERROR SPP DEFAULT CONNECTION NOT STORED Trying to co
103. vice Address From the Bluetooth Device window select the Bluetooth module and click Properties Highlight the name and change it to EasyR and make note of the address and click OK The device address for the module used in this example is 00 17 0 56 65 The address is used in the example program for the transmitting Bluetooth module on BOE2 Add Bluetooth Device Wizard Completing the Add Bluetooth Device Wizard The Bluetooth device was successfully connected to your computer Y our computer and the device can communicate whenever they are near each other These are the COM serial ports assigned to pour device Outgoing port COM15 Incoming COM port COM18 more about iue To close this wizard click Finish EasyBT Properties General Services 9 of device Address Last connected Connection Unclassified Device 00 17 0 01 56 65 Tuesday December 08 2009 at 10 40 51 Passkey enabled Copyright Parallax Inc AppNote Easy Bluetooth to Easy Bluetooth Connection 1 19 2010 Page 6 of 11 Step 8 Repeat for 2 Bluetooth Devices Devices Options COM Ports Hardware Power down 1 and use steps 4 through 6 to get the Easy Bluetooth on BOE2 configured Keep note of 05 the Outgoing and Incoming ports OE Once both Bluetooth modules are configured the Bluetooth Device window should look similar to the scre
104. vice is Single Slave and actively establishes a link to another device by using one of the following commands SDAP Connect Establish Link Connect to Default Connection Once Scatternet Master has been reached RBT 001 is not able to accept another incoming link However the device will still be discoverable and will still answer to service requests Transparent Master In case the RBT 001 is only connected to one other device point to point connection it might be beneficial for the application to send data directly to the UART interface without having to use the command SPP Send Data For this the RBT 001 offers the so call Transparent Mode on the UART which allows to send data directly Since the RBT 001 in this case gets no information to which port to send this data to transparent mode is only allowed on a point to point connection Data will be routed directly from the UART interface to the remote Bluetooth device Transparent Master means the RBT 001 is master for the point to point connection to one other link and Transparent Mode is switched on This state is reached by one of the following situations L Sending the Transparent Mode command in Piconet Master state In case Automatic operation is ON Default Connection setup after Reset in which the transparent flag is set to Ox01 RoboTech Bluetooth Serial Module 19 User Manual Ver 1 2 L Default Connection setup by using Connect to Default
105. y mode 2 0x03 Security mode 3 0x83 Security mode 3 with link level encryption Data Status ERROR OK 1 byte ERROR INVALID NO OF PARAMETERS ERROR INVALID SECURITY MODE Pairing The pairing process is part of the authentication procedure If a local or remote service asks for authentication during link establishment the authentication process will check if a link key already exists between the two devices If not the Link Manager initiates the pairing process Within this the two devices exchange a PIN code and create a secure link key which will be stored in each device During next link setup the authentication routine takes the existing link key and proceeds without this pairing procedure The RBT 001 has a fixed PinCode which can be changed with the command Change fixed Pin This pin is used during any pairing procedure In case the stored PinCode has length 0x00 the RBT 001 will request a Pin from the application using the Pin Request indicator The application needs to respond with the appropriate pin in the Pin request Remove Pairing Description Remove pairing with a remote device PacketType GAP_REMOVE_PAIRING DataLength NN EM Remove pairing to the BdAddress 6 byte RoboTech Bluetooth Serial Module 33 User Manual Ver 1 2 Description Response to the request above PacketType T EO Nd REMOVE_PAIRING DataLength _ Data _ 1 byte ERROR_INVALI

Download Pdf Manuals

image

Related Search

Related Contents

HP Dreamcolor Z27x  "取扱説明書"  EVGA GeForce 7200 GS NVIDIA GeForce 7200 GS  Bridgit 4.5 user`s guide  Xerox 3635MFP/S All in One Printer User Manual  Personal Audio System  LED MAGIC BAR - Flash  1 - Brother  Tenda N301 router  LG GU292 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file