positron96 / LocoNetControlStation

An ultimate model railroading control station based on ESP32, with LocoNet, WiFi, WiThrottle, DCC
MIT License
19 stars 5 forks source link

lbServer and Rocrail #4

Closed lucadentella closed 3 years ago

lucadentella commented 3 years ago

Hi!

I'm trying to use the included lbServer with Rocrail.

The esp32 devboard has IP address 192.168.1.4 and I can see the mDNS advertise (_lbserver._tcp.)

This is my configuration in Rocrail:

<digint lib="loconet" iid="lbServer" device="com1" host="192.168.1.4" port="1234" localip="" swtime="250" bps="19200" flow="no" ctsretry="1000" sublib="socket" fbmod="0" fastclock="true" absent="false" stress="false" guid="6045CBC7069B20210406183454540000" libpath=".">

When I run rocrail, I can see the connection attempt:

20210406.184037.715 r9999W lnlbsr lbtcp 0040 trying to connect to 192.168.1.4:1234...

and the corresponding log in the serial monitor:

[I][LbServer.h:41] operator()(): onConnect: New client(3FFD3EFC): 192.168.1.5

but nothing more... the connection seems "pending" forever...

Thanks!

lucadentella commented 3 years ago

In addition: I made a test with PanelPro (JMRI), with a similar configuration (LocoNet over TCP). Again when I run the software I can see the incoming connection:

[I][LbServer.h:41] operator()(): onConnect: New client(3FFD3EBC): 192.168.1.5

but the communication is not established:

Thanks again!

lucadentella commented 3 years ago

... to complete my tests: with Engine Driver (android app using WiThrottle protocol) I can control locomotives, power, turnouts... so with WiThrottle the command stations works fine!

positron96 commented 3 years ago

Hi and thanks for report. Yes, you are correct, for some reasson LbServer does not work and I see the same behavior with JMRI. I'll look into it in the next few days. Meanwhile, you can try previous version made before I rewrote LbServer with AsyncTCP library. Probably this one would work: https://github.com/positron96/LocoNetControlStation/tree/81a7c9c0d75cc1c3b0dbd959d8f647bf62077d4d

positron96 commented 3 years ago

Should be working now.

lucadentella commented 3 years ago

Hi! Yes, it works, thanks!