voroshkov / Solo-DIY-RF-Laptimer

RX5808-based Laptimer Solution for a Lonely Drone Racer
MIT License
27 stars 9 forks source link

Android apps #8

Open 2black0 opened 7 years ago

2black0 commented 7 years ago

Hi, I get issue with android apps, please check attach file

It not show what channel used, rssi is not show

2black0 commented 7 years ago

image

data flow change rapidly from R>> to S<<, and bytes received is about 0 or 2

2black0 commented 7 years ago

FYI : I use pro mini + HC05 (Baud 115200) + RX5808(V1.0) original source code (no editing)

2black0 commented 7 years ago

and try press - / + in channel and get this

image

voroshkov commented 7 years ago

It all looks like a baud rate issue. Screenshot shows that Android app reads some trash instead of meaningful HEX values from BT. Please verify that you use:

2black0 commented 7 years ago

For hc05 baudrate I can confirm 115200 (will post screenshot later)

For arduino need to be check again, okay I will report here asap after make check

2black0 commented 7 years ago

I change promini with UNO (5v + 16Mhz), and this is screenshot of baudrate changed of hc05

image

2black0 commented 7 years ago

the problem still same, android apps still not show value like before

voroshkov commented 7 years ago

The terminal screenshot shows that you successfully communicate with your BT module at 9600 baud (see lower right corner of the terminal window). I'm not sure why it shows 115200 as a response.

2black0 commented 7 years ago

sorry for not info the process, I use softserial (uno) to connected with HC05,cause I dont have FTDI, but it works, If I send AT it will respond OK, so I think AT Command work normally so PC - uno 9600, and uno - hc05 38400 (default), and success change into 115200,

voroshkov commented 7 years ago

I see. OK. What is the code you use on Arduino to communicate with HC05?

2black0 commented 7 years ago

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

include

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {

Serial.begin(9600);

pinMode(9,OUTPUT); digitalWrite(9,HIGH);

Serial.println("Enter AT commands:");

mySerial.begin(38400);

}

void loop()

{

if (mySerial.available())

Serial.write(mySerial.read());

if (Serial.available())

mySerial.write(Serial.read());

}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I am following this tutorial : http://www.instructables.com/id/AT-command-mode-of-HC-05-Bluetooth-module/step4/Setting-up-connection/

voroshkov commented 7 years ago

OK. mySerial.begin(38400); means that BT module is connected to Arduino at 38400.

voroshkov commented 7 years ago

Did you enter AT+BAUD8 command in terminal?

voroshkov commented 7 years ago

Sorry, I've never worked with HC-05 before. It looks like in config mode it's always 38400. Take a look at this vid: https://www.youtube.com/watch?v=zoJUAjW3vQ0 It looks they enter a bit different command to set baud rate: AT+UART=115200,1,0

2black0 commented 7 years ago

Okay thanks, will try with AT+UART=115200,1,0 Will report here asap

voroshkov commented 7 years ago

Well, it looks this won't work. These params control the parity and stop bits. Two zeros correspond to default Arduino UART settings. One more thing you might need is a voltage divider at RX pin of your BT module(to have 3.3V signals instead of 5V), but this seems odd, since you can successfully communicate with HC05 during setup without a voltage divider.

2black0 commented 7 years ago

Wait I will make simple test of BT HC05 and Arduino (BT Terminal), if this is a problem maybe I need to fix it first, but If no problem I think the side of Android APPs maybe have some bug,

Oh, my test device is Xiaomi RedMi Note 4 (MIUI 8),

nikybiasion commented 7 years ago

I use HC-05 without issues, set to 115200 and all works great

2black0 commented 7 years ago

@nikybiasion AT+UART=115200,1,0 right?

nikybiasion commented 7 years ago

i've set only AT+UART=115200, try to reset the module with AT+ORGL, set name, password and speed

voroshkov commented 7 years ago

@2black0 have you managed to solve the issue?

2black0 commented 7 years ago

@voroshkov still cant solved, I am still trying with other bluetooth, maybe this one is not normal

voroshkov commented 7 years ago

You can try a simple test:

  1. connect your HC05 to arduino:
    • GND - GND
    • 5V - VCC
    • RX - TX
    • TX - RX
  2. Upload sketch:
    int cnt = 0;
    void setup() {
    Serial.begin(115200);
    }
    void loop() {
    cnt++;
    Serial.print("Counter:"); 
    Serial.println(cnt);
    delay(1000);
    }
  3. Download https://play.google.com/store/apps/details?id=Qwerty.BluetoothTerminal to your phone
  4. Power all up and connect from phone App to BT

If after connection you see messages "Counter: X" appearing in android app, then it's all set up correctly and there's possibly an issue with Solo Laptimer App or with hardware connections in your laptimer device.

Otherwise, try changing the baud rate in the Serial.begin(115200); line of the sketch. So you'll find out what baud rate your HC module really uses.

2black0 commented 7 years ago

@voroshkov will try this night, will reported it back

FredFrancisIT commented 7 years ago

Any update on this one ?

leveltgn commented 7 years ago

from my youtube chanel (Spanish, sorry)

Adaptador TTL solo cuatro cables necesarios; RX, TX, +5V y GND (TX-RX cruzados) Hay que conseguir entrar en el modo AT2 (pulsar el boton al conectar al TTL y soltar) parpadeo de led 1/seg Ventana de comandos a 38400 baudios (Ambos NL & CR) Introducimos: AT+UART=115200,1,0 AT+NAME=NOMBRE el pin será 1234 Con esa configuración funcionan perfectamente Partir siempre de la configuración original