Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Jmriusers
- Messages
Search
Locked
Re: Sound decoder identification with JMRI
Reading will not work without the motor load. Wouter On Sat, 6 May 2023, 06:53 thomasmclae via , <mclae5-lists=[email protected]> wrote: First, do a read type from decoder to get the correct decoder definition. |
Locked
Re: Sound decoder identification with JMRI
First, do a read type from decoder to get the correct decoder definition.
This might be so old there is not a proper set of features in the decoder. Early decoders had some odd feature sets before things settled in. -- --- Thomas DeSoto, TX |
MFRC522, Ethernet/Serial, Nano/Uno/Mega, MQTT???
Guys, Yeah, you read that right! I have been playing around a LOT with MQTT lately and getting stuff to work with JMRI. So this evening I decided to use the working MFRC522 sketch, first over Serial, and then over Ethernet, using Node-Red (amazing bit of software!), to parse the incoming ReaderIDs, tag data, etc. into MQTT Out (publish topics) for the Sensor, Reporter, and ID Tag objects. It was crazy how easily and quickly I got this to work. Granted, JMRI cannot auto-generate the Sensor and Reporter objects like it can with a defined RFID connection type, but it absolutely can handle RFID readers connected via MQTT, which might be a very attractive route for some. Or many? All I know is that it works and works well. Sorry for the little tangent here, but I was very pleased and excited about this. LOL! Tom |
Locked
Sound decoder identification with JMRI
Hi all,
First post here! I just need some help with how to properly identify a sound decoder, using JMRI connected to a DCS52. I tried to find PCM decoders on JMRI but couldn't, and the closest thing I could find (broadway limited light decoder) didn't work. (Note: the disconnected decoder is a Lenz, for controlling the motor only. I want to program just the sounds and lights so that is why it is disconnected) ![]() -- Cheers, Wilks |
Locked
Re: Throttle ID in Slot Monitor - can it be made more descriptive?
On 4/15/2023 8:30 AM, Bob Morningstar via groups.io wrote:
Where does the hexadecimal throttle ID come from in Slot Monitor?Usually, from the throttle type (one hex digit) and from the throttle itself (the other hex digit). Some older throttles have rather limited values, while others provide more variable throttle numbers (in the other hex digit). ?> ?Is there a way to set a more descriptive valve (user settable perhaps) for the throttle id values?in general, no. Billybob |
On 3/15/2023 3:36 PM, philip8944 via groups.io wrote:
On startup the system repeatedly attempts to throw 2 turnouts.? ive deleted the turnouts but it does the same thing with two more.? the message below copied from loconet is continually and rapidly repeating over and over, when i close decoderpro the turnouts stop throwing so it isnt being generated by digitrax:(recent response to an somewhat-old thread!) There is something wrong. It is setting LT70 to thrown AND then setting LT70 to closed. It seens that perhaps two different places are setting the turnout at two different values! Regards, Billybob |
Dave, What do you mean by "amplified"? ?As far as I know, all of the features have help content. Dave Sand ----- Original message ----- From: Dave Barraza <dave@...> Subject: Re: [jmriusers] logix vs logixNG Date: Friday, May 05, 2023 9:42 PM Logix will probably never be enhanced. ?All new capabilities will be done in LogixNG. Has the Logix N. G. documentation been amplified at all? |
Locked
Re: restricting classification yards by location
#operationspro
That idea works.? I put all of my classification tracks into one pool.? I do have to make decisions on what physical track(s) to put the blocked cars on, but I am ok with that and in fact seems more prototypical to me.? The additional car movement, which is significant, is worth it to me.??
-- Tom |
Locked
Re: Locomotive programming using Decoder Pro problems
Little information is supplied by the original poster about the decoder, the DCC system (if indeed there is one) and as you point out Thomas, version of JMRI. The first red flag in this thread is "I've read", what have you read and how old is what you read. Years ago pretty near all sound decoders needed a programming booster, not now. An aside to this thread, I have a SPROG II, it has never ever failed to read/write any decoder it has been attached to, BLI, ESU, TCS, Digitrax, Hornby, Bachmann, QSI or Soundtraxx. The only issue with ESU decoders is that if there is a firmware update or you want to change something in the sound files, you absolutely need the LokProgrammer, no getting around it. So, if you want advice poster, please give us some information a bit more informative. John On Fri, May 5, 2023 at 5:26?PM thomasmclae via <mclae5-lists=[email protected]> wrote: First off, sounds like you are just writing. |
Locked
Re: Locomotive programming using Decoder Pro problems
First off, sounds like you are just writing.
Put a Lok on the programming track, select new entry, then read type from decoder. That should read something from the decoder. If that does not work, the write will not either. The issue could be one or more of the following: JMRI connection flipped to simulator. AN old version had that issue, upgrade to newest version. Loose wire dirty track wrong decoder type selected (See read type from decoder above) booster dead. All resolutions start with being able to read. -- --- Thomas DeSoto, TX |
Seeedstudio 125KHz, Ethernet/Serial, Uno
Micheal, Actually, the Ethernet shield type (W5100 or W5500) shouldn't even matter since the 125KHz readers don't use SPI. To get you started, upload the following sketch to the Uno, being sure to change the IP and port accordingly, attach the Ethernet shield and readers (see correct pins in the sketch), and plug in the CAT cable. In JMRI preferences, create a new connection (RFID) using the network interface type and the MERG Concentrator (A-H). Define the IP and port number you assigned to your Uno in the sketch, and then restart JMRI. The Uno can handle 7 of these readers, but will work for any number of readers from 1-7. Also, this sketch should also allow you to use the direct serial connection (same MERG Concentrator (A-H) connection type) as the output is sent to the Serial output in ALL cases and to the Ethernet connection if a shield is attached and a connection established. // Import required libraries
#include <SoftwareSerial.h> // SoftwareSerial library for serial communication with the RFID readers
#include <Ethernet.h> // Ethernet library for communication over Ethernet
#include <SPI.h> // SPI library for communication with the Ethernet module
?
// MAC address of the Ethernet module
const byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
?
// IP address of the Ethernet module
const IPAddress ip(192, 168, 1, 177); // Change Uno's IP address as desired
?
// TCP server object listening on port 8888
EthernetServer server(8888); // Change port number as desired
?
// Create an array of SoftwareSerial objects to communicate with the RFID readers
SoftwareSerial rfidSerial[] = {
? SoftwareSerial(2, 3), // RX, TX for reader A
? SoftwareSerial(4, 5), // RX, TX for reader B
? SoftwareSerial(6, 7), // RX, TX for reader C
? SoftwareSerial(8, 9), // RX, TX for reader D
? SoftwareSerial(A0, A1), // RX, TX for reader E
? SoftwareSerial(A2, A3), // RX, TX for reader F
? SoftwareSerial(A4, A5) // RX, TX for reader G
};
?
// Array of reader IDs, used to determine which reader has sent a tag
const char readerIDs[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G'};
?
void setup() {
? // Initialize the hardware serial port (USB connection)
? Serial.begin(9600);
?
? // Initialize the SoftwareSerial objects
? for (int i = 0; i < 7; i++) {
? ? rfidSerial[i].begin(9600);
? }
?
? // Initialize Ethernet communication
? Ethernet.begin((uint8_t*)mac, ip);
?
? // Start the TCP server
? server.begin();
}
?
char getReaderID(const unsigned char stx) {
? // Compare the STX byte to the known STX bytes for each reader
? for (int i = 0; i < 7; i++) {
? ? if (stx == (0xA0 + i)) {
? ? ? // If the STX byte matches, return the corresponding reader ID
? ? ? return readerIDs[i];
? ? }
? }
?
? // If no match is found, return an invalid reader ID
? return 'X';
}
?
// This function takes the tag data and the index of the reader that sent the tag data,
// formats the tag data as a string, adds the reader ID, and sends the data to the client.
void parseData(const unsigned char* data, const int readerIndex) {
? // Get the reader ID based on the index
? const char reader = readerIDs[readerIndex];
?
? // Copy the tag data into a character array
? char tag[8];
? for (int i = 1; i <= 8; i++) {
? ? tag[i - 1] = *(data + i);
? }
?
? // Get the received checksum
? uint8_t checksum = data[9];
?
? // Create the output string
? char output[15];
? snprintf(output, sizeof(output), "%c%s%02X\r\n>", reader, tag, checksum);
?
? // Send the output string to the hardware serial port (USB connection)
? Serial.print(output);
?
? // If a client is connected, send the output string
? EthernetClient client = server.available();
? if (client) {
? ? client.print(output);
? }
}
?
// This function runs repeatedly in the main loop
void loop() {
? // Check if data is available from any of the RFID readers
? for (int i = 0; i < 7; i++) {
? ? // If data is available from the current reader
? ? while (rfidSerial[i].available()) {
? ? ? // Read the tag data from the reader
? ? ? unsigned char tagData[10];
? ? ? int count = 0;
? ? ? while (count < 10 && rfidSerial[i].available()) {
? ? ? ? tagData[count++] = rfidSerial[i].read();
? ? ? }
?
? ? ? // Parse the tag data and send it to the client
? ? ? parseData(tagData, i);
? ? }
? }
?
? // Check if a client is connected to the server
? EthernetClient client = server.available();
? if (client) {
? ? // Do nothing if the client is connected
? }
} Tom |
On Fri, May 5, 2023 at 07:27 PM, Blair wrote:
Blair, You better bite! LOL! It would be a BIG help if you jumped into the testing of stuff with us. Have a great weekend! Tom |
开云体育Hmm.? I've just been 'gifted' an Uno, and both of those Ethernet
boards; working status unknown.? Over the years, I've studiously
avoided Ethernet.? But now all I need is a reader, or a few.?
Hmmmmmmmm.? I smell a rabbit hole. I have zero time this weekend for this, but I might just bite.?? We'll see. B
On 2023-05-05 19:21, Thomas Seitz
wrote:
On Fri, May 5, 2023 at 03:20 PM, Micheal Hodgson wrote: |
On Fri, May 5, 2023 at 03:20 PM, Micheal Hodgson wrote:
YAY my Ethernet shield showed up today!!……….now what? I have two groove 125khz sensors and an uno. I plan to buy more sensors in the near future. Can someone please provide a step per step for hooking it up, then programming followed by the required JMRI settings. Thank you?Micheal, OK, so like Steve mentioned, I need to know which Ethernet shield you are using (W5100 or W5500 based?). We should be able to get this set up and hashed out fairly quickly. :-) Tom |
On Fri, May 5, 2023 at 06:05 PM, <stephenjohnson500@...> wrote:
I'm just pleased it's finally working! I thought we had a Serial only sketch that did list connected readers, or am I getting mixed up, there's been a lot of sketches! Lol!PN532, Ethernet/Serial, Nano/Uno/Mega Steve, Speaking of the PN532 sketch, here is my latest foray into that endeavor. I will tackle Micheal's 125KHz stuff too. // Include Libraries
#include <SPI.h>
#include <Adafruit_PN532.h>
#include <string.h>
#include <Ethernet.h>
?
// Ethernet configuration
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192, 168, 1, 177);
unsigned int serverPort = 8888; // Replace with the desired port number
EthernetServer server(serverPort); // Start the Ethernet server
?
struct RFIDReader {
? char id;
? uint8_t ssPin;
? Adafruit_PN532 pn532;
? byte nuid[7];
? bool cardRead;
?
? RFIDReader() : id(0), ssPin(0), pn532(Adafruit_PN532(0, &SPI)), cardRead(false) {}
};
?
#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO)
const uint8_t ssPins[] = {9, 8, 7, 6, 5, A0};
const char readerID[] = {'A', 'B', 'C', 'D', 'E', 'F'};
#elif defined(ARDUINO_AVR_MEGA2560)
const uint8_t ssPins[] = {53, 52, 51, 50, 49, 48, 47, 46};
const char readerID[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'};
#endif
?
const int numReaders = sizeof(ssPins) / sizeof(ssPins[0]);
RFIDReader readers[numReaders];
?
bool isEthernetConnected = false;
?
void setup() {
? Serial.begin(9600);
? SPI.begin();
?
? pinMode(10, OUTPUT);
? digitalWrite(10, HIGH);
?
? // Set pin 53 as OUTPUT for the Arduino Mega 2560
? #if defined(ARDUINO_AVR_MEGA2560)
? ? pinMode(53, OUTPUT);
? #endif
?
? pinMode(4, OUTPUT);
? digitalWrite(4, HIGH);
?
? if (Ethernet.begin(mac) == 1) {
? ? isEthernetConnected = true;
? ? delay(1000);
? } else {
? ? // Serial.println("Ethernet shield not connected or network not available");
? ? isEthernetConnected = false;
? }
?
? if (isEthernetConnected) {
? ? server.begin();
? }
?
? for (uint8_t i = 0; i < numReaders; i++) {
? ? readers[i].ssPin = ssPins[i];
? ? readers[i].id = readerID[i];
? ? readers[i].cardRead = false;
? ? readers[i].pn532 = Adafruit_PN532(ssPins[i], &SPI);
? ? readers[i].pn532.begin();
?
? ? if (readers[i].pn532.getFirmwareVersion()) {
? ? ? readers[i].pn532.SAMConfig();
? ? ? // Print information about the detected reader
? ? ? // Serial.print("Reader ");
? ? ? // Serial.print(readers[i].id);
? ? ? // Serial.print(" detected on SS pin: ");
? ? ? // Serial.println(readers[i].ssPin);
? ? } else {
? ? ? readers[i].ssPin = 0; // Mark as not detected
? ? }
? }
?
? pinMode(LED_BUILTIN, OUTPUT);
?
? // Count the number of detected readers
? uint8_t detectedReaders = 0;
? for (uint8_t i = 0; i < numReaders; i++) {
? ? if (readers[i].ssPin != 0) {
? ? ? detectedReaders++;
? ? }
? }
?
? // Blink the on-board LED based on the number of detected readers
? for (uint8_t i = 0; i < detectedReaders; i++) {
? ? digitalWrite(LED_BUILTIN, HIGH);
? ? delay(200);
? ? digitalWrite(LED_BUILTIN, LOW);
? ? if (i < detectedReaders - 1) {
? ? ? delay(200);
? ? }
? }
}
?
void loop() {
? EthernetClient client;
?
? if (isEthernetConnected) {
? ? client = server.available();
? }
?
? for (uint8_t i = 0; i < numReaders; i++) {
? ? if (readers[i].ssPin == 0) {
? ? ? continue;
? ? }
?
? ? uint8_t uid[] = {0, 0, 0, 0, 0, 0, 0};
? ? uint8_t uidLength;
? ? uint8_t success = readers[i].pn532.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
?
? ? if (success) {
?
? ? ? memcpy(readers[i].nuid, uid, 7);
? ? ? readers[i].cardRead = true;
?
? ? ? byte checksum = readers[i].nuid[0];
? ? ? for (byte j = 1; j < 5; j++) {
? ? ? ? checksum ^= readers[i].nuid[j];
? ? ? }
?
? ? ? // Send output to Serial connection
? ? ? Serial.write(readers[i].id);
?
? ? ? // Send output to Ethernet client if connected
? ? ? if (client) {
? ? ? ? client.write(readers[i].id);
? ? ? }
?
? ? ? for (byte j = 0; j < 5; j++) {
? ? ? ? // Send output to Serial connection
? ? ? ? Serial.print(readers[i].nuid[j] < 0x10 ? "0" : "");
? ? ? ? Serial.print(readers[i].nuid[j], HEX);
?
? ? ? ? // Send output to Ethernet client if connected
? ? ? ? if (client) {
? ? ? ? ? client.print(readers[i].nuid[j] < 0x10 ? "0" : "");
? ? ? ? ? client.print(readers[i].nuid[j], HEX);
? ? ? ? }
? ? ? }
?
? ? ? // Send output to Serial connection
? ? ? Serial.print(checksum < 0x10 ? "0" : "");
? ? ? Serial.print(checksum, HEX);
?
? ? ? // Send output to Ethernet client if connected
? ? ? if (client) {
? ? ? ? client.print(checksum < 0x10 ? "0" : "");
? ? ? ? client.print(checksum, HEX);
? ? ? }
?
? ? ? // Send output to Serial connection
? ? ? Serial.write(0x0D);
? ? ? Serial.write(0x0A);
? ? ? Serial.write('>');
?
? ? ? // Send output to Ethernet client if connected
? ? ? if (client) {
? ? ? ? client.write(0x0D); // CR
? ? ? ? client.write(0x0A); // LF
? ? ? ? client.write('>');? // ETX replaced by '>'
? ? ? }
?
? ? ? delay(500); // Add a delay to avoid multiple reads
? ? } else {
? ? ? readers[i].cardRead = false;
? ? }
? }
} Tom |
On Fri, May 5, 2023 at 12:12 PM, Thomas Seitz wrote:
Steve,Tom I'm just pleased it's finally working! I thought we had a Serial only sketch that did list connected readers, or am I getting mixed up, there's been a lot of sketches! Lol! I guess modifying this sketch for the PN532 would be next? Yes, I'm looking forward to actually connecting up all eight readers and seeing what happens. I'll do this over the next few days. Steve |
On Fri, May 5, 2023 at 08:20 PM, Micheal Hodgson wrote:
YAY my Ethernet shield showed up today!!……….now what? I have two groove 125khz sensors and an uno. I plan to buy more sensors in the near future. Can someone please provide a step per step for hooking it up, then programming followed by the required JMRI settings. Thank you?Michael, Great stuff! Right, we need to know which Ethernet Shield you have bought! The sketches Tom and I have been developing on here use a Shield with the Wiznet 5100 chip. Tom already has a Seeed reader sketch using an Arduino Ethernet Shield.? Once we know thay, we should be sble to progress. Steve |
Locked
Re: SOUND DECODERS
Any sound decoder will require specialised hardware from the appropriate manufacturer to load sound files into the decoder. But JMRI can program the CVs of any decoder through an appropriate NMRA compatible command station. On Fri, 5 May 2023 at 16:34, Lawrence Varady <mrmrsv5049@...> wrote: I'm looking to buy my first sound decoder installed N scale loco. |
to navigate to use esc to dismiss