Hi,
Currently adding a user web interface to the LoRaWAN Server and I have come across a strange problem.
LoRaWAN server holds a table for the #rxframe and a table for the #node. I am trying to get the last message sent by the node to update the webpage.
I can get the last datetime a message was sent by searching the node table.
MatchHead = #node{last_rx='$1',devaddr= <<16#26011C6F:32>>, _='_'},
Guard = [],
Result = ['$1'],
[DeviceLastRx]=mnesia:dirty_select(node,[{MatchHead, Guard, Result}]), % Get last data time point
Here I am using a fixed devaddr for development. This gives me a nice clean universal datetime such as {{2020,5,27},{12,5,14}}
If I now search the #rxframe table for this message I find the datetimes stored in the #rxframe table have fractions of a second? such as {{2020,5,27},{12,4,5.986800e+01}}
Looking through the code for the LoRaWAN server I can not see why there should be fractions of a second. The source code always uses datetime=calendar:universal_time() which should give whole seconds.
Anyone any ideas?
Thanks,
MPC