Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration not loading into JMRI properly #5

Closed
ggee opened this issue Aug 12, 2020 · 10 comments
Closed

Configuration not loading into JMRI properly #5

ggee opened this issue Aug 12, 2020 · 10 comments

Comments

@ggee
Copy link
Collaborator

ggee commented Aug 12, 2020

Node information in JMRI is invalid.

image

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

image

@ggee
Copy link
Collaborator Author

ggee commented Aug 12, 2020

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
Copy link
Owner

manu-fwi commented Aug 12, 2020 via email

@ggee
Copy link
Collaborator Author

ggee commented Aug 12, 2020

Yes, both have 4.20.

@ggee
Copy link
Collaborator Author

ggee commented Aug 14, 2020

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
Copy link
Owner

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

@manu-fwi
Copy link
Owner

I commited a fix for that, hopefully.

@ggee
Copy link
Collaborator Author

ggee commented Aug 19, 2020

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:

  • opening and closing the Network Tree does not clean up.
  • restarting JMRI returns the list to a good state.

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

@manu-fwi
Copy link
Owner

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

@manu-fwi
Copy link
Owner

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

@manu-fwi
Copy link
Owner

I think this is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants