Talk to the SMuFF via Bluetooth

This is an extension of the Talk to the SMuFF chapter. 

In some cases you don't have the option to connect the SMuFF (for debugging and stuff) conveniently to your PC/Mac because of distance. Don't frett, there's an easy and fairly cheap cure for that: Utilizing Bluetooth! 

Here I'll describe what you need to accomplish this task.

First, get one of those...

pretty cheap HC-05 (or HC-06) Wireless Bluetooth Transceiver modules.

Such a module will enable you connecting various devices easily using a TTL-Serial interface and exchange data over the air using the standardized Bluetooth Serial Port Profile (SPP).

Second, wire it up...

to the SMuFF controller of your choice using a bunch of Dupont wires. Wiring is pretty straight forward: 

As shown in the image on the left, it's easiest to use the TFT port as a connection point on the SMuFF controller.

That's it! 

Now set the according port to a baud rate of 9600 on the SMuFF, pair with the device (it usually shows up as "HC-05") from your PC/Mac, fire up your favorite terminal app, connect over the according Bluetooth serial port and you're done.

If 9600 baud is too slow for you...

you have to reprogram the HC-05 device settings.

Connect your HC-05 to a USB-to-TTL adapter using the wiring scheme shown on the left (again: make sure RX and TX are crossed over).

While plugging the USB-to-TTL adapter into your PC/Mac hold down the "Mode"-Button (see arrow). This will switch the device into a command mode which will accept AT-Commands for setting up the parameter values.
A comprehensive list of all commands available you'll find here.

Connect via a terminal app (i.e. TeraTerm or PuTTY) to the serial port of the USB-to-TTL adapter using a baud rate of 38400 (that's the default speed of the HC-05). 

Type AT <Enter> to check whether or not the device is responsible. If the device is online, it'll respond with "OK". If that doesn't happen, check your wiring.

Once you've got this positive response, key in:

AT+UART=115200,1,0 <Enter>

This will set the default baud rate to 115200 baud, one stop-bit, no parity. 

And while you're already at it, you may want to change the device name as well, just to be able to find ti easier when you browse for Bluetooth devices nearby (since, if you have more than one HC-05 device, it's hard to tell which one is which).
Type in the command:

AT+NAME=SMuFF_BT <Enter>

and it'll show up with the name SMuFF_BT in every future Bluetooth scan on the PC.
Pro tip: If you have multiple 3D printers equipped with a SMuFF, set the name according to your printer, i.e. SMuFF_E3 or SMuFF_CR10.

After you've set it up, disconnect the HC-05 from the USB-to-TTL adapter and connect it back to your SMuFF and don't forget to change the baud rate on the SMuFF to 115200 as well. 


Hint: If you still struggle with the programming of the HC-05 device, here's an Instructables page that might help you. 

Programming the HC-06

The HC-06 module is slightly different, since it's not capable operating in "Master" mode. Since this is not needed for the SMuFF communication, it's totally fine using this device instead of the HC-05.
The connection scheme is the same as for the HC-05 (GND, VCC, RX, TX - later two crossed over) and without programming, it is ready for communication at a speed of 9600 Baud right away. 

Though,  the programming is different compared to the HC-05.
Therefore I dug up a video on YouTube, which explains the process on how to set the HC-06 up for a different baud rate / name in detail.