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
155 stars 42 forks source link

Config for Auto Connect Bluetooth #51

Closed kusnendar closed 1 year ago

kusnendar commented 2 years ago

Hi! now i use board ESP32. Where is configurator in "config.h" to ESP32 auto connect with my bluetooth module HC-5?

My bluetooth module HC-5 is "kusnendar fpv" & password: 1234 My modulw HC-5 transmitt telemetry mavlink from openHD

zs6buj commented 2 years ago

Hi kusnendar

Do you know how to setup ESP32 in Arduino IDE ( or PlarformIO)? If you do, I can make up a config.h that should work. But first you need to install the esp32 core onto the IDE. https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/

Then you need to select the correct variant in the ide:

image

You need to tell me which esp32 board you have, with maybe a picture.

zs6buj commented 2 years ago

I could also compile a binary for you, if you know how to flash a binary with the espressif flash tool

zs6buj commented 2 years ago

I leave on a long flight on Monday/Tuesday

kusnendar commented 2 years ago

I could also compile a binary for you, if you know how to flash a binary with the espressif flash tool

This my esp32 Screenshot_20220902_151158

zs6buj commented 2 years ago

Looks like an ordinary Dev Module clone. Are you expecting Mavlink telemetry in?

zs6buj commented 2 years ago

Ok, see that you mentioned mavlink above. Do you plan to use a compass and / or GPS module attached on the tracker?

Also, (1) you can determine HOME location by pressing a button on the ESP32, or (2) you can determine HOME when you arm your drone/plane.

1 or 2?

Also, do you have/want an OLED display attached? Like this:

image

kusnendar commented 2 years ago

Ok, see that you mentioned mavlink above. Do you plan to use a compass and / or GPS module attached on the tracker?

Also, (1) you can determine HOME location by pressing a button on the ESP32, or (2) you can determine HOME when you arm your drone/plane.

1 or 2?

zs6buj commented 2 years ago

config.txt

You need to change the extension from .txt to .h

kusnendar commented 2 years ago

config.txt

You need to change the extension from .txt to .h

Do not input password my bluetooth HC-05? Password is 1234

zs6buj commented 2 years ago

AntTrack.ino.esp32.zip

binary is in the zip file. I don't recall setting up a pw for BT, but if it asks let me know.

kusnendar commented 2 years ago

config.txt

You need to change the extension from .txt to .h

2 more question

  1. Do this right for setup no compass & GPS module attached on the tracker? but use bluetooth module

header

  1. How to flash bia bin file? do you have tutorial?
kusnendar commented 2 years ago

do this right for my parameter if build new config?

header

zs6buj commented 2 years ago

Yes, it means that it uses the plane's compass to orientated the tracker when you start. So you point the plane in the same direction the tracker is facing.

zs6buj commented 2 years ago

https://m.youtube.com/watch?v=oLzR5gjZKJY

kusnendar commented 2 years ago

config.txt

You need to change the extension from .txt to .h

LAST QUESTION

I want try flash via Arduino IDE, do my parameter is right before flashed? parameters

also i not use OLED display, do your config.txt has change for no OLED Display?

zs6buj commented 2 years ago

It looks ok but I'm on my phone

kusnendar commented 2 years ago

It looks ok but I'm on my phone

also i not use OLED display, do your config.txt has change for no OLED Display?

zs6buj commented 2 years ago

I disabled display

kusnendar commented 2 years ago

I disabled display

I Use ESP32, where is PIN for azimuth & elevator servo?

zs6buj commented 2 years ago

define azPWM_Pin 32

define elPWM_Pin 33

See below for Dev Module pins

if (ESP32_Variant == 1) // ESP32 Dev Module

uint8_t in_rxPin = 27; // uart1

define in_txPin 17

uint8_t gps_rxPin = 13; // uart2 for tracker box GPS if applicable

define gps_txPin 4

bool rxInvert = true; // ONLY FOR FrSky S.Port, NOT F.Port, NOT MAVLINK

define SetHomePin 34 // LOW == pushed

define StatusLed 25 // Off=No good GPS yet, flashing=good GPS but home not set yet, solid = ready to track

define BuiltinLed 99

define azPWM_Pin 32 // azimuth servo (can't be 34,35,36,39 because input only !!)

define elPWM_Pin 33 // elevation servo(can't be 34,35,36,39 because input only !!)

define BuiltinLed 02 // PB1

kusnendar commented 2 years ago

after esp32 flashed always rebooting flashed

kusnendar commented 2 years ago

bloetooth not pairing:

https://youtu.be/ZL7uy35cXKw

zs6buj commented 2 years ago

Can you please show me the flashing process.

I found this regarding BT password: https://electronics.stackexchange.com/questions/594094/esp32-classic-bluetooth-set-password

so maybe I can look at it after I arrive at my destination next week.

I'm packing up equipment today, and travel tomorrow, but I'll have my tablet and phone

kusnendar commented 2 years ago

Can you please show me the flashing process.

I found this regarding BT password: https://electronics.stackexchange.com/questions/594094/esp32-classic-bluetooth-set-password

so maybe I can look at it after I arrive at my destination next week.

I'm packing up equipment today, and travel tomorrow, but I'll have my tablet and phone

I don't use bluetooth because it's difficult,

then I use serial port.

And it works when I select Board: DOIT DEVESP32 DEV KIT1.

do my flashing result successful? serial port

zs6buj commented 2 years ago

Yes it looks like your flashing effort was successful.