![]() ![]() In my brief experience with the module, it seems to be easier (at least for what I am doing) to use slave mode, thus transferring the control to the more powerful device (such as a PC) with a better user interface. These modules are in one state or another, they cannot be in both at the same time (that I know of), where as a PC can be. In slave mode the module broadcasts itself as being available and waits for a master device to initiate a connection with it. In master mode, it is the module that initiates connections, requiring it to scan for slave devices. The WLS123A1M module has two separate modes: Master and Slave modes. Changing between these is the first topic of discussion. It is also important to note that the module has two separate modes: Master and Slave. Any changes made to these settings are retained even when the device is powered off. If a command is mentioned in the datasheet and not in this section, it means I haven’t personally tried it. Presented below is a mixture of my own experience and what various data-sheets claim. The default speed of this specific model was 38400 bps, but this can be changed in software (see the INBD command). On the MacBook, I used a program called CoolTerm to act as a dump terminal, and the standard Mac OS X drivers were used to communicate with the Arduino’s FTDI chipset. My Ubuntu desktop machine was used to connect with the module via bluetooth. My Apple MacBook Pro was used on the USB side of the Arduino board, as the local control of the board. ![]() ![]() I used two computers to develop with the WLS123A1M module. The data-sheet says they will tolerate 5V logic from the FTDI/Atmel chips, and in my experience do. The logic inputs are TTL inputs, supposedly at 3.3v. Not sending enough causes lots of errors. Sending too many \r\n sequences does not cause any problems. To ensure this, I always sent a blank like before I entered the command, and once again after it. The biggest thing to remember is that the WLS123A1M Bluetooth Module expects a carriage-return ( \r) and line-feed ( \n) combination ( \r\n) before and after every command. See the Software Features section of the device’s datasheet for more details on their intended use. Signals PIO10 (pin #33) and PIO11 (pin #34) also give indications to the modules status. Signal PIO1 (pin #24) gives a status instruction port high when connected, low when disconnected. Simply connecting the RS232 UART lines of the bluetooth module to the TX/RX lines of the Arduino does the trick: Arduino-RX to Bluetooth-TX and visa-versa allows them to communicate (This may not be true when communicating from the Arduino’s MCU and not FTDI-USB – check the connections!). The Arduino device was programmed to just flash an LED (digital #13) so it left the serial communications lines. With my Arduino shield it is possible to connect the bluetooth module directly to the FTDI chip. The PCB layout is available for you to do as you please, in line with my standard Disclaimer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |