Intercepting Conduit FOTA Descriptor and Checksum Response Packets.

Home Forums mDot/xDot Intercepting Conduit FOTA Descriptor and Checksum Response Packets.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31638
    Ajay K
    Participant

    We have overridden the PacketRx method in our custom firmware class as shown below for our FOTA implementation.

    void CustomLora::PacketRx(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries, uint32_t address, uint32_t fcnt, bool dupRx) {
    	mDotEvent::PacketRx(port, payload, size, rssi, snr, ctrl, slot, retries, address, fcnt, dupRx);
    	
    	if(port == 200 || port == 201 || port == 202) {
    	    Fota::getInstance()->processCmd(payload, port, size);
    	}
    }

    1) I was hoping to intercept the FOTA Frag Session Setup request on port 201 with payload 0200xxxxxxxxxxdddddddd where dddddddd
    is the descriptor. However I am not sure how do I distinguish this payloads that arrive on port 201 from the other payload that arrive on this port? We want to be able to make some decisions based on the descriptor passed in this Fragment Session setup packet. Based on the Multitech documentation on FOTA fragmentation the command type “02” is that unique for this payload?

    2) I have a similar question on how to intercept the Checksum response packet, which has a payload 800x where x indicates correct (1) or incorrect(0). Is the command type “80” unique to identify the checksum response?

    3) Finally if the checksum response is incorrect, does the underlying fota implementation delete the file that was downloaded so far from the external flash and/or does the conduit attempt to send the entire firmware again?

    Thanks,
    Ajay

    #31639
    Ajay K
    Participant

    Any thoughts Multitech team as to how I can intercept these packets definitively?

    #31640
    Taylor Heck
    Blocked

    You can assume a message on port 201 with command ID 0x02 is a fragmentation setup request with the descriptor field and a message on port 201 with command ID 0x80 is a checksum response.

    If the checksum response is incorrect the received file is deleted. Also, the checksum request is sent up to 3 times, if no response is received the file is deleted.

    The Conduit does not send the file again.

    #31645
    Ajay K
    Participant

    Thanks Taylor for taking the time to respond and for the clarifications provided. Have a great day!

    Thanks,
    Ajay

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.