Packet and Ack Counter

Home Forums mDot/xDot Packet and Ack Counter

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #19486

    I’vev just started working with the mDot and the AEP conduit gateway and I’ve got them connected through TTN. I’m also using a custom program running on the mDot to send packets in a specific intervals. I just need to know how to get some statistics like the number of packets been sent from the mDot and how many of them been received by the gateway.

    Any ideas please?..

    #19491
    Jason Reiss
    Keymaster

    https://developer.mbed.org/teams/MultiTech/code/libmDot-mbed5/file/0c4b59488f41/mDotEvent.h

    PacketRx has number of retries if ack is missed.
    Or a counter can be added to TxDone or MissedAck event.

    MDot.h has getStats() function with some statistic info.

    On application server side monitor the frame counter of each packet.

    #19495

    Thanks Jason
    I dont know how to read the outputs of my program because I’m using a micro SDK board to connect the mDot?

    #19618

    Hi Jason,

    I’m using a micro SDK developer kit to connect the mDot.
    I used to use mDot_USB_AT_firmware to be able to log in to the mDot and use AT commands to do some tests.
    Now that I uploaded my own program to the mDot its overrid the mDot_USB_AT_firmware and I’m no longer able to log in to the mDot.
    also because of that I’m unable of reading my program’s outputs.
    Could you please help me in solving this issue?

    Or is it possible to create a log file with the program outputs or a specific output and then save it on the mDot or somewhere accessible?

    Realy appreciate your support..

    Noman

    #19619
    Mike Fiore
    Blocked

    Noman,

    The debug UART from the mDot is available over the USB connection. You should get 2 COM/tty ports on your PC when you plug in the MDK. One will be the AT command port and the other will be the debug port.

    You’ll want to make sure that debug logging in the Dot Library/AT Firmware is enabled by issuing AT+LOG in the AT Firmware or using the Dot Library API call setLogLevel(const uint8_t& level). Level 0 is off and level 6 is maximum logging.

    Cheers,
    Mike

    #19635

    Thanks Mike,

    It’s good to know that it is possible, However, in my program, I replaced
    dot->setLogLevel(mts::MTSLog::INFO_LEVEL);
    With
    dot->setLogLevel(mts::MTSLog::TRACE_LEVEL);
    and in PuTTY, I selected the XR21V1410 USB UART port instead of STMicroelectronics STLink Virtual COM Port
    but still not able to read any log messages..
    Could you please advise what have I missed or done wrong?

    Thanks again
    Noman

    #19640
    Mike Fiore
    Blocked

    Are you building your own application or using the default AT firmware? What version of the Dot Library or Firmware are you using? What version of mbed-os (if building an app)? If building an app, are you using the same mbed-os version the Dot Library was compiled with?

    Do you have the speed set correctly on the COM port? The AT firmware defaults to 115200 on the command and debug ports.

    Cheers,
    Mike

    #19677

    Dear Mike,

    I’m uploading the following application:

    I’m not sure about how to get the mbed-os version?

    and I have set the speed on the COM port to 115200 but since I’m not using the AT firmware, how can I make sure that I’m using the correct one?

    Thanks.
    Noman

    #19678
    #19733

    Dear Mike,

    I wonder if there is a guide or any sort of documentation on how to read the log messages when using the micro SDK developer kit, because that the issue I’m facing right now.

    Really appreciate your support..

    Noman

    #19785
    Mike Fiore
    Blocked

    Noman,

    Your application needs to be compiled with the same mbed-os version the Dot Library was compiled with (see the revision for mbed-os and the Dot Library). When you’re looking at the revisions, the bolded line is the current version you’re using. You can switch to other versions by clicking the desired version and the “switch” button.

    The STLink Virtual COM Port should be the device’s debug port. Make sure your terminal emulator has HW flow control turned off and has the baud set to match your application.

    If you still run into issues, you can try out our example programs for the Dots. We have a manual mode example (looks like that’s what you’re trying to do).

    https://developer.mbed.org/teams/MultiTech/code/Dot-Examples/

    You’ll need to import the mDot library. The development version for mDot is the newest and best and is compatible with the latest version of the examples.

    https://developer.mbed.org/teams/MultiTech/code/libmDot-dev-mbed5/

    Cheers,
    Mike

    #19930

    Hi Guys,

    I’ve been told that in order to get statistics about the packet transmission,
    getStats() in the mDot.h header is what I want, so I did call it in my main.cpp file after the transmission if done, but I did not get any statistics.
    it might be the way I’m calling it, so could you please tell me where and how to proparly call this function?

    Really appreciate your help.
    Noman

    #19931
    Jason Reiss
    Keymaster
    #20229

    Dear Jason,

    I looked at the above example in AT Firmware source code, and to be honest it wasn’t clear on how do I call the getStats() function
    I tried:
    mDot::getStats();
    but it shows the following erorr:
    “a nonstatic member reference must be relative to a specific object”
    and I read that it is because getStats() is not a static function.
    I would really appreciate if you could help me on how to call this function in my main program..

    Regards,
    Noman

    #20300

    Dear Jason,

    I have read that in order to call a non-static function it have to call it through an object. so i did the following (also changed mDot from private to public):

    mDot aa,
    aa.getStats();

    however, i didnt get any statistics about the communication after the communication is done.
    so, does getStats(), automatically print the statistics variouble (Up, Down, Joins, JoinFails, MissedAcks) or do i have to print them after the function is called?
    I’m sorry for keep asking about this issue but its really important for me to get such statistics about the packet transmission.
    Please help..

    Regards,
    Noman

    #20306
    Peter Ferland
    Blocked

    The function returns a populated mDot::mdot_stats object. Did that object not contain any information?

    #20309
    Jason Reiss
    Keymaster

    Look at main.cpp and the call to mDot::getInstance() that returns a reference to the singleton object.

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