Lora class

Home Forums General Lora class

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20562

    Hi All,
    I need to know where these variables are used please, which are in the Lora.h file:

    typedef struct {
                uint8_t Joined;                     //!< State of session
                uint8_t Rx1DatarateOffset;          
                uint32_t Rx2Frequency;              
                uint8_t Rx2DatarateIndex;          
                uint8_t TxPower;                    
                uint8_t TxDatarate;                 
                uint32_t Address;                   //!< Network address
                uint32_t NetworkID;                 //!< Network ID 24-bits
                uint8_t NetworkSessionKey[16];      //!< Network session key
                uint8_t ApplicationSessionKey[16];  //!< Data session key
                uint16_t ChannelMask[4];            //!< Current channel mask
                uint16_t ChannelMask500k;           
                uint32_t DownlinkCounter;           
                uint32_t UplinkCounter;             
                uint8_t Redundancy;                 
                uint8_t MaxDutyCycle;               
                uint32_t JoinTimeOnAir;             
                uint32_t JoinTimeOffEnd;            
                uint32_t JoinFirstAttempt;          
                uint32_t AggregatedTimeOffEnd;      
                uint16_t AggregateDutyCycle;        
                uint8_t AckCounter;                 
                uint8_t AdrCounter;                 
                uint8_t RxDelay;                    
                uint8_t CommandBuffer[COMMANDS_BUFFER_SIZE]; 
                uint8_t CommandBufferIndex;         
                bool SrvRequestedAck;               
                bool DataPending;                   
                uint8_t RxTimingSetupReqReceived;   
                uint8_t RxParamSetupReqAnswer;      
        } NetworkSession;

    Because I tried to print some of them after a packet transmission and all what I got is “0”.
    I also need to know where the device address is being generated and is it possible to access the content of the function that it does that.

    Really appreciate your help..

    Regards,
    Noman

    #20564
    Jason Reiss
    Keymaster

    The session information is maintained by the library.

    If you want to read the current settings you could access a pointer to the structures through this function in the mDot class.

    lora::Settings* getSettings();

    #20565
    Jason Reiss
    Keymaster

    If you want to see a source code example of a LoRaWAN client, one is available from Semtech.
    https://github.com/Lora-net/LoRaMac-node

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