0% found this document useful (0 votes)
97 views15 pages

Bluetooth Modules

The document provides information about two Bluetooth modules, the EGBT-045MS and EGBT-046S. It summarizes their key specifications and features. The EGBT-046S is permanently configured as a Bluetooth slave device and is easier to use out of the box than the EGBT-045MS, which can be configured as either a master or slave. Both modules are lower cost alternatives to the previous EGBC-04 module and can replace wired UART connections.

Uploaded by

GUILHEM
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views15 pages

Bluetooth Modules

The document provides information about two Bluetooth modules, the EGBT-045MS and EGBT-046S. It summarizes their key specifications and features. The EGBT-046S is permanently configured as a Bluetooth slave device and is easier to use out of the box than the EGBT-045MS, which can be configured as either a master or slave. Both modules are lower cost alternatives to the previous EGBC-04 module and can replace wired UART connections.

Uploaded by

GUILHEM
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

EGBT-045MS

EGBT-046S

Bluetooth Modules
Wireless UART Cable Replacement

Hardware Manual &


AT Commands Reference Manual Rev. 1r0

EGBT-045MS and EGBT-046S Bluetooth Mod-


ule are low cost replacements of our now retired
EGBC-04 Bluetooth Module. EGBC-04 is an excel-
lent Bluetooth Module, it is fully certified to Blue-
tooth standards, and is loaded with programmable
features users had come to love. There is just one
thing that went against it- it is expensive.

It is easy to see why the EGBC-04 cost so much. The new EGBT-04 Bluetooth module
Firstly, the manufacturer produced these specialty comes in two flavors. The EGBT-046S is
modules in relatively small volume; hence, there permanently configured as a slave de-
is no economy of the scale to speak of. Secondly, vice. EGBT-045MS, on the other hand,
certification costs a lot of money; and this cost will can be configured by the user to work as
have to be added on top of the manufacturing cost. a master or slave Bluetooth device.
Hence, EGBC-04 ended up costing about 10 times
more expensive than its garden variety USB-type
Bluetooth dongles cousins.

Fortunately, at least one volume manufacturer


have came up with an idea of producing a generic
Bluetooth module in large quantity, for sale and
distribution to developers who now have to put only
the firmware functionalities. This resulted in a huge
drop in prices of these specialty Bluetooth modules,
benefiting us experimenters and hobbyists. EGBT-04 modules can be soldered di-
rectly on a hi-rel type IC socket to make it
EGBT-045MS and EGBT-046S are generic Blue- easier to work with prototyping platforms,
tooth Modules loaded with SPP firmware for UART such as breadboards and perforated pro-
wireless cable replacement functions. The EGBT- totyping boards.
045MS can be configured by the user to work either
as a master or slave Bluetooth device using a set of
AT commands.
firmware.
EGBT-046S, on the other hand, is permanently pro-
grammed as Bluetooth slave device. EGBT-046S, Use the cheaper EGBT-046S if your application will
because of its simpler function, is a lot easier to connect to a master Bluetooth device, such as PC
use, and of course, costs less than EGBT-045MS. or laptops. Use the EGBT-045MS if your application
You can use it straight out of the box as a UART must connect to a slave Bluetooth device, such as
wireless cable replacement, without any need to with EGBT-046S. Note that EGBT-045MS will work
add set-up codes in your microcontroller application as well as a slave Bluetooth device.

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 1 of 15 pages


COMMON SPECIFICATIONS EGBT-046S PIN CONFIGURATION

Radio Chip: CSR BC417


Memory: External 8Mbit Flash
Output Power: -4 to +6dbm Class 2
Sensitivity: -80dbm Typical
Bit Rate: EDR, up to 3Mbps EGBT-046S

 
Interface: UART  
Antenna: Built-in
Dimension: 27W x 13H mm

Voltage: 3.1 to 4.2VDC


Current: 40mA max

COMMON HARDWARE INTERFACING CON-  


 
 
SIDERATIONS     

The EGBT-04 module will work with supply voltage


of 3.1VDC to 4.2VDC. When supplied with 3.3VDC, Figure 1. EGBT-046S Pin Layout
it will interface directly with the UART port of any
microcontroller chip running at 3.3VDC.
Table 1. EGBT-046S Pin Description
When used with 5V microcontrollers, The TXD
output logic swing of the EGBT-04 still falls within
the valid 5V TTL range, hence, can be connected PIN ID DESCRIPTION
directly to the UART RXD of the 5V microcontroller 1 TXD UART TXD Output
host. EGBT RXD and inputs, however, are not 5V 2 RXD UART RXD Input
tolerant, and can be damaged by 5V level logic go- 11 RESET RESET Input
ing in. Some level translation circuit must be added
12 Vcc +3.1 to 4.2VDC Power Input
to protect the inputs.
13 GND Common Ground
A simple diode level translator circuit like the ones 22 GND Common Ground
shown in Figure 3 and 7 will suffice in most applica- 24 LED LED Status Indicator
tions. A better alternative is with the use of 5V input Flashing
tolerant tiny logic chips such as 74LVC1G125 – a - Waiting to Connect/Pair
single buffer chip housed in smd sot23-5 package. Steady ON
- Connected/Paired

Note:
All unassigned pins must be left unconnected.

Page 2 of 15 pages EGBT-046S/EGBT-045MS Bluetooth Module e-Gizmo Mechatronix Central






     






   
    




  

Figure 2. EGBT-046S wiring example with a 3v3 host microcontroller. The 470R resistor and LED
are for status indication, and may be omitted if not needed.








     



 


  
    




  

Figure 3. EGBT-046S RX input is not 5V tolerant. A schottky diode connected as shown will keep
5V voltages out of the Bluetooth module when operated with a 5V host microcontroller.

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 3 of 15 pages


PREPARATION FOR USE (paired) to any other Bluetooth device. You can
change the Passkey, Device Name, and Baud Rate
The EGBT-046S is permanently configured as a while the EGBT-046S is in Command Mode by
slave Bluetooth device. It works under the following entering a small subset of AT style commands. Any
default configuration: changes made will be retained even after power is
removed from the EGBT-046S, hence device con-
Baud Rate: 9600 bps figuration setup must not be repeated unless new
Data : 8 bits changes need to be made.
Stop Bits: 1 bit
Parity : None You can do configuration setup using the host con-
Handshake: None troller itself (the microcontroller in your own circuit),
or a PC running a terminal software using a serial
Passkey: 1234 to TTL (or USB to Serial TTL) converter. See Figure
Device Name: linvor 4 for connection details.

If the default configuration suits your application, It is important to note that EGBT-046S does not
then you can use EGBT-046S immediately. Once wait for any termination character for each AT com-
it is paired to a master Bluetooth device, its opera- mand entry. Instead, it acts to whatever character
tion becomes transparent to the user. No user code you entered after one second. Hence, if you are not
specific to the Bluetooth module is needed at all in able to complete a command entry within a second,
the user microcontroller program. it will be ignored. Because of this behavior, it may
be extremely difficult to do manual entry configura-
The EGBT-046S automatically sets itself up in tion using Windows Hyperterminal software. Termi-
Command Mode when it is not remotely connected nal software that allows batch sending of multiple
characters must be used.


   








 




 

 





Figure 4. A PC may be used to configure the EGBT-04. To connect to a PC COM port, a RS-232C to TTL converter
is needed. This figure shows a wiring example using e-Gizmo RS-232 to TTL converter kit.

Page 4 of 15 pages EGBT-046S/EGBT-045MS Bluetooth Module e-Gizmo Mechatronix Central


EGBT-046S AT Command Set Example1: Set baud rate to 57600bps

1. TEST From Host controller:


AT+BAUD7
Used to test the UART connection between the EGBT-046S Response
host controller and Bluetooth Module. OK57600

COMMAND RESPONSE Example2: Set baud rate to 4800bps


AT OK
From Host controller:
AT+BAUD3
EGBT-046S Response
2. Change Baud Rate
OK4800

COMMAND RESPONSE 3. Change Device Name


AT+BAUD<p> OK<r>
The EGBT-046S can be assigned a readable name
where: of up to 20 characters in lenght.
<p> Paramater
<r> Response, set to nnnn bps COMMAND RESPONSE
AT+NAME<name> OK<name>
<p> <r> Remarks
1 1200 set to 1200bps Example1: Set device name as EGBT-04
2 2400 set to 2400bps
From Host controller:
3 4800 set to 4800bps
AT+NAMEEGBT-04
4 9600 set to 9600bps (Default) EGBT-046S Response
5 19200 set to 19200bps OKEGBT-04
6 38400 set to 38400bps
7 57600 set to 57600bps 4. Change PASSKEY(PIN code)
8 115200 set to 115200bps
Passkey (PIN Code) is a 4-digit code shared with
9 230400 set to 230400bps a master Bluetooth Device (e.g. PC) to prevent
A 460800 set to 460800bps unauthorized pairing.
B 921600 set to 921600bps
C 1382400 set to 1382400bps COMMAND RESPONSE
AT+PIN<nnnn> OK<nnnn>
Caution:
PC standard COM port hardware does not support Where:
baud rates in excess of 115200bps. If you are using <nnnn> 4-digit passkey
a PC to configure EGBT-046S and accidentally set
baud rate to these values, connection to a PC COM Example1: Set PASSKEY to 5995
port will no longer be possible. Use of USB to Serial
converter cable that can work at higher bauds may From Host controller:
be necessary to re-establish a connection. Prolific AT+PIN5995
PL-2303 based USB to Serial converter cables are EGBT-046S Response
known to work up to 921600bps. OK5995

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 5 of 15 pages


EGBT-045MS PIN CONFIGURATION Table 1. EGBT-045MS Pin Description

PIN ID DESCRIPTION
1 TXD UART TXD Output
2 RXD UART RXD Input
11 RESET RESET Input
EGBT-045MS
    12 Vcc +3.1 to 4.2VDC Power Input
   

 13 GND Common Ground


 
22 GND Common Ground
  25 PIO2 User programmable I/O
 
  26 PIO3 User programmable I/O
 
 
27 PIO4 User programmable I/O


 28 PIO5 User programmable I/O

     29 PIO6 User programmable I/O
30 PIO7 User programmable I/O
33 PIO10 User programmable I/O
31 LED1 LED Status Indicator
Figure 5. EGBT-045MS pin layout
32 LED2 LED Status Indicator
34 CMD Command Mode
Note:


  All unassigned pins must be left unconnected.

 
 


 


  

 






 

 
  

Figure 6. Connecting the EGBT-045MS to a PC for test and configuration. To connect to a PC COM port, a RS-
232C to TTL converter is needed. This figure shows a wiring example using e-Gizmo RS-232 to TTL converter kit.

Page 6 of 15 pages EGBT-046S/EGBT-045MS Bluetooth Module e-Gizmo Mechatronix Central




 
  

 

  
 
 
 
  









  



Figure 7. EGBT-045MS wiring example with a 3v3 host microcontroller. The 470R resistors and LEDs are for
status indication, and may be omitted if not needed. The microcontroller can switch the EGBT-045MS between
command mode and data mode at any time by setting the CMD pin accordingly.

##

%

##

!
  
#$ 
 !

 #" "
! "
#! !

  
$& 
$& 




!"


 !#
 
%!

%!
  


%!

Figure 8. EGBT-045MS RX input is not 5V tolerant. A schottky diode connected as shown will keep 5V volt-
ages out of the Bluetooth module when operated with a 5V host microcontroller. The transistor circuit takes on
a similar function for the CMD pin.

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 7 of 15 pages


PREPARATION FOR USE pin at logic low (or open circuit), and then pulled
High a moment later, the UART parameters as-
The EGBT-045MS is pre-configured as a slave sumes a set of values that was previously fixed
Bluetooth device. As shipped, it works under the using the AT+UART command, with 9600bps, 8
following data mode default configuration: data bits, 1 stop bit, no parity, and no handshake as
default parameter values.
Baud Rate: 38400/9600 bps – see “Entering Com-
mand Mode” section for details You can do configuration setup using the host con-
Data : 8 bits troller itself (the microcontroller in your own circuit),
Stop Bits: 1 bit or a PC running a terminal software using a serial
Parity : None to TTL (or USB to Serial TTL) converter. See Figure
Handshake: None 6 for connection details.

Passkey: 1234 EGBT-045MS AT COMMAND REFERENCE


Device Name: HC-05
Symbols and Nomenclatures.
If the default configuration suits your application,
then you can use EGBT-045MS immediately. Once <xxxx> Descriptive ID of parameters that must be
it is paired to a master Bluetooth device, its opera- entered by the user or reported back by the EGBT-
tion becomes transparent to the user. No user code 045MS.
specific to the Bluetooth module is needed at all in
the user microcontroller program. Example:
AT+INQM=<inq1>,<inq2>,<inq3>
The EGBT-045MS works in Data Mode when the May in actual use appear as
CMD pin (pin 34) is pulled to logic 0 level or is AT+INQM=0,1,15
left unconnected. Transparent UART data trans- When <inq1> =0, <inq2>=1, and <inq3>=15
fer with a connected remote device occurs only
while in Data Mode. The EGBT-045MS switches to
Command Mode if CMD pin is set to logic HIGH. É = Carriage Return followed by Line Feed
Command mode must be invoked to setup and character<CR><LF>
configure EGBT-045MS. Pairing and connection
to a remote Bluetooth slave device can be initiated Example:
only while the EGBT-045MS is in command mode
(and configured in role as a Master) by entering a OKÉ = OK<CR><LF>
string of AT style commands. Any changes made to
system parameters (e.g. password, baud rate, etc) Important note: All commands must be terminated
will be retained even after power is removed, hence by <CR><LF>. If the host controller send a <CR>
device configuration setup must not be repeated only, EGBT-045MS will repeatedly send a respond
unless new changes need to be made. that will stop only when <LF> is issued by the host
controller
Entering Command Mode

EGBT-045MS is put in Command Mode by setting


the CMD pin to logic High. There is one important
point the user should be aware of when setting the
device in Command Mode – the baud rate may as-
sume a different value depending on the instance
the CMD pin is switched to high:

• If EGBT-045MS is powered ON with CMD pin to


+Vcc, the UART is set to 38400bps, 8 data bits, 1
stop bit, no parity, no handshake.

• If the EGBT-045MS is powered ON with the CMD

Page 8 of 15 pages EGBT-046S/EGBT-045MS Bluetooth Module e-Gizmo Mechatronix Central


AT COMMAND LISTING ERROR CODES

COMMAND FUNCTION ERROR VERBOSE


CODE
1 AT Test UART Connection
0 Command Error/Invalid Command
2 AT+RESET Reset Device
1 Results in default value
3 AT+VERSION Querry firmware version
2 PSKEY write error
4 AT+ORGL Restore settings to Factory Defaults
3 Device name is too long (>32 characters)
5 AT+ADDR Query Device Bluetooth Address
4 No device name specified (0 lenght)
6 AT+NAME Query/Set Device Name
5 Bluetooth address NAP is too long
7 AT+RNAME Query Remote Bluetooth Device’s
Name 6 Bluetooth address UAP is too long
8 AT+ROLE Query/Set Device Role 7 Bluetooth address LAP is too long
9 AT+CLASS Query/Set Class of Device CoD 8 PIO map not specified (0 lenght)
9 Invalid PIO port Number entered
10 AT+IAC Query/Set Inquire Access Code
A Device Class not specified (0 lenght)
11 AT+INQM Query/Set Inquire Access Mode
B Device Class too long
12 AT+PSWD Query/Set Pairing Passkey
C Inquire Access Code not Specified (0 lenght)
13 AT+UART Query/Set UART parameter
D Inquire Access Code too long
14 AT+CMODE Query/Set Connection Mode
E Invalid Iquire Access Code entered
15 AT+BIND Query/Set Binding Bluetooth Address
F Pairing Password not specified (0 lenght)
16 AT+POLAR Query/Set LED Output Polarity
10 Pairing Password too long (> 16 characters)
17 AT+PIO Set/Reset a User I/O pin
11 Invalid Role entered
18 AT+MPIO Set/Reset multiple User I/O pin
12 Invalid Baud Rate entered
19 AT+MPIO? Query User I/O pin
13 Invalid Stop Bit entered
20 AT+IPSCAN Query/Set Scanning Parameters
14 Invalid Parity Bit entered
21 AT+SNIFF Query/Set SNIFF Energy Savings
Parameters 15 No device in the Pairing List
22 AT+SENM Query/Set Security & Encryption Modes 16 SPP not initialized
23 AT+RMSAD Delete Authenticated Device from List 17 SPP already initialized
24 AT+FSAD Find Device from Authenticated Device 18 Invalid Inquiry Mode
List 19 Inquiry Timeout occured
25 AT+ADCN Query Total Number of Device from 1A Invalid/zero lenght address entered
Authenticated Device List 1B Invalid Security Mode entered
1C Invalid Encryption Mode entered
26 AT+MRAD Query Most Recently Used Authenti-
cated Device
27 AT+STATE Query Current Status of the Device
28 AT+INIT Initialize SPP Profile
29 AT+INQ Query Nearby Discoverable Devices
30 AT+INQC Cancel Search for Discoverable
Devices
31 AT+PAIR Device Pairing
32 AT+LINK Connect to a Remote Device
33 AT+DISC Disconnect from a Remote Device
34 AT+ENSNIFF Enter Energy Saving mode
35 AT+EXSNIFF Exit Energy Saving mode

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 9 of 15 pages


1. Test UART connection 6. Query/Set Device Name

COMMAND RESPONSE COMMAND RESPONSE


ATÉ OKÉ AT+NAME?É +NAME:<name>É
OKÉ
2. Reset Device AT+NAME=<name>É OKÉ
COMMAND RESPONSE
AT+RESETÉ OKÉ where <name> = Device Name (31 characters max.)

Example: Query device name


3. Querry firmware version
From Host controller:
COMMAND RESPONSE AT+NAME?É
AT+VERSION?É +VERSION:<VER>É EGBT-045MS Response
OKÉ +NAME:HC-05É
OKÉ
where <VER> = Version Number
Example: Set device name to “e-Gizmo”
4. Restore settings to Factory Defaults From Host controller:
AT+NAME=e-GizmoÉ
COMMAND RESPONSE EGBT-045MS Response
AT+ORGLÉ OKÉ OKÉ

Restore to the following settings: Example: Set device name to “supercalifragilisticexpiali-


Device Class: 0 docious”
Inquiry Code: 0x009e8b33
Device Mode: Slave From Host controller:
Binding Mode: SPP AT+NAME=supercalifragilisticexpialidociousÉ
UART: 38400bps, 8 bit, 1 stop bit, no parity EGBT-045MS Response
Pairing Code: 1234 ERROR:(3)É name too long (>31 characters)

Device Name: H-C-2010-06-01


7. Query Remote Bluetooth Device’s Name
5. Query EGBT-045MS Bluetooth Address
COMMAND RESPONSE

COMMAND RESPONSE AT+RNAME?<addr>É +NAME:<name>É


OKÉ
AT+ADDR?É +ADDR:nn:uu:llÉ
OKÉ
where <name> = Device name
<addr> = 48 bit bluetooth address
Bluetooth Address Format:
in NAP,UAP,LAP format
nn - NAP (16 bit Non-significant Address Por-
tion)
uu - UAP (8 bit Upper Address Portion) Example: Query remote Bluetooth device having ad-
ll - LAP (24 bit Lower Address Portion) dress = 00:02:72:0A:3C:7F
Returned bluetooth address
Bluetooth address in NA:UAP:LAP format = 0002:72:0A3C7F

Example: Querry EGBT-045MS Bluetooth Address From Host controller:


AT+RNAME?0002,72,0A3C7FÉ
From Host controller:
EGBT-045MS response if remote device name is “HC-05”
AT+ADDR?É +NAME:HC-05É
EGBT-045MS Response
OKÉ
+ADDR:11:6:230154É EGBT-045MS response if remote device name is unresolved
OKÉ FAILÉ
Bluetooth Address is 11:06:23:01:54

Page 10 of 15 pages EGBT-046S/EGBT-045MS Bluetooth Module e-Gizmo Mechatronix Central


8. Query/Set Device Role
COMMAND RESPONSE
COMMAND RESPONSE AT+INQM?É +INQM:<inq1>,<inq2>,<inq3>É
AT+ROLE?É +ROLE:<role>É OKÉ
OKÉ AT+INQM=<inq1>,<inq2>,< OKÉ / FAILÉ
AT+ROLE=<role>É OKÉ inq3>É

where <role> where <inq1> Inquire Access Mode


0 - Slave (default) 0 - standard
1 - Master 1 - rssi (default)
2 - Slave-Loop
<inq2> Maximum number of devices response
Slave - EGBT-045MS acts as discoverable wireless 0 to 32000
UART device ready for transparent data ex- 1 (default)
change.
Master - Scans for a remote bluetooth (slave) device, <inq3> Inquire timeout
pairs, and setup connection for a transparent 1 to 48
data exchange detween devices 48 (default)
Slave-Loop - Data loop-back Rx-Tx. Used mainly for
testing. Maximum number of devices response - EGBT-045MS
will stop inquiring once the number of devices
Example: Set EGBT-045MS in master role that responded reaches this value.
Inquire Timeout - Multiply this number by 1.28 to get the
Bluetooth address in NA:UAP:LAP format = 0002:72:0A3C7F maximum time in seconds the EGBT-045MS will
wait for a respond to an inquiry call.
From Host controller:
AT+ROLE=1É Example: Set EGBT-045MS Inquire Access Mode at
EGBT-045MS response Inquire access mode - 1 (rssi)
+ROLE:1É Number of devices - 3
OKÉ Timeout - 10 (10*1.28 = 12.8 seconds)

9. Query/Set Class of Device CoD


Bluetooth address in NA:UAP:LAP format = 0002:72:0A3C7F

COMMAND RESPONSE From Host controller:


AT+CLASS?É +CLASS:<class>É AT+INQM=1,3,10É
OKÉ EGBT-045MS response
AT+CLASS=<class>É OKÉ OKÉ

where <class> 12. Query/Set Pairing Passkey


0 - (default)
COMMAND RESPONSE
The Class of Device identifier. For more info, see the AT+PSWD?É +PSWD:<password>É
Bluetooth_Code_Definition.pdf file included with the OKÉ
product documentation of this kit.
AT+PWSD=<password>É OKÉ
10. Query/Set Inquire Access Code
where <password> = Alphanumeric password 16 characters max.
1234 - (default)
COMMAND RESPONSE
AT+IAC?É +IAC:<iac>É Example: Set EGBT-045MS Password to “e-Gizmo”
OKÉ
AT+IAC=<iac> OKÉ / FAILÉ From Host controller:
AT+PSWD=e-GizmoÉ
EGBT-045MS response
where <iac> = Inquire Access Code
9e8b33 - default value OKÉ
11. Query/Set Inquire Access Mode 13. Query/Set UART parameter

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 11 of 15 pages


COMMAND RESPONSE COMMAND RESPONSE
AT+UART?É +UART:<baud>,<stop>,<parity>É AT+BIND?É +BIND:<addr>É
OKÉ OKÉ
AT+UART=<baud>,<stop>,< OKÉ AT+BIND=<addr>É OKÉ
parity>É
where <addr> = 48 bit bluetooth address
where <baud> =baud rate, any one of the following in NAP,UAP,LAP format
4800
9600 (default) Example: Bind with Bluetooth device having address =
19200 00:02:72:0A:3C:7F
38400
57600 Bluetooth address in NA,UAP,LAP format = 0002,72,0A3C7F
115200
234000 From Host controller:
460800 AT+BIND=0002,72,0A3C7FÉ
921600 EGBT-045MS response
1382400 OKÉ

<stop> = number of stop bits 16. Query/Set LED Output Polarity


0 - 1 bit (default)
1 - 2 bits
COMMAND RESPONSE
<parity> = Parity bit AT+POLAR?É +POLAR:<led1>,<led2>É
0 - None (default) OKÉ
1 - Odd parity AT+POLAR=<led1>,<led2>É OKÉ
2 - Even Parity
where <led1> = LED1 (pin 31) Polarity
Example: Set EGBT-045MS UART parameter to 0 - LED1 output active low
115200bps, 2 stop bits, even parity 1 - LED1 output active high (default)

From Host controller: <led2> = LED2 (pin 32) Polarity


AT+UART=115200,1,2É 0 - LED2 output active low
EGBT-045MS response 1 - LED2 output active high (default)
OKÉ
LED 1
14. Query/Set Connection Mode Flashes once each seconds to indicate EGBT-045MS is
in Command Mode. Flashes two times per second when
COMMAND RESPONSE EGBT-045MS is in data mode.
AT+CMODE?É +CMODE:<mode>É
OKÉ LED2
Turns ON when EGBT-045MS remote connection is suc-
AT+CMODE=<mode>É OKÉ cessfuly opened.

where <mode> 17. Set/Reset a User I/O pin


0 - Connect to a specified Bluetooth device only (default).
See related command Command 15.
COMMAND RESPONSE
1 - Can connect with any other Bluetooth device.
2 - Test mode AT+PIO=<pn>,<value>É OKÉ

15. Query/Set Binding Bluetooth Address where <pn> = port number. Available port are as follows
2 - PIO2
3 - PIO3
4 - PIO4
5 - PIO5
6 - PIO6
7 - PIO7
10 - PIO10

Page 12 of 15 pages EGBT-046S/EGBT-045MS Bluetooth Module e-Gizmo Mechatronix Central


20. Query/Set Scanning Parameters
<value>
0 - Logic Low COMMAND RESPONSE
1 - Logic High
AT+IPSCAN?É +IPSCAN:<int>,<dur>,<pint>,
Example: Set PIO2 to logic High <pdur>É
OKÉ
From Host controller: AT+IPSCAN=<int>,<dur>,<pint> OKÉ
AT+PIO=2,1É ,<pdur>É
EGBT-045MS response
OKÉ where <int> = inquire scan time interval
1024 - default
18. Set/Reset multiple User I/O pin <dur> = inquire scan time duration
512 - default
<pint> = page scan time interval
COMMAND RESPONSE
1024 - default
AT+MPIO=<iomap>É OKÉ <pdur> = page scan time duration
512 - default
where
<iomap> =12-bit I/O map presented in hexadecimal All parameters must be represented with decimal integer
x PIO10 X X PIO7 PIO6 PIO5 PIO4 PIO3 PIO2 x x value.
x - don’t care/reserved
21. Query/Set SNIFF Energy Savings Parameters
Example:
Set PIO2 and PIO6 to logic High, all others to logic 0 COMMAND RESPONSE
AT+SNIFF?É +SNIFF:<tmax>,<tmin>,<retry
Bit pattern is 0000 0100 0100 = 44 hexadecimal
>,<timeout>É
OKÉ
From Host controller:
AT+MPIO=44É AT+SNIFF=<tmax>,<tmin>,<retry OKÉ
EGBT-045MS response >,<timeout>É
OKÉ
where <tmax> = maximum time
19. Query User I/O pin 0 - default
<tmin> = minimum time
0 - default
COMMAND RESPONSE
<retry> = retry time
AT+MPIO?É +MPIO:<iomap>É 0 - default
OKÉ <timeout> = timeout
0 - default
where
<iomap> =12-bit I/O map presented in hexadecimal All parameters must be represented with decimal integer
x PIO10 X X PIO7 PIO6 PIO5 PIO4 PIO3 PIO2 x x value.
x - reserved -used by system, may assume any values
22. Query/Set Security & Encryption Modes
Example:
Read PIO inputs COMMAND RESPONSE
AT+SENM?É +SENM:<mode>,<encrypt>É
From Host controller:
OKÉ
AT+MPIO?É
EGBT-045MS response AT+SENM=<mode>,<encrypt>É OKÉ
+MPIO:944É
OKÉ where <mode> = Security Mode
Returned value in binary: 1001 0100 0100 0 - sec_mode_off (default)
1 - sec_mode1_non-secure
In this example, the PIO are previously set in command 2 - sec_mode2-service
18 with PIO2 and PIO6 set. The returned value also 3 - sec_mode3_link
shows reserved bits 11 and 8 set by the system. 4 - sec_mode_unknown

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 13 of 15 pages


<encrypt> = encryption mode 26. Query Most Recently Used Authenticated De-
0 - hci_enc_mode_off (default) vice
1 - hci_enc_mode_pt_to_pt
2 - hci_enc_mode_pt_to_pt_and_bcast
COMMAND RESPONSE
AT+MRAD?É +MRAD:<addr>É
23. Delete Authenticated Device from List OKÉ

where <addr> = 48 bit bluetooth address


COMMAND RESPONSE
in NAP:UAP:LAP format
AT+RMSAD=<addr>É OKÉ
27. Query Current Status of the Device
where <addr> = 48 bit bluetooth address
in NAP,UAP,LAP format
COMMAND RESPONSE
Example: Remove from Authenticated Device list a Blue- AT+STATE?É +STATE:<stat>É
tooth device having address = 00:02:72:0A:3C:7F OKÉ

Bluetooth address in NA,UAP,LAP format = 0002,72,0A3C7F where


<stat> = Current Status, any one of the following:
From Host controller:
AT+RMASD=0002,72,0A3C7FÉ INITIALIZED
EGBT-045MS response if deletion is successful READY
OKÉ PAIRABLE
EGBT-045MS response if remote device address is not in the list PAIRED
ERROR(15)É INQUIRING
CONNECTING
Caution: CONNECTED
DISCONNECTED
Entering UNKNOWN
AT+RMASDÉ
will delete ALL authenticated device from the list! 28. Initialize SPP Profile

24. Find Device from Authenticated Device List COMMAND RESPONSE


AT+INITÉ OKÉ / FAILÉ
COMMAND RESPONSE
AT+FSAD=<addr>É OKÉ
29. Query Nearby Discoverable Devices
where <addr> = 48 bit bluetooth address
in NAP,UAP,LAP format
COMMAND RESPONSE
Note: AT+FSAD returns a FAIL response if device is not AT+INQÉ +INQ: <addr>,<class>,>rssi>É
in the authenticated list OKÉ

25. Query Total Number of Device from Authenti- where <addr> = 48 bit bluetooth address
cated Device List in NAP:UAP:LAP format
<class> = Device Class
<rssi> = RSSI
COMMAND RESPONSE
AT+ADCN?É +ADCN:<total>É This command will scan and report all nearby dicov-
OKÉ erable Bluetooth devices. The same device may be
reported more than once.
where
<total> = total number of devices in the authenticated This command will work only if EGBT-045MS is set to
device list work as a master device, i.e. AT+ROLE=1, and after
AT+INIT is executed.

Example: Discover nearby devices

Page 14 of 15 pages EGBT-046S/EGBT-045MS Bluetooth Module e-Gizmo Mechatronix Central


33. Disconnect from a Remote Device
From Host controller: Set device role as master
AT+ROLE=1É COMMAND RESPONSE
EGBT-045MS response
OKÉ AT+DISCÉ +DISC:<results>É
From Host controller: Initialize SPP
AT+INITÉ where
EGBT-045MS response <results> = Disconnection results, any one of the follow-
OKÉ ing:
From Host controller: Set inquire mode as RSSI, look for 9 devices, SUCCESS
and 48 as timeout LINK_LOSS
AT+INQM=1,9,48É NO_SLC
EGBT-045MS response TIMEOUT
OKÉ ERROR
From Host controller: Start Device Discovery
AT+INQÉ 34. Enter Energy Saving mode
EGBT-045MS response (sample only, actual report will vary)
+INQ:101D:C0:2E7B54,5A0204,7FFFÉ
+INQ:25:48:21AD1A,5A020C,7FFFÉ COMMAND RESPONSE
OKÉ AT+ENSNIFF=<addr>É OK É

In this example, EGBT-045MS found only two discover- where <addr> = 48 bit bluetooth address
able devices. It will quit searching after the timeout time in NAP,UAP,LAP format
specified by the AT+INQM command or if the number
of discovered devices equals the number of specified 35. Exit Energy Saving mode
devices.
COMMAND RESPONSE
30. Cancel Search for Discoverable Devices
AT+EXSNIFF=<addr>É OKÉ
COMMAND RESPONSE
where <addr> = 48 bit bluetooth address
AT+INQCÉ OKÉ in NAP,UAP,LAP format

AT+INQ can be stopped at anytime by executing this


command.

31. Device Pairing

COMMAND RESPONSE
AT+PAIR=<addr>,<timeout>É OKÉ / FAILÉ

where <addr> = 48 bit bluetooth address


in NAP,UAP,LAP format
<timeout> = Timeout time in sec

32. Connect to a Remote Device

COMMAND RESPONSE
AT+LINK=<addr>É OKÉ / FAILÉ

where <addr> = 48 bit bluetooth address


in NAP,UAP,LAP format

e-Gizmo Mechatronix Central EGBT-046S/EGBT-045MS Bluetooth Module Page 15 of 15 pages

You might also like