As the title says... Chat on...

User avatar
By Ripper121
#29019 I wrote a UART TCP Bridge:

Code: Select alluart.setup(0,115200,8,0,1)
file.remove('config.lc')

sk=net.createConnection(net.TCP, 0)
 sk:on("receive", function(sck, c) uart.write(0,c) end )
 sk:connect(1234,ipTCP)

uart.on("data", 1,
      function(data)
        sk:send(data)       
    end, 0)


Is there a way to see if the Connection to the server is lost and then try to reconnect?
User avatar
By Doodieb
#29088 I have solved this Problem only by sending a heartbeat character every second. Once the Server or the Client finds the heartbeat character missing, it reconnects.

If there are other Solutions -> I would be also happy to hear.