Initial setup: I used one HM10 connected to AUX UART (UART1) on the PIC32, and another connected through a serial-USB cable to a PC running Arduino serial monitor. The HM10 BLE modules can be in either 'peripherial' or 'central' mode. You need one of each mode to set up a data link. On the peripherial node (attached to PC with arduino serial): 0. Set the arduino serial monitor terminator to 'no line ending' 1. Set the main module to peripherial mode with 'AT+ROLE0'. 2. Use 'AT+ADDR?' to get BLE address. On the Central node (in command mode): 1. Set the main module to manual connect mode using 'AT+IMME1'. 2. Set the main module to Central mode with 'AT+ROLE1'. 3. Use 'AT+CONaddress' to connect. e.g. 'AT+CONA81B6AAE5221' If the connection is successful you should see 'OK+CONNA' but use the address of the peripeherial mode module 4. Make sure that the LEDs stop blinking. From http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/#getStarted ============================ If you did the steps above, you are now in data tranmission mode, so AT commands will NOT be recoginzed! On the peripherial node (attached to PC with arduino serial): 0. Set the serial monitor terminator to CR+LF On the Central side (PIC32 running the HM10 est code), do 1. Change mode to data using 'm' command 2. send a data burst using 'b 10'. Data should appear on peripherial serial connection. 3. Send a string using 's hithere' String should appear on peripherial serial connection, and the PIC32 side will hang until you send back (peripherial->-central) a string. ============================ Break the connection by cycling the power on both modules. Both LEDs should blink when you turn on the power. On the Central side (PIC32 running the HM10 est code): 1. Send 'AT+IMME0' to turn off manual pairing 2. Send 'AT+RESET'. The modules should immediately reconnect and LEDs stop blinking. 3. Change mode to data using 'm' command 4. Send the test strings as before. 5. If you now cycle the power on the modules, they will automatically reconnect. This suggests that you could configure the link once for two modules using only two serial monitors, then move the modules to the PIC32 and just use the data link. ============================ Effect of power cycle: If you reset the PIC (or load new code) but not the HM-10s the connection remains active. Therefore AT commands in any initialiation function will get sent as data and not have any effect on the modules. You could: 1. Cycle power on the modules. 2. Before sending the AT commands, send a welcome message to see if there is an active connection. The remote device would reply to the message. 3. Set the modules to auto connect and get rid of any AT commands in the init code. Not very flexible, but easy to set up. ============================