How to change LNCV values with Rocrail?

Moderator: Moderators

Re: How to change LNCV values with Rocrail?

Postby Dagnall » 06.07.2016, 13:42

So LNCV does not refer to LocoIO being used to change CV's???
I thought it was the general shorthand for loco "CV reading"....
Sorry I did not get the terminology correct... :oops:
I see that there seem to be a lot of issues regarding Dixitrax Licences and Loconet LocoIO Uhlenbrock messages.. Is there any forum or explanation page where the various issues etc and which messages we should use?

I was using http://wiki.rocrail.net/doku.php?id=loconet:ln-pe-en#variable_byte_message_opcodes as my main reference, but I see from other sources that Uhlenbrock E5 messages are different... and are not referenced on your opcode list.

For the avoidance of doubt and to help others reading this later, I see you put
CV
The default way of programming is using the CV (Uhlenbrock) mode.

Can you therefore confirm that RocPro expects the "Uhlenbrock" message for the returning CV data from a decoder or am I wrong again??? :?
Does using the Uhlenbrock message strictly require a Dixitrax Licence??

Many thanks.. This is a very confusing subject!
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Re: How to change LNCV values with Rocrail?

Postby rjversluis » 06.07.2016, 14:33

Hi,

do not mixup LNCV and LNSV.
LocoIO uses LNSV which is documented by the LocoBuffer/LocoIO developers. (Not HdL)

LNCV is what Uhlenbrock is using for its Hardware; Not documented and no support.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: How to change LNCV values with Rocrail?

Postby Dagnall » 06.07.2016, 14:41

So I should be trying to use "LNSV" to get the CV values back to RocPro??

(obviously I thought that was only for SV values....)
D
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Re: How to change LNCV values with Rocrail?

Postby rjversluis » 06.07.2016, 14:56

RocPro does not support LNSV/LNCV.
You must use the LNCV Tab.
http://wiki.rocrail.net/doku.php?id=roc ... net_sv_tab

LNCV/LNSV does have nothing in common with DCC CV.
RocPro only supports DCC CV.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: How to change LNCV values with Rocrail?

Postby Dagnall » 06.07.2016, 15:17

Rob, Thanks for your patience!...

It IS the CV from a LOCO I am trying to read, so I assume now that the correct terminology is "I am trying to read a DCC CV using Loconet over LNUDP"...?

The question however remains... RocPro sends "E5 10 50 5A 01 00 02 32 00 00 00 01 00 00 00 30"...

What message and sequence precisely is it expecting to get back over the LNUDP interface to tell it the CV data.....(CV17 is asked for here)

Thanks
Dagnall
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Re: How to change LNCV values with Rocrail?

Postby rjversluis » 06.07.2016, 15:47

Hi Dagnall,

RocPro does not send LocoNet packets.
This is handled in the LocoNet library of Rocrail.
Reading and writing to the LocoNet programming track is part of the LocoNet Personal Edition and works fine.
Its up to the Command Station to respond correctly.
All Digitrax compatible CS should understand it.
I do not seen any issue about it because this is reliable code since over more then a decade in Rocrail.
The LNUDP sublibrary of LocoNet in Rocrail does not modify LocoNet Packets; It just publish it on the LocoNet.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: How to change LNCV values with Rocrail?

Postby Dagnall » 06.07.2016, 16:29

Ok..
Getting somewhere now... I suppose from your viewpoint, I am "simulating" a Command Station. There is no physical Command Station in my system, Rocrail publishes its commands using Locoio on LNUDP.. and I read these directly from the WiFi and directly respond to them. Mostly this interface sequence is understood (but not easily) from the published interface data.

I agree the Rocrail code is working well and is stable, the data flow that I am trying to understand and simulate is presumably normally hidden between Rocrail and the CS...Which is why I was hoping that you would be able to simply let me know the expected data flow / sequence.

Avoiding RocPro, and just using the "Programming" Tab, I ask for a CV (either using the loco address and POM or using Broadcast)
Rocrail sends me a Write_PT_slot_data message, asking for a CV, (I can receive these Ok, and think I have the correct format sorted..)
I send back a LONG_ACK, with B4 6F 01 25, i think as demanded by http://wiki.rocrail.net/doku.php?id=loconet:ln-pe-en#variable_byte_message_opcodes
.. Rocrail seems to see this as a "LNCV Response", but with "program Event 7: CV0=0 addr=0 type=1"..

I THEN send the CV data I want to send, (CV17 for example..) using OPC_PEER_XFER, and Rocrail see this as "LOCOIO SV response" "Program Event 7: cv17=192 Addr=6 type= 2".
So I can send Rocrail CV data, perhaps its in the wrong format (LocoIO and not LNCV??) or is it just being sent at the wrong time or to the wrong address to show up in the CV values tables??

From the Rocrail response I assume that instead of a LONG_ACK, I should perhaps be responding to Write_PT_slot_data with something else, With data inside? ... Question is ... What?, I have rather too many variables to find the correct answer by hacking.....


PS also, how do I get to the "LocoNet SV Tab" http://wiki.rocrail.net/doku.php?id=rocgui-pt-en#loconet_sv_tab
I'm using Rocview Jun12, rev 11213... but I cannot see that exact tab set .. I have "Active locos" and "Programming", but not the "LCCV/SV" tab.....
Seeing it was deprecated i wonder if you had removed it?

:coding:

Dagnall

PS should I/we move this discussion to a new subject???
An easy way for me to get the answer I think Im looking for would be to see a "Byte" Trace file for a LocoIO system successfully reading a CV from a Loco..
I have a CBUS system here and its presumably not the same protocol used between Rocrail and Cbus as between LocoIO and Rocrail.
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Re: How to change LNCV values with Rocrail?

Postby rjversluis » 06.07.2016, 19:04

This discussion is not needed because all is documented in the LocoNet PE:
http://www.digitrax.com/static/apps/cms ... dition.pdf
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: How to change LNCV values with Rocrail?

Postby Dagnall » 07.07.2016, 16:42

Rob, Thank you..
the key would appear to be :
Programmer Task Final Reply: (if saw LACK <B4>,<7F>,<1>,<chk> code reply at task start)
<0xE7>,<0E>,<7C>,<PCMD>,<PSTAT>,<HOPSA>,<LOPSA>,<TRK>;<CVH>,<CVL>,<DATA7>
,<0>,<0>,<CHK>

Previously I had interpreted other parts as meaning I needed to send an E5 message.. I will work on this now.
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Re: How to change LNCV values with Rocrail?

Postby fulda » 14.07.2016, 09:20

Hello,

I spend little time by checking messages presented by Dagnall, It is request for read from loco decoder in PoM mode.
Then here must be some extra device called RailCom detector for read response and send it back to LocoNet.

I know here exist few kinds of those devices, I know, that here is part of Digitrax documentation for it called "RFID Reader Message Formats Version 4 (2016-06-25)", but I does not read it in details.

Then I can recommend to focus to PoM read with LocoNet and also study of "RFID Reader Message Formats Version 4 (2016-06-25)"

Jindra
fulda
 

Re: How to change LNCV values with Rocrail?

Postby Dagnall » 14.07.2016, 16:43

The example I used was coded as a "POM", but the question was originally generic, and applied to CV reading regardless of if POM or programming track as, in the WIFI controlled scenario I am designing, there is no control station, no "programming track" and actually, no "DCC main line"!...Just a lot of WiFi modules that can change turnouts, monitor sensors, or control engine speed of battery powered locos. This could be the "ultimate" minimum hardware Rocrail setup...Just a couple of $10 ESP8266 modules..- But only for Larger Gauges that can hide the ESP8266 modules in the Locos..

I now have the initial version of the code working, thanks to detailed reading of the correct section in "Programmer Task Start:" in the personal edition.

I will publish some more when the code is tidier, but for anyone else wanting to experiment with WiFi control, I have placed the source here : https://github.com/dagnall53/LOCOWIFI this code is crude and untidy but generally works...

Dagnall
ESP8266 Based RocNet Universal 8 i/o decoder and Mobile Decoder. http://wiki.rocrail.net/doku.php?id=users:dagnall53:description
G Scale 3D printed Locos and wagons : (on Thingyverse)
Dagnall
 

Previous

Return to Loconet