Packet and Ack Counter
Tagged: log messages, mDot, micro SDK
- This topic has 16 replies, 4 voices, and was last updated 7 years, 4 months ago by Jason Reiss.
-
AuthorPosts
-
June 11, 2017 at 11:41 am #19486Noman AbdulkhudhurBlocked
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?..
June 11, 2017 at 3:20 pm #19491Jason ReissKeymasterhttps://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.
June 12, 2017 at 4:39 am #19495Noman AbdulkhudhurBlockedThanks Jason
I dont know how to read the outputs of my program because I’m using a micro SDK board to connect the mDot?June 21, 2017 at 8:06 am #19618Noman AbdulkhudhurBlockedHi 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
June 21, 2017 at 9:34 am #19619Mike FioreBlockedNoman,
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,
MikeJune 23, 2017 at 3:45 am #19635Noman AbdulkhudhurBlockedThanks 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
NomanJune 23, 2017 at 9:44 am #19640Mike FioreBlockedAre 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,
MikeJune 27, 2017 at 5:40 am #19677Noman AbdulkhudhurBlockedJune 27, 2017 at 5:41 am #19678Noman AbdulkhudhurBlockedSorry the application is below:
mDot_Workshop
June 28, 2017 at 5:05 am #19733Noman AbdulkhudhurBlockedDear 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
June 29, 2017 at 11:03 am #19785Mike FioreBlockedNoman,
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,
MikeJuly 13, 2017 at 10:46 am #19930Noman AbdulkhudhurBlockedHi 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.
NomanJuly 13, 2017 at 11:11 am #19931Jason ReissKeymasterSee example in AT Firmware source code
https://developer.mbed.org/teams/MultiTech/code/Dot-AT-Firmware/file/95c9eb69329a/CommandTerminal/CmdDisplayStats.cppJuly 19, 2017 at 10:06 am #20229Noman AbdulkhudhurBlockedDear 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,
NomanJuly 24, 2017 at 7:08 am #20300Noman AbdulkhudhurBlockedDear 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,
NomanJuly 24, 2017 at 6:27 pm #20306Peter FerlandBlockedThe function returns a populated mDot::mdot_stats object. Did that object not contain any information?
July 25, 2017 at 7:50 am #20309Jason ReissKeymasterLook at main.cpp and the call to mDot::getInstance() that returns a reference to the singleton object.
-
AuthorPosts
- You must be logged in to reply to this topic.