Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deeja/840cf52206f0aa3fb82e435f29e19a95 to your computer and use it in GitHub Desktop.
Save deeja/840cf52206f0aa3fb82e435f29e19a95 to your computer and use it in GitHub Desktop.
The second part of connecting to SSH using bluetooth (from windows)

Copied from https://www.instructables.com/id/Raspberry-Pi-Bluetooth-to-PuTTY-on-Windows-10/ First part: https://gist.github.com/deeja/83f50fb893383ba328e06769a1e6d44d

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. Good Luck!

Final Suggestion:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment