Skip to main content

Serial port bluetooth module(Master/Slave)

This module is an easy to use Bluetooth SPP (Serial Port Protocol) module, designed for transparent wireless serial connections.

The Serial port Bluetooth module is fully qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation with complete 2.4GHz radio transceiver and baseband. It uses CSR Bluecore 04-External single chip Bluetooth system with CMOS technology and with AFH(Adaptive Frequency Hopping Feature). It has a footprint as small as 12.7mmx27mm. Hopefully it will simplify your overall design/development cycle.

Model: WLS123A1M

Features

Hardware features

  • Typical -80dBm sensitivity
  • Up to +4dBm RF transmit power
  • Low Power 1.8V Operation ,1.8 to 3.6V I/O
  • PIO control
  • UART interface with programmable baud rate
  • Integrated antenna
  • Edge connector

Software features

  • Default Baud rate: 38400, Data bits:8, Stop bit:1,Parity:No parity, Data control: yes. Supported baud rate:

9600,19200,38400,57600,115200,230400,460800.

  • Use CTS and RTS to control data stream.
  • Given a rising pulse in PIO0, device will be disconnected.
  • Status instruction port PIO1: low-disconnected, high-connected;
  • PIO10 and PIO11 can be connected to red and blue LED separately. When master and slave are paired, red

and blue led blinks 1time/2s in interval. While disconnected only blue led blinks 2times/s.

  • Auto-connects to the last device on power as default.
  • Permits pairing device to connect as default.
  • Auto-pairing PINCODE:”0000” as default
  • Auto-reconnect in 30 min when disconnected as a result of beyond the range of connection.

Application Ideas

  • Remote controller
  • Wireless communication

Cautions

  • While using with Seeeduino / Arduino, set the operation voltage to 5V. Else use a proper logic level converter.
  • While using with UartSBee, set the operation voltage to 5V
  • Command to change baud rate is persistent even after reset. Hence remember the baud rate for next use.

Specification

Pin#Pad TypeDescription
PIO1134Bi-DirectionProgrammable input/output line
PIO1033Bi-DirectionProgrammable input/output line
PIO932Bi-DirectionProgrammable input/output line
PIO831Bi-DirectionProgrammable input/output line
PIO730Bi-DirectionProgrammable input/output line
PIO629Bi-DirectionProgrammable input/output line
PIO528Bi-DirectionProgrammable input/output line
PIO427Bi-DirectionProgrammable input/output line
PIO326Bi-DirectionProgrammable input/output line
PIO3225Bi-DirectionProgrammable input/output line
PIO124Bi-Direction TX ENProgrammable input/output line, control output for PA(if fitted)
PIO023Bi-Direction RX ENProgrammable input/output line, control output for LNA(if fitted)
GND13,21,22VSSGround pot
USB±15,20Bi-Directional
SPI_CLK19CMOS input with weak internal pull-downSerial peripheral interface clock
SPI_MISO18CMOS input with weak internal pull-downSerial peripheral interface data Output
SPI_MOSI17CMOS input with weak internal pull-downSerial peripheral interface data input
SPI_CSB16CMOS input with weak internal pull-upChip select for serial peripheral interface,active low
NC14
3.3VCC123.3VIntegrated 3.3V(+)supply with on-chip linear regulator output within 3.15-3.3V
RESETB11CMOS input with weak internal pull-upReset if low (externally held)

Software Instruction

Working Sketch Map

Flowchat

Commands to change default configuration

1. Set working MODE

\r\n+STWMOD=0\r\nSet device working mode as client (slave). Save and Rest.
\r\n+STWMOD=1\r\nSet device working mode as server (master). Save and Rest.

Note: \r\n is necessary for operation and the value of are 0x0D 0x0A in Hex. \r and \n represent carriage-return and line-feed(or next line),

2.Set BAUDRATE

\r\n+STBD=115200\r\nSet baudrate 115200. Save and Rest.
Supported baudrate: 9600, 19200,38400,57600,115200,230400,460800.

3. Set Device NAME

\r\n+STNA=abcdefgSet device name as "abcdefg". Save and Rest.

4. Auto-connect the last paired device on power

\r\n+STAUTO=0\r\nAuto-connect forbidden. Save and Rest.
\r\n+STAUTO=1\r\nPermit Auto-connect. Save and Rest.

5. Permit Paired device to connect me

\r\n+STOAUT=0\r\nForbidden. Save and Rest.
\r\n+STOAUT=1\r\nPermit. Save and Rest.

6. Set PINCODE

\r\n +STPIN=2222\r\nSet pincode "2222", Save and Rest.

7. Delete PINCODE(input PINCODE by MCU)

\r\n+DLPIN\r\nDelete pincode. Save and Rest.

8. Read local ADDRESS CODE

\r\n+RTADDR\r\nReturn address of the device.

9. Auto-reconnecting when master device is beyond the valid range (slave device will auto-reconnect in 30 min when it is beyond the valid range)

\r\n+LOSSRECONN=0\r\nForbid auto-reconnecting.
\r\n+LOSSRECONN=1\r\nPermit auto-reconnecting.

Commands for Normal Operation:

1. Inquire

a) Master
\r\n+INQ=0\r\nStop Inquiring
\r\n+INQ=1\r\nBegin/Restart Inquiring
b) Slave
\r\n+INQ=0\r\nDisable been inquired
\r\n+INQ=1\r\nEnable been inquired

When +INQ=1 command is successful, the red and green LEDS blink alternatively.

2. Bluetooth module returns inquiring result

\r\n+RTINQ=aa,bb,cc,dd,ee,ff;name\r\nSerial Bluetooth device with the address "aa,bb,cc,dd,ee,ff" and the name "name" is inquired

3. Connect device

\r\n+CONN=aa,bb,cc,dd,ee,ff\r\nConnect to a device with address of "aa,bb,cc,dd,ee,ff"

4. Bluetooth module requests inputting PINCODE

\r\n+INPIN\r\n

5. Input PINCODE

\r\n+RTPIN=code\r\n
Example: RTPIN=0000Input PINCODE which is four zero

6. Disconnect device Pulling PIO0 high will disconnect current working Bluetooth device.

7. Return status \r\n+BTSTA:xx\r\n xx status:

  • 0 - Initializing
  • 1 - Ready
  • 2 - Inquiring
  • 3 - Connecting
  • 4 - Connected

(Note: This is not a command, but the information returned from the module after every command)

Additional Idea

Resources

Support

If you have questions or other better design ideas, you can go to our forum or wish to discuss.

How to buy

Click here to buy: Serial port bluetooth module (Master/Slave)

See Also

Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under GPL/LGPL, see source code files for details.

Links to external webpages which provide more application ideas, documents/datasheet or software libraries

If you want to make some awesome projects by Serial port bluetooth module, here's some projects for reference.

Control Multiple servo Motor From android app

This is an interesting demo make by Arduino and Grove. This is a complete tutorial about how to control multiple servo motors from android app.

I want to make it.

Share Your Awesome Projects with Us

Born with the spirit of making and sharing, that is what we believe makes a maker.

And only because of this , the open source community can be as prosperous as it is today.

It does not matter what you are and what you have made, hacker, maker, artist and engineers,

as long as you start sharing your works with others,

you are being part of the open source community and you are making your contributions .

Now share you awesome projects on with us on Recipe, and win a chance to become the Core User of Seeed.

  • Core Users, are those who showing high interests and significant contributions in Seeed products.
  • We cooperate with our Core Users in the development of our new product, this, in another word, the Core Users will have the chance to experience any new products of Seeed before its official launch, and in return we expect valuable feedback from them to help us improving the product performance and user experience. And for most of cases if our Core Users have any good ideas for making things, we'll offer hardware pieces, PCBA services as well as technical support. Besides, further commercial cooperation with the Core Users is highly possible.
Get more information about Core User please email to: [email protected]

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...