Chat freely about anything...

User avatar
By luca.gamma
#46866 Thanks for your reply. Yes, a customizable timeout could be a good idea in a future release. At this time it's ok to leave 30s on the control port because is quite fast to redo the command (in a Linux terminal) and the TCP client can be also done with netcat (e.g. nc -C 192.168.1.101 23 then ^C to terminate, just in case) instead of telnet.

On the other side the problem is sending data from the UART to the TCP bridge. I tried different terminals (minicom, PuTTY) but the problem is still the same. From the TCP client to the UART characters are sent when pressing the RETURN key (or ^J or ^M) and this is correct. Form the UART to the TCP client characters are sent as they are typed but the first type 'a' sends 'a', the second type 'b' sends 'ab', the third type 'c' sends 'abc' and so on... It looks like a buffer issue, don't know if any one has a similar problem or I'm doing something wrong...
User avatar
By eriksl
#46911 It sounds like you found a bug there :o I must say I haven't tried the UART bridge for a long time, development focusses on adding sensors and lcd's.

I will be looking at it shortly, I am almost done with the latest addition, LCD over i2c I/O expander.
User avatar
By eriksl
#47192 I think I found the bug. It only needs testing, which I will do tomorrow, no more time left.

I also have to finish the new release with LCD over i2c support, it still needs some testing and documentation adaptation, so if you want to use te release image, you will have to need a few days patience.

I still, very humbly, think the universal I/O bridge has the best UART bridge, in terms of speed and reliability, because it fully makes use of all available hardware UART support (queue, interrupts) and it also fully complies to the SDK requirements (don't use the CPU for more than a few milliseconds before relinguishing control to the SDK code).

So this bug is indeed a bit shameful :o It crept in during one of the major code clean-up / overhauls I'm afraid.

If you build the image yourself, you can try this patch:

Code: Select alldiff --git a/user_main.c b/user_main.c
index 97a97e7..be86e10 100644
--- a/user_main.c
+++ b/user_main.c
@@ -158,6 +158,7 @@ irom static void config_wlan(const char *ssid, const char *passwd)
 
 irom static void tcp_data_sent_callback(void *arg)
 {
+   string_clear(data.send_buffer);
    data.send_busy = false;
 
    // retry to send data still in the fifo