Pmod BT2 Reference Manual
The Digilent Pmod BT2 (Revision A) is a powerful peripheral module employing the Roving Networks RN-42 to create a fully integrated Bluetooth interface.
Download This Reference Manual
Features
-
Bluetooth 2.1/2.0/1.2/1.0 compatible
-
Add wireless capability with this low power, Class 2 Bluetooth radio
-
Supports SPP profile for emulating a point to point wired “COM” connection
-
Secure communications, 128-bit encryption
-
12-pin Pmod port with UART interface
Functional Description
The Pmod BT2 uses a 12-pin Pmod port and communicates via UART. There is a secondary SPI header on the board for updating the RN-42 firmware if needed, however this port is not used under normal operation.
The typical application for the Pmod BT2 is to replace a wired UART connection between two Bluetooth capable devices. When paired with an Android, Linux, MacOSX,或者Windows电脑,Pmod BT2看起来像一个serial COM port similar to how a USB-UART bridge or RS-232 serial port behaves. The Pmod BT2 can be easily configured from the Bluetooth connected computer by entering a “Command Mode” that allows settings such as UART baud rate to be programmed into non-volatile configuration registers.
When used with another Pmod BT2, a wireless UART bridge can be achieved with no need for software configuration of the Bluetooth link. This is accomplished by using the on-board jumper settings to control an automated discovery process of the two Pmod BT2's. In this way you can communicate wirelessly between two embedded devices without complicated software like is required with WiFi or 802.15.4 solutions. Communicate wirelessly with simple serial prints and reads!
Note that due to security restrictions built into iOS, the Pmod BT2 cannot be used with the iPhone, iPad, or other iOS devices.
Interfacing with the Pmod
UART/Pmod Interface
The Pmod BT2 communicates with the host board via theUART protocol. By default, the UART interface uses a baud rate of 115.2 kbps, 8 data bits, no parity, and a single stop bit. The startup baud rate may be customized to predefined rates or set to a specific user customized baud rate ranging from 1200 bps to 921 kbps.
The reset pin (RST) on J1 is active low. If the RST pin is toggled, the device will undergo a hard reset. This hard reset performs similarly to a power cycling of the device. The second interface besides the standard UART signals is the STATUS pin also on J1. The STATUS pin directly reflects the connection status of the device. STATUS is driven high by the device when connected and is driven low otherwise.
Jumpers
The Pmod BT2 has several settings that are configurable via jumper blocks JP1 through JP4. These jumpers are all sampled in the first 500 ms of operation and configure the RN-42 module's behavior whether they are shorted are un-shorted when the Pmod BT2 is powered up.
JP1 restores the device to factory default settings after three transitions of the jumper setting (short-to-open or open-to-short). This only works if JP1 was initially shorted before the Pmod BT2 was powered on. Also, each transition must be separated by a 1 second pause. If done correctly, theLEDon the Pmod BT2 will blink rapidly.
JP2 enables pairing with a special device class defined by the user in software. This may be used so that the Pmod BT2 operates as a substitute for an RS232 cable. JP3 enables auto connect to a stored address defined by the user. Finally, JP4 chooses whether to operate at the stored baud rate (115.2kbps default) or a baud rate of 9600 regardless of the software selected rate when shorted.
Pinout Description Table
J1 Header Connections | J2 Header Connections | |||||
---|---|---|---|---|---|---|
Pin | Signal | Description | Pin | Signal | Description | |
1 | RTS | Ready to Send | 1 | MISO | Master-In-Slave-Out | |
2 | RXD | Receive Data | 2 | MOSI | Master-Out-Slave-In | |
3 | TXD | Transmit Data | 3 | SCK | Serial Clock | |
4 | CTS | Clear to Send | 4 | CS | Chip Select | |
5 | GND | Power Supply Ground | 5 | GND | Power Supply Ground | |
6 | VCC | Power Supply (3.3V) | 6 | VCC | Power Supply (3.3V) | |
7 | STATUS | Connection Status | Jumper Descriptions | |||
8 | RST | Reset | Jumper | Description | ||
9 | (NC) | Not Connected | JP1 | Factory Default | ||
10 | (NC) | Not Connected | JP2 | Auto Discovery/Pairing | ||
11 | GND | Power Supply Ground | JP3 | Auto Connect | ||
12 | VCC | Power Supply (3.3V/5V) | JP4 | Baud Rate Setting (9600) |
The Pmod BT2 can be left in the default 'data mode' where the Pmod simply acts as a data pipeline. The on-board RN-42 module will strip out the Bluetooth headers and footers as data is given to the user through the UART header. It will automatically construct the Bluetooth packet when the user provides data to it from the UART port.
Alternatively, the 'command mode' can be entered by sending the module the characters “$$$” to which it will respond “CMD”. When in command mode, the module will respond to a large number of commands allowing the user to customizing the module for specific applications. In order to exit command mode, send “—
The various modes of operation are accessed by using the “SM,<5,4,3,2,1,0>” command while in command mode. The Pmod BT2 can be put into one of six available modes of operation. The modes in order, 0 to 5, are: slave, master, trigger master, auto-connect, auto-connect DTR, and auto-connect ANY.
Any external power applied to the Pmod BT2 must be within 3.0V and 3.6V; however, it is recommended that Pmod is operated at 3.3V.
Physical Dimensions
The pins on the pin header are spaced 100 mil apart. The PCB is 1.5 inches (3.81 cm) long on the sides parallel to the pins on the pin header and 0.8 inches (2.032 cm) long on the sides perpendicular to the pin header. The PCB on the RN-42 module extends the length of the PCB from 1.5 inches to 1.75 inches (4.445 cm).
Additional Information
The schematics of the Pmod BT2 are availablehere. For more information on the device's UART interface and RST and STATUS pins, as well as jumper settings and functionality refer to theRN42用户手册and theRN42 Datasheeton the Microchip website.
If you have any questions or comments about the Pmod BT2, feel free to post them under the appropriate section (“Add-on Boards”) of theDigilent Forum.