Beaglebone Blue fails to connect to Mission Planner via Bluetooth

Hello everyone,
I am working with Ardurover on the Beaglebone Blue, and have been having quite a bit of trouble with Mission Planner (and other GCS) for a while now. I have successfully connected via UDP over several wifi networks, but I would like to try connecting via Bluetooth.

I have followed this tutorial by Yuri_Rage for a lot of the setup with my rover, and it has proved helpful so far, especially since I am still unfamiliar with Linux, which the Beaglebone runs on. This tutorial is one of the few places where Bluetooth telemetry for the Beaglebone is documented. Anyways, this tutorial has you set up a Python file (bluetooth-serial.py) which, after connecting to a host computer, will handle a virtual COM port that can be used in Mission Planner. I will attach this file below.

import os, pty, serial, time
from bluetooth import *
import threading


def receive(client, master):
    try:
        while True:
            received_data = os.read(master, 1024)
            client.send(received_data)
    except:
        print("cannot receive, connection closed")


def send(client, master):
    try:
        while True:
            data = client.recv(1024) #128
            written = os.write(master, data)
    except:
        print("cannot send, connection closed")


def start_server_and_listen(master):
    service_uuid = "00001101-0000-1000-8000-00805F9B34FB"
    server = BluetoothSocket(RFCOMM)
    server.bind(("", PORT_ANY))
    server.listen(1)
    port = server.getsockname()[1]
    advertise_service(server, "BBBlue-MAVLink", service_id=service_uuid,
                      service_classes=[service_uuid, SERIAL_PORT_CLASS],
                      profiles=[SERIAL_PORT_PROFILE])
    client, client_info = server.accept()
    receive_thread = threading.Thread(target=receive, args=(client, master))
    send_thread = threading.Thread(target=send, args=(client, master))
    receive_thread.start()
    send_thread.start()
    receive_thread.join()
    send_thread.join()
    server.close()
    client.close()


master, slave = pty.openpty()
s_name = os.ttyname(slave)
print(s_name)
ser = serial.Serial(port=s_name, baudrate=57600, stopbits=serial.STOPBITS_TWO)

while 1:
    try:
        start_server_and_listen(master)
    except:
        print("Exception occurred, restarting server...")

client.close()
server.close()

I am fairly certain that a failure related to this file is the source of my problem. Using the systemctl command, I checked the status of another file, bluetooth-serial.service, and was given a console output from this file, among other things. bluetooth-serial.py keeps printing “Exception occurred, restarting server”. As for what is causing this problem, I am unsure.

Any help with this problem would be greatly appreciated. Sorry if this topic is a bit lengthy.