[Solved] Need help receiving downlinks in Serial Data Mode

Home Forums mDot/xDot [Solved] Need help receiving downlinks in Serial Data Mode

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22775
    Anthony Nguyen
    Participant

    EDIT: I just found out Senet’s console takes in hex for downlinks, and that SD is working perfectly.

    Original: I currently have a mDot set to Class C in Serial Data Mode, and it’s connected to a gateway set up with Senet’s packet forwarder. It seems to be sending and receiving packets just fine; after sending 4 downlinks from the Senet console, AT+DLC returns 4. The Senet console also shows that the downlinks were confirmed, and AT+RECV shows the last payload.

    What I am having trouble with is receiving the payloads in real-time in Serial Data Mode, as explained in the documentation and shown in this video (timestamped). I put it into serial data mode with AT+SD, and it responds with CONNECT. I can send data by typing characters through picocom, but nothing ever shows up if I try to send a downlink. Is there anything else I need to set to get it to show up?

    Thanks

    #22789
    Jason Reiss
    Keymaster

    CommandTerminal.cpp shows the code for a received packet. It should write to the serial port when in serial data mode and a packet is received with port != 0.
    You should also see debug output for the number of bytes received for each packet.

    
    void CommandTerminal::RadioEvent::PacketRx(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries, uint32_t address) {
        mDotEvent::PacketRx(port, payload, size, rssi, snr, ctrl, slot, retries, address);
    
        if (serial_data_mode && port != 0) {
            logDebug("Rx %d bytes", size);
            if (size > 0) {
                CommandTerminal::Serial()->write((char*) RxPayload, RxPayloadSize);
            }
            if (!CommandTerminal::Serial()->readable() && _dot->getAckRequested() && _dot->getClass() == "C") {
                _sendAck = true;
            }
        }
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.