Paco's GenLi + NanoX-S88 and Rocrail

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Paco's GenLi + NanoX-S88 and Rocrail

Post by cwichmann » 13.10.2008, 18:47

Hi lenz fans,

because i have fun while soldering i build Paco's NanoX-S88 and GenLi.
First of all: Everything works ... mostly :wink:
Sensors, programming track, loco's switches, no problem
I connected the GenLi with the com port of my Rocrail server, 9600 bd, cts, 4 Sensor boards, programming track.
But sometimes it seems that Rocrail and GenLi have a communcation problem. The logfile shows:
  • 20081013.191230.621 r9999I main OApp 0690 MemOp.getAllocCount() = 34393
    20081013.191231.625 r9999I main OApp 0690 MemOp.getAllocCount() = 34389
    20081013.191232.137 r9999I transact OLenz 1099 Command not known.
    20081013.191244.793 r9999I transact OLenz 1099 Command not known.
    20081013.191246.525 r9999c cmdr0854 OLenz 0814 Power ON
    20081013.191246.573 r9999I transact OLenz 1084 Normal operation resumed.
    20081013.191246.574 r9999I transact OLenz 0395 Initializing sensors ... please wait!.
After these "command not known" stuff the sensors stuck for some seconds and the loco doesn't receive any command. I attached a Lokmaus instead of the Li to NanoX and everything works without errors.

I'm a totally newbie to lenz protokoll so i can't decide if the problem is on the Li side or on the rocrail side or on my side :wink:

Can anyone assist me a little bit?
thanks in advance
You do not have the required permissions to view the files attached to this post.

ron&bram
Posts: 2460
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Post by ron&bram » 13.10.2008, 19:48

Hi Christian,

First of all;
i can't decide if the problem is on the Li side or on the rocrail side or on my side
I'll try to be on your side.

The command not known is the translation of lenz.dll/so receiving the hex codes 0x61 0x82:

Code: Select all

else if (in[0] == 0x61 && in[1] == 0x82){
  TraceOp.trc( name, TRCLEVEL_INFO, __LINE__, 9999, "Command not known.");
This is a string send from the lenz command station, part of lenz xpressnet protocol manual (I attached it as zip file so you can read it when needed, and since you are the administrator, you can also remove it if I unwillingly violated some -copyright- rules):
2.1.10 Instruction not supported by command station
Format:
Call Byte Header byte Data Byte 1 X-Or-byte
Binary: P11A AAAA 0110 0001 1000 0010 X-Or-byte
Hex: P+0x60+GA 0x61 0x82 X-Or-byte
Decimal: P+96+GA 97 130 X-Or-byte
Description:
If an instruction received by the command station is not supported, then the command station sends this
answer back. Likewise, this response is sent if the request was not allowed in the current context. For
example, the PC will receive this response after sending a Direct Mode CV read request (CV mode) when
the command station is not currently in service mode.
So I think that rocrail sends a command that is not understood by the nano firmware (it is not garbled up, that should not produce this message)

Best regards,
Ronald


P.S.: The XPressNet protocol is found in the wiki, http://wiki.rocrail.net/doku.php?id=lenz-en, or directly at Lenz.
(To save web space.)
Regards, Rob.

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

Post by rjversluis » 13.10.2008, 19:55

Hi Christian,

congratulations to the nice work and welcome to the world of Command Stations!

;-)
20081013.191232.137 r9999I transact OLenz 1099 Command not known.
It looks like the NanoX does not have implemented all XPressNet commands, but which command you only can find out with byte level traces switched on.

ron&bram
Posts: 2460
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Post by ron&bram » 13.10.2008, 21:54

Hi Christian,

You could try a port sniffer program. When I was debugging with the elite, I used a 30 trail program of a windows program that logs all traffic between a windows program and a serial port. When the 30 trail period (and my headaches with the elite) had passed, I deleted the program and I forgot the exact name and web address, but some googling will certainly give an idea.

Best regards,
Ronald

anam
Posts: 65
Joined: 25.02.2008, 21:41
Location: Santhia' - ITALY

Post by anam » 13.10.2008, 22:07

Hi Christian,

I build the NanoX + genLi and I'm testing it under Rocrail. In fact Rocrail shows many message 'Command not know', but I have no problems moving locos.

I think you already searched in Paco's forum, where Paco said

in the rocrail.ini you have to change the digint definition with this:

digint iid="NanoX" lib="lenz" device="com1" fbmod="2" bps="9600"

set the apropiate com port, and use the lenz.dll v.1.1.0 or newer.


Are you sure the two MAX485 work correctly?

Regards
Daniel

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Post by cwichmann » 14.10.2008, 10:23

Good Morning Rocrailers,

thanks a lot for your replies. It's good to feel that i'm not alone :wink:
I did further tests with Linux and that XP-thing from Billyboy. The behaviour is the same.
One correction: The Loco does not stuck at every "command not known". The loco ( and every acc. decoder) stuck after a shortcut or after i powered off and on again. The decoders does not react on every command for about 30 sec. During this Time the LED1 (input buffer is full) flickers. In normal conditions it is off.

Another point are the Sensors. it taks some seconds until a a sensor lights in Rocgui. Sometimes they stuck for more than one minute. I changed the S88 board without success, the same behavior with ORF-1, LDT und Tams.

Yet another thing is the shortcut dealing. If there is one it is not displayed in Rocrail and the Track power Button is stil pressed. Is this due to the Lenz protocol?

@Ronald:
Yes there are some commands sent that NanoX does not recognize. But i think that is not a problem. In my eyes the problem is with GenLi, see above: Input buffer is full. I think that means that GenLi can't send data to NanoX

@Rob:
I don't think that i arrived in the world of command stations. It took Tobbe and me so much effort to develope ORD. Be sure that I stay with it. I build NanoX mostly because of the Booster. Maybe we can use it. It works great.

@Daniel
Yes i visited paco's Forum and found his post but that does not change anything.
Especially the fbmod function has a funny behavior. It does not matter if you set it to 0,1,2,3,4 or whatever. All 30 Sensors work in the way i described above.
Btw. Did you find a search button in his forum? I had to read the hole board.
Did you attach S88 boards to your NanoX? What is the behavior.
I think there must be something wrong with the Max485. But i didn't find any short or something else. The data could not been sent to Nano X sometimes.

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Post by cwichmann » 14.10.2008, 10:42

Hi All,

i posted the same question in Pacos Forum. Maybe there is also somebody who can help: http://boards4.melodysoft.com/app?ID=fo ... s&msg=2989

ron&bram
Posts: 2460
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Post by ron&bram » 14.10.2008, 12:36

Christian,

I think you are right:
I think that means that GenLi can't send data to NanoX
but remember that the nano-x is controlling the communication, it has to give the genli a transmission window for the genli to be able to send data. The communication betwen xpressnet devices is described in some detail on the first pages of the lenz manual that I uploaded with a previous post. It could therefore also be that the problem is not with the genli but with the nano-x.
I have a mini cs (hornby select) that, when only connected over the xpressnet works as a workaround controller from which loco/switch commands are send to the cs. If you want, I can lend it to you so that you can check the xpressnet communication on the nano side (but I fear that it will not bring much).

Best regards,
Ronald

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Post by cwichmann » 14.10.2008, 13:45

Hi Ronald,
but remember that the nano-x is controlling the communication
yes but if the problem is on the NanoX side why does the Lokmaus work without any problems? I have no xpressnet splitter or hub so i can attach either the Li or the Rocolocomaus. Maybe i'll etch a pcb for such a splitter this evening or tomorow or later.
If you want, I can lend it to you so that you can check the xpressnet communication on the nano side
Thanks for your offer but a package to germany and back to netherland is as expensive as a NanoX :wink: But it would be great if i could send you the Li for testing with your CS. It's small enough to fit in a letter.
But first i will wait some days if there will be a response in Paco's forum.

jeanmichel

Post by jeanmichel » 14.10.2008, 15:21

Hi Christian,

there is no Problem about the two

Code: Select all

20081013.191232.137 r9999I transact OLenz 1099 Command not known.
20081013.191244.793 r9999I transact OLenz 1099 Command not known. 
these are Commands to the LI-* from lenz to find out the Version.

Or are they appear more often?

Jean-Michel

ron&bram
Posts: 2460
Joined: 11.06.2008, 19:34
Location: Heemskerk, Netherlands

Post by ron&bram » 14.10.2008, 15:38

Hi Christian,

I think that a splitter is very simple, since the protocol is based on rs-485 communication standard, a xpressnet splitter really is just a splitter, no electronics involved there.

Have you tried changing the genli's xpressnet address?

And,
Thanks for your offer
as I wrote many times before here, if there is something I can do to help, everybody, please feel free to ask, if it is within my means I'll try.

Best regards,
Ronald

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Post by cwichmann » 14.10.2008, 15:48

Hi Jean Michel,
these are Commands to the LI-* from lenz to find out the Version.
Or are they appear more often?
yes they appear more often, especially after power off/on
  • 20081014.163738.782 r9999c cmdr0854 OLenz 0808 Power OFF
    20081014.163740.873 r9999I transact OLenz 1099 Command not known.
    20081014.163741.173 r9999c cmdr0854 OLenz 0814 Power ON
    20081014.163743.053 r9999I transact OLenz 1099 Command not known.
    20081014.163743.553 r9999I transact OLenz 1099 Command not known.
    20081014.163747.843 r9999c cmdr0854 OLenz 0743 loc 15 velocity=0 direction=rev
    20081014.163748.404 r9999I cmdr0854 OLenz 0731 function group 1 (Lights ON)
    20081014.163748.404 r9999c cmdr0854 OLenz 0743 loc 15 velocity=0 direction=rev
    20081014.163748.453 r9999c cmdr0854 OLenz 0765 function 15 light=OFF f1=OFF f2=OFF f3=OFF f4=OFF f5=OFF f6=OFF f7=OFF f8=OFF f9=OFF f10=OFF f11=OFF f12=OFF
    20081014.163748.742 r9999I transact OLenz 1099 Command not known.
    20081014.163749.263 r9999I cmdr0854 OLenz 0731 function group 1 (Lights ON)
    20081014.163749.264 r9999c cmdr0854 OLenz 0743 loc 15 velocity=0 direction=rev
    20081014.163749.308 r9999c cmdr0854 OLenz 0765 function 15 light=ON f1=OFF f2=OFF f3=OFF f4=OFF f5=OFF f6=OFF f7=OFF f8=OFF f9=OFF f10=OFF f11=OFF f12=OFF
    20081014.163752.643 r9999c cmdr0854 OLenz 0743 loc 15 velocity=2 direction=rev
    20081014.163752.956 r9999c cmdr0854 OLenz 0743 loc 15 velocity=5 direction=rev
    20081014.163753.342 r9999I transact OLenz 1099 Command not known.
Do you think it is a problem?

jeanmichel

Post by jeanmichel » 14.10.2008, 15:55

Do you think it is a problem?
I might be or it might be not. I'm not shure. Maybe you post the same sequence here with debug enabled, then I can see what command is not known.

Jean-Michel

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Post by cwichmann » 14.10.2008, 15:57

Hi Ronald,

yes i tried several ID's. actual i setup the Li at device 30 but i didn't recognized any change.

I found a NetBox diagram at Paco's site. i looks a like a simple multiple socket.

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Post by cwichmann » 14.10.2008, 16:09

Hi Jean Michel,

Thanks for your help. After 1 minute i got an 800kb tracefile. I think Rob will hate me if i post it completely :wink:
Here are some extracts. If you want i will send you the whole file as PM.
  • 20081014.170147.064 r9999D transact OModel 1850 event <co>

    20081014.170147.064 r9999D transact OModel 1916 UNKNOWN CO: 0_128_4_NanoX off
    20081014.170147.065 r9999D transact OLenz 0237 Updating lenz turnouts in group: 127
    20081014.170147.106 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170147.106 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170147.107 r9999I transact OLenz 1099 Command not known.
    20081014.170147.146 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170147.146 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170147.147 r9999I transact OLenz 1099 Command not known.
    20081014.170147.186 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170147.186 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170147.226 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170147.226 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170147.227 r9999D transact OLenz 1074 Feedback OK
    20081014.170147.227 r9999D transact OLenz 0165 sw 7 1 = thrown
    20081014.170147.229 r9999D transact OModel 1850 event <sw>
  • 20081014.170025.453 r9999D cmdr0852 OClntCon 0242 cmdReader() <sys>
    20081014.170025.455 r9999D cmdr0852 OControl 0274 __callback...
    20081014.170025.456 r9999D cmdr0852 OControl 0275 nodeName=sys
    20081014.170025.457 r9999D cmdr0852 OControl 0184 NodeOp.getName=sys
    20081014.170025.458 r9999c cmdr0852 OLenz 0814 Power ON
    20081014.170025.462 r9999D infw0852 OSocket 0603 72 bytes written to socket.
    20081014.170025.463 r9999D infw0852 OSocket 0603 44 bytes written to socket.
    20081014.170025.503 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170025.503 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170025.543 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170025.543 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170025.544 r9999I transact OLenz 1099 Command not known.
    20081014.170026.079 r9999I main OApp 0690 MemOp.getAllocCount() = 34384
  • 20081014.170048.729 r9999D transact OModel 1850 event <co>

    20081014.170048.729 r9999D transact OModel 1916 UNKNOWN CO: 0_44_4_NanoX off
    20081014.170048.730 r9999D transact OLenz 0237 Updating lenz turnouts in group: 43
    20081014.170048.771 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170048.772 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170048.812 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170048.812 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170048.851 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170048.852 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170048.853 r9999D transact OLenz 1069 Command OK
    20081014.170048.892 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170048.892 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170048.931 r9999D transact OSerial 0583 read size=2 rc=2 readed=2 errno=0
    20081014.170048.932 r9999D transact OSerial 0583 read size=1 rc=1 readed=1 errno=0
    20081014.170048.933 r9999I transact OLenz 1099 Command not known.

Post Reply

Return to “Lenz”