12.07.2015 Views

RBT-001 Module - User Manual v.1.2

RBT-001 Module - User Manual v.1.2

RBT-001 Module - User Manual v.1.2

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RoboTechBluetooth Serial <strong>Module</strong><strong>RBT</strong>-<strong>001</strong><strong>User</strong> <strong>Manual</strong>Ver. 1.2RoboTech srlVia Chiodo 16119121 La Spezia (SP) – ITALYP.IVA (VAT Number): IT 01185460118Sede Operativa (Main Office):Via Boccioni 156037 Peccioli (PI) – ITALYTel: +39.0587.672027Fax: +39.0587.670936E-mail: info@RoboTechsrl.comhttp://www.RoboTechsrl.com


Reading the user-friendly name of the local device........................................................28Read Local Name.......................................................................................................28Changing the user-friendly name of the local device......................................................28Write Local Name .......................................................................................................28Reading the Bluetooth device address of the local device .............................................29Read Local Bluetooth Address ...................................................................................29Changing Scanmode (Connectability and Discoverability) .............................................29Set Scan Mode ...........................................................................................................30Set Scan Mode Indication...........................................................................................30Bluetooth Security ..........................................................................................................31Get Fixed PIN .............................................................................................................31Set Fixed PIN .............................................................................................................31PIN request.................................................................................................................32Get Security Mode......................................................................................................32Set Security Mode ......................................................................................................33Pairing............................................................................................................................33Remove Pairing ..........................................................................................................33List Paired Devices.....................................................................................................34"Air interface" Low Power Modes ...................................................................................34Exit Sniff Mode ...........................................................................................................35Enter Park Mode.........................................................................................................35Exit Park Mode ...........................................................................................................36Enter Hold Mode.........................................................................................................36Set Link Policy ............................................................................................................37Get Link Policy............................................................................................................37Power Save Mode Changed.......................................................................................38Device Low Power Modes..............................................................................................38Disable Transport Layer .............................................................................................38ACL indications ..............................................................................................................39ACL Established .........................................................................................................39ACL Terminated..........................................................................................................39Serial port profile (SPP)..................................................................................................40Open / Close an RFCOMM port .....................................................................................40Reading / changing current port configuration................................................................40Set Port Config ...........................................................................................................40Get Port Config...........................................................................................................41Port Config Changed ..................................................................................................42Reading / changing current port status...........................................................................43Get Port Status ...........................................................................................................43Set DTR......................................................................................................................44Set RTS ......................................................................................................................45Set BREAK .................................................................................................................45Set Overrun Error .......................................................................................................46Set Parity Error ...........................................................................................................46Set Framing Error .......................................................................................................46Port Status Changed ..................................................................................................47Establish / Release SPP link to a remote device............................................................48Establish Link .............................................................................................................48Link Established..........................................................................................................49Incoming Link Established ..........................................................................................49RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.23


Release Link...............................................................................................................49Link Released.............................................................................................................50Sending / Receiving data on a SPP link (Normal mode) ................................................50Send Data...................................................................................................................50Incoming Data ............................................................................................................51Sending / Receiving data on a SPP link (Transparent mode) ........................................51Transparent Mode ......................................................................................................52Default Connection.........................................................................................................53Connect Default Connection.......................................................................................53Store Default Connection............................................................................................53Get List of Default Connections ..................................................................................54Delete Default Connection..........................................................................................54Link supervision Timeout................................................................................................55Set Link Timeout.........................................................................................................55Get Link Timeout ........................................................................................................55Service discovery application profile (SDAP) .................................................................56SDAP Connection Handling ...........................................................................................56Connect ......................................................................................................................56Disconnect..................................................................................................................57Connection Lost..........................................................................................................57SDAP Service Discovery................................................................................................57Service Browse...........................................................................................................57Service Search ...........................................................................................................58Service Request .........................................................................................................59Attribute Request........................................................................................................59Configuration..................................................................................................................61Change NVS UART Speed ............................................................................................61Change UART Settings ..................................................................................................61Read Operation Mode....................................................................................................62Write Operation Mode ....................................................................................................62Set Ports To Open..........................................................................................................62Get Ports To Open .........................................................................................................63Restore Factory Settings................................................................................................63Store Class of Device.....................................................................................................63Force Master Role..........................................................................................................64Set Default Link Policy ...................................................................................................64Get Default Link Policy...................................................................................................65Set Event Filter...............................................................................................................65Get Event Filter ..............................................................................................................66Set Default Link Timeout................................................................................................66Get Default Link Timeout................................................................................................66Set Default Link Latency ................................................................................................67Get Default Link Latency ................................................................................................67SDP Record Handling ....................................................................................................67Enable SDP Record....................................................................................................68Delete All SDP Records..............................................................................................68Store Generic SDP Record.........................................................................................69Other Commands...........................................................................................................69Reset..............................................................................................................................69Device Ready.................................................................................................................70RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.24


Test Mode ......................................................................................................................70RF_TEST_MODE...........................................................................................................70Read RSSI .....................................................................................................................71Read NVS ......................................................................................................................72Write NVS ......................................................................................................................72ErrorCodes ........................................................................................................................73ACL Error Codes............................................................................................................73Generic error codes........................................................................................................74RFCOMM Error Codes...................................................................................................76RFCOMM Release Reasons..........................................................................................76Bibliography .......................................................................................................................77Certifications ......................................................................................................................78Bluetooth........................................................................................................................78CE ..................................................................................................................................78Revision History.................................................................................................................79RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.25


Product DescriptionThe RoboTech Bluetooth Serial <strong>Module</strong> is an effective and low-cost solution to free yourhardware applications from wires.Main features are:• Compliant with the Bluetooth 2.0 Specification• Certified as an end product: no additional Bluetooth qualification is needed whenusing 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)• RoHS compliant• Radio Type Approved for Europe and JapanRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.26


Technical specificationsPhysical dimensions and pin assignmentPin numberPin nameType(Input/Output)Description1 VCC I Voltage DC input ( Typical 3VDC)2 RX I Serial Port Receive Data (TTL level)3 TX O Serial Port Transmit Data (TTL level)4 RTS O Serial Port Request To Send (active low)5 CTS I Serial Port Clear To Send (active low)6 GND - GroundRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.27


Recommended Operating ConditionsSymbol Parameter Min Typ Max UnitVCC Voltage DC Input 2.5 3.0 3.3 1 VTa Ambient Operating Temperature Range 0 25 45 °C1. Recommended maximum 3.0V for best RF performanceDigital DC CharacteristicsSymbol Parameter Condition Min Max UnitV IH Logical 1 Input Voltage High2.5V ≤ VCC ≤ 3.0V 0.7 x VCC VCC + 0.23.0V ≤ VCC ≤ 3.3V 2.0 VCC + 0.2VV IL Logical 0 Input Voltage Low2.5V ≤ VCC ≤ 3.0V -0.2 0.25 x VCC3.0V ≤ VCC ≤ 3.3V -0.2 0.8VI OH Logical 1 Output CurrentV OH = 2.4V,VCC = 3.0V-10 mAI OL Logical 0 Output CurrentV OL = 0.4V,VCC = 3.0V10 mAPower Supply Requirements 1Symbol Parameter Min Typ 2 Max UnitI RXSL Receive Data in SPP Link, Slave 3 26 mAI RXM Receive Data in SPP Link, Master 3 23 mAI SnM Sniff Mode, Sniff interval 1 second 3 5.6 mAI SC-TLDIS Scanning, No Active Link, TL Disabled 3 0.43 mAI Idle Idle, Scanning Disabled, TL Disabled 3 100 µA1. Based on UART Baudrate 921.6kbit/s.2. VCC = 3.3V, Ambient Temperature = +25 °C.3. Average values excluding LedsTL= Transport LayerRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.28


Powering with Voltage DC Input above 3.0VIf the Host circuitry works with a voltage above 3.0V, a regulator is needed to provide thecorrect Voltage DC Input level to the <strong>RBT</strong>-<strong>001</strong> module keeping the best RF performance.Furthermore the <strong>RBT</strong>-<strong>001</strong> module's inputs must be lowered to acceptable levels. Just forinstance, a simple schematic considering a Host circuitry working from 3.3VDC to 5VDC isreported here below.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.29


RS232 adapter board schematicRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.210


UART InterfaceThe main communication interface between the <strong>RBT</strong>-<strong>001</strong> and the host is the UARTInterface. The UART interface between host and <strong>RBT</strong>-<strong>001</strong> needs to be connected in NullModem configuration, meaning RTS/CTS and TX/RX are crossed.<strong>RBT</strong>-<strong>001</strong>HOSTFigure 1: UART Null Modem connectionThe command interface is based on a command/event based structure. Each command(also called “Request”) will be acknowledged with the appropriate status event (also called“Confirm”). Unexpected events, like incoming link establishment or data, are also sent asevents, 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 commandinterface.Since the <strong>RBT</strong>-<strong>001</strong> 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 <strong>RBT</strong>-<strong>001</strong> uses the RTS lines to indicate low buffers and reacts on the CTS from thehost, immediately stopping sending packages to the host.In case the host microcontroller is not able to provide hardware handshaking, the UARTshould be used in "Command Mode" only, since the device would not be able to indicate fullbuffers by using the RTS signal. In the same way, the host needs to provide enough bufferspace to be able to handle the incoming data, since it’s not able to stop the flow from the<strong>RBT</strong>-<strong>001</strong>.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.211


Command mode and Transparent modeCommand ModeThe <strong>RBT</strong>-<strong>001</strong> offers a wide range of commands to configure the hardware and theBluetooth operation. As the command set is on top of the profiles, Bluetooth operationalcommands are reduced to high level commands controlling general Bluetooth operation.In Command Mode, the <strong>RBT</strong>-<strong>001</strong> will try to interpret all data sent over the UART to aknown command. The commands have to be sent in a specific package format. Theinterface is based on an event mechanism. Any command sent will be confirmed by theappropriate confirmation event. Unexpected events (e.g. incoming links) will be reportedby indication events.Please refer to the following section for a complete list of commands and their usage.Transparent ModeIn case the <strong>RBT</strong>-<strong>001</strong> has established a link to only one remote device and no configurationcommands have to be sent to the <strong>RBT</strong>-<strong>001</strong> ("Command Mode"), the UART interface canbe switched to “Transparent mode”. This means data are directly routed to the Bluetoothlink and not interpreted. Also incoming data are not indicated as events, they are sent asRAW data to the UART.Leaving transparent modeAs the <strong>RBT</strong>-<strong>001</strong> does not listen to commands, UART Break has to be used to tell thedevice to leave the transparent mode.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.212


Bluetooth modeThe operation of the <strong>RBT</strong>-<strong>001</strong> can be divided into different states. Each state representsspecial situations and describes the behaviour of the module.The operation states are influenced by a few features, stored in the NVS (Non-VolatileStorage). Depending on those, the device will come up to different modes and actaccording to those settings:NVS Settings influencing the operation stateBefore actually describing the different states, we should have a look on the parameters,which influence the behaviour of the <strong>RBT</strong>-<strong>001</strong>. The following parameters are stored inNVS and are checked during boot-up.<strong>RBT</strong>-<strong>001</strong> System Parameters, NVS EEPROM Memory MapNo. Address Parameter Default Value Description1 0000-0005 BD_Addr Bluetooth Device AddressLAP(lsb), LAP, LAP, UAP, NAP, NAP (msb)Required for Bluetooth modeSW Resetrequiredno2 0006 - 0x00 Reserved -3 0007 Unit-KeyPresent0xFFUsed by BT core, generated during pairing procedure.4 0008-<strong>001</strong>7 UnitKey 0xFF..0xFF Used by BT core, generated during pairing procedure.5 <strong>001</strong>8 Device-Name-Length6 <strong>001</strong>9-0040 Device-Name7 0041 Country-Code0xFF Length of Parameter 6 “Devicename” no0xFF...0xFF Friendly Name of the Bluetooth Device no0x00 Used by BT core yes8 0042 PinLength 0x04 The length of parameter 9, “PinCode”. In caseset to 0, the <strong>RBT</strong>-<strong>001</strong> will request pin from host.9 0043-0052 PinCode “0000” Fixed PinCode used for pairing with otherdevices10 0053-0055 ClassOfDevice0x000000The ’Class of Device’ describes general functionalityof the Bluetooth Device and is transmittedduring the Inquiry process.nonononono11 0056 SppPorts-ToOpen0x00000<strong>001</strong>Bitmask defining the RFCOMM channels toopen. For each channel one RFCOMM instancewill be created.no12 005A Preferred-MasterRole0x00Preferred Master forces the device to switch toMaster Role after being connected. The devicewill reject the link if command could not be executed.yesRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.213


No. Address Parameter Default Value DescriptionSW Resetrequired13 005B AutomaticOperation0x01Configures the general behavior of the device.yes0x00: Automatic OFF (Non-automatic)0x01: Automatic ON (Automatic)14 005C PageScan-Mode0x01Configures the connectability of the device0x00: not connectable0x01: normal scan0x81: interlaced scan (faster connection time)no15 005D Inquiry-ScanMode0x01Configures the discoverability of the device0x00: not discoverable0x01: normal scan0x81: interlaced scan (faster response time)no16 005E Security-Mode0x02 Configures Service Level Security Mode. no17 005F-0060 Default-LinkPolicy0x000FConfigures the default link policy for incominglinks.18 0061 EventFilter 0x01 Configures the level of events reported to thehost.0x00: No filter, all events reported0x01: ACL events filtered, only API eventsreported.0x02: All events filtered, only UART breaks indicated0x03: All events filtered, including UART break.nono19 0062 - 0xFF Reserved -20 0063-0064 LinkTimeout0x7D00Configures the default link supervision timeout (inslots, 0.625ms) used for incoming and outgoinglinks.21 0065 - 0x00 Reserved -22 0066 - 0x00 Reserved -no23 0067-0068 RfcommLatency0x0000Configures the default poll period of master toslave.0x0000: No requirement (default 40slots)0x0002-0x0190: Valid link latencyno24 0069-006C - 0x00000000 Reserved -25 006d UartParity-Bit0x00Parity setting for the hardware UART interface.0x00: No Parity0x01: Even Parity0x02: Odd Parityyes26 006E UartStopBit 0x00 Stop bit settings for the hardware UART interface0x00: 1 Stop bit0x01: 2 Stop bitsyesRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.214


No. Address Parameter Default Value Description27 006F UartSpeed 0x03 Speed of the Hardware UART interface.2400: 0x004800: 0x017200: 0x029600: 0x0319200: 0x0438400: 0x0557600: 0x06115200: 0x07230400: 0x08460800: 0x09921600: 0x0ASW Resetrequiredyes28 0070-00AE RemoteDevices0x00..0x00Default connections database, to be connectedduring boot-up or by sending a command.29 00AF - 0xFF Reserved -30 00B0 - 0xFF Reserved -31 00B1 - 0xFF Reserved -32 00B2-00B3 - 0xFFFF Reserved -33 00B4 - 0xFF Reserved -no34 00B5-00B8 - 0xFFFF Reserved -35 00B9-00BC - 0xFFFF Reserved -36 00BD-00EE Filler 1 0xFF ... 0xFF Filler (not used)37 00EF-011 E Service-Records38 011 F-0346 CoreNvs-LinkKeys39 0347-0355 - 0xFF..0xFF Reserved40 0356-0367 - 0xFF..0xFF Reserved0xFF..0xFF SDP/Security info storage no0xFF..0xFF Link key storage (24 keys) no41 0368-037F Filler2 0xFF..0xFF Filler, not used42 0380-137F SdpRecords0xFF..0xFF SDP record storage no43 1380-1 FFF - 0xFF..0xFF Reserved -Automatic operation on/offThe 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: Connect to "Default connections stored in NVS" Switch UART to "Transparent Mode" after first incoming link ("Transparent Slave")Automatic Operation Off: No automatic steps after Reset/Boot-upRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.215


Force Master on/offThis flag improves multipoint operation of the <strong>RBT</strong>-<strong>001</strong>. In normal operation, the <strong>RBT</strong>-<strong>001</strong>will be slave for any incoming link, which limits the number of incoming connects to 2devices.In case the Force Master Bit in the NVS is set to On, the <strong>RBT</strong>-<strong>001</strong> will request a roleswitch on any incoming link to become Master.Force Master On: Request Role Switch on incoming link to become Bluetooth Master. Link will bedropped if role switch not successful. Force Master Off: Accept incoming link as slaveDefault connections stored in NVSIn case the automatic operation bit is set to On, the default connections database ischecked for any valid entry. If a valid entry is found, the <strong>RBT</strong>-<strong>001</strong> tries three times toconnect to each device stored in the database.Default connection transparent On/OffEach default connection can be configured to switch the UART to "Transparent Mode" orto "Command Mode" after link establishment. In case the transparent flag is set, the<strong>RBT</strong>-<strong>001</strong> will switch to "Transparent Mode" once the link is established.NOTE: The transparent flag can only be activated if only one default connection is storedin the databaseOperation StatesAs combination out of the different parameters and usage scenarios, the following statescan be defined for the <strong>RBT</strong>-<strong>001</strong>. The parameters and possibilities for this states aresummarized in the following Table "Overview of Operation States".An example on how to read the Table: E.g. Scatternet Master (assuming default NVSsettings). In Scatternet Master, the device is in command mode (listening to commands). The automatic flag in NVS has no influence. The device is discoverable andconnectable for other devices. 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 fromanother device. RAW data traffic is not possible. No Incoming link possible. In case the command interface is used to establish a link to another device, thedevice stays in "Scatternet Master". A UART BREAK has no influence on the functionality. Sending the command"Transparent Mode" is not applicable for this mode.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.216


RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.217


Idle, Automatic and Idle, Non-automaticAfter boot-up, reset or after successfully releasing the last link, the <strong>RBT</strong>-<strong>001</strong> stays withinone of the Idle states.In case the Automatic Operation bit is set to “On”, 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 thecommand interface to actively inquire or establish a link.The difference between Automatic “On” and “Off” just shows up at an incomingconnection:Incoming Link at Idle AutomaticIn case, the <strong>RBT</strong>-<strong>001</strong> is not connected to any other device and gets an incoming linkrequest, it will ask for authentication or pin code exchange 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 anyinteraction with the <strong>RBT</strong>-<strong>001</strong> to accept an incoming link. As the <strong>RBT</strong>-<strong>001</strong> automaticallyswitches to transparent mode, the application can start sending Raw data immediatelyafter receiving the notification.Incoming Link in Idle Non-AutomaticIn case, the <strong>RBT</strong>-<strong>001</strong> is not connected to any other device and gets an incoming linkrequest, it will ask for authentication or pin code exchange accept the link notify the application by an indicator change state to "Single Slave"After link establishment, the command interface is still active, delivering incoming datausing the "Incoming Data Indicator". To send data the command "SPP Send Data" needsto be used.“Idle Non-automatic” is optimised for multi-profile applications which need to managemultiple links or different profiles at the same time. As the <strong>RBT</strong>-<strong>001</strong> stays in commandmode, the application still has full control over the <strong>RBT</strong>-<strong>001</strong>, to establish links or doconfigurations.In case "Transparent Mode" would be beneficial for some data transfer, it can be reachedanytime by sending the "Transparent Mode" command.Piconet MasterIn Piconet Master, the <strong>RBT</strong>-<strong>001</strong> 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 thepaging procedure). A device accepting an incoming link is called slave. However, everyRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.218


Bluetooth device is able to request to a change of role (also called “role switch”) during linksetup, therefore this general rule may not apply in 100% of the cases.The <strong>RBT</strong>-<strong>001</strong> can be assumed as master of the Bluetooth link and to be in “PiconetMaster” when the command interface has been used to actively establish one or more links byusing one of the following commands— "Establish Link"— "Connect to Default Connection"— a default connection has been established after power-up or "Reset" the <strong>RBT</strong>-<strong>001</strong> accepted an incoming link while the Force Master bit in NVS was setto 0x01 ("Force Master Role")After successfully establishing a link, the <strong>RBT</strong>-<strong>001</strong> will stay in "Command Mode"The benefit of being master instead of slave is, that the <strong>RBT</strong>-<strong>001</strong> is actively managing thelink to all devices, so can assign each device the bandwidth it requires. With this, the<strong>RBT</strong>-<strong>001</strong> is able to support up to 7 active links.Scatternet MasterIn case a Bluetooth device is master for one or several slaves and in parallel slave to onemaster, the connection scenario is called “scatternet”. The <strong>RBT</strong>-<strong>001</strong> is able to be master toone or multiple slaves and in addition can be slave to maximum one master. Within the<strong>RBT</strong>-<strong>001</strong> scenario, this state is called “Scatternet Master”.The <strong>RBT</strong>-<strong>001</strong> can be assumed to be in this state, after one of the following connectionsituations The <strong>RBT</strong>-<strong>001</strong> accepts an incoming link as "Piconet Master" while the Force Masterbit is set to 0x00. The device is "Single Slave" and actively establishes a link to another device byusing one of the following commands— "SDAP Connect"— "Establish Link"— "Connect to Default Connection"Once Scatternet Master has been reached, <strong>RBT</strong>-<strong>001</strong> is not able to accept anotherincoming link. However the device will still be discoverable and will still answer to servicerequests.Transparent MasterIn case the <strong>RBT</strong>-<strong>001</strong> is only connected to one other device (“point-to-point” connection), itmight be beneficial for the application to send data directly to the UART interface, withouthaving to use the command "SPP Send Data". For this the <strong>RBT</strong>-<strong>001</strong> offers the so call“Transparent Mode” on the UART, which allows to send data directly.Since the <strong>RBT</strong>-<strong>001</strong> 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 routeddirectly from the UART interface to the remote Bluetooth device.Transparent Master means, the <strong>RBT</strong>-<strong>001</strong> is master for the point-to-point connection to oneother link and Transparent Mode is switched on. This state is reached by one of thefollowing situations Sending the "Transparent Mode" command in "Piconet Master" state. In case Automatic operation is ON, Default Connection setup after Reset, in whichthe transparent flag is set to 0x01.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.219


Default Connection setup by using "Connect to Default Connection", in which thetransparent flag is set to 0x01. Leaving Transparent Master, initiated by a UARTbreak, will lead into "Piconet Master" state.Since the <strong>RBT</strong>-<strong>001</strong> can not send any events or react on incoming commands, scanning isswitched off and therefore the <strong>RBT</strong>-<strong>001</strong> is not discoverable or connectable for otherdevices.Single SlaveThe Bluetooth specification defines a Bluetooth slave as the device which is connected byanother device and adjusting to the timing of that device (Master). The slave synchronizesto the clock of Master and to its hopping sequence. In an active link, the master polls eachslave (by default every 40 slots) to keep them synchronized but also to allow the slave tosend data.By default, the <strong>RBT</strong>-<strong>001</strong> accepts any incoming link. Depending on the configuration ofSecurity level ("Set Security Mode") and the Service Database entry, the device will ask forauthentication.The <strong>RBT</strong>-<strong>001</strong> can be assumed to be in Single Slave after one of the following actionsappeared: The <strong>RBT</strong>-<strong>001</strong> accepted an incoming link and reports it by the "SPP Link EstablishedIndicator", while the Automatic Operation flag is set to 0x00 (Non-automatic). The host sends a UART Break to a <strong>RBT</strong>-<strong>001</strong> in "Transparent Slave"In theory, there’s also the possibility for Single Slave, in case the <strong>RBT</strong>-<strong>001</strong> activelyestablishes a link to another device, which requests a role switch. In this case the initiatingdevice will be slave. Since the role switch is not reported to the command interface andtherefore can’t be proven, this scenario shall not be discussed in this document.In Single slave the <strong>RBT</strong>-<strong>001</strong> still listens to commands on the UART. The device will bediscoverable and connectable for other devices.Scatternet SlaveAn advanced but not most efficient connection state is the Scatternet Slave. In this modethe <strong>RBT</strong>-<strong>001</strong> is slave to two different masters. This means, the <strong>RBT</strong>-<strong>001</strong> needs to switchbetween two different synchronization states over time, serving each Master only for alimited time. While it is synchronized to Master 1 it is not able to listen to Master 2,therefore might miss the poll packages.The <strong>RBT</strong>-<strong>001</strong> can be assumed to be in Scatternet Slave after the following actionappeared: The <strong>RBT</strong>-<strong>001</strong> accepted an incoming link as "Single Slave", reported by "SPP LinkEstablished Indicator".The <strong>RBT</strong>-<strong>001</strong> is able to manage such a link without issues. However, since the switchingbetween two piconets consumes significant bandwidth, "Piconet Master" or at least"Scatternet Master" should be used instead, which for example can be reached by settingthe Force Master Flag within the NVS ("Force Master Role").In Scatternet Slave, discoverability and connectability are switched off.Transparent SlaveA typical scenario for the <strong>RBT</strong>-<strong>001</strong> is the cable replacement, in which the <strong>RBT</strong>-<strong>001</strong> justwaits for an incoming connection and the host connected over UART starts transmittingRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.220


data after an incoming link has been established. Since in many cases the <strong>RBT</strong>-<strong>001</strong> justreplaces a former cable connection, the "Transparent Mode" on the UART allowsimplementation without any software change on the data transmissions.Transparent Slave means the device is slave on the Bluetooth link and the UART isswitched to "Transparent Mode".The <strong>RBT</strong>-<strong>001</strong> can be assumed to be in “Transparent Slave” state after on of the followingactions appeared: the <strong>RBT</strong>-<strong>001</strong> accepted an incoming link in “Idle, Automatic”, in which the AutomaticFlag is switched to On. the host sent command "Transparent Mode" while the <strong>RBT</strong>-<strong>001</strong> is in "Single Slave"state. Leaving Transparent Slave, initiated by a UART break, will lead into "SingleSlave" state.Since the <strong>RBT</strong>-<strong>001</strong> can not send any events or react on incoming commands, scanning isswitched off and therefore the <strong>RBT</strong>-<strong>001</strong> is not discoverable or connectable for otherdevices.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.221


UART Protocol PrinciplesThe <strong>RBT</strong>-<strong>001</strong> can be controlled with simple commands on the UART interface. Thecommands have to be sent within a special package format. The following sectionsdescribe the format of the command set packages.FramingThe connection is considered “Error free”. But for packet recognition and synchronization,some framing is used. All packets sent in both directions are constructed after thefollowing model:StartdelimiterPacket TypeidentificationOpcode1 byte 1 byte 1byteDatalength2bytes|----------- Checksum ------------|ChecksumPacket Data1 byte bytesEnddelimiter1 byteStart delimiterThe start delimiter indicates the <strong>RBT</strong>-<strong>001</strong> the beginning of a new package. The “STX” charis used as start delimiter: STX = 0x02Packet type identificationThis byte identifies the type of packet. The following types are valid:Code Packet Type Description0x52'R'0x43'C'0x69'i'0x72'r'Request(REQ)Confirm(CFM)Indication(IND)Response(RES)All other values are reserved.A request sent to the Bluetooth module.All request are answered by exactly one confirm.The Bluetooth modules confirm to a request.All request are answered by exactly one confirm.Information sent from the Bluetooth module, that is not adirect confirm to a request.An optional response to an indication.This is used to respond to some type of indicationmessaged.OpcodeThe opcode is a command specifier. Each command is represented by this one byteidentifier, as in the following table.OpcodeGAP_INQUIRYGAP_DEVICE_FOUNDValue0x000x01RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.222


RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.223OpcodeValueGAP_REMOTE_DEVICE_NAME0x02GAP_READ_LOCAL_NAME0x03GAP_WRITE_LOCAL_NAME0x04GAP_READ_LOCAL_BDA0x05GAP_SET_SCANMODE0x06GAP_GET_FIXED_PIN0x16GAP_SET_FIXED_PIN0x17GAP_GET_PIN0x75GAP_GET_SECURITY_MODE0x18GAP_SET_SECURITY_MODE0x19GAP_REMOVE_PAIRING0x1BGAP_LIST_PAIRED_DEVICES0x1CGAP_ENTER_SNIFF_MODE0x21GAP_EXIT_SNIFF_MODE0x37GAP_ENTER_PARK_MODE0x38GAP_EXIT_PARK_MODE0x39GAP_ENTER_HOLD_MODE0x3AGAP_SET_LINK_POLICY0x3BGAP_GET_LINK_POLICY0x3CGAP_POWER_SAVE_MODE_CHANGED0x3DGAP_ACL_ESTABLISHED0x50GAP_ACL_TERMINATED0x51SPP_SET_PORT_CONFIG0x07SPP_GET_PORT_CONFIG0x08SPP_PORT_CONFIG_CHANGED0x09SPP_ESTABLISH_LINK0x0ASPP_LINK_ESTABLISHED0x0BSPP_INCOMMING_LINK_ESTABLISHED0x0CSPP_RELEASE_LINK0x0DSPP_LINK_RELEASED0x0ESPP_SEND_DATA0x0FSPP_INCOMING_DATA0x10SPP_TRANSPARENT_MODE0x11SPP_CONNECT_DEFAULT_CON0x12SPP_STORE_DEFAULT_CON0x13SPP_GET_LIST_DEFAULT_CON0x14SPP_DELETE_DEFAULT_CON0x15SPP_SET_LINK_TIMEOUT0x57SPP_GET_LINK_TIMEOUT0x58SPP_PORT_STATUS_CHANGED0x3ESPP_GET_PORT_STATUS0x40


RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.224OpcodeValueSPP_PORT_SET_DTR0x41SPP_PORT_SET_RTS0x42SPP_PORT_BREAK0x43SPP_PORT_OVERRUN_ERROR0x44SPP_PORT_PARITY_ERROR0x45SPP_PORT_FRAMING_ERROR0x46SDAP_CONNECT0x32SDAP_DISCONNECT0x33SDAP_CONNECTION_LOST0x34SDAP_SERVICE_BROWSE0x35SDAP_SERVICE_SEARCH0x36SDAP_SERVICE_REQUEST0x1ESDAP_ATTRIBUTE_REQUEST0x3FCHANGE_NVS_UART_SPEED0x23CHANGE_UART_SETTINGS0x48SET_PORTS_TO_OPEN0x22GET_PORTS_TO_OPEN0x1FRESTORE_FACTORY_SETTINGS0x1ASTORE_CLASS_OF_DEVICE0x28FORCE_MASTER_ROLE0x1DREAD_OPERATION_MODE0x49WRITE_OPERATION_MODE0x4ASET_DEFAULT_LINK_POLICY0x4CGET_DEFAULT_LINK_POLICY0x4DSET_EVENT_FILTER0x4EGET_EVENT_FILTER0x4FSET_DEFAULT_LINK_TIMEOUT0x55GET_DEFAULT_LINK_TIMEOUT0x56SET_DEFAULT_LINK_LATENCY0x63GET_DEFAULT_LINK_LATENCY0x64SET_PCM_SLAVE_CONFIG0x74ENABLE_SDP_RECORD0x29DELETE_SDP_RECORDS0x2ASTORE_SDP_RECORD0x31RESET0x26<strong>RBT</strong>-<strong>001</strong>_READY0x25TEST_MODE0x24WRITE_ROM_PATCH0x47READ_RSSI0x20RF_TEST_MODE0x4BDISABLE_TL0x52


OpcodeTL_ENABLEDAWAIT_INITIALIZATION_EVENTENTER_BLUETOOTH_MODEREAD_NVSWRITE_NVSValue0x530x660x660x720x73Data lengthNumber of bytes in the “Packet data” area. The maximum size is 333 bytes.Packet dataThe data fields hold binary data; hence both 0x02 (=STX) and 0x03 (=ETX) are allowed asdata.ChecksumThis is a simple Block Check Character (BCC) checksum of the bytes from “Packet type”to, and including, “data length”. The BCC checksum is calculated as the low byte of thesum of all bytes.E.g. if the sum of all bytes are 0x3724, the checksum is 0x24.End delimiterThe “ETX” char is used as end delimiter: ETX = 0x03RetransmissionThe connection is considered “Error free”, hence no need for implementing time-outs andretransmissions.Flow controlA transparent data-mode is supported for RFCOMM communication. When using thistransparent mode, full hardware handshake is advised.When not in transparent mode, the protocol principle of REQ-CFM, limits the need ofbuffer capacity. As IND's can come out of REQ-CFM sequence, and is unconfirmed, theuser device has to be able to read these data fast enough / have enough buffer capacity.Byte OrderThe byte order of the protocol is Little Endian, if nothing else is specified.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.225


Commands in Command ModeThe <strong>RBT</strong>-<strong>001</strong> implements a complete command set for bluetooth operation and localconfiguration. The command set is based on a request/confirm scheme meaning anycommand will be confirmed by an appropriate event including the same opcode.Searching for remote devicesThe <strong>RBT</strong>-<strong>001</strong> implements the basic Bluetooth functionalities ("GAP"), and offers simpleinterfaces for locating other Bluetooth devices (Inquiry and name discovery), and easyconfiguration of the local Bluetooth device.HostA p p lic a tio nR E Q , IN Q U IR Y<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eIN D , D E V IC E _ F O U N DF o r e a ch fo u n dd e viceC F M , IN Q U IR YInquiryDescriptionPacketType REQOpcode GAP_INQUIRYDataLength 3DataLength1 byteNumResponses1 byteDescriptionInitiates a search for other Bluetooth devices.Mode1 BytePacketType CFMOpcode GAP_INQUIRYDataLength 1DataStatus1 byteDuration of inquiryRange: 0x01 -0x30 (1.28s - 61.44s)Maximum number of responsesRange: 0x00 - 0xFF0x00 = Unlimited number of responses.General Inquiry 0x00Limited Inquiry 0x01Confirms that the search for other Bluetooth devices is complete.ERROR_OKERROR_DURATION_OUT_OF_RANGEERROR_INVALID_MODEERROR_INVALID_NO_OF_PARAMETERSDevice FoundDescriptionIndicates that a device has been found.PacketType INDOpcode GAP_DEVICE_FOUNDDataLength 9DataBdAddrBluetooth device address of the found device.6 bytesDeviceClass Class of the found device.3 byteRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.226


Getting user-friendly name of remote Bluetooth DeviceHostA p p lic a tio n<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eR E Q , R E M O T E _ D E V IC E _ N A M EC F M , R E M O T E _ D E V IC E _ N A M ERemote Device NameDescriptionRequest the user-friendly name from a known remote Bluetoothdevice.PacketType REQOpcode GAP_REMOTE_DEVICE_NAMEDataLength 6DataBdAddr6 byteBluetooth device address for the remote deviceDescriptionConfirm to the request above.PacketType CFMOpcode GAP_REMOTE_DEVICE_NAMEDataLength 8+ NameLength if ok, otherwise 8DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSBdAddr6 byteNameLength1 byteDeviceNameLength bytesERROR_TIMEOUTBluetooth device address for the remote deviceNumber of bytes in device nameThe user-friendly name of the remote device.NULL terminated. Maximum length is 40 bytes.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.227


Reading the user-friendly name of the local deviceHostA p p lic a tio nR E Q , R E A D _ L O C A L _ N A M E<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eC F M , R E A D _ L O C A L _ N A M ERead Local NameDescriptionRequest the user-friendly name for the local Bluetooth device.PacketType REQOpcode GAP_READ_LOCAL_NAMEDataLength 0DataNoneDescriptionPacketTypeOpcodeDataLengthDataConfirm to the request above.CFMGAP_READ_LOCAL_NAME2 + NameLengthStatusERROR_OK1 byteERROR_INVALID_NO_OF_PARAMETERSERROR_UNKNOWN_ERRORNameLength Number of bytes in device name1 byteDeviceNameNameLength bytesThe user-friendly name of the local device.The string is NULL terminated. . Max length is 40 bytes.Changing the user-friendly name of the local deviceHostA p p lic a tio nR E Q , W R IT E _ L O C A L _ N A M E<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eC F M , W R IT E _ L O C A L _ N A M EWrite Local NameDescriptionPacketTypeOpcodeDataLengthDataChange the user-friendly name for the local Bluetooth device. Thename is stored in NVSREQGAP_WRITE_LOCAL_NAME1+ NameLengthNameLengthNumber of bytes in device nameDeviceNameLength bytesThe user-friendly name of the local device.(String must be NULL terminated). Max length is 40 bytes.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.228


DescriptionConfirm to the request above.PacketType CFMOpcode GAP_WRITE_LOCAL_NAMEDataLength 1DataStatus1 byteERROR_OKERROR_NAME_TOO_LONGERROR_INVALID_NO_OF_PARAMETERSReading the Bluetooth device address of the local deviceHostA p p lic a tio nR E Q , R E A D _ L O C A L _ B D A<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eC F M , R E A D _ L O C A L _ B D ARead Local Bluetooth AddressDescriptionRead the Bluetooth device address of the local Bluetooth device.PacketType REQOpcode GAP_READ_LOCAL_BDADataLength 0DataNoneDescriptionConfirm to the request above.PacketType CFMOpcode GAP_READ_LOCAL_BDADataLength 7DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSBdAddr6 byteERROR_UNKNOWN_ERRORBluetooth device address for the local deviceChanging Scanmode (Connectability and Discoverability)Connectability and Discoverability is set with this single request.HostA p p lic a tio nR E Q , S E T _ S C A N M O D E<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eC F M , S E T _ S C A N M O D EIN D , S E T _ S C A N M O D E60 secondsRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.229


Set Scan ModeDescriptionChange the Bluetooth scan mode.Automatic limited discoverable mode automatically toggles betweengeneral and limited inquiry scanning. This mode defined by theBluetooth GAP profile specification, refer to part K.1, section 6.2.1. Theautomatic Limited discoverable mode times out after 60 sec. At thispoint the <strong>RBT</strong>-<strong>001</strong> sends the GAP_SET_SCANMODE indication andresets page and inquiry scan settings to the value that was storedbefore the automatic limited discoverable mode was entered.The Connectability mode and discoverability modes are stored in NVSand restored during startup. An exception are the limited discoverablemode and automatic limited discoverable modes are selected, in thiscase neither connectability mode or discoverability mode are stored inNVS.PacketType REQOpcode GAP_SET_SCANMODEDataLength 2DataConnectability1 byteDescriptionDiscoverability1 byte0x00 = Not connectable0x01 = Connectable0x81 = Connectable using Interlaced Scanning.0x00 = Non discoverable0x01 = General discoverable0x81 = General discoverable using Interlaced Scanning.0x02 = Limited discoverable0x82 = Limited discoverable using Interlaced Scanning.0x03 = Automatic limited discoverable mode0x83 = Automatic limited discoverable mode using Interlaced Scanning.Confirm to the request above.PacketType CFMOpcode GAP_SET_SCANMODEDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_CONNECTABILITY_PARAMETERERROR_INVALID_DISCOVERABILITY_PARAMETERERROR_INVALID_NO_OF_PARAMETERSERROR_UNKNOWN_ERRORSet Scan Mode IndicationDescriptionIndication send from the device, when automatic limited discoverablemode has ended.PacketType INDOpcode GAP_SET_SCANMODEDataLength 1DataStatus1 byteERROR_OKERROR_UNKNOWN_ERRORRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.230


Bluetooth SecurityBluetooth security is part of the Generic Access Profile GAP. It is controlled by: Security Modeo 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) isdetermined by the setting in the service database entries. Each entrycan have different security requirements. no authentication necessary for SDAP linkso Security Mode 3: Authentication already necessary on Link Manager level: SDAP linksalready require authentication (Service requests) Device always asks for authentication Service Database Entry (only for Security Mode 2)o Each entry can specify the settings for authentication and encryptionThe <strong>RBT</strong>-<strong>001</strong> by default is in Security Mode 2.Get Fixed PINDescriptionReads the current fixed pin code from NVSPacketType REQOpcode GAP_GET_FIXED_PINDataLength 0DescriptionPacketTypeOpcodeDataLengthDataResponse to the request above.CFMGAP_GET_ FIXED _PIN2+PinlengthStatusERROR_OK1 byteERROR_INVALID_NO_OF_PARAMETERSPinlength1 bytePincodePinlength bytesLength of pin code, in bytes.0x00: No Fixed pin, <strong>RBT</strong>-<strong>001</strong> will send "Pin request indicator" incase a pin is required.Range: 0x01-0x10PIN code used when the two Bluetooth devices are paired. Themaximum length of a PIN code is 128 bits (16 bytes).Set Fixed PINDescriptionPacketTypeOpcodeDataLengthDataStores a new fixed pin code in NVSREQGAP_SET_FIXED_PIN1+ PinlengthPinlengthLength of pin code, in bytes.1 byteRange: 0x01-0x10PincodePIN code used when the two Bluetooth devices are paired. ThePinlength bytes maximum length of a PIN code is 128 bits (16 bytes).RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.231


DescriptionResponse to the request above.PacketType CFMOpcode GAP_SET_ FIXED _PINDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_PINCODE_LENGTHPIN requestDescriptionThis event is used to inform the Host when a PIN code is requestedduring authentication of an ACL link. This event is only generated if thelength of the Fixed pin parameter stored in the NVS is set to 0.PacketType INDOpcode GAP_GET_PINDataLength 6DataBdAddr6 byteDescriptionPacketType REQOpcode GAP_GET_PINDataLength 1DataLength 7 + PinlengthDataBdAddr6 bytePinlength1 byteDescriptionThe Bluetooth device address of the remote device.This command is used to send a PIN code to the <strong>RBT</strong>-<strong>001</strong> module asresponse to a GAP_GET_PIN indication.PincodePinlength bytesPacketType CFMOpcode GAP_GET _PINDataLength 1DataStatus1 byteGet Security ModeDescriptionResponse to the request above.The Bluetooth device address of the remote device.Length of pin code, in bytes.Range: 0x00-0x100x00 indicates that the Host does not allow the authentication of theACL link.PIN code used when the two Bluetooth devices are paired. Themaximum length of a PIN code is 128 bits (16 bytes).ERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_PINCODE_LENGTHReads the current security mode of the Bluetooth device.PacketType REQOpcode GAP_GET_SECURITY_MODEDataLength 0DataNoneRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.232


DescriptionConfirm to the request above.PacketType CFMOpcode GAP_GET_SECURITY_MODEDataLength 2DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSMode1 byteThe current Bluetooth security mode.0x01 Security mode 10x02 Security mode 20x03 Security mode 30x83 Security mode 3 with link level encryptionSet Security ModeDescriptionChanges the current security mode of the Bluetooth device. Thesecurity mode is stored in NVS and restored during power up.PacketType REQOpcode GAP_SET_SECURITY_MODEDataLength 1DataMode1 byteDescriptionConfirm to the request above.The current Bluetooth security mode.0x01 Security mode 10x02 Security mode 20x03 Security mode 30x83 Security mode 3 with link level encryptionPacketType CFMOpcode GAP_SET_SECURITY_MODEDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_INVALID_SECURITY_MODEPairingThe pairing process is part of the authentication procedure. If a local or remote serviceasks for authentication during link establishment, the authentication process will check if alink key already exists between the two devices. If not, the Link Manager initiates thepairing process. Within this, the two devices exchange a PIN code and create a secure linkkey which will be stored in each device.During next link setup, the authentication routine takes the existing link key and proceedswithout this pairing procedure.The <strong>RBT</strong>-<strong>001</strong> has a fixed PinCode which can be changed with the command “Changefixed Pin”. This pin is used during any pairing procedure. In case the stored PinCode haslength 0x00, the <strong>RBT</strong>-<strong>001</strong> 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 PairingDescriptionRemove pairing with a remote device.PacketType REQOpcode GAP_REMOVE_PAIRINGDataLength 6BdAddress6 byteRemove pairing to the BdAddress.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.233


DescriptionResponse to the request above.PacketType CFMOpcode GAP_REMOVE_PAIRINGDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_LINKKEY_DOES_NOT_EXISTSList Paired DevicesDescriptionRequest a list of paired devices from NVSPacketType REQOpcode GAP_LIST_PAIRED_DEVICESDataLength 0DescriptionPacketTypeOpcodeDataLengthDataResponse to the request above.CFMLIST_PAIRED_DEVICES2 +6 * DeviceCountStatusERROR_OK1 byteERROR_INVALID_NO_OF_PARAMETERSDeviceCount1 byteBdAddresses6 byte * DeviceCountNumber of devices in the list of paired devicesIf 0 the device is not paired to any other devices.The maximum number of paired devices is 7.The list of paired devices"Air interface" Low Power ModesA Bluetooth link is a based on a physically synchronized connection, which means that thedevices can only communicate after successful synchronization. For this, each packagealso includes some synchronization information. Also a specific polling scheme is in placeto keep synchronization if no traffic is necessary.As the slave has to actively listen to packages from the master, there are differentmethods 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 sureboth devices support the low power mode requested, Link Policy can be set first. It willonly be successful if both sides support it.Enter Sniff ModeCommand to enter the sniff mode. The command includes the maximum and minimumvalue for the sniff interval. After sending the command, Master and slave will calculate areasonable sniff time and will switch into Sniff mode.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.234


DescriptionThis command is used to request sniff mode on a given link with userspecified parameters.PacketType REQOpcode GAP_ENTER_SNIFF_MODEDataLength 14DataBdAddr6 bytesThe Bluetooth address of the remote device of which to put the linkin sniff mode.SniffMaxInterval Maximum sniff interval in slots.2 bytesSniffMinInterval Minimum sniff interval in slots.2 bytesSniffAttempt2 bytesNumber of slots the slave must listen, beginning at the sniff slot,even if it does not receive a packet with its own AM.SniffTimeout2 bytesNumber of additional slots the slave must listen if it continues toreceive only packets with its own AM address.DescriptionResponse to the request above.PacketType CFMOpcode GAP_ENTER_SNIFF_MODEDataLength 1DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSERROR_NO_CONNECTIONExit Sniff ModeDescriptionThis command is used to exit a current sniff mode on a given link.PacketType REQOpcode GAP_EXIT_SNIFF_MODEDataLength 6DataBdAddr6 bytesThe Bluetooth address of the remote device of which to exit thecurrent sniff mode.DescriptionResponse to the request above.PacketType CFMOpcode GAP_ENTER_SNIFF_MODEDataLength 1DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSERROR_NO_CONNECTIONEnter Park ModeIn Park Mode the slave will lose its active member address and will not longer be part ofthe piconet. It will be kept synchronized by beacons within the specified interval range.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.235


DescriptionThis command is used to request park mode on a given link with userspecified parameters.PacketType REQOpcode GAP_ENTER_PARK_MODEDataLength 10DataBdAddr6 bytesThe Bluetooth address of the remote device of which to put the linkin park mode.BeaconMaxInterval2 bytesAcceptable longest length of the interval between beacons.BeaconMinInterval2 bytesAcceptable shortest length of the interval between beacons.DescriptionResponse to the request above.PacketType CFMOpcode GAP_ENTER_PARK_MODEDataLength 1DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSERROR_NO_CONNECTIONExit Park ModeDescriptionThis command is used to exit a current park mode on a given link.PacketType REQOpcode GAP_EXIT_PARK_MODEDataLength 6DataBdAddr6 bytesThe Bluetooth address of the remote device of which to exit thecurrent park mode.DescriptionResponse to the request above.PacketType CFMOpcode GAP_ENTER_PARK_MODEDataLength 1DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSERROR_NO_CONNECTIONEnter Hold ModeDescriptionThis command is used to request Hold mode on a given link with userspecified parameters.PacketType REQOpcode GAP_ENTER_HOLD_MODEDataLength 10DataBdAddr6 bytesThe Bluetooth address of the remote device of which to put the linkin Hold mode.HoldMaxInterval2 bytesMaximum length of the Hold interval for which the Host mayactually enter into the hold mode after negotiation with the remoteHoldMinInterval2 bytesdevice.Minimum length of the Hold interval for which the Host mayactually enter into the hold mode after the negotiation with theremote device.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.236


DescriptionResponse to the request above.PacketType CFMOpcode GAP_ENTER_HOLD_MODEDataLength 1DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSERROR_NO_CONNECTIONSet Link PolicyDescriptionThis command is used to change the current link policy setting for thegiven link.PacketType REQOpcode GAP_SET_LINK_POLICYDataLength 8DataBdAddr6 bytesThe Bluetooth address of the remote device of which to change thelink policy settings for the link.LinkPolicy2 byteDescriptionResponse to the request above.Bitfield:0x0<strong>001</strong> = Master-slave switch allowed0x0002 = Hold mode allowed0x0004 = Sniff mode allowed0x0008 = Park mode allowedPacketType CFMOpcode GAP_SET_LINK_POLICYDataLength 1DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSERROR_NO_CONNECTIONERROR_ILLEGAL_LINK_POLICYGet Link PolicyDescriptionThis command is used to get the current link policy setting for thegiven link.PacketType REQOpcode GAP_GET_LINK_POLICYDataLength 6DataBdAddr6 bytesThe Bluetooth address of the remote device of which to get thecurrent link policy settings for the link.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.237


DescriptionResponse to the request above.PacketType CFMOpcode GAP_GET_LINK_POLICYDataLength 3DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSLinkPolicy2 byteERROR_NO_CONNECTIONBitfield:0x0<strong>001</strong> = Master-slave switch allowed0x0002 = Hold mode allowed0x0004 = Sniff mode allowed0x0008 = Park mode allowedPower Save Mode ChangedDescriptionThis indication is sent to the host when changes the power save modeon a link occur.PacketType INDOpcode GAP_POWER_SAVE_MODE_CHANGEDDataLength 8DataStatus1 byteBdAddr6 bytesMode1 byteERROR_OKERROR_ATTEMPT_FAILEDERROR_UNSPECIFIED_ERRORThe Bluetooth address of the remote device for which the power savemode has changed on the link.0x00 = Active mode (Left power save mode)0x01 = Hold mode (Hold mode entered)0x02 = Sniff mode (Sniff mode entered)0x03 = Park mode (Park mode entered)Device Low Power ModesIn certain applications the <strong>RBT</strong>-<strong>001</strong> will be used most of the time in a waiting status,meaning it is waiting for being connected or listening to commands. To reduce powerconsumption of the system, the <strong>RBT</strong>-<strong>001</strong> supports a specific Wake up functionality.The <strong>RBT</strong>-<strong>001</strong> supports to disable the UART transport layer (command "Disable TransportLayer") to switch off the command interpreter and all hardware components not needed forthe current operation. The interface can be reactivated again by either side by usinghardware pins. The <strong>RBT</strong>-<strong>001</strong> uses the RTS signal pin to wake up the host. The RTS / CTSsignals are connected in a NULL-Modem fashion (i.e. "crossed"), meaning that RTS on theHost is connected to CTS on the <strong>RBT</strong>-<strong>001</strong> and vice versa. Therefore the host would needto be able to monitor its CTS input or has to use a separate hardware pin. In case the<strong>RBT</strong>-<strong>001</strong> has to be triggered by the host, the RTS pin is used as the hardware Wake-Upsignal.Disable Transport LayerDescriptionPacketType REQOpcode DISABLE_TLDataLength 0This Command disables the transport layer and thereby allowingpower saving.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.238


DescriptionPacketType CFMOpcode DISABLE_TLDataLength 1DataStatus1 byteResponse to the request above.ERROR_OKERROR_COMMAND_DISALLOWEDDescriptionThis indication is sent when the transport layer is re-enabled.Transport layer is re-enabled by pulling RTS signal of the host or anevent is ready to be sent from the <strong>RBT</strong>-<strong>001</strong> to the host, normally dueto an air-interface event.PacketType INDOpcode TL_ENABLEDDataLength 1DataStatus1 byteERROR_OKACL indicationsIf the Event Filter is set to “Report all events”, the <strong>RBT</strong>-<strong>001</strong> indicates any established andterminated ACL link to the host. This feature enables the user to monitor the Bluetoothphysical interface. In case the establishment failed the indicators report the reason forterminating or not establishing the link. The ACL error events can be found in Table "ACLError Codes" on page 73.ACL EstablishedDescriptionThis indication is sent to the host when an ACL link is established.PacketType INDOpcode GAP_ACL_ESTABLISHEDDataLength 7DataBdAddr6 bytesThe Bluetooth address of the remote device.Status1 byteSee "ACL Error Codes" on page 73.ACL TerminatedDescriptionThis indication is sent to the host when an ACL link is terminated.PacketType INDOpcode GAP_ACL_TERMINATEDDataLength 8DataBdAddr6 bytesThe Bluetooth address of the remote device.Status1 byteSee "ACL Error Codes" on page 73.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.239


Serial port profile (SPP)An active SPP link appears as a virtual serial port connection between two devices. As anyother serial connection it has different settings for that “virtual” serial port. The followingsettings enable the host to change specific port settings on that virtual port. The referencefor 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 directimpact on the Bluetooth link.The <strong>RBT</strong>-<strong>001</strong> implements the serial port profile (SPP), and offers a very simple interfacefor RFCOMM communication.Open / Close an RFCOMM portThe device will automatically open all configured "ports to open" at start up.Reading / changing current port configurationHostA p p lic a tio nR E Q , S P P _ S E T _ P O R T _ C O N F IGC F M , S P P _ S E T _ P O R T _ C O N F IG<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eR E Q , S P P _ G E T _ P O R T _ C O N F IGC F M , S P P _ G E T _ P O R T _ C O N F IGSet Port ConfigDescriptionWrite the configuration for the SPP port. These are “virtual” settings forthe air connection, not the settings for the <strong>RBT</strong>-<strong>001</strong> UART.Note: The baudrate in this configuration has no impact on thethroughput on the Bluetooth link itself or the <strong>RBT</strong>-<strong>001</strong>. It is not used bythe RFCOMM layer.PacketType REQOpcode SPP_SET_PORT_CONFIGDataLength 6DataLocalPort Local RFCOMM port number. Range 1-301 byteBaudRate1 byteBaudrate0x00 = 2400 baud 0x01 = 4800 baud 0x02 = 7200 baud0x03 = 9600 baud 0x04 = 19200 baud 0x05 = 38400 baud0x06 = 57600 baud 0x07 = 115200 baud 0x08 = 230400 baudPortsettings1 byteNote: The baudrate in this configuration has no impact on thethroughput on the Bluetooth link itself or the <strong>RBT</strong>-<strong>001</strong>. It is not used bythe RFCOMM layer. The parameter might be used as informativeparameter on the application level.Bitfield: 000000XX Number of databits 00=5 bits01=6 bits02=7 bits03=8 bitsBitfield: 00000X00 Number of stopbits 0 = 11 = 1.5Bitfield: 0000X000 Parity 0 = No parity1 = ParityRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.240


FlowControl1 byteXonChar1 byteXoffChar1 byteBitfield: 00XX0000 ParityType 00=ODD01=EVEN02=MARK03=SPACEBitfield: XX000000 ReservedBitfield: 0000000X XonXoffOnInput 0=Disable1=EnableBitfield: 000000X0 XonXoffOnOutput 0=Disable1=EnableBitfield: 00000X00 RtrOnInput 0=Disable1=EnableBitfield: 0000X000 RtrOnOutput 0=Disable1=EnableBitfield: 000X0000 RtcOnInput 0=Disable1=EnableBitfield: 00X00000 RtcOnOutput 0=Disable1=EnableBitfield: XX000000 ReservedChar used for Xon, if Xon/Xoff flowcontrol is used.Char used for Xoff, if Xon/Xoff flowcontrol is used.DescriptionConfirm to the request above.PacketType CFMOpcode SPP_SET_PORT_CONFIGDataLength 2DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_UNSPECIFIED_ERRORERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort1 byteERROR_UART_SPEED_OUT_OF_RANGELocal RFCOMM port number. Range 1-30Get Port ConfigDescriptionRead the configuration for the SPP port. This is "virtual" settings for theair connection, not settings for the <strong>RBT</strong>-<strong>001</strong> serial port.PacketType REQOpcode SPP_GET_PORT_CONFIGDataLength 1DataLocalPort1 byteLocal RFCOMM port number. Range 1-30DescriptionConfirm to the request above.PacketType CFMOpcode SPP_GET_PORT_CONFIGDataLength 7DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.241


LocalPort1 byteBaudRate1 bytePortsettings1 byteFlowControl1 byteXonChar1 byteXoffChar1 byteLocal RFCOMM port number. Range 1-30Baudrate0x00 = 2400 baud 0x01 = 4800 baud 0x02 = 7200 baud0x03 = 9600 baud 0x04 = 19200 baud 0x05 = 38400 baud0x06 = 57600 baud 0x07 = 115200 baud 0x08 = 230400 baudBitfield: 000000XX Number of databits 00=5 bits01=6 bits02=7 bits03=8 bitsBitfield: 00000X00 Number of stopbits 0 = 11 = 1.5Bitfield: 0000X000 Parity 0 = No parity1 = ParityBitfield: 00XX0000 ParityType 00=ODD01=EVEN02=MARK03=SPACEBitfield: XX000000 ReservedBitfield: 0000000X XonXoffOnInput 0=Disable1=EnableBitfield: 000000X0 XonXoffOnOutput 0=Disable1=EnableBitfield: 00000X00 RtrOnInput 0=Disable1=EnableBitfield: 0000X000 RtrOnOutput 0=Disable1=EnableBitfield: 000X0000 RtcOnInput 0=Disable1=EnableBitfield: 00X00000 RtcOnOutput 0=Disable1=EnableBitfield: XX000000 ReservedChar used for Xon, if Xon/Xoff flowcontrol is used.Char used for Xoff, if Xon/Xoff flowcontrol is used.Port Config ChangedDescriptionSent from the <strong>RBT</strong>-<strong>001</strong> when remote device has changed the portconfiguration.PacketType INDOpcode SPP_PORT_CONFIG_CHANGEDDataLength 6DataLocalPort Local RFCOMM port number. Range 1-301 byteBaudRate1 bytePortsettings1 byteBaudrate0x00 = 2400 baud 0x01 = 4800 baud 0x02 = 7200 baud0x03 = 9600 baud 0x04 = 19200 baud 0x05 = 38400 baud0x06 = 57600 baud 0x07 = 115200 baud 0x08 = 230400 baudBitfield: 000000XX Number of databits 00=5 bits01=6 bits02=7 bits03=8 bitsBitfield: 00000X00 Number of stopbits 0 = 11 = 1.5RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.242


FlowControl1 byteXonChar1 byteXoffChar1 byteBitfield: 0000X000 Parity 0 = No parity1 = ParityBitfield: 00XX0000 ParityType 00=ODD01=EVEN02=MARK03=SPACEBitfield: XX000000 ReservedBitfield: 0000000X XonXoffOnInput 0=Disable1=EnableBitfield: 000000X0 XonXoffOnOutput 0=Disable1=EnableBitfield: 00000X00 RtrOnInput 0=Disable1=EnableBitfield: 0000X000 RtrOnOutput 0=Disable1=EnableBitfield: 000X0000 RtcOnInput 0=Disable1=EnableBitfield: 00X00000 RtcOnOutput 0=Disable1=EnableBitfield: XX000000 ReservedChar used for Xon, if Xon/Xoff flowcontrol is used.Char used for Xoff, if Xon/Xoff flowcontrol is used.Reading / changing current port statusSPP link allows signaling of Modem status and line status over the Bluetooth link. Thecommands for changing Modem / Line status will only have effect if the SPP link isavailable.HostApplicationREQ, SPP_SET_DTRCFM , SPP_SET_DTRLocal<strong>RBT</strong>-<strong>001</strong>LocalSim ply BlueRemoteRem ote<strong>RBT</strong>-<strong>001</strong>Sim ply BlueIND, SPP_PORT_STATUS_CHANGEDHostApplicationREQ, SPP_G ET_PO RT_STATUSCFM , SPP_GET_PORT_STATUSGet Port StatusDescriptionGet the current state of the modem status and line status. Thiscommand resets the value (to 0) of the following members of the portstatus:OverrunErrorParityErrorFramingErrorBreakLengthThe value of DSR and CTS are only changed when new values arereceived from the remote device!PacketType REQOpcode SPP_GET_PORT_STATUSDataLength 1DataLocalPort1 byteLocal RFCOMM port number. Range 1-30RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.243


DescriptionConfirm to the request above.PacketType CFMOpcode SPP_GET_PORT_STATUSDataLength 5DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort Local RFCOMM port number. Range 1-301 bytePortStatus1 byteBreakLength2 bytesBitfield: 0000000X DTR 0 = Low1 = HighBitfield: 000000X0 RTS 0 = Low1 = HighBitfield: 00000X00 DSR 0 = Low1 = HighBitfield: 0000X000 CTS 0 = Low1 = HighBitfield: 000X0000 Overrun Error 0 = No Error1 = Overrun ErrorBitfield: 00X00000 Parity Error 0 = No Error1 = Parity ErrorBitfield: 0X000000 Framing Error 0 = No Error1 = Framing ErrorBitfield:X0000000 DLC established 0 = No DLC1 = DLC is availableThe length in ms of the detected break. The value 0 is used to indicate that nobreak has been detected.Set DTRDescriptionThis command sets the state of the DTR bit. Since RFCOMM acts as a"null modem" where DTR and DSR are connected, the remote devicewill see this as a change of the state of the DSR signal. In case theremote device is a <strong>RBT</strong>-<strong>001</strong>, this remote <strong>RBT</strong>-<strong>001</strong> will send a "SPPPort Status Changed Indicator" to its application.PacketType REQOpcode SPP_PORT_SET_DTRDataLength 2DataLocalPort Local RFCOMM port number. Range 1-301 byteState 0: False.1: True.DescriptionConfirm to the request above.PacketType CFMOpcode SPP_PORT_SET_DTRDataLength 2DataStatus1 byteERROR_OKERROR_ILLEGAL_STATE_VALUEERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort1 byteLocal RFCOMM port number. Range 1-30RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.244


Set RTSDescriptionThis command sets the state of the RTS bit. Since RFCOMM acts as a"null modem" where RTS and CTS are connected, the remote devicewill see this as a change of the state of the CTS signal. In case theremote device is a <strong>RBT</strong>-<strong>001</strong>, this remote <strong>RBT</strong>-<strong>001</strong> will send a "SPPPort Status Changed Indicator" to its application.PacketType REQOpcode SPP_PORT_SET_RTSDataLength 2DataLocalPort Local RFCOMM port number. Range 1-301 byteState 0: False.1: True.DescriptionConfirm to the request above.PacketType CFMOpcode SPP_PORT_SET_RTSDataLength 1DataStatus1 byteERROR_OKERROR_ILLEGAL_STATE_VALUEERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort1 byteLocal RFCOMM port number. Range 1-30Set BREAKDescriptionThis command indicates that the host has detected a UART BREAKover the virtual serial link. In case the remote device is a <strong>RBT</strong>-<strong>001</strong>, thisremote <strong>RBT</strong>-<strong>001</strong> will send a "SPP Port Status Changed Indicator" to itsapplication.PacketType REQOpcode SPP_PORT_BREAKDataLength 2DataLocalPort Local RFCOMM port number. Range 1-30.1 byteBreakLength2 bytesDescriptionThe length of the break in ms. Range 0 - 3000.The break length is sent in 200 ms units on the air interface (stored in a 4 bitparameter).Confirm to the request above.PacketType CFMOpcode SPP_PORT_BREAKDataLength 1DataStatus1 byteERROR_OKERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort1 byteLocal RFCOMM port number. Range 1-30RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.245


Set Overrun ErrorDescriptionThis command is used to indicate that the host has detected anoverrun error. In case the remote device is a <strong>RBT</strong>-<strong>001</strong>, this remote<strong>RBT</strong>-<strong>001</strong> will send a "SPP Port Status Changed Indicator" to itsapplication.PacketType REQOpcode SPP_PORT_OVERRUN_ERRORDataLength 1DataLocalPort1 byteLocal RFCOMM port number. Range 1-30DescriptionConfirm to the request above.PacketType CFMOpcode SPP_PORT_OVERRUN_ERRORDataLength 1DataStatus1 byteERROR_OKERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort1 byteLocal RFCOMM port number. Range 1-30Set Parity ErrorDescriptionThis command is used to indicate that the host has detected a parityerror. In case the remote device is a <strong>RBT</strong>-<strong>001</strong>, this remote <strong>RBT</strong>-<strong>001</strong>will send a "SPP Port Status Changed Indicator" to its application.PacketType REQOpcode SPP_PORT_PARITY_ERRORDataLength 1DataLocalPort1 byteLocal RFCOMM port number. Range 1-30DescriptionConfirm to the request above.PacketType CFMOpcode SPP_PORT_PARITY_ERRORDataLength 1DataStatus1 byteERROR_OKERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort1 byteLocal RFCOMM port number. Range 1-30Set Framing ErrorDescriptionThis command is used to indicate that the host has detected a framingerror. In case the remote device is a <strong>RBT</strong>-<strong>001</strong>, this remote <strong>RBT</strong>-<strong>001</strong>will send a "SPP Port Status Changed Indicator" to its application.PacketType REQOpcode SPP_PORT_FRAMING_ERRORDataLength 1DataLocalPort Local RFCOMM port number. Range 1-301 byteRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.246


DescriptionConfirm to the request above.PacketType CFMOpcode SPP_PORT_FRAMING_ERRORDataLength 1DataStatus1 byteERROR_OKERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocalPort1 byteLocal RFCOMM port number. Range 1-30Port Status ChangedDescriptionSend from the <strong>RBT</strong>-<strong>001</strong> when remote device has changed the port.PacketType INDOpcode SPP_PORT_STATUS_CHANGEDDataLength 4DataLocalPort Local RFCOMM port number. Range 1-301 bytePortStatus1 byteBitfield: 0000000X DTR 0 = Low1 = HighBitfield: 000000X0 RTS 0 = Low1 = HighBitfield: 00000X00 DSR 0 = Low1 = HighBitfield: 0000X000 CTS 0 = Low1 = HighBitfield: 000X0000 Overrun Error 0 = No Error1 = Overrun ErrorBitfield: 00X00000 Parity Error 0 = No Error1 = Parity ErrorBitfield: 0X000000 Framing Error 0 = No Error1 = Framing ErrorBitfield:X0000000 DLC established 0 = No DLCBreakLength2 bytes1 = DLC is availableThe length in ms of a break detected by the remote device. Range 0 - 3000.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 <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.247


Establish / Release SPP link to a remote deviceThis 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 canbe found within the following flowchart.The command will first be confirmed by a standard confirmation package. Afterwards the<strong>RBT</strong>-<strong>001</strong> will start to page and try to connect to the remote device. TheSPP_Link_Establishment indicator returns an error code reporting the success of the linkestablishment.HostA p p lic a tio nR E Q , S P P _ E S T A B L IS H _ L IN KC F M , S P P _ E S T A B L IS H _ L IN K<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eIN D , S P P _ L IN K _ E S T A B L IS H E DR F C O M M D L C lin kco n tro lled c lo seR F C O M M D A T A tra n sfe rN o rm a l, o r tra ns p are nt -d e p en d in g o n ho w po rt is o p en e d .R E Q , S P P _ R E L E A S E _ L IN KC F M , S P P _ R E L E A S E _ L IN KIN D , S P P _ L IN K _ R E L E A S E DR F C O M M clo s edfro m eith er s id e, o rc on n e ction lo stEstablish LinkDescriptionEstablish a DLC link to remote Bluetooth devicePacketType REQOpcode SPP_ESTABLISH_LINKDataLength 8DataLocalPortLocal RFCOMM port number. Range 1-301 byteBdAddr6 byteBluetooth device address for the remote deviceRemotePortNumber1 byteRemote device RFCOMM port number.(Must be found using SDAP)Description Confirm that the DLC link establishment is initiated.Note: This confirm does NOT indicate link establishment but only thatlink establishment is in progress. When link establishment response isreceived from the core, a SPP_LINK_ESTABLIHED indication is sentfrom the <strong>RBT</strong>-<strong>001</strong>.PacketType CFMOpcode SPP_ESTABLISH_LINKDataLength 2DataStatus1 byteERROR_OKERROR_SPP_PORT_BUSYERROR_SPP_PORT_NOT_OPENERROR_SPP_INVALID_PORTERROR_SPP_AUTOMATIC_CONNECTIONS_PROGRESSINGLocalPort1 byteLocal RFCOMM port number. Range 1-30RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.248


Link EstablishedDescriptionIndication of establishment of a locally requested DLC link.PacketType INDOpcode SPP_LINK_ESTABLISHEDDataLength 9DataStatusRefer to RFCOMM Error Codes section.1 byteBdAddrBluetooth device address for the remote device.6 byteLocalPort1 byteLocal RFCOMM port number. Range 1-30RemotePortNumber1 byteRemote device RFCOMM port number.Incoming Link EstablishedIn case a remote device creates a link to the <strong>RBT</strong>-<strong>001</strong>, the device will indicate thesuccessful link establishment by sending the “Incoming Link Established Indicator”. Thepacket includes the BD_Addr of the remote device and the local RFComm Port it isconnected to.DescriptionIndication of establishment of a remotely requested DLC link.PacketType INDOpcode SPP_ INCOMING_LINK_ESTABLISHEDDataLength 7DataBdAddr6 byteBluetooth device address for the remote deviceLocalPort1 byteLocal RFCOMM port number. Range 1-30Release LinkDescriptionRelease a DLC link to remote Bluetooth devicePacketType REQOpcode SPP_RELEASE_LINKDataLength 1DataLocalPort1 byteLocal RFCOMM port number. Range 1-30DescriptionConfirm that the release is initiated. When the release is complete, aSPP_LINK_RELEASED indication is sent from the <strong>RBT</strong>-<strong>001</strong>.PacketType CFMOpcode SPP_RELEASE_LINKDataLength 2DataStatus1 byteLocalPort1 byteERROR_OKERROR_NO_CONNECTIONERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocal RFCOMM port number. Range 1-30RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.249


Link ReleasedDescriptionIndicates that a DLC link is released. The link release may have beeninitiated locally or remote, or could be caused by a loss of link(disturbance, dead device, ….)PacketType INDOpcode SPP_LINK_RELEASEDDataLength 1DataReason1 byteRefer to section RFCOMM Release Reasons on page 76.LocalPort1 byteLocal RFCOMM port number. Range 1-30Sending / Receiving data on a SPP link (Normal mode)In the normal mode, data are transferred in packets with normal framing.HostA p p lic a tio nR E Q , R F C O M M _ S E N D _ D A T AC F M , R F C O M M _ S E N D _ D A T A<strong>RBT</strong>-<strong>001</strong>D o n g leIN D , R F C O M M _ IN C O M IN G _ D A T ASend DataIf not switched to transparent, data have to be sent to a remote device using thiscommand. The local RFComm Port is used to address the remote device.DescriptionPacketTypeOpcodeDataLengthDataSend data on a SPP link to remote Bluetooth deviceREQSPP_SEND_DATA3 + LocalPort1 bytePayloadSize2 bytesPayloadData bytesLocal RFCOMM port number. Range 1-30Number of data bytes to send.Valid range is 1 to 330 bytes..The data to send.DescriptionConfirm to the request above.PacketType CFMOpcode SPP_SEND_DATADataLength 2DataStatus1 byteLocalPort1 byteRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.2ERROR_OKERROR_LIMITERROR_UNABLE_TO_SENDERROR_CURRENTLY_NO_BUFFERERROR_NO_CONNECTIONERROR_SPP_INVALID_PORTERROR_SPP_PORT_NOT_OPENLocal RFCOMM port number. Range 1-3050


Incoming DataDescriptionPacketTypeOpcodeDataLengthDataIncoming data on a DLC link, from a remote Bluetooth deviceINDSPP_INCOMING_DATA3 + LocalPortLocal RFCOMM port number. Range 1-301 bytePayloadSizeNumber of data bytes to send.2 bytesValid range is 1 to 330 bytes..PayloadData The data to send. bytesSending / Receiving data on a SPP link (Transparent mode)For connections with high data rate requirement, a transparent mode can be used for datatransfer.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<strong>RBT</strong>-<strong>001</strong> will then leave transparent mode.HostA p p lic a tio nR E Q , S P P _ E S T A B L IS H _ L IN KC F M , S P P _ E S T A B L IS H _ L IN KIN D , S P P _ L IN K _ E S T A B L IS H E D<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eR E Q , S P P _ T R A N S P A R E N T _ M O D EC F M , S P P _ T R A N S P A R E N T _ M O D ET ra n sp a re n t m o d een te red a fter s en d in g cfmR F C O M M D A T A tran s fe r-tra n sp a re n t, w ith no fra m in gR F C O M M D L C lin kco n trolle d clo s e"U A R T B R E A K sig n a l""U A R T B R E A K s ig n a l"le a ve sT ra n sp a re n t m o d eIN D , S P P _ T R A N S P A R E N T _ M O D E(C O M M A N D M O D E )R E Q , S P P _ R E L E A S E _ L IN KC F M , S P P _ R E L E A S E _ L IN KIN D , S P P _ L IN K _ R E L E A S E DR F C O M M D L C linkR e le a se dRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.251


If the link is lost, the <strong>RBT</strong>-<strong>001</strong> will issue a BREAK signal, and send theSPP_LINK_RELEASED message.HostA p p lic a tio nR E Q , S P P _ E S T A B L IS H _ L IN KC F M , S P P _ E S T A B L IS H _ L IN KIN D , S P P _ L IN K _ E S T A B L IS H E D<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eR E Q , S P P _ T R A N S P A R E N T _ M O D EC F M , S P P _ T R A N S P A R E N T _ M O D Etra n sp a re n t m o d e en te redR F C O M M D A T A tra n sfer-tra n sp a re n t, w ith n o fra m ing"U A R T B R E A K sig n a l"IN D , S P P _ T R A N S P A R E N T _ M O D ER F C O M M c lo se d fromrem o te d e vice , o r lin klo st.IN D , S P P _ L IN K _ R E L E A S E DFor SPP links established from remote device, a SPP_LINK_ESTABLISHED indication willbe sent to the application upon reception of the first data.Again, the SPP_TRANSPARENT_MODE request can be used to switch to transparentmode.HostA p p lic a tio nIN D , S P P _ L IN K _ E S T A B L IS H E DR E Q , S P P _ T R A N S P A R E N T _ M O D EC F M , S P P _ T R A N S P A R E N T _ M O D E<strong>RBT</strong>-<strong>001</strong>S im p ly B lu eIn c om in g D L C lin k,an d d a ta .R F C O M M D A T A tra n sfer-tra n sp a re n t, w ith n o fra m ingTransparent ModeDescriptionSwitch to transparent mode on a SPP link to remote Bluetooth devicePacketType REQOpcode SPP_TRANSPARENT_MODEDataLength 1DataLocalPort1 byteLocal RFCOMM port number. Range 1-30DescriptionConfirm to the request above.PacketType CFMOpcode SPP_TRANSPARENT_MODEDataLength 2DataStatus1 byteERROR_OKERROR_SPP_PORT_NOT_OPENERROR_SPP_INVALID_PORTERROR_SPP_MULTIPLE_CONNECTIONSERROR_NO_CONNECTIONLocalPort1 byteLocal RFCOMM port number. Range 1-30RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.252


DescriptionIndication from <strong>RBT</strong>-<strong>001</strong> that transparent mode is left.PacketType INDOpcode SPP_TRANSPARENT_MODEDataLength 2DataLocalPort1 byteLocal RFCOMM port number. Range 1-30Mode1 byteCommand Mode = 0Transparent Mode = 1Default ConnectionConnect Default ConnectionDescriptionConnects the <strong>RBT</strong>-<strong>001</strong> to a stored connection. Either a single or allconnections can be establishedPacketType REQOpcode SPP_CONNECT_DEFAULT_CONDataLength 1DataIndex1 byteDescriptionConfirm to the request above.Index in the default connection storage. Range 0x00 to 0x06. If indexis set to 0xFF, all default connections will be established.PacketType CFMOpcode SPP_ CONNECT _DEFAULT_CONDataLength 1DataStatus1 byteERROR_OKERROR_SPP_AUTOMATIC_CONNECTIONS_PROGRESSINGERROR_LIMITERROR_SPP_DEFAULT_CONNECTION_NOT_STOREDStore Default ConnectionDescriptionStores a default connection in NVS.PacketType REQOpcode SPP_STORE_DEFAULT_CONDataLength 10DataIndex1 byteIndex in the default connection storage. Range 0x00 to 0x06.LocalPort1 byteRemotePort1 byteRemoteBdAddress6 bytesTransparentMode1 byteLocal RFCOMM port number. Range 1-30RFCOMM port number on remote deviceThe BdAddress of the remote deviceWhich transparent mode to enter when the connection is established.0x00 Transparent mode off0x01 Transparent mode on (only for point-to-point). If multipointconnections exist the <strong>RBT</strong>-<strong>001</strong> will not enter transparent modeRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.253


DescriptionConfirm to the request above.PacketType CFMOpcode SPP_STORE_DEFAULT_CONDataLength 1DataStatus1 byteERROR_OKERROR_LIMITERROR_SPP_INVALID_PORTERROR_SPP_MULTIPLE_TRANSPARENTERROR_SPP_PORT_BUSYGet List of Default ConnectionsDescriptionRequest a list of the default connections stored in NVSPacketType REQOpcode SPP_GET_LIST_DEFAULT_CONDataLength 1DataIndex1 byteIndex in the default connection storage. Range 0x00 to 0x06.DescriptionConfirm to the request above.PacketType CFMOpcode SPP_GET_LIST_DEFAULT_CONDataLength 11DataStatus1 byteERROR_OKERROR_LIMITIndex1 byteEntryStatus1 byteRemoteBdAddress6 bytesLocalPort1 byteRemotePort1 byteIndex in the default connection storage. Range 0x00 to 0x06.Bitfield: 0000000xBitfield: 000000x0Bitfield: xxxxxx000: Entry is not stored.1: Entry is stored.0: Command mode.1: Transparent mode.Reserved.The BdAddress of the remote deviceLocal RFCOMM port number. Range 1-30RFCOMM port number on remote deviceDelete Default ConnectionDescriptionDeletes a stored default connection in NVSPacketType REQOpcode SPP_DELETE_DEFAULT_CONDataLength 1DataIndex1 byteIndex in the default connection storage. Range 0x00 to 0x06.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.254


DescriptionConfirm to the request above.PacketType CFMOpcode SPP_DELETE_DEFAULT_CONDataLength 1DataIndex1 byteIndex in the default connection storage. Range 0x00 to 0x06.Status1 byte0x00 OKLink supervision TimeoutSet Link TimeoutDescriptionThis command is used to change the current ACL link supervisiontimeout.This command will affect all DLC’s established to the specified device.PacketType REQOpcode SPP_SET_LINK_TIMEOUTDataLength 8DataBdAddr6 bytesThe Bluetooth address of the remote device of the ACL link forwhich the Link Supervision Timeout is changed.LinkTimeout2 byteDescriptionResponse to the request above.The link supervision timeout in slots (0,625ms).0x0000: No link supervision timeout (the timer is disabled)0x0190-0xFFFF: Valid timeout range (in slots)0x7D00: The default value (20s)PacketType CFMOpcode SPP_SET_LINK_TIMEOUTDataLength 7DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSERROR_NO_CONNECTIONBdAddr6 bytesERROR_ILLEGAL_LINK_TIMEOUTThe Bluetooth address of the remote device of the ACL link forwhich the Link Supervision Timeout is changed.Get Link TimeoutDescriptionThis command is used to get the current link supervision timeoutsetting for the given ACL link.PacketType REQOpcode SPP_GET_LINK_TIMEOUTDataLength 6DataBdAddr6 bytesThe Bluetooth address of the remote device of the ACL link forwhich the Link Supervision Timeout is requested.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.255


DescriptionResponse to the request above.PacketType CFMOpcode SPP_GET_LINK_TIMEOUTDataLength 9DataStatus1 byteERROR_OKERROR_UNSPECIFIED_ERRORERROR_INVALID_NO_OF_PARAMETERSBdAddr6 bytesLinkTimeout2 byteERROR_NO_CONNECTIONThe Bluetooth address of the remote device of the ACL link forwhich the Link Supervision Timeout is requested.The link supervision timeout in slots (0,625ms).0x0000: No link supervision timeout (the timer is disabled)0x0190-0xFFFF: Valid timeout range (in slots)Service discovery application profile (SDAP)The <strong>RBT</strong>-<strong>001</strong> implements the service discovery application profile (SDAP), and makesservice discovery very simple.A pHostp lic a tio nR E Q , S D A P _ C O N N E C T<strong>RBT</strong>-<strong>001</strong>S im p ly(dongle) B lu eC F M , S D A P _ C O N N E C TD o n g le c re a te s a S D Pco n n e c tio nC o n n e ctio n is cre a te d ,s ta rt b ro w s in gR E Q , S D A P _ S E R V IC E _ B R O W S EC F M , S D A P _ S E R V IC E _ B R O W S EP e rfo rm a se a rc h in th ere m o te S D P d a ta b a seH o st re c e iv e s th ere s u lt, n e e d s a d d itio n a lp a ra m e te rsR E Q , S D A P _ S E R V IC E _ S E A R C HC F M , S D A P _ S E R V IC E _ S E A R C HP e rfo rm a s e a rch in th ere m o te S D P d a ta b a s eH o s t h a s fin is h e d th eS D P s e a rc hR E Q , S D A P _ D IS C O N N E C TC F M , S D A P _ D IS C O N N E C TD is c o n n e c t re m o ted e v ic eSDAP Connection HandlingConnectDescriptionCreates an SDP connection to a remote device. Only one SDPconnection can be active.PacketType REQOpcode SDAP_CONNECTDataLength 6DataBdAddr6 bytesThe Bluetooth address of the remote device to connect to.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.256


DescriptionConfirms the request abovePacketType CFMOpcode SDAP_CONNECTDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_CONNECTION_FAILEDDisconnectDescriptionThis command disconnects the active SDP connection.PacketType REQOpcode SDAP_DISCONNECTDataLength 0DescriptionConfirms the request abovePacketType CFMOpcode SDAP_DISCONNECTDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSConnection LostDescriptionNotification sent to the application when a loss of the SDP connectionis detected.PacketType INDOpcode SDAP_CONNECTION_LOSTDataLength 0SDAP Service DiscoveryThe SDAP Service Browse can be used to get the RFComm Port Numbers of all or onlyspecific Service Classes. The search mechanism is based on the 16bit-UUID for theservices. The actual list of UUIDs can be found within the “Bluetooth Assigned Numbers”Document of the Bluetooth SIG.Service BrowseDescriptionThis command is used to browse the service record of the remotedevice.PacketType REQOpcode SDAP_SERVICE_BROWSEDataLength 2DataBrowseGroupID2 bytesThe requested browse group (16 bit UUID).The UUID has to be byte swapped within the command.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.257


DescriptionPacketTypeOpcodeDataLengthDataConfirms the request aboveCFMSDAP_SERVICE_BROWSE2+NoOfServices*(5+ NameLength)StatusERROR_OK1 byteERROR_INVALID_NO_OF_PARAMETERSERROR_RESULT_TOO_LARGEERROR_TRUNCATED_ANSWERNoOfServices Number of services found on remote device.1 byteFor each serviceBrowseGroupID The browse group UUID that the service belongs to.2 bytesServiceID The service UUID.2 bytesPortNrRFCOMM port number.1 byteNameLength The number of bytes in the service name1 byteServiceName The name of the service.NameLengthbytesService SearchThe SDAP Service Search command offers the ability to search for specific attributes for aservice. The attribute IDs can be found at the Bluetooth SIG website under “BluetoothAssigned numbers”.NOTE: As an exception to all other commands, this command does NOT required byteswapped 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".DescriptionPacketTypeOpcodeDataLengthDataThis command is used to search for services in the service record ofthe remote device.REQSDAP_SERVICE_SEARCH2 + 2*SearchPatternLength + 2*AttributesLengthSearchPatternLength Number of 16-bit UUID’s in Search pattern List. Note: Must be less1 bytesthan 86 elements.SearchPattern List of the requested services. The search pattern list is a list of 16-bit UUID’s of the requested services.AttributesLength Number of 16-bit UUID’s in attributeId list. Note: Must be less than1 byte86 elements.AttributesList of requested attributes for the requested services. The attributelist is a list of 16-bit UUID’s for the requested attributes.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.258


DescriptionPacketTypeOpcodeDataLengthDataConfirms the request aboveCFMSDAP_SERVICE_SEARCH3 + LenghtStatusERROR_OK1 byteERROR_INVALID_NO_OF_PARAMETERSERROR_UNKNOWN_ERRORERROR_RESULT_TOO_LARGELengthLength of the result of the search. Maximum 330 bytes.2 byteResultResult of the searchLength bytesService RequestEach Service Entry has a unique number called “Service Record Handle”. This commandis used to get the record handle for stored entries for specific UUIDs.DescriptionPacketTypeOpcodeDataLengthDataDescriptionPacketTypeOpcodeDataLengthDataThis command is used the service record handles, from a remotedevice, for the given services in the search pattern.REQSDAP_SERVICE_REQUEST2 +2* SearchPatternLengthSearchPatternLength Number of 16-bit UUID’s in Search pattern List. Note: Must be less1 bytesthan 86 elements.SearchPattern List of the requested services. The search pattern list is a list of 16- bytesConfirms the request aboveCFMSDAP_SERVICE_REQUEST2 + 4*LenghtStatusERROR_OK1 byteERROR_INVALID_NO_OF_PARAMETERSERROR_UNKNOWN_ERRORERROR_RESULT_TOO_LARGELengthNumber of 32-bit service record handles returned from remote1 byteResult bytesdevice.The received 32-bit service record handles from the remote device.Attribute RequestInstead of browsing the whole list of services within the remote database it is also possibleto search only for specific attributes within a chosen entry. This command is based on theattribute “connection handle” of that specific entry.Connection handles can be retrieved by the “SDAP Service Search” Command.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.259


DescriptionPacketTypeOpcodeDataLengthDataDescriptionPacketTypeOpcodeDataLengthDataThis command is used to get the given attributes for a given servicerecord handle.REQSDAP_ATTRIBUTE_REQUEST5 + 2*AttributesLengthHandle4 bytesAttributesLength1 byteAttributes bytesConfirms the request aboveThe 32-bit service record handle returned for a given service bySDAP_ATTRIBUTE_REQUEST.Number of 16-bit UUID’s in attributeId list. Note: Must be less than86 elements.List of requested attributes for the requested services. The attributelist is a list of 16-bit UUID’s for the requested attributes.CFMSDAP_ATTRIBUTE_REQUEST3 + LengthStatusERROR_OK1 byteERROR_INVALID_NO_OF_PARAMETERSERROR_UNKNOWN_ERRORERROR_RESULT_TOO_LARGELengthLength of the result of the search. Maximum 330 bytes.2 byteResultResult of the searchRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.260


ConfigurationChange NVS UART SpeedDescriptionThis command will change the UART speed stored in NVS. The newUART speed will be used after a reset.PacketType REQOpcode CHANGE_NVS_UART_SPEEDDataLength 1DataUartSpeed1 ByteDescriptionConfirms the request aboveThe UART speed to be stored in NVS0x00 = 24000x01 = 48000x02 = 72000x03 = 96000x04 = 192000x05 = 384000x06 = 576000x07 = 1152000x08 = 2304000x09 = 4608000x0A = 921600PacketType CFMOpcode CHANGE_NVS_UART_SPEEDDataLength 1DataStatus1 byteERROR_OKERROR_UART_SPEED_OUT_OF_RANGEERROR_INVALID_NO_OF_PARAMETERSChange UART SettingsDescriptionThis command will change the UART settings stored in NVS. The newUART settings will be used after a reset.PacketType REQOpcode CHANGE_UART_SETTINGSDataLength 2DataPartityBit1 ByteDescriptionStopBits1 Byte0x00 None0x01 Even0x02 Odd0x00 One Stop bit0x01 Two Stop bitsConfirms the request abovePacketType CFMOpcode CHANGE_UART_SETTINGSDataLength 1DataStatus1 byteERROR_OKERROR_PARITY_BIT_OUT_OF_RANGE,ERROR_STOP_BITS_OUT_OF_RANGE,ERROR_INVALID_NO_OF_PARAMETERSRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.261


Read Operation ModeDescriptionThis command will read out the current operation mode.PacketType REQOpcode READ_OPERATION_MODEDataLength 0DataNoneDescriptionConfirms the request abovePacketType CFMOpcode READ_OPERATION_MODEDataLength 2DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSMode1 Byte0x00 Automatic Operation OFF0x01 Automatic Operation ONWrite Operation ModeDescriptionThis command will change the operation mode stored in NVS. Thenew setting will take effect after a reset.PacketType REQOpcode WRITE_OPERATION_MODEDataLength 1DataMode1 ByteDescriptionConfirms the request above0x00 Automatic Operation OFF0x01 Automatic Operation ONPacketType CFMOpcode READ_OPERATION_MODEDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_INVALID_MODESet Ports To OpenDescriptionThis command will change which RFCOMM ports the <strong>RBT</strong>-<strong>001</strong> willopen both at start-up and runtime. The value gets effectiveimmediately and is stored within the NVS to be restored after reset.PacketType REQOpcode SET_PORTS_TO_OPENDataLength 4DataPORTS4 BytesDescriptionConfirms the request abovePacketType CFMOpcode PORTS_TO_OPENDataLength 1DataStatus1 byteThis field is a 32-bit mask indicating which RFCOMM ports the<strong>RBT</strong>-<strong>001</strong> has to open. Bit 30 and 31 must be set to 0. Bit 0 isRFCOMM port 1 and bit 29 is port 30 e.g. if this field has the value0x00000007, port 1 to 3 will be opened. All other ports will beclosed if open.ERROR_OKERROR_INVALID_PORTERROR_INVALID_NO_OF_PARAMETERSRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.262


Get Ports To OpenDescriptionPacketTypeOpcodeDataLength 0DataDescriptionThis command will get the value of which RFCOMM ports the <strong>RBT</strong>-<strong>001</strong>will open both at start-up and runtime.REQGET_PORTS_TO_OPENConfirms the request abovePacketType CFMOpcode PORTS_TO_OPENDataLength 5DataStatus1 bytePORTS4 BytesERROR_OKERROR_INVALID_NO_OF_PARAMETERSThis field is a 32-bit mask indicating which RFCOMM ports the<strong>RBT</strong>-<strong>001</strong> has to open. Bit 30 and 31 must be set to 0. Bit 0 isRFCOMM port 1 and bit 29 is port 30 e.g. if this field has the value0x00000007, port 1 to 3 will be opened.Restore Factory SettingsDescriptionPacketTypeOpcodeDataLength 0DatanoneDescriptionThis command will restore the <strong>RBT</strong>-<strong>001</strong> configuration in NVS to factorysettings. The factory settings are similar to all default settings listed inthe table on page 13.The <strong>RBT</strong>-<strong>001</strong> needs to be restarted in order to let the changes takeeffect. No commands that write to NVS should be sent to the device inbetween RESTORE_FACTORY_SETTINGS REQ and CFM. WhenCFM is sent all the factory settings are completed.REQRESTORE_FACTORY_SETTINGSConfirms the request abovePacketType CFMOpcode RESTORE_FACTORY_SETTINGSDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSStore Class of DeviceDescriptionThis command will store the class of device for the <strong>RBT</strong>-<strong>001</strong> in NVS.The proper value for the class of device parameter is specified by theBluetooth SIG.PacketType REQOpcode STORE_CLASS_OF_DEVICEDataLength 3DataClassOfDevice3 bytesThe class of device value to be stored in NVS.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.263


DescriptionConfirms the request abovePacketType CFMOpcode STORE_CLASS_OF_DEVICEDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSForce Master RoleThe Force Master Role is initiated only after boot up or reset. The role is stored asparameter within NVS. If Force Master is activated the <strong>RBT</strong>-<strong>001</strong> tries to switch its role tomaster if connected from another device. For this the <strong>RBT</strong>-<strong>001</strong> is sending a Master/Slaveswitch request after link establishment to the remote device. If the switch is successful, thelink setup will be continued and the <strong>RBT</strong>-<strong>001</strong> is open for other incoming connections.If the switch fails, the link will be dropped.This functionality allows Access Point like applications on the <strong>RBT</strong>-<strong>001</strong>.DescriptionThis command will change the preferred role of the <strong>RBT</strong>-<strong>001</strong> e.g. toforce master role at any connections. The <strong>RBT</strong>-<strong>001</strong> must be reset tolet the changes take effect.PacketType REQOpcode FORCE_MASTER_ROLEDataLength 1DataRole1 bytesDescriptionConfirms the request above0x00 Don't care about role0x01 Force master role at connection setupPacketType CFMOpcode FORCE_MASTER_ROLEDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_ROLEERROR_INVALID_NO_OF_PARAMETERSSet Default Link PolicyDescriptionThis command is used to change the default link policy. The defaultlink policy is set during connection setup. The default link policy settingis stored in NVS.PacketType REQOpcode SET_DEFAULT_LINK_POLICYDataLength 2DataLinkPolicy2 byteBitfield:0x0<strong>001</strong> = Master-slave switch allowed0x0002 = Hold mode allowed0x0004 = Sniff mode allowed0x0008 = Park mode allowedRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.264


DescriptionResponse to the request above.PacketType CFMOpcode SET_DEFAULT_LINK_POLICYDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_ILLEGAL_LINK_POLICYGet Default Link PolicyDescriptionThis command is used to read the default link policy setting from NVS.PacketType REQOpcode GET_DEFAULT_LINK_POLICYDataLength 0DescriptionResponse to the request above.PacketType CFMOpcode GET_DEFAULT_LINK_POLICYDataLength 2DataLinkPolicy2 byteBitfield:0x0<strong>001</strong> = Master-slave switch allowed0x0002 = Hold mode allowed0x0004 = Sniff mode allowed0x0008 = Park mode allowedSet Event FilterDescriptionThis command is used to set the event filter. The setting is stored inNVS.PacketType REQOpcode SET_EVENT_FILTERDataLength 2DataFilter1 byteDescriptionResponse to the request above.PacketType CFMOpcode SET_EVENT_FILTERDataLength 1DataStatus1 byte0x00: All events reported0x01: 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)ERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_LIMITRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.265


Get Event FilterDescriptionThis command reads the current event filter setting.PacketType REQOpcode GET_EVENT_FILTERDataLength 0DescriptionResponse to the request above.PacketType CFMOpcode GET_EVENT_FILTERDataLength 1DataFilter1 byte0x00: All events reported0x01: 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 TimeoutDescriptionThis 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.PacketType REQOpcode SET_DEFAULT_LINK_TIMEOUTDataLength 2DataLinkTimeout2 byteDescriptionResponse to the request above.The link supervision timeout in slots (0,625ms). The default valuestored in the NVS after a factory reset is 20s.0x0000: No link supervision timeout (the timer is disabled)0x0190-0xFFFF: Valid timeout range (in slots)0x7D00: The default value (20s)PacketType CFMOpcode SET_DEFAULT_LINK_TIMEOUTDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_ILLEGAL_LINK_TIMEOUTGet Default Link TimeoutDescriptionThis command is used to read the default link supervision timeoutsetting from NVS.PacketType REQOpcode GET_DEFAULT_LINK_TIMEOUTDataLength 0DescriptionResponse to the request above.PacketType CFMOpcode GET_DEFAULT_LINK_TIMEOUTDataLength 2DataLinkTimeout2 byteThe link supervision timeout in slots.0x0000: No link supervision timeout (the timer is disabled)0x0190-0xFFFF: Valid timeout range (in slots)RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.266


Set Default Link LatencyDescriptionThis command is used to change the default SPP link latency. Thedefault link latency is set during SPP connection setup. The default linklatency setting is stored in NVS. The link latency is used to calculate apoll interval for the ACL link. The calculated poll interval may be biggerthan the latency specified because of e.g. another ACL link.PacketType REQOpcode SET_DEFAULT_LINK_LATENCYDataLength 2DataLatency2 byteDescriptionResponse to the request above.The link latency in slots.0x0000: No link latency requirement (default)0x0002 - 0x0190: Valid link latencyIn case 0x0000 is set the link latency is managed by the master,typically 40 slots (0x0028, 25ms) in a point-to-point connection areusedPacketType CFMOpcode SET_DEFAULT_LINK_LATENCYDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSERROR_LIMITGet Default Link LatencyDescriptionThis command is used to read the default link latency setting fromNVS.PacketType REQOpcode GET_DEFAULT_LINK_LATENCYDataLength 0DescriptionResponse to the request above.PacketType CFMOpcode GET_DEFAULT_LINK_LATENCYDataLength 2DataLatency2 byteThe link latency in slots.0x0000: No link latency requirement (default)0x0002 - 0x0190: Valid link latencyIn case 0x0000 is set the link latency is managed by the master,typically 40 slots (0x0028, 25ms) in a point-to-point connection areusedSDP Record HandlingThe <strong>RBT</strong>-<strong>001</strong> allows the modification of the Local Service Discovery Database. By default,the service database contains one entry configured at RFComm port 1 for a Serial PortProfile, with Authentication and Encryption enabled.If the application needs to offer a second service to another device, this service has to beentered 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, whichappears on a remote device after browsing, the port number and security settings.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.267


Each registered service entry itself can be enabled or disabled. This allows to havedifferent services registered to one specific RFComm port enabling and disabling them byneeds.The command set includes just one command to store any SDP record available within theService Database, called "Store Generic SDP Record". Each record includes the profilespecific settings needed.The service records are stored in a database like system within the NVS, so they are stillavailable after reset. The storage of an entry is confirmed by the <strong>RBT</strong>-<strong>001</strong> with a specificrecord identifier. This identifier is needed for the Enabling or Disabling command toaddress those specific entries.Enable SDP RecordDescriptionThis command is used to enable/disable stored SDP records in the<strong>RBT</strong>-<strong>001</strong>.PacketType REQOpcode ENABLE_SDP_RECORDDataLength 2Data State1 byteDescriptionIdentifier1 byteThe new state of the SDP record.0x00 Disable the record.0x01 Enable the record.Confirms the request aboveThe identifier received when the record was stored in the <strong>RBT</strong>-<strong>001</strong>.PacketType CFMOpcode ENABLE_SDP_RECORDDataLength 2DataStatus1 byteERROR_OKERROR_ILLEGAL_STATE_VALUEERROR_IDENTIFIER_OUT_OF_RANGEERROR_RECORD_ALREADY_IN_SELECTED_STATEERROR_IDENTIFIER_NOT_IN_USEIdentifier1 byteERROR_INVALID_NO_OF_PARAMETERSThe identifier received when the record was stored in the <strong>RBT</strong>-<strong>001</strong>.Delete All SDP RecordsDescriptionPacketTypeOpcodeDataLength 0Data NoneDescriptionThis command is used to delete all stored SDP records in the <strong>RBT</strong>-<strong>001</strong>.REQDELETE_SDP_RECORDSConfirms the request abovePacketType CFMOpcode DELETE_SDP_RECORDSDataLength 1DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.268


Store Generic SDP RecordDescriptionPacketTypeOpcodeDataLengthDataDescriptionThis command will create a new service record in the local SDPdatabase, stored in the NVS.REQSTORE_SDP_RECORD5 + LocalPortThe local RFCOMM port used by this service. Range 1 to 30.1 byteAuthentication1 byteEncryption1 byteSdpRecordLength2 bytesSdpRecord BytesConfirms the request above0x00 No authentication requirements.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 connections in both directions0x00 No encryption requirements0x04 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 directionsThe number of bytes in the SDP record.The SDP record data formatted as: < uint16:AttributeId,SdpDataElement:AttributeData, uint16:AttributeId,SdpDataElement:AttributeData, …>. The maximum length for each service is255 bytes.PacketType CFMOpcode STORE_SDP_RECORDDataLength 2DataStatus1 byteERROR_OKERROR_INVALID_SDP_RECORDERROR_MAXIMUM_NO_OF_SERVICE_RECORDS_REACHEDIdentifier1 byteERROR_WRITING_TO_NVSA unique identifier, which must be used when dynamic enabling/disablingthe record.Other CommandsResetHostA p p lic a tio nR E Q , R E S E T<strong>RBT</strong>-<strong>001</strong>(Dongle)S im p ly B lu eIN D , D O N G L E _ R E A D YD o n g lep e rfo rm s are se tDescriptionPacketTypeOpcodeDataLength 0DataNoneThis command will perform a soft reset of the <strong>RBT</strong>-<strong>001</strong>. The <strong>RBT</strong>-<strong>001</strong>will send a DEVICE_READY indication when it has performed thereset.REQRESETRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.269


Device ReadyDescriptionPacketTypeOpcodeDataLengthDataTest ModeDescriptionThe device will send this indication to the host when the device is fullyinitialized and ready to receive commands from the host.INDDEVICE_READY1+LengthLength1 byteversion bytesPacketType REQOpcode TEST_MODEDataLength 1DataMode1 byteDescriptionPacketType CFMOpcode TEST_MODEDataLength 1DataStatus1 byteNumber of bytes in software version stringASCII string containing the software version. e.g. "0210" indicatingthat the software version is version 2.10.This command will activate the test mode. To exit the test mode, areset of the device must be performed. If local loopback mode isactivated all data send to the device though the UART, are send backto the host. The device can only leave local loopback mode byperforming a hardware reset.Confirms the request aboveThe Bluetooth test mode to enter:0x01 Enable Bluetooth test mode0x02 Enable local loopback modeERROR_OKERROR_ILLEGAL_TESTMODEERROR_UNKNOWN_ERRORERROR_INVALID_NO_OF_PARAMETERSRF_TEST_MODEDescriptionThis command will activate the RF test mode. To exit the test mode, areset of the device must be performed. The transmitter test must bestopped before a new test with changed parameters can be started.PacketType REQOpcode RF_TEST_MODEDataLength 14DataTest1 byteChannel1 byteTest Scenario:0x00: Stop transmit0x01: Burst transmit, take payload from this command0x02: Burst transmit, use PRBS-9 sequence0x03: Continuos transmit, sends all-1 if ModulationPayload isnonzero, otherwise all-00x04: Hopping receive0x05: continuos receive at fixed channelChannel number 0 – 780: 2402 MHz78: 2480 MHz255 (0xFF): Hopping in connection stateRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.270


PaCtrl1 byteModulationCtrl1 byteModulationPattern8 bytesModulationPayload1 byteOptions1 byteReserved for future useModulation Control:0: No modulation1: Access code only (68 us TX data every 1250 us)2: Bluetooth DH1 packet with defined payload3: Bluetooth DM1 packet (17 bytes)4: Bluetooth DH1 packet (27 bytes)5: Invalid6: Invalid7: Bluetooth HV3 packet (30 bytes)8: Invalid9: Bluetooth AUX1 packet (29 bytes)10: Bluetooth DM3 packet (121 bytes)11: Bluetooth DH3 packet (183 bytes)12: Invalid13: Invalid14: Bluetooth DM5 packet (224 bytes)15: Bluetooth DH5 packet (339 bytes)Defines Access Code modulation if ModulationCtrl = 1, elseignored.Defines one byte of payload repeated through packet ifTest = 1, else ignored0: Whitening is disabled for transmit.1: Whitening is enabled for transmit.2-255: Reserved for future use.DescriptionConfirms the request abovePacketType CFMOpcode RF_TEST_MODEDataLength 1DataStatus1 byteRead RSSIDescriptionPacketType REQOpcode READ_RSSIDataLength 6DataBdAddress6 byteDescriptionPacketType CFMOpcode READ_RSSIDataLength 2DataStatus1 byteERROR_OKERROR_INVALID_NO_OF_PARAMETERSThis command will read out the current RSSI value for given link aremote device.Confirms the request aboveRSSI1 byteBluetooth Address of the remote device for which to read out thecurrent RSSI value.ERROR_OKERROR_UNKNOWN_ERRORERROR_INVALID_NO_OF_PARAMETERSThe RSSI valueRange:0x01: Too High0x00: Good0xFF: Too LowRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.271


Read NVSDescriptionPacketType REQOpcode READ_NVSDataLength 3DataAddress2 bytesLength1 byteThis command can be used to read from the eeprom (NVS) in the<strong>RBT</strong>-<strong>001</strong> module.The address.The number of bytes that should be read.DescriptionPacketTypeOpcodeDataLengthDataConfirms the request above.CFMREAD_NVS4 + LengthStatus1 byteAddress2 bytesLength1 byteData< Length > bytesERROR_OKERROR_INVALID_NO_OF_PARAMETERSThe address.The number of bytes that has been read.The data.Write NVSDescriptionPacketTypeOpcodeDataLengthDataDescriptionThis command can be used to write data to the NVS in the <strong>RBT</strong>-<strong>001</strong>module.REQWRITE_NVS3 + LengthAddress2 bytesLength1 byteData< Length > bytesPacketType CFMOpcode WRITE_NVSDataLength 4DataStatus1 byteAddress2 bytesLength1 byteThe address.The number of bytes that should be written.The data.Confirms the request above.ERROR_OKERROR_INVALID_NO_OF_PARAMETERSThe address.The number of bytes that has been writtenRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.272


ErrorCodesACL Error CodesError Code0x010x020x030x040x050x060x070x080x090x0A0x0B0x0C0x0D0x0E0x0F0x100x110x120x130x140x150x160x170x180x190x1A0x1B0x1C0x1D0x1E0x1F0x200x210x220x230x240x25DescriptionUnknown HCI Command.No Connection.Hardware Failure.Page Timeout.Authentication Failure.Key Missing.Memory Full.Connection Timeout.Max Number Of Connections.Max Number Of SCO Connections To A Device.ACL connection already exists.Command Disallowed.Host Rejected due to limited resources.Host Rejected due to security reasons.Host Rejected due to remote device is only a personal device.Host Timeout.Unsupported Feature or Parameter Value.Invalid HCI Command Parameters.Other End Terminated Connection: <strong>User</strong> Ended Connection.Other End Terminated Connection: Low Resources.Other End Terminated Connection: About to Power Off.Connection Terminated by Local Host.Repeated Attempts.Pairing Not Allowed.Unknown LMP PDU.Unsupported Remote Feature.SCO Offset Rejected.SCO Interval Rejected.SCO Air Mode Rejected.Invalid LMP Parameters.Unspecified Error.Unsupported LMP Parameter Value.Role Change Not AllowedLMP Response TimeoutLMP Error Transaction CollisionLMP PDU Not AllowedEncryption Mode Not AcceptableRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.273


0x260x270x280x290x2A0x2B0x2C0x2D0x2E0x2F0x300x310x320x330x340x35Unit Key UsedQoS is Not SupportedInstant PassedPairing with Unit Key Not SupportedDifferent Transaction CollisionReservedQoS Unacceptable ParameterQoS RejectedChannel Classification Not SupportedInsufficient SecurityParameter out of Mandatory RangeReservedRole Switch PendingReservedReserved Slot ViolationRole Switch FailedGeneric error codesError MacroDescriptioncode0x00 ERROR_OK No error.0x01 ERROR_INVALID_NO_OF_PARAMETERS The number of bytes in the request does notcorrespond to the protocol specification0x02 ERROR_DURATION_OUT_OF_RANGE The given duration value is not valid according tothe specification.0x03 ERROR_INVALID_MODE The selected mode is not valid according to thespecification0x04 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 longerthan the maximum specified value.0x07 ERROR_INVALID_DISCOVERABILITY_PARAMETER The given discoverability parameter does notcontain a valid value according to thespecification.0x08 ERROR_INVALID_CONNECTABILITY_PARAMETER The given connectability parameter does notcontain a valid value according to thespecification.0x09 ERROR_INVALID_SECURITY_MODE The given security mode is not a valid Bluetoothsecurity mode.0x0a ERROR_LINKKEY_DOES_NOT_EXISTS No link key exists for the given Bluetoothaddress0x0b ERROR_CONNECTION_FAILED The connection setup failed due to unknownreasons.0x0c ERROR_TRUNCATED_ANSWER The returned number of services is too large to behandled by the <strong>RBT</strong>-<strong>001</strong>. The answer is truncated0x0d ERROR_RESULT_TOO_LARGE The SDP result from the remote device is toolarge to be handled by the <strong>RBT</strong>-<strong>001</strong> due to ramlimitations0x0e ERROR_NOT_POSSIBLE_TO_ENTER_TESTMODE It is currently not possible to enter the selectedtest mode.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.274


Error MacroDescriptioncode0x0f ERROR_ILLEGAL_TESTMODE The given test mode is not a valid test modeaccording to the specification0x10 ERROR_RESET_TO_NSC_BDADDRESS The <strong>RBT</strong>-<strong>001</strong> will change the Bluetooth addressto the NSC address.0x11 ERROR_UART_SPEED_OUT_OF_RANGE The selected UART speed value is not validaccording to the specification.0x12 ERROR_INVALID_PORT The given port value is larger than the maximumspecified value.0x13 ERROR_ILLEGAL_STATE_VALUE The given state value is not a valid stateaccording to the specification0x14 ERROR_IDENTIFIER_OUT_OF_RANGE The given identifier is larger than the maximumspecified value.0x15 ERROR_RECORD_ALREADY_IN_SELECTED_STATE The service record is already enabled/disabled.0x16 ERROR_INVALID_AUTHENTICATION_VALUE The given authentication value is not a validvalue according to the specification.0x17 ERROR_INVALID_ENCRYPTION_VALUE The given encryption value is not a valid valueaccording to the specification.0x18 ERROR_MAXIMUM_NO_OF_SERVICE_RECORDS_REACHED The maximum number of service records, whichthe <strong>RBT</strong>-<strong>001</strong> is able to store, is reached.0x19 ERROR_WRITING_TO_NVS An error occurred while writing to flash. Theservice record may not be stored.0x1a ERROR_INVALID_ROLE The given role value is not a valid valueaccording to the specification.0x1b ERROR_LIMIT Limits exceeded (Parameter(s) violates limits).0x1c ERROR_UNEXPECTED Unexpected at this moment.0x1d ERROR_UNABLE_TO_SEND Could not send at this moment, no reasonspecified.0x1e ERROR_CURRENTLY_NO_BUFFER Currently no room in buffer, try again later.0x1f 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 aconnection.0x23 ERROR_SPP_MULTIPLE_CONNECTIONS Transparent mode attempted while more than 1connection active.0x24 ERROR_SPP_MULTIPLE_TRANSPARENT Trying to store a default connection when atransparent default connection is already stored,or trying to store a transparent default connectionwhen another connection is already stored.0x25 ERROR_SPP_DEFAULT_CONNECTION_NOT_STORED Trying to connection to a default connection,which is not stored.0x26 ERROR_SPP_AUTOMATIC_CONNECTIONS_PROGRESSING Trying to start connecting to default connectionswhen default connection establishment is alreadyprogressing.0x27 ERROR_UNSPECIFIED_ERROR Other error.0x28 ERROR_IDENTIFIER_NOT_IN_USE Trying to enable a SDP record which is notstored. 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 excessesthe specified maximum number of supportedformats.0x2b ERROR_TOO_MANY_DATASTORES The given number of data stores excess thespecified maximum number of data stores.0x2C ERROR_ATTEMPT_FAILED Attempt to change low power mode failed0x2D ERROR_ILLEGAL_LINK_POLICY The given link policy value is out of range0x2E ERROR_PINCODE_LENGTH The pin code length field is zero or too large.0x2F ERROR_PARITY_BIT_OUT_OF_RANGE The given parity check is out of rangeRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.275


Error MacroDescriptioncode0x30 ERROR_STOP_BITS_OUT_OF_RANGE The given number of stop bits is out of range0x31 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_TYPE The given Audio 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 volumecontrol.0x38 ERROR_ILLEGAL_PACKET_TYPE The packet type specified in the request is notvalid.0x39 ERROR_INVALID_CODEC_SETTING The codec (slave) setting is invalid.RFCOMM Error CodesError MacroDescriptioncode0x00 RFCS_NO_ERROR No error0x01 RFCS_INVALID_DLC The DLC does not exist0x02 RFCS_INVALID_PORT The port does not exist0x03 RFCS_DLC_ESTABLISH_FAILED The DLC establishment failed0x04 RFCS_ACCESS_REJECTED SECM did not authorize access to the requestedservice (DLC)0x05 RFCS_INVALID_CONNECTION There does not exist a DLC/L2CAP connection tothe device0xFF RFCS_UNSPECIFIED_ERROR Not usedRFCOMM Release ReasonsError MacroDescriptioncode0x00 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 theDLC.RoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.276


Bibliography RoboTech: <strong>RBT</strong>-<strong>001</strong> Datasheet National Semiconductor: LMX9830 Software <strong>User</strong>s Guide Bluetooth SIG: Specification of the Bluetooth System Bluetooth SIG: Bluetooth Assigned Numbers,https://www.bluetooth.org/foundry/assignnumb/document/assigned_numbersRoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.277


CertificationsBluetoothThe <strong>RBT</strong>-<strong>001</strong> module has passed the Bluetooth Qualification/Certification process and hasbeen fully qualified as "end product" with QPID: B0313300.CEThe <strong>RBT</strong>-<strong>001</strong> module complies with the requirements of the R&TTE Directive 99/05/CE: EN 60950-1:2<strong>001</strong> - LV Art. 3.1a 99/05/CE ETSI EN 301.489-03 V1.4.1 - EMC Art. 3.1b 99/05/CE EN 300 328 V1.6.1, EN 300 328-2 V1.2.1 - ERM Art. 3.2 99/05/CERoboTech Bluetooth Serial <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.278


Revision HistoryRevision #(PDF Date)Revisions / Comments1.0 (31-Oct-06) Initial release1.1 (24-Nov-06) Changed maximum Voltage DC inputAdded " 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 <strong>Module</strong><strong>User</strong> <strong>Manual</strong> Ver. 1.279

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!