Trying to connect with HC-05 Bluetooth with MIT APP

Hi everyone,
I'm having trouble getting a HC-05 Bluetooth to pair with MIT APP inventor. The app is not identifying the Bluetooth device, and I cant seem to figure out why. I keep getting error 515 and 507 even though I give permission for the app and apk file. I am using Galaxy 23 phone to download the app. Here the Arduino code and MIT blocks I've used so far. can anyone help me understand what might be going wrong or suggest a solution to get the HC-05 pair correctly? Any assistance would be greatly appreciated!
Blocks:


Arduino code
//Includes the Arduino Stepper Library
#include <Stepper.h>
#include <SoftwareSerial.h>

// Defines the number of steps per rotation
const int stepsPerRevolution = 2038;
char receivedChar;
SoftwareSerial BTSerial(19,18);
// Creates an instance of stepper class
// Pins entered in sequence IN1-IN3-IN2-IN4 for proper step sequence
Stepper myStepper = Stepper(stepsPerRevolution, 8, 10, 9, 11);
void setup() {
// put your setup code here, to run once:
BTSerial.begin(9600);
Serial.begin(9600);
Serial.println("The bluetooth gates are open.\n Connect to HC-05 from any other bluetooth device with 1234 as pairing key!.");
myStepper.setSpeed(15);
}
// set stepper speed to 15 rpm

void loop() {
// put your main code here, to run repeatedly:
if(BTSerial.available()>0){
char command=BTSerial.read();
if(command=='1'){
myStepper.step(256);//move the motor at 45 degree angle
//pause for 5min
delay(50000);
//Stepper.step(0);//stop the motor
} else if(command == '0') {
// Stop the stepper motor (by not calling stepper.step())
// or you could rotate it to home position if needed.
// Rotate CCW quickly at 10 RPM
myStepper.setSpeed(10);
myStepper.step(-stepsPerRevolution);
delay(10000);
// Stepper.step(0);//this will stop the motor
}
}
}

A post was merged into an existing topic: MIT App compatibility with Samsung phones

sort of duplicate post