Bluetooth and Crius AIO Pro

Post Reply
wiwitop
Posts: 7
Joined: Wed Feb 05, 2014 10:33 am
Location: France

Bluetooth and Crius AIO Pro

Post by wiwitop »

Hello,

I bought an HC-06 bluetooth module that I'm trying to connect to my Crius AIO Pro V1.1 (From HK).
With AT Commands, I configured it at 115200 bauds as multiwii expected it. I'm sure it's working properly because I tested it with my Arduino UNO.
I'm able to read at 115200 bauds (with putty) the values received from bluetooth.
But, I don't understand why it doesn't work on my Crius AIO Pro connected to Wingui through Bluetooth (I have no problem with USB). I'm sure it's properly connected.
And to be sure, i tried to permute data connectors.
I got a timeout. Some suggestions to debug it ?

Thanks.

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Re: Bluetooth and Crius AIO Pro

Post by ezio »

Is your usb cable connected while you try the Bluetooth?

wiwitop
Posts: 7
Joined: Wed Feb 05, 2014 10:33 am
Location: France

Re: Bluetooth and Crius AIO Pro

Post by wiwitop »

USB was not plugged.

I'm thinking about installing a sketch to test my Crius AIO Pro.
Something like that :

Code: Select all

void setup() {
  Serial.begin(115200);
}
void loop() {
  Serial.println("test");
}


That should work, right ?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Bluetooth and Crius AIO Pro

Post by PatrikE »

Load MultiSerialMega sketch included in Arduino Examples.
Then you can test communicating between the serial ports.

Code: Select all

void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  Serial1.begin(115200);
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }
 
  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.write(inByte);
  }
}

wiwitop
Posts: 7
Joined: Wed Feb 05, 2014 10:33 am
Location: France

Re: Bluetooth and Crius AIO Pro

Post by wiwitop »

I used this sketch with success on my Crius AIO (received "Test module HC-06 bluetooth" on putty @ 115200 bauds, USB was not connected)

int counter = 0;
unsigned long time;

void setup() {
Serial.begin(115200);
Serial.println("Start");
}
void loop(){
Serial.print("Test module HC-06 bluetooth");
Serial.print(++counter);
Serial.print(" " );
time = millis();
Serial.println(time);
delay(1000);
}


So I don't think there are problems with my bluetooth module or my flight controller.

So why it doesn't work with Wingui or Multiwiiconf ? :( I'm using multiwii 2.3, should I use another version ?

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: Bluetooth and Crius AIO Pro

Post by NikTheGreek »

I guess that you have to set up communication speed at 57600..

wiwitop
Posts: 7
Joined: Wed Feb 05, 2014 10:33 am
Location: France

Re: Bluetooth and Crius AIO Pro

Post by wiwitop »

NikTheGreek wrote:I guess that you have to set up communication speed at 57600..


Hello,

Multiwii was not supposed to work @ 115200 bauds ?

I already tried @ 57600.

I changed this code in config.h:

Code: Select all

    #define SERIAL0_COM_SPEED 115200
    #define SERIAL1_COM_SPEED 115200
    #define SERIAL2_COM_SPEED 115200
    #define SERIAL3_COM_SPEED 115200

Then I sent "AT+BAUD7" on my bluetooth module.

Then I used Wingui to be able to change communication speed. That worked with USB, not with Bluetooth.

For my next try, i will modify multiwii code to add my previous code.

Post Reply