Welcome, Guest
Username: Password: Remember me
In this category, you can discuss different ways of connection between EE radios and external Power Amplifiers.

TOPIC: ESP32 TCI to CAT bridge for SPE PA

ESP32 TCI to CAT bridge for amplifier 14 Dec 2021 14:13 #31

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
I finally got everything working now.

1. The ESP32 is talking to the SPE so the ATU is tracking the frequency changes successfully.
2. The SPE is turned on automatically when I turn the radio on in EESDR2/EESDR3. When the radio is turned off in EESDR2/3, the SPE is also shutdown.
3. The ESP32 will detect both EESDR2 and EESDR3 anywhere on the network using two different schemes (UDP broadcast and TCP scanning). Because of this, you do not need to enter the client address (although you still can) and you can operate from several different machines on the network.
The administrator has disabled public write access.
The following user(s) said Thank You: SM0JCA

ESP32 TCI to CAT bridge for amplifier 14 Dec 2021 18:50 #32

  • SM0JCA
  • SM0JCA's Avatar
  • OFFLINE
  • Posts: 36
  • Thank you received: 5
Congratulations, well done :hi: :good: :yahoo:
Erik -JCA
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 16 Dec 2021 13:51 #33

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
I have not modified the library to allow for telnet access. I can now telnet into the ESP32 and perform a bunch of diagnostics. This is necessary because the ESP32 occasionally becomes unresponsive. With this mod, I should be able to log in and find out what happened.
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 16 Dec 2021 16:13 #34

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
Typo: I have NOW modified the library...
danielwee wrote:
I have not modified the library to allow for telnet access. I can now telnet into the ESP32 and perform a bunch of diagnostics. This is necessary because the ESP32 occasionally becomes unresponsive. With this mod, I should be able to log in and find out what happened.

Additionally, I have put in some diagnostic code to catch situations where a connection is not closed properly and reset it. There were what I think might be a few bugs in the code - need to verify this but I've corrected it.
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 17 Dec 2021 03:36 #35

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
Hi Enzo, I found a couple of problems in the library that you may want to fix.

in the TCI::doCat() function - the res String is unconstrained in size. If there is garbage coming in the serial port (an unused one) for any reason, the string will just grow and grow and eventually wiping out the heap memory. I've added a check for the length just in case this happens. I found this because I noticed some memory leak that was resulting in unexplained failures after the unit has been operating for a while. If your serial input is clean, you will not see this problem. In my case, the unused Rig2 had spurious characters that was causing problems.

Also in the TCI::audioStop() and TCI::audioStart() functions, I think you might have missed out the enclosing curly brackets. Maybe you can confirm if this is a mistake or you meant for it to be like this?
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 17 Dec 2021 06:43 #36

  • iw7dmh
  • iw7dmh's Avatar
  • OFFLINE
  • Posts: 113
  • Thank you received: 63
Hello Daniel,
thenk you very much for the debug reports.
I addedd a reserve() statements for both rigbuffer variables and added the curly brackets on both the Audio methods.
I didn't experienced the problem you described on Serial2 port.
The new release is available for download at the following link www.dropbox.com/s/kgfx3baouu9m4hw/TCI-1-6.zip?dl=1

73' Enzo
iw7dmh
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 17 Dec 2021 11:25 #37

  • iw7dmh
  • iw7dmh's Avatar
  • OFFLINE
  • Posts: 113
  • Thank you received: 63
iw7dmh wrote:
Hello Daniel,
thenk you very much for the debug reports.
I addedd a reserve() statements for both rigbuffer variables and added the curly brackets on both the Audio methods.
I didn't experienced the problem you described on Serial2 port.
The new release is available for download at the following link www.dropbox.com/s/kgfx3baouu9m4hw/TCI-1-6.zip?dl=1

73' Enzo
iw7dmh

Added the length check on both buffers as well.
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 20 Dec 2021 04:19 #38

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
Thanks Enzo! I will try to incorporate but now I have made a lot of changes to your library. I have also added a Telnet server so that I can remotely log in and perform a bunch of diagnostics. I've also added OTA updates ability so I won't have to keep pulling the thing apart!
The administrator has disabled public write access.
The following user(s) said Thank You: iw7dmh

ESP32 TCI to CAT bridge for amplifier 01 Jan 2022 18:23 #39

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
Hi Enzo, I've noticed that the way the TCI library is set up currently, it tracks the receive frequency if the radio is in split mode. Have you considered having it reply with the TX frequency instead?
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 01 Jan 2022 19:03 #40

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
I have gone ahead and made the mod that you may want to consider - it works well and can prevent some unpleasant accidents. This is in the RTX::doIF function:-
getVfo(getSplitEnable()?1:0),		//p1
// getVfo(0),                //p1
Last Edit: 01 Jan 2022 19:04 by danielwee.
The administrator has disabled public write access.
The following user(s) said Thank You: iw7dmh

ESP32 TCI to CAT bridge for amplifier 01 Jan 2022 19:10 #41

  • iw7dmh
  • iw7dmh's Avatar
  • OFFLINE
  • Posts: 113
  • Thank you received: 63
Hi Daniel,

I suppose you are talking about one of the implemented CAT commands.
In such a case the the IF and FT commands are ithe only involved in the "Split" mode.
In particular the IF command send back the VFO-A frequency as per definition in the 480 Protocol manual.
If you need the TX (or VFO B) frequency you can modifiy the code in the String RTX::doIF(String cmd) function.
You should test the split with the getSplitEnable() function then return getVfo(0) o getVfo(1) if you need respctively VFO-A or VFO-B frequency.
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 01 Jan 2022 19:25 #42

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
Hi Enzo - you are correct. The library is actually answering correctly as per the Kenwood CAT definition. The problem really lies with the SPE amplifier since it only polls for IF? which does not contain the frequency for VFOB. Even when it knows that the radio is in split mode, it cannot change the bands unless it makes a separate FB? request, which it does not do. I have made the modification as a workaround the issue such that when split is enabled, it will simply return the VFOB frequency instead of the VFOA frequency. I hope this doesn't break anything else and for this application it should be okay I think.

Separately, I noticed that with the latest EESDR3 0.11.0 release, there seems to be some new TCI functions implemented.
The administrator has disabled public write access.
The following user(s) said Thank You: iw7dmh

ESP32 TCI to CAT bridge for amplifier 03 Jan 2022 19:57 #43

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
Today, I've finally automated the tedious task of tuning the SPE amplifier's ATU. This involved splitting the COM port for the SPE control so that I can make use of it while the remote Term software is still working. This is not absolutely necessary but definitely useful to have.

The Python script opens up a websocket to the EESDR that is running, and sets the frequency and power levels up for the tune according the the SPE's sub-band centers (found in the SPE manual). It then cycles through it while talking to the SPE through the split serial port, activating the TUNE on the SPE, then activating the TUNE on EESDR, and monitoring for completion of tuning (and a bunch of other stuff just to be safe). This will now automatically cycle through the bands and gets everything tuned without manual intervention. Laziness is great motivation.
The administrator has disabled public write access.

ESP32 TCI to CAT bridge for amplifier 04 Jan 2022 12:53 #44

  • danielwee
  • danielwee's Avatar
  • OFFLINE
  • Posts: 90
  • Thank you received: 15
I made a video showing the automated tuning of the SPE ATU with the EESDR. This is done using a Python script that talks to both the EESDR client and the SPE amplifier, while the TCI bridge is updating the SPE with the frequency changes of the EESDR.


Last Edit: 04 Jan 2022 12:53 by danielwee.
The administrator has disabled public write access.
Time to create page: 0.099 seconds