ser2net with multiple software uarts

Moderators: grovkillen, TD-er, Stuntteam

Message
Author
miim
New user
Posts: 5
Joined: 20 Mar 2016, 09:53

ser2net with multiple software uarts

#1 Post by miim » 20 Mar 2016, 10:23

Hello,
I would like to request to extend the option SER2NET plugin into the ESP-Easy firmware with multiple software uart.
Multiple software uart are available in arduino and have been ported to eps8266 here: softuart.h https://github.com/plieningerweb/esp8266-software-uart
SER2NET should provide one different TCP port per uart.

Application use case:
Connect several slow serial devices to an application server via ser2net.
I am using esp-easy with ser2net with one power meeter sending its status every second; I would like to connect the second power meeter to the same board.

---
A second improvement would be to allow 2 or more connection to the same ser2net port( nice to have)
benefit: multiple application server can share the same serial device

---
A third improvement would be to introduce a timeout for the tcp connection; after the timeout the port is closed.
benefit: Increased stability in case one application server loses the connection and reconnects.

Thanks in advance, I really appreciate your effort.
Best regards
miim

miim
New user
Posts: 5
Joined: 20 Mar 2016, 09:53

Re: ser2net with multiple software uarts

#2 Post by miim » 26 Mar 2016, 00:05

Dear all
I think I improved the robustness of the ser2net.
problem: If the client loses temporary the connection, the ser2net server is blocked and no reconnection possible, without a reboot.

Please consider adding following line to _P020_Ser2Net.ino after line 192

Code: Select all

 else ser2netClient.stop(); 
zipped patched file is enclosed below

best regards
miim
You do not have the required permissions to view the files attached to this post.

miim
New user
Posts: 5
Joined: 20 Mar 2016, 09:53

Re: ser2net with multiple software uarts

#3 Post by miim » 14 Apr 2016, 21:30

Dear all
the change in release R99 has brocken _P020_Ser2Net.ino
- SaveTaskSettings(event->TaskIndex);
- LoadTaskSettings(event->TaskIndex);
reintroducing the 2 lines fixes the issue.

other topic:
I wrote a quick and dirty version of software uart: _P030_swser.ino
it can be combined with _P020_Ser2Net.ino and you have 2 serial interfaces connected to the network on 2 different ports
it is still very buggy; it requires a restart each time you change its setting.
you need the last version of https://github.com/plerup/espsoftwareserial
therefore in _P030_swser.ino you cannot configure everything: following is fixed
(8) data bits, no (N) parity bit, and one (1) stop bit


question for @ExpertDevelopers how and where shall I contribute? just post in the board or add some code proposal directly to git?
b.r.
miim
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Anthropic Claude Bot [bot] and 0 guests