zs6buj / AntTracker

Antenna Tracker for tracking a moving model aircraft or drone with a small high-gain UHF or SHF antenna
GNU General Public License v3.0
141 stars 41 forks source link

Help getting serial telemetry on bluepill board #63

Closed brunoproza closed 3 months ago

brunoproza commented 4 months ago

Hi @zs6buj

Firstly I want to thank you for this project.

But I'm facing 2 problems (in this topic I'll only address 1, the other is with another card so I'll open another topic)

My senate. I designed the antenna to use with my Radiomaster TX16s

In the TX16s I placed a bluetooth module (hc05 master mode) through the UART output

In the antenna I use the bluepill board and I have another HC05 (slave mode).

I already did the test using the 2 hc05 and both are "talking"

also test connecting the cell phone via Bluetooth to the TX16S and I can read the telemetry using the telemetry viewer app

but for some reason the tracker doesn't understand this telemetry.

My link system is crossfire using mavlink, and my airplane run Inav.

see below that the board turns on, starts, identifies what has something in serial using baud rate 115200 (which is the connection speed between the 2 HC05) but after that the tracker screen shows "no telemetry" several times

18:55:11.473 -> Starting AntTrack version:2.20.04 18:55:11.473 -> Default I2C pins are defined in Wire.h 18:55:11.473 -> Display support activated: Landscape 18:55:11.473 -> 64x128 text_size=1 char_w_px=6 char_h_px=8 scr_h_ch=8 scr_w_ch=21 18:55:11.515 -> Target Board = 1 STM32F1xx 18:55:11.515 -> Serial Telemetry In 18:55:11.547 -> Selected protocol is AUTO 18:55:11.547 -> headingsource = 2 FC Compass 18:55:11.579 -> Testing Servos 18:55:22.618 -> Serial port rx pin -61 is IDLE_HIGH, regular rx polarity retained 18:55:22.618 -> autoBaud - sensing pin 195 18:55:22.890 -> Serial input baud rate detected is 115200 b/s

Any idea what might solve it?

in advance, thank you very much!

zs6buj commented 4 months ago

Hi Bruno, I suggest you select the crsf or mavlink protocol, and don't use Auto. Also try selecting a fixed baud rate. You could also activate any of the debug macros that look potentially helpful. I can't remember the exact ones right now.

I'm travelling for the next few days, and unfortunately won't always have internet.

brunoproza commented 4 months ago

Thank you, I will carry out tests with CRSF and Mavlink.

I'll also look at the debug options, and get back to you.

but I'm thinking about changing the project to ESP32 (but I'm having errors, I'll cover that in another topic soon)

brunoproza commented 4 months ago

I tested switching to protocol 9

define PROTOCOL 9 //CRFS/ELRS

but I get the error below

\config.h:873:22: error: conflicting declaration 'HardwareSerial inSerial'

\config.h:864:20: note: previous declaration as 'SoftwareSerial inSerial'

brunoproza commented 4 months ago

I tested switching to protocol 9

define PROTOCOL 9 //CRFS/ELRS

but I get the error below

\config.h:873:22: error: conflicting declaration 'HardwareSerial inSerial'

\config.h:864:20: note: previous declaration as 'SoftwareSerial inSerial'

Consegui resolver este erro.

when using Telemetry with CRSF I commented line 852 and 853 //#include
//SoftwareSerial inSerial(in_rxPin, in_txPin, inInvert); // RX=10, TX=11

The compile errors no longer appear, but I still have an error regarding flash From what I understand, this refers to the size of the program that would no longer fit in the STM32

c:/users/bruno.roza/appdata/local/arduino15/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\bruno.roza\AppData\Local\Temp\arduino\sketches\20211AD497C6B3EECE8F268C33C195DB/AntTrack.ino.elf section .text' will not fit in regionFLASH' c:/users/bruno.roza/appdata/local/arduino15/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 91080 bytes collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

I am using the F103CB board (or C8 with 128K) in the IDE

image

If this is really the problem I will try using another board.

Again, thank you for the project.

zs6buj commented 4 months ago

If I remember correctly, you can select a board variant with larger memory in the IDE, before you try to compile.

zs6buj commented 3 months ago

Stale?