Danielle Aspitz

MAS.863 | How to Make (Almost) Anything

Networking and Communications

This week we explored how to network and communicate between devices


1. Choose and Connect with Bluetooth Device
2. Connect two Devices

1. Choose and Connect with Bluetooth Device

The goal this week was to communicate between two devices.
As I would like to have remote communication between the user and my lamp for my final project and wifi might prove difficult with log-ins and whatnot I decided to opt for Bluetooth connectivity. I originally was steered into the newer Bluetooth modules but could not find any documentation from past use cases, and as my electronics know-how is very primitive I decided to stick with the Bluetooth 4.0 HM-10 which had many more uses described in past years. I relied heavily on descriptions from Dan Chen in this tutorial from HTMAA '15

Figure 1. The Bluetooth 4.0 HM-10

The first step was to program the Bluetooth Module by connecting to it via Arduino. Unfortunately my module was different than Dan's. Dan's had nice connections pre-soldered to the board allowing easy access to TX,RX,VCC,and GND, in my board I had to create these connections by looking at the data sheet and soldering mini jumpers to create these connections that feed into the FTDI cable.

Figure 2. The Data Sheet
Figure 3. Dan's nice diagram
Figure 4. My clunky work-around
Figure 5. pads to mini wires to bigger wires...
Figure 6. ...to jumper wires to FTDI cable...
Figure 7. ...to laptop port... to recognized Arduino port
Figure 8. And finally Communication!

Once all was wired up I plugged it in and selected the correct port in Arduino. Then I opened up the Serial Monitor, ensured it was set to 9600 baud, and typed in: AT+NAME? and got back the message: OK+NAME:HMSoft , which means it worked!

2. Connect two Devices
Figure 9. BLE B came together much quicker
Figure 10. I retrieved the address for BLE A
Figure 11. LABEL - before things get messy
Figure 12. Get Address for BLE B
Figure 13. AT+CON - connect both BLEs and establish Roles

I got both addresses for the BLEs and connected them to one another. Lastly I established BLE A as Role[0] and BLE B as Role[1].