Introduction: Raspberry Pi Bluetooth to PuTTY on Windows 10.
Both the Raspberry Pi 3 B and Raspberry Pi Zero W have a Bluetooth capability. You can free up your serial port for things like a GPS unit, by instead configuring the Bluetooth transceiver for all shell access.
Patrick Hundal wrote an excellent piece called Headless Raspberry Pi configuration over Bluetooth, that shows how to configure the Bluetooth radio for shell logins. This article extends that work, by demonstrating how to pair with such a configuration of Raspberry Pi, for shell access via PuTTY on a Windows 10 machine.
Step 1: Configure Raspberry Pi for Bluetooth.
First configure you Raspberry Pi for Bluetooth shell access, by following the directions in Patrick Hundal's article Headless Raspberry Pi configuration over Bluetooth.
Notes on this process:
As an alternative to SD Card pre-configuration, the method I used was to enable the Pi's serial port, login using the PuTTY terminal program via a USB to serial converter, and configure the Pi's system whilst it ran on the target hardware. There are many other instructional articles available on this topic.
Step 2: Configure Windows 10 for Raspberry Pi Bluetooth.
Now that you have your Raspberry Pi's Bluetooth configured for shell access, and you have the Pi fully booted and in range, we can begin the pairing with Windows 10.
To associate a COM port with a Rasperry Pi/ Windows 10 Bluetooth pairing, we proceed as follows:
On your Windows 10 Desktop/ Laptop first enable the Bluetooth transceiver. Select Start, Settings, then Devices. At this point resist the intuitive temptation to Add bluetooth or other device. Instead, scroll down to 'Related settings', and select Devices and printers. Find your Desktop/ Laptop under 'Devices', right click it, then select Bluetooth settings from the pop up menu. This brings up the 'Bluetooth settings dialogue:
Select the COM ports tab, then select Add... to bring up the 'Add COM port' dialogue. Here we select the 'Outgoing' radio button, and then click on Browse... This will yield the 'Select Bluetooth Device' dialogue. All going well, you should see your Raspberry Pi listed as a discovered device. Select the Raspberry Pi device listed, and click OK twice. This should take you back to the COM ports tabbed dialogue, and list a COM port that is now associated with the Windows 10/ Raspberry Pi pairing. Take note of which COM port has been assigned.
Step 3: Login to Your Pi's Bluetooth Shell.
Download and install the PuTTY terminal software.
You should now be able to initiate a login session from your Windows 10 machine, using the numbered COM port previously noted, at a speed of 115200 bps.
Getty, running on the Pi, has been configured to automatically log users in when they connect via PuTTY. As there are no other privacy measures, you may wish to defeat this behavior, and rely on the usual username and password requirements to provide a modicum of security.
To do this, remove the '-a pi' settings in the following line of your /home/pi/btserial.sh file:
ExecStart=/usr/bin/rfcomm watch hci0 1 getty rfcomm0 115200 vt100 -a pi
We have a be nice policy.
Please be positive and constructive.