nakhonthai / ESP32APRS_T-TWR

APRS Software project device support LILYGO T-TWR Plus.
GNU General Public License v3.0
90 stars 15 forks source link

T-twr plus open edition support #17

Closed nmuntyanov closed 5 months ago

nmuntyanov commented 6 months ago

Hello.

THIS PR IS NOT PRODUCTION READY

I've found your project and interested in a lot. I have T-TWR open edition VHF version

So I took this https://github.com/OpenRTX/sa8x8-fw firmware, and wrote an abstraction layer for SA868 module this library (https://github.com/OpenRTX/OpenRTX/blob/master/platform/drivers/baseband/AT1846S_SA8x8.cpp) was taken as a reference

I've tested APRS tracker, voice tx/rx

So if you interested in this, we can try to extend it and make it fully workable

lyusupov commented 5 months ago

@nmuntyanov you may consider to contribute your efforts (if this PR merge will fail) into an alternative ESP32-S3 APRS project: https://github.com/Hamlabs/ArcticTracker-ESP32

ArcticTracker-ESP32 is a mature project (4 years old). It uses a hardware which is quite similar to the T-TWR Plus. The ArcticTracker-ESP32 author is friendly for porting the project on the T-TWR Plus as well: 1) https://github.com/Hamlabs/ArcticTracker-ESP32/issues/3 2) https://github.com/Hamlabs/ArcticTracker-ESP32?tab=readme-ov-file#future-work

image
lyusupov commented 5 months ago

@nmuntyanov use of exceptions (try...catch...) is a bad practice for Arduino/PlatformIO compliant libraries/sketches. https://forum.arduino.cc/t/try-catch/180063

Would you mind to alter your code with no use of exceptions ?

nmuntyanov commented 5 months ago

@lyusupov

@nmuntyanov use of exceptions (try...catch...) is a bad practice for Arduino/PlatformIO compliant libraries/sketches. https://forum.arduino.cc/t/try-catch/180063

Would you mind to alter your code with no use of exceptions ?

try-catch blocks was removed

lyusupov commented 5 months ago

@nmuntyanov

try-catch blocks was removed

LGTM, thank you!

separate build for each module?

IMHO, to split one firmware binary on two, (radio specific) ones - it is a good start !

However, if you will eventually decide to support both NiceRF and OpenEdition drivers within a single ESP32-S3 firmware binary by having 2 instances of 'class SA868' object and differentiate them by executing Version() call in runtime during the SA868 module probing sequence - that would be perfect !

lyusupov commented 5 months ago

@nmuntyanov I've pulled current 'master' of the ESP32APRS_T-TWR repo and rebult -

======================================== [SUCCESS] Took 87.03 seconds ========================================

Environment                   Status    Duration
----------------------------  --------  ------------
sa868_vhf_open_edition        SUCCESS   00:02:49.842
sa868_vhf_open_edition_debug  SUCCESS   00:01:27.028
========================================= 2 succeeded in 00:04:16.870 =========================================

My question is: no PIO build for SA868 with NiceRF firmware anymore ?

lyusupov commented 5 months ago

@nmuntyanov I've made an attempt to use the firmware with Open Edition module.

The OE firmware flashing procedure went fine and the device works with OpenRTX nicely.


However, there are issues with ESP32APRS_T-TWR, as follows -


Issue No.1

TRACKER function is enabled by default and makes an attempt to transmit every 10 seconds. It is worth to turn it back off by default.

image



Issue No.2

Missing radio module info and unable to store settings.

image
nmuntyanov commented 5 months ago

@lyusupov it was draft pr, not production ready, I have added a notice in description. I have just implemented driver for openEdition no backward compatibility yet.

nakhonthai commented 5 months ago

Thank @nmuntyanov for code sa8x8. I'm developing and testing. I have a concept that The flash code will be inserted into the ESP32. It can upload firmware by webservice.

462599 messageImage_1706761421682 messageImage_1706761362047