Problem connecting two Seed Xiao boards through BLE

Good day everyone,

I am trying to connect two Seed Xiao Nrf52840 Sense boards with the central device sending the pressure value from an analog sensor to the peripheral device. The peripheral then uses that pressure value to control a servo motor (I'll leave it as print line for now as I can't control the servos yet).

As I am new to the space, I have found a few guide to get to the code below. However, the two boards won't connect as the Central device keeps saying "Peripheral device attributes discovery failed!". Please let me know how to fix that as well as any pointers on whether the pressure can be sent through or not will be greatly appreciated. Thank you!

Central code:

#include <ArduinoBLE.h>
#include <Wire.h>

const char* deviceServiceUuid = "19B10000-E8F2-537E-4F6C-D104768A1214";
const char* deviceServiceCharacteristicUuid = "19B10000-E8F2-537E-4F6C-D104768A1214";

int pressure = -1;
int oldPressureValue = -1;  

void setup() {
  Serial.begin(9600);
  while (!Serial);

    if (!BLE.begin()) {
    Serial.println("* Starting Bluetooth® Low Energy module failed!");
    while (1);
  }
  
  BLE.setLocalName("Pressure sensor (Central)"); 
  BLE.advertise();

  Serial.println("Pressure sensor (Central Device)");
  Serial.println(" ");
}

void loop() {
  connectToPeripheral();
}

void connectToPeripheral(){
  BLEDevice peripheral;
  
  Serial.println("- Discovering peripheral device...");

  do
  {
    BLE.scanForUuid(deviceServiceUuid);
    peripheral = BLE.available();
  } while (!peripheral);
  
  if (peripheral) {
    Serial.println("* Peripheral device found!");
    Serial.print("* Device MAC address: ");
    Serial.println(peripheral.address());
    Serial.print("* Device name: ");
    Serial.println(peripheral.localName());
    Serial.print("* Advertised service UUID: ");
    Serial.println(peripheral.advertisedServiceUuid());
    Serial.println(" ");
    BLE.stopScan();
    controlPeripheral(peripheral);
  }
}

void controlPeripheral(BLEDevice peripheral) {
  Serial.println("- Connecting to peripheral device...");

  if (peripheral.connect()) {
    Serial.println("* Connected to peripheral device!");
    Serial.println(" ");
  } else {
    Serial.println("* Connection to peripheral device failed!");
    Serial.println(" ");
    return;
  }

  Serial.println("- Discovering peripheral device attributes...");
  if (peripheral.discoverAttributes()) {
    Serial.println("* Peripheral device attributes discovered!");
    Serial.println(" ");
  } else {
    Serial.println("* Peripheral device attributes discovery failed!");
    Serial.println(" ");
    peripheral.disconnect();
    return;
  }

  BLECharacteristic pressureCharacteristic = peripheral.characteristic(deviceServiceCharacteristicUuid);
    
  if (!pressureCharacteristic) {
    Serial.println("* Peripheral device does not have pressure_type characteristic!");
    peripheral.disconnect();
    return;
  } else if (!pressureCharacteristic.canWrite()) {
    Serial.println("* Peripheral does not have a writable pressure_type characteristic!");
    peripheral.disconnect();
    return;
  }
  
  while (peripheral.connected()) {
    pressure = pressureReading();

    if (oldPressureValue != pressure) {  
      oldPressureValue = pressure;
      Serial.print("* Writing value to gesture_type characteristic: ");
      Serial.println(pressure);
      pressureCharacteristic.writeValue((byte)pressure);
      Serial.println("* Writing value to pressure_type characteristic done!");
      Serial.println(" ");
    }
  
  }
  Serial.println("- Peripheral device disconnected!");
}
  
int pressureReading() {
  pressure = analogRead(A0);
    return pressure;
}

Peripheral code:

#include <ArduinoBLE.h>

const char* deviceServiceUuid = "19B10000-E8F2-537E-4F6C-D104768A1214";
const char* deviceServiceCharacteristicUuid = "19B10000-E8F2-537E-4F6C-D104768A1214";

int pressure = -1;

BLEService pressureService(deviceServiceUuid); 
BLEByteCharacteristic pressureCharacteristic(deviceServiceCharacteristicUuid, BLERead | BLEWrite);



void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  while (!Serial);

  if (!BLE.begin()) {
    Serial.println("- Starting Bluetooth® Low Energy module failed!");
    while (1);
  }

  BLE.setLocalName("Motor control (Peripheral)");
  BLE.setAdvertisedService(pressureService);
  pressureService.addCharacteristic(pressureCharacteristic);
  BLE.addService(pressureService);
  pressureCharacteristic.writeValue(-1);
  BLE.advertise();

  Serial.println("Motor control (Peripheral Device)");
  Serial.println(" ");
}

void loop() {
  // put your main code here, to run repeatedly:

  BLEDevice central = BLE.central();
  Serial.println("- Discovering central device...");
  delay(5000);

  if (central) {
    Serial.println("* Connected to central device!");
    Serial.print("* Device MAC address: ");
    Serial.println(central.address());
    Serial.println(" ");

    while (central.connected()) {
      if (pressureCharacteristic.written()) {
         pressure = pressureCharacteristic.value();
         writePressure(pressure);
       }
    }
    
    Serial.println("* Disconnected to central device!");
  }
}

void writePressure(int pressure) {

  if (pressure <500) {
    Serial.println("1");
  }
  if (pressure >500) {
    Serial.println("2");
  }