BiDi addressing problem
BiDi addressing problem
I have problem with addressing DIY BiDi detector in rocrail using OPC_MULTI_SENSE.
Detection in rocrail sensor work fine with sensor address 1 to 4...but don't work with address 263 (I don't tested other value a this time). Address 263 in rocrail is located like address 1. To debug I sniffed with Lonotet Sniffer and it look right address 263.
I attached plan with rocrail.ini and trace.
Detection in rocrail sensor work fine with sensor address 1 to 4...but don't work with address 263 (I don't tested other value a this time). Address 263 in rocrail is located like address 1. To debug I sniffed with Lonotet Sniffer and it look right address 263.
I attached plan with rocrail.ini and trace.
- Attachments
-
- BancoDiTest.zip
- (413.9 KiB) Downloaded 2 times
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
only provide the trace file with the multi sense packet.
Better: Show your program snippet how you set the address in the packet.
Not 263 but 652...
The OPC_MULTI_SENSE is a classic LocoNet packet and is used for many decoders like BDL, Lissy, DR5088RC, ...
The addressing in Rocrail is correct.
Better: Show your program snippet how you set the address in the packet.
Code: Select all
20180530.001407.763 r9999c lnreader OLocoNet 0719 BDL[1] RX[7] zone [D] reports [present] of decoder address [652] direction [-]
20180530.001407.764 r9999a lnreader OModel 4950 trying to match sensor event: [LNPC] 0:7 uidname=[] state=1 code=652
The OPC_MULTI_SENSE is a classic LocoNet packet and is used for many decoders like BDL, Lissy, DR5088RC, ...
The addressing in Rocrail is correct.
Re: BiDi addressing problem
652 is detected Locomotive Address
- Attachments
-
- rocrail.006.trc
- Trace
- (35.91 KiB) Downloaded 1 time
-
- monitorLog.txt
- Loconet Log
- (1.7 KiB) Downloaded 3 times
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
OK, the BDL section number is 7:
The monitor log does not show the binary packet.
You did not answer all my questions.
Code: Select all
20180530.081802.480 r9999c lnreader OLocoNet 0719 BDL[1] RX[7] zone [D] reports [present] of decoder address [652] direction [-]
20180530.081802.481 r9999a lnreader OModel 4950 trying to match sensor event: [LNPC] 0:7 uidname=[] state=1 code=652
20180530.081802.482 r9999a lnreader OFBack 0725 fb[S1N_1] state=ON code=652 dir=fwd val=0 count=1 regval=0
20180530.081802.483 r9999a lnreader OFBack 0774 fb [S1N_1](ON) code=652 val=0 count=1 absent=0 call listener 0x01000DEC...
You did not answer all my questions.
Re: BiDi addressing problem
I'm sorry but in Loconet log:
Thanks
Nuccio
and rocrail trace:08:18:02.486: [D0 22 06 05 0C 02] Transponder address 652 present at LR263 () (BDL16x Board ID 17 RX4 zone D).
For same packet rocrail tell BDL1 and Loconet sniffer 263 (right). Rocrail switch on feedback with address 120180530.081802.480 r9999c lnreader OLocoNet 0719 BDL[1] RX[7] zone [D] reports [present] of decoder address [652] direction [-]
Do you talk about loconet data : [D0 22 06 05 0C 02] ?The monitor log does not show the binary packet.




Thanks
Nuccio
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
Zone and section is in your packet 0x06: BDL 1 sensor address = 6+1(Rocrail + 1 offset) = 7.
7 is also used for looking up a fitting sensor.
http://wiki.rocrail.net/doku.php?id=loc ... e_opcodes2
OPC_MULTI_SENSE is not documented in the LNPE...
7 is also used for looking up a fitting sensor.
http://wiki.rocrail.net/doku.php?id=loc ... e_opcodes2
OPC_MULTI_SENSE is not documented in the LNPE...
Code: Select all
static void __handleTransponding(iOLocoNet loconet, byte* msg) {
iOLocoNetData data = Data(loconet);
int type = msg[1] & OPC_MULTI_SENSE_MSG;
int dyntype = msg[1] & MULTI_SENSE_DYN_ITEMMASK;
int addr = msg[2] + ((msg[1] & 0x01) ? 0x80:0x00);
Re: BiDi addressing problem
I used JMRI and LoconetOverTcp to decode (both software show expected address)rjversluis wrote:
http://wiki.rocrail.net/doku.php?id=loc ... e_opcodes2
OPC_MULTI_SENSE is not documented in the LNPE..]
Code: Select all
//;<OxD0>,<ARG1>,<ARG2>,<ARG3>,<ARG4>,<CKSUM>
//;<OPC>=0xD0
//;<ARG1>=0x20 // MSG field: transponder seen
//;<ARG1>=0x00 // MSG field: transponder lost
//;<ARG1>=0x60 // MSG field: Power message
//;<ARG1>=<0,T1,T0,0- A10,A9,A8,A7>
//;<ARG2>=<0,A6,A5,A4- A3,A2,A1,A0>
//;<ARG3>=ADR
//;<ARG4>=ADR2
<ARG0>=D0
<ARG1>=22 Transponder seen (0x20), Detector AddressHi =2 (0x02)
<ARG2>=06 Detector AddressLow =6 (0x06)
Detector address (2^8)+(2^2)+(2^1)=262 +1 (offeset)= 263
You don't use low nibble of ARG1, right ? May be useful to use

My code:
Code: Select all
//*****************************************************************************
//*send_multisense_data *
//*****************************************************************************
BYTE send_multisense_data(BYTE railcom_adrh,BYTE railcom_adrl,BYTE track_sts,BYTE zone){
BYTE multisense_buffer[6],adrl,adrh,i;
adrl=DEVICE_ADDRESS_LOW+zone;
adrh=DEVICE_ADDRESS_HIGH;
if(adrl&0x80){
adrl=adrl&0x7F;
adrh=(adrh+1)&0x0F;
}
multisense_buffer[0]=OPC_MULTI_SENSE;
multisense_buffer[1]=adrh|((track_sts<<5)&0x60);
multisense_buffer[2]=adrl;
multisense_buffer[3]=((railcom_adrh<<1)|(railcom_adrl>>7)&0x01)&0x7F;
multisense_buffer[4]=railcom_adrl&0x7F;
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
just ask Digitrax for an official documentation of its multi sense, it has been extended by Digikeijs for RailCom DR5088rc:
As far as I am correctly informed only bit zero of byte 1 is used for address high.
MULTI_SENSE_DYN_QOS uses all other bits.
IMHO LocoNet is not RailCom ready. (sucks)
Code: Select all
#define OPC_MULTI_SENSE_MSG 0x60 // byte 1
#define OPC_MULTI_SENSE_PRESENT 0x20 // MSG field: transponder seen
#define OPC_MULTI_SENSE_ABSENT 0x00 // MSG field: transponder lost
#define OPC_MULTI_SENSE_POWER 0x60 // MSG field: Power message
#define OPC_MULTI_SENSE_DYN 0x40 // MSG field: RailCom dyn
#define MULTI_SENSE_RAILCOM_DYN 0x40
#define MULTI_SENSE_DYN_ITEMMASK 0x1E
#define MULTI_SENSE_DYN_SPEED 0x00
#define MULTI_SENSE_DYN_FLAGS 0x0A
#define MULTI_SENSE_DYN_INPUT 0x0C
#define MULTI_SENSE_DYN_QOS 0x0E
#define MULTI_SENSE_DYN_QTY_BASE 0x10
MULTI_SENSE_DYN_QOS uses all other bits.
IMHO LocoNet is not RailCom ready. (sucks)
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
OK, I found the problem; git pull and test.
Re: BiDi addressing problem
Can you explain pleaserjversluis wrote:OK, I found the problem; git pull and test.
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
check revision 13.999+ if its OK.
Re: BiDi addressing problem
I will test tonight.rjversluis wrote:check revision 13.999+ if its OK.
But question, may be another topic, never consider a method to fill locomotive list in rocrail via railcom (like ecos)?
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
Another topic, a new thread with LocoNet and RailCom Plus.Buddace wrote: But question, may be another topic, never consider a method to fill locomotive list in rocrail via railcom (like ecos)?
Re: BiDi addressing problem
Tested work fine with address 263. Are you using all 4 last significant bits ?rjversluis wrote:check revision 13.999+ if its OK.
-
- Site Admin
- Posts: 39071
- Joined: 10.04.2006, 08:48
- Location: Speyer, Germany
- Contact:
Re: BiDi addressing problem
Yes, all 4.Buddace wrote:Tested work fine with address 263. Are you using all 4 last significant bits ?rjversluis wrote:check revision 13.999+ if its OK.