Closed DmitriySurin closed 5 years ago
That +UART:38400,0,0 worries me. Can you change the settings to UART 38400,1,0? It should have no parity, one stop bit.
No it doesnt help
I have uploaded a firmware version with debugging support for the bluetooth UART.
As said, this for monitoring the RX pin on the UART3 of the controller.
I hope this helps us isolating the issue.
I send 123456 via Serial bluetooth terminal and I can see very strange result in your debugging mode:
Bluetooth debug: ON ▒▒▒▒
Also $d B said:
Bluetooth UART's last error code flag says: no errors
That does not make sense. Sending different characters resulting in the same target character without frame or parity error is impossible. Something is wrong. What I would do next is connect the PC via a USB-to-UART adapter to the cablecam controller's bluetooth pins (without 5V) and proof the UART is fine or not.
What I would expect to see in terminal? At? Or what?
If you send "123456" to the UART, in the USB terminal you would see "123456".
I have added a print statement into the UART3 receiver logic. Before the received char is put into the UART buffer, it is also sent to the USB terminal.
void UARTX_IRQHandler(UART_HandleTypeDef *huart) {
if (controllerstatus.bluetooth_passthrough) {
PrintSerial_char(byteReceived, EndPoint_USB);
}
huart->pRxBuffPtr[huart->RxXferCount % huart->RxXferSize] = byteReceived;
huart->RxXferCount++;
}
Ok. I cheked it. Thats works. Flips UART is fine!
I bought HC-05, and now everything is work fine.
I have HC-06 manually programmed to: AT OK AT+UART +UART:38400,0,0 OK AT+NAME +NAME:cablecam OK AT+PSWD +PIN:"1234" OK AT+VERSION VERSION:3.0-20170609 OK
But it doesnt work for FLIP.