Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
learn:programmable-logic:tutorials:auto-connect-2-bt2_s:start [2016/08/04 23:17] – [Instructions] Mikel Skreenlearn:programmable-logic:tutorials:auto-connect-2-bt2_s:start [2016/08/04 23:57] (current) – [Instructions] Mikel Skreen
Line 20: Line 20:
 ==== Instructions ==== ==== Instructions ====
  
-The general setup just needs the user to be able to connect and enter setup mode on the BT2's therefore this tutorial can be performed either using a Bluetooth compatible PC with a terminal program or a Bluetooth compatible smartphone (non IOS) with a terminal app.+The general setup just needs the user to be able to connect and enter setup mode on the BT2's therefore this tutorial can be performed either using a Bluetooth compatible PC with a terminal program or a Bluetooth compatible smartphone (non IOS) with a terminal app. All commands used in this tutorial can be found in the [[http://ww1.microchip.com/downloads/en/DeviceDoc/bluetooth_cr_UG-v1.0r.pdf|RN42's reference manual]].
  
 === 1. Initial Setup === === 1. Initial Setup ===
Line 44: Line 44:
 >4.2) Send the commands "SA,0<cr>" and "Sm,3<cr>" separately. These commands will disable authentication and set the BT2 into "Auto-Connect" mode. >4.2) Send the commands "SA,0<cr>" and "Sm,3<cr>" separately. These commands will disable authentication and set the BT2 into "Auto-Connect" mode.
  
->4.3) Check to make sure that the device is in auto connect code and has no authenticationSend "D<cr>" and verify "Mode =DTRand "Authen=0".+>4.3) Next you'll need to tell the BT2 module which device to connect toWith the slave BT2 powered on send the "I,10<cr>" command to discover all PmodBT2 devices within range and their addressees will be returned. The address is a 12-digit hexadecimal number. It can also be found on the Pmod BT2's label as the MAC ID. Once the slave's device address is known send the command "SR,<address><cr>in order to save it to memory. For example if the slave's address was 00066676ABCD you would enter "SR,00066676ABCD<cr>".
  
->4.4) Reboot the device using the "R,1<cr>" command.+>4.4) Check to make sure that the device is in auto connect code, has no authentication, and has stored the correct slave address. Send "D<cr>" and verify "Mode =DTR", "Authen=0" and that "REM=ADDR" where ADDR is the slave's address. 
 + 
 +>4.5) Reboot the device using the "R,1<cr>" command.
  
 === 5. Test! === === 5. Test! ===