ESP8266 based Mobile Rocnet Node

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 24.04.2019, 13:54

I was thinking perhaps 230 data bytes?
There are 10 Address/protocol bytes and 230 data bytes would still keep the overall message length under 255 in case that is a limit somewhere..
:beer:
Dagnall

rjversluis
Site Admin
Posts: 42015
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: ESP8266 based Mobile Rocnet Node

Post by rjversluis » 24.04.2019, 14:03

Hi Dagnal,

I just increased it from 110 to 250. (113 = 3 bytes header, 110 bytes data)

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 24.04.2019, 14:22

Fantastic.. Many thanks..
I will get the nightly Rocrail revision tonight and try it out tomorrow.

:rr_for_ever:
D

drblack
Posts: 81
Joined: 10.05.2008, 13:02
Location: Quickborn, S-H

Re: ESP8266 based Mobile Rocnet Node

Post by drblack » 24.04.2019, 19:31

Hi Dagnall,

even though Rob extended the MSG length maybe it is still of interest for you:
https://wiki.rocrail.net/doku.php?id=us ... rocdisplay
Please let me know what else you need to know.

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 24.04.2019, 20:16

Henning, thanks for that reference. I have just added scrolling, but with different syntax! Perhaps we need a committee to agree the display protocol standard! :wink:
I am looking forward to checking out longer messages tomorrow and hope it all works well!
Dagnall

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 25.04.2019, 13:08

Rob many thanks for the modification.
I have tested with some long messages.. using text ending with numbers to save counting.
QUESTION...:?: Larger messages do not "visibly" truncate in the controller window.. was that intended? :?: .

I have seen some crashes :( .. but they may be my system. I am not certain that the RAsPi mosquitto is as stable as a windows one. Also my Cbus was off line when the crashes happened, but switching it on seemed to make the system more stable.

I will do more tests to see if I can get it "reliably" failing.. But attached are some traces.

Dagnall

My TEST Details..
My test message with 249 characters is shown in Controller as (note end of message has text '789{P} to get to 249 characters)

Code: Select all

12:23:27 set display 50:60:1 to  {F0}A{T0}Some  Long Messages{L1}B{L1T0}Line B 1234567890{L2}C{L2T0}text 123456789{}ABCDEFGHIJKLMNOPQRSTUVWXYZ {L3}D{L3T0}abcdefghijklmnopqrstuvwxyz{L4}E{L4T0} text to test {L5}E{L5T0}more text text  text {L6}F{L6T0}some more  {L7}G{L7T0}123456789{P}  len=249
251 and 252 characters report 250 but seem the same..

Code: Select all

12:25:24 set display 50:60:1 to  {F0}A{T0}Some  Long Messages{L1}B{L1T0}Line B 1234567890{L2}C{L2T0}text 123456789{}ABCDEFGHIJKLMNOPQRSTUVWXYZ {L3}D{L3T0}abcdefghijklmnopqrstuvwxyz{L4}E{L4T0} text to test {L5}E{L5T0}more text text  text {L6}F{L6T0}some more  {L7}G{L7T0}12345678901{P}  len=250
..
12:26:39 set display 50:60:1 to  {F0}A{T0}Some  Long Messages{L1}B{L1T0}Line B 1234567890{L2}C{L2T0}text 123456789{}ABCDEFGHIJKLMNOPQRSTUVWXYZ {L3}D{L3T0}abcdefghijklmnopqrstuvwxyz{L4}E{L4T0} text to test {L5}E{L5T0}more text text  text {L6}F{L6T0}some more  {L7}G{L7T0}123456789012{P}  len=250
Using my monitor, I can see that the message is actually truncated at 250.. so that works fine!

I have seen some server crashes immediately after sending messages over 250 characters. This only seemed to happen when my CBUS system was off line (traces attached). A repeat with the CBus online seems more stable, but there may be some interaction??

I will explore some more and let you know when I find something definitive.

:coding: :beer: :coding: :rr_for_ever:
You do not have the required permissions to view the files attached to this post.

rjversluis
Site Admin
Posts: 42015
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: ESP8266 based Mobile Rocnet Node

Post by rjversluis » 25.04.2019, 13:29

The CBUS Library also processes Text.
The number of CAN Frames send for text is text length divided by 4;

rjversluis
Site Admin
Posts: 42015
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: ESP8266 based Mobile Rocnet Node

Post by rjversluis » 25.04.2019, 13:52

Hi Dagnall,

can you attache your plan.xml with the long text so I can test with CBUS?

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 25.04.2019, 14:19

I have not seen any issues that might be related to a /4
And the code is currently running quite stably.. :thumb_up: Which is nice, but irritating when I have seen errors before. :mad:
( I may switch off the CBUS and see if I can get the errors again..)

I have attached my "test" workspace. This is dedicated to sending messages to (mainly) MQTT Node addr 50.
The circular buttons are in general tests of Display options. The square ones trigger my WiRocS internal sounds.
There is a set of "points/sensors" at the top that allows me to do simple switch / sensor tests.
I have placed a BIG button and Text box to show you the button that sends the LONG display message.
This simply runs act1(unf) which is where the text parameter I use is held. For simplicity I am not using variables in this code.
The trace files in the zip may have "rotated" from this morning so probably do not have any server crash data..
I am seeing some "mqtt broken socket" in the server window, but it does not seem to stop anything working..

Have I sent everything you need?

Cheers
D
You do not have the required permissions to view the files attached to this post.
Last edited by Dagnall on 25.04.2019, 14:21, edited 1 time in total.

rjversluis
Site Admin
Posts: 42015
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: ESP8266 based Mobile Rocnet Node

Post by rjversluis » 25.04.2019, 14:21

Hi Dagnall,

if the crash cannot be reproduced with this data, it won't help.

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 25.04.2019, 14:22

rjversluis wrote:
25.04.2019, 14:21
Hi Dagnall,

if the crash cannot be reproduced with this data, it won't help.
( I may switch off the CBUS and see if I can get the errors again..)

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 25.04.2019, 14:34

Dagnall wrote:
25.04.2019, 14:22
rjversluis wrote:
25.04.2019, 14:21
Hi Dagnall,

if the crash cannot be reproduced with this data, it won't help.
( I may switch off the CBUS and see if I can get the errors again..)
CBUS off and it still works fine!.. tested with text lengths 248, 249, 250, 251,252,253 (all truncate at 250, but no crashes..)

I definitely managed to capture some crashes earlier, but the traces simply stopped, so nothing useful to help debug.
I agree that without any repeatable failures, nothing can (or needs to be ) be done.
Thanks as usual!

D
IMG_2858.JPG
You do not have the required permissions to view the files attached to this post.

rjversluis
Site Admin
Posts: 42015
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: ESP8266 based Mobile Rocnet Node

Post by rjversluis » 26.04.2019, 14:08

Hi Dagnall,

a bit of topic, but could be of interest:
viewtopic.php?f=94&t=17871
In short:
In case Rocrail crashes, or the Mosquitto connection got lost, you will be informed over the rocnet/ht with the 'Last Will'.

Code: Select all

<exception text="abend"/>
abend=Abnormal End

Dagnall
Posts: 278
Joined: 15.05.2015, 14:41

Re: ESP8266 based Mobile Rocnet Node

Post by Dagnall » 29.04.2019, 12:53

Not sure what you mean by " you will be informed over the rocnet/ht with the 'Last Will'."
But Rocrail just crashed three times in a row when I pressed my "large" message button.
This action (sucessfully) sends a (Truncated) message to my displays, but then crashes rocrail.
Crashed three times in a row..
The last Traces before the crashes are 001, 003 and 009 all seem to end with

Code: Select all

r9999c 0000277C OrocNet  1022 set display 50:60:1 to "{F0w15}A{T0}Some  Long Messages{L1}B{L1T0}Line B 1234567890{L2}C{L2T0}text 123456789{}ABCDEFGHIJKLMNOPQRSTUVWXYZ {L3}D{L3T0}abcdefghijklmnopqrstuvwxyz{L4}E{L4T0} text to test xxx{L5}E{L5T0}more text text  text {L6}F{L6T0}some more  {L7}G{L7T0}1234567890123{}" len=250
20190429.124414.987 r9999I cmdr044D OText    0683 broadcast text [{F0w15}A{T0}Some  Long Messages{L1}B{L1T0}Line B 1234567890{L2}C{L2T0}text 123456789{}ABCDEFGHIJKLMNOPQRSTUVWXYZ {L3}D{L3T0}abcdefghijklmnopqrstuvwxyz{L4}E{L4T0} text to test xxx{L5}E{L5T0}more text text  text {L6}F{L6T0}some more  {L7}G{L7T0}1234567890123{}]
20190429.124414.989 r9999c rnwriter rnmqtt   0160 RocNet Group: 12
Hope you can replicate this!.
D
You do not have the required permissions to view the files attached to this post.

rjversluis
Site Admin
Posts: 42015
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: ESP8266 based Mobile Rocnet Node

Post by rjversluis » 29.04.2019, 13:16

Hi Dagnall,

OK, I can reproduce it...
:coding:

Post Reply

Return to “RocNet”