Paco's GenLi + NanoX-S88 and Rocrail

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

Post by ron&bram » 14.10.2008, 16:21

Hi Christian,

You can send the full 800 kb to my email address (it is in my profile and has a 10MB individual mail size limit), I'll have a look at it (too).

Regards,
Ronald

jeanmichel

Post by jeanmichel » 14.10.2008, 17:51

Code: Select all

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 
This is really strange. Are you up to date with the code?

And: there are no byte traces visible ;) Just do the b pressing thing in console mode and copy the lines around the "Command not known" lines.

But there are definitly some commands which NanoX will not know.

BTW: I tried to get the nanoX working but without success. After that I decided to build a OpenDCC and this was the best decision ever. Oh, and just a little preview: Wolfgang and me are working on a very cool Throttle. This will fully support rocrail. Something like RocMobile but a little bit more straight forward to handle. And it will be wireless at the end.

Jean-Michel

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

Post by cwichmann » 14.10.2008, 18:29

Hi Jean Michel,
Are you up to date with the code?
yep i use SVN3731
I created and attached a trace file on byte level
BTW: I tried to get the nanoX working but without success. After that I decided to build a OpenDCC and this was the best decision ever.
Yes i know about the capabilities of OpenDCC. It's realy great but i only wanted to test this very small CS to see if it works with Rocrail and to test the Booster. If it's working well i'll sell it here for a Rocrail donation ... maybe 20€
Oh, and just a little preview: Wolfgang and me are working on a very cool Throttle. This will fully support rocrail. Something like RocMobile but a little bit more straight forward to handle. And it will be wireless at the end.
A wireless Throttle will be the best solution. With a rotary encoder and a nice display?. I hope to see it soon ;-) but don't hurry, it's hobby :wink:
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

Don't understand

Post by ron&bram » 14.10.2008, 18:37

Hi Guys,

I found Christian's trace files in my mail (sorry Christian, the size limit is 10 MB per mail, not in total).

When going through them the first I noticed was that, when setting a turnout, the lenz lib sends out a switch command:
20081014.170017.092 r9999D transact OLenz 0165 sw 7 3 = thrown
At the model lib level that switch event is detected:
20081014.170017.093 r9999D transact OModel 1850 event sw addr1="7" port1="3" iid="NanoX" state="turnout"
But also an output event is detected:
20081014.170017.095 r9999D transact OModel 1850 event co addr="7" port="3" gate="0" iid="NanoX" state="off"
Since this output is not defined as an output it is not found:
20081014.170017.096 r9999D transact OModel 1916 UNKNOWN CO: 0_7_3_NanoX off
Why is this happening, is this a side effect of the work in progress to handle all events as outputs (like signals that are already no longer handled in the cs libs)?

Regards,
Ronald

jeanmichel

Post by jeanmichel » 14.10.2008, 19:09

With a rotary encoder and a nice display
of course a color display ;) And a rotary knob is the heart of the whole thing.

Jean-Michel

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

Analysis of trace file at byte level

Post by ron&bram » 14.10.2008, 20:38

Christian,

I worked through the trace file you uploaded.

Let's start with the short version so that only the really interested people have to dig through all the technical details furter on.

I am sorry, but I can not find the reason for the unknown command errors.
I see a lot of communication going on (I do therefore not think that is just a matter of a buffer in the genli filling up), with a lot of delay between sending a command to the nano and receiving the nano's response.
I see a huge amount of unknown communication errors, far to much to my liking.

Technical details.
Upon startup, the lenz lib asks for the li100 version (message 0xF0 0xF0).
I see a response to the li version request, the message says hardware version 3.0 software 01 (Jean-Michel this is not properly coded in lenz.c, the response 0x30 must not be turned into decimal, hence the false version 4.8 ).
The lenz then starts the initialisation fase by asking for the status of all possible accessory addresses. The nano starts responding to these status requests, but as communication continues (most message look normal to me) I see a worrying amount of reponses from the genli (not from the nano): 0x01 0x03 0x02. From the lenz manual:
01 / 03 / 02: If a data transmission error occurs during a data communication to the command station,
then the XpressNet equipment that had the transmission error is again addressed and must acknowledge
receipt of this error. The LI100 also transmits this error message to the PC. If this condition arises
frequently, then the wiring should be examined. This message can also arise, if errors were made with
the computation of the x-Or-byte.
At the end of the initialisation fase, apart from the huge number of the 0x01 0x03 0x02 (informatively described in the lenz manual as unknown communication error), the nano has responded to all acessorry status request from the lenz.lib.
The lenz lib starts sending commands, I see responses that you would expect from the nano, but again with a lot of "unknown communication error" in between.
I also found several unknown command messages, but is -nearly- impossible to find which command it concerned because this response does not come immediately after sending the command. For example, the lenz lib is already sending a status request for accessory address 0x50, when the nano is just answering the request for address 0x20.

Hope this helps a little bit.

Best regards,
Ronald

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

Post by anam » 14.10.2008, 23:11

Hi Christian,

I stressed this evening my NanoX+genLi+rocrail. Well,in few case, after a NanoX off/on, loco didnt start as long as I sent a function command (in my case loco lights on/off)
About S88 connected to Nanox, I noted that sometimes, after loco exit the sensor (I use occupancy detector) Rocrail does not recognise the status change (in other words the sensor on the screen continue to be red). In any case, when train enter the sensor Rocrail changes immediately the status from green to red, always.

For Ronald
if can help, I can send you my trace files, so you can compare with Christian files. In this case tell me what I must do, because I'm not PC expert!

Regards
Daniel

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

Post by ron&bram » 15.10.2008, 11:42

Hi Anam,

Thanks for you offer.

Having a trace file at byte level to compare could be helpful, at least to see if there are not so many "unknown communication error".

You can make a byte level trace file as follows:
start rocrail only (not rocgui also) and immediately press b <enter> to start the byte trace. After a while (10 seconds or so) you will see a message in the rocrail windows that initialization has finished. Press q <enter> to quit rocrail again. This should produce one or more (check time/date) trace files.
To keep Rob's worries about webspace to a minimum, you can mail the tracefiles to me only, you'll find my email address in the memberlist.

Many thanks in advance
Ronald

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

Post by cwichmann » 15.10.2008, 13:38

Hi Ronald,

thanks for your effort. I sent the Link to this thread to Paco. Maybe he will like to check the trace file too.
Paco sent me a new firmware for the NanoX to solve the S88 issue. It works great but only with the first three sensors, all other sensors are skiped.

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

Slow nano?

Post by ron&bram » 15.10.2008, 20:42

Hi Guys,

Next to Christian's byte level traces Daniel (Anam) was also so kind to send me byte level traces from the rocrail startup with his nano.

I see also a lot of the unknown communication error messages passing by in Daniels trace (but I would say less then in Christian's case). What I also see is that in Daniel's "case" the responses from the nano come quicker, there is less "distance" between a inquiry of the lenz lib and an answer from the nano. What I mean to say is that with Daniel's trace there is sort of balance between messages going to the nano (out buffer) and responses from the nano (in buffer); at a certain moment the lenz lib asks the nano for the status of accessory address 0x40. The first following response from the nano is for address 0x2E (18 inquiries difference). When looking at the general picture of the communication there is a balance between inquiries (out buffer) and responses (in buffer). Roughly every 2 out buffer events there is an in buffer event, there is a certain rhytym to it.

In Christian's trace there are far more out buffer events before an in buffer event comes. First, there are roughly 3 out buffers for every in buffer, but then the in buffer events get less and less. Very soon there are just screens and screens full of only out buffer events.

Christian, I get the feeling that your nano is not able to handle the communication quickly enough, it starts responding but is overrun with inquiries from the lenz lib. Maybe you should also have a look and compare your trace file with that of Daniel, I tried to describe as best as I could what I saw, but is easier seen then described. I'm sorry that I can not make any more of.

As to the commands unknown, in Daniel's trace file it looks that the nano is handling the inquiries from the lenz lib in the order that they came in. So I checked what the nano's response was before the command not known response. I then searched the inquiry from the lenz lib for that response, but the next inquiry/command from the lenz lib was just for the hext accessory status address, why this suddenly is interpreted as an unknown command beats me (also).

Sorry, but for the time being it looks that I tried and failed.

Best regards,
Ronald

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

Post by cwichmann » 15.10.2008, 21:50

Hi Ronald,

thank you for spending so much time to soilve my problem!
Could you plese so kind and forward the trace file from Daniel as PM? Then i will take a look at it.
I build NanoX with 4MHz xtal, there is another firmware which uses the internal oscilator of the pic. I will try this too.

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

Post by cwichmann » 15.10.2008, 21:53

Hi Daniel,
I stressed this evening my NanoX+genLi+rocrail. Well,in few case, after a NanoX off/on, loco didnt start as long as I sent a function command (in my case loco lights on/off)
are you able to send commands to your locos directly after you send a power on command?
Do you use a 4MHz xtal or internal Oscilator?

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

Post by ron&bram » 16.10.2008, 09:21

forward the trace file
In your mailbox.

Best regards,
Ronald

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

Post by cwichmann » 16.10.2008, 12:17

Hi Guys,

don't ask me why but after update to SVN3751 the nasty behaviour is away.
I saw that Jean Michel has changed something in the Lenz lib but it seems the changes are for the throttle he announced ???

Now i'm very confused :shock:

One more Question about the short cut detection. Is the lenz lib not able to show a shortcut or does it depend on the Li? If i shorten the tracks i received a "STOP" in my Lokmaus but not in Rocrail.

Anotherone is that NanoX switches Power on as soon as Rocrail is started. But if i start Rocgui the Power button is not pressed.

Is this quite normal or worth to raise a feature request?

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

Post by ron&bram » 16.10.2008, 12:35

Hi Christian,

When I start rocrail with the elite (also lenz.c) and the elite is powered on, it stays powered, with the power button in rocgui not showing the on state. When I power down/up in rocgui, the elite follows that behaviour. When rr/rg is running and I press emergency stop on the elite (having smoked one command station for unknown reasons in the past I am a bit afraid of creating a deliberate shortcut), that is picked up by rr/rg. I'll have a closer look tonight when at home.

Regards,
Ronald

Post Reply

Return to “Lenz”