开云体育

JMRI default CANID #preferences


 

Hi All
?
whilst testing a new style MERG network adapter it has been noted that JMRI uses the default CANID of 127, whilst this is supposedly only for the CANUSB4 connection module it does form part of any network message. This causes an issue when there is a CANCMD dcc adapter in the network as this is fixed. As each CANID is supposed to be unique should JMRI be using 127 at all??
?
Thanks
Tim


 

Hi Tim,
?
Well done for spotting this MERG CBUS(R) CAN ID issue.
?
As I'm sure you're aware, the CAN ID that JMRI uses can be set within Additional Connection Settings, see
for CANUSB4, currently selectable 120-127.
?
Text towards the top of that page suggests that MB reckoned JMRI should be using 126.
I wrote that support page ( before I learnt Java !! ), so at one point the default was 126 ! ?
?
In CBUS dev. guide 6b, CAN IDs 120-127 were reserved for PC interfaces and non-DIP fixed ID DCC command station.
?
In CBUS dev. guide 6c, CAN IDs 100-127 are reserved for PC interfaces and non-DIP fixed ID DCC command station,
CANCMD is supposed to be using 114 ;-)
?
I've uploaded PR#13788 which :
?
  • Sets the default JMRI CAN ID back to 126 for new connections.
  • Does not modify the CAN ID for existing connections.
  • Makes the CAN ID selectable from 100-127.
  • Changes the CAN ID option name in Connection Preferences from "CAN ID for CAN-USB" to "CAN ID For JMRI" ( much more accurate ).
  • Affects MERG CBUS ( CAN-RS / CANUSB / CANUSB4 / Network ) connections.
?
I've asked Andrew Crosland to review these changes and check it's OK to update SPROG GEN5 Default CAN IDs, seemingly also affected.
?
?
Thanks for reporting Tim, and kudos for spotting this!
?
Steve.
--
Steve Young


 

If there are multiple modules connected with CAN IDs in the reserved range then it's up to the user to ensure there are no conflicts. E.g., two CANUSB adapters would need different connection settings in JMRI.
?
Are you sure the CANCMD uses an ID of 127? Exactly what issue are you seeing when using the CANCMD and CANUSB4?
?
I wrote the original firmware for the CANCMD and it had a fixed ID of 114, as per the developer guide. If that has been changed then you need to ping Pete Brownlow who is now the developer of the CANCMD.
?
The USB adapters have never had "fixed" IDs. They always simply pass through the ID from the gridconnect packet on the host side. This can be set in the connection preference in JMRI.
?
I would consider making the documentation clearer, rather than change something that hasn't been an issue for many years.
?
Andrew