manu-fwi / openlcb-gateway

Gateway from openlcb to cmri (and more)
GNU General Public License v3.0
3 stars 1 forks source link

Configuration not loading into JMRI properly #5

Closed ggee closed 4 years ago

ggee commented 4 years ago

Node information in JMRI is invalid.

image

When trying to 'Open Configuration dialog', nothing appears.

image

ggee commented 4 years ago

Update 1: Interesting find. This problem only occurs if I open JMRI on the RPi. If I open JMRI on my Windows PC and connect to the gateway, all looks fine.

image

Update 2: Well, I crashed the gateway and when I restarted and refreshed the node list, both JMRI show garbled content.

image

manu-fwi commented 4 years ago

Do you have the same versions on both?

Le mer. 12 août 2020 à 06:39, ggee notifications@github.com a écrit :

Update 1: Interesting find. This problem only occurs if I open JMRI on the RPi. If I open JMRI on my Windows PC and connect to the gateway, all looks fine.

[image: image] https://user-images.githubusercontent.com/4544293/89975182-1ad79400-dc33-11ea-8d9a-dd81f564f01a.png

Update 2: Well, I crashed the gateway and when I restarted and refreshed the node list, both JMRI show garbled content.

[image: image] https://user-images.githubusercontent.com/4544293/89975601-28d9e480-dc34-11ea-811d-c7ad404c91d3.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/manu-fwi/openlcb-gateway/issues/5#issuecomment-672568216, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3PEQKIBHO6IUROXTNOYOLSAIMGZANCNFSM4P37XT2Q .

ggee commented 4 years ago

Yes, both have 4.20.

ggee commented 4 years ago

This doesn't seem to be specific to RR-duino. I tried the cmri_net_serial and see the same problem. When I look at the stdout of the openlcb_gateway.py, it shows this. I don't know the protocol, so I can't tell if it is correct or not.

sending poll to cpNode (add= 101 )
new msg= :X19490370N;
event/frame transferred by server =  b':X19490370N;'
event/frame transferred by server =  b':X19170132N020112AAAAAA;'
event/frame transferred by server =  b':X19170132N020112AAAAAA;'
Sent---> :X19170132N020112AAAAAA;
new msg= :X19170370N020112C0177A;
event/frame transferred by server =  b':X19170370N020112C0177A;'
new msg= :X19DE8370N0132;
sent SNIR Reply
data= b'n gate'
data= b'way\x00te'
data= b'st\x001.0'
data= b'\x001.0\x00\x02'
data= b'gw1\x00ga'
data= b'teway-'
data= b'1'
---> b':X19A08132N04707974686F;'
---> b':X19A08132N6E2067617465;'
---> b':X19A08132N776179007465;'
---> b':X19A08132N737400312E30;'
---> b':X19A08132N00312E300002;'
---> b':X19A08132N677731006761;'
---> b':X19A08132N74657761792D;'
---> b':X19A08132N31;'
manu-fwi commented 4 years ago

Hmm it looks like the last string is always missing the terminal null character.

manu-fwi commented 4 years ago

I commited a fix for that, hopefully.

ggee commented 4 years ago

I can still reproduce.

  1. gateway, net_serial and JMRI running
  2. In JMRI, open Network Tree and Refresh. All looks good.
  3. Open the configuration dialog of a node in JMRI and try and 'Write' a 'Node Name'.
  4. This will cause the gateway and net_serial to crash.
  5. Do not close JMRI.
  6. Restart gateway and net_serial.
  7. In JMRI, click the Refresh again. Node list content should look messed up.

NOTES:

So not sure if this is a JMRI issue or a sync phase issue.

manu-fwi commented 4 years ago

I have a fix for the write that causes a crash but I need some input from the openlcb guys. Stay tuned.

manu-fwi commented 4 years ago

OK can you test the latest git, it should be fixed!

manu-fwi commented 4 years ago

I think this is fixed now.