diff --git a/Docs/BST-BME680-DS001-00.pdf b/Docs/BST-BME680-DS001-00.pdf new file mode 100755 index 0000000..dcc1926 Binary files /dev/null and b/Docs/BST-BME680-DS001-00.pdf differ diff --git a/Docs/Beehive health monitor rev3.pdf b/Docs/Beehive health monitor rev3.pdf new file mode 100755 index 0000000..0670d16 Binary files /dev/null and b/Docs/Beehive health monitor rev3.pdf differ diff --git a/Docs/asciiplot.c b/Docs/asciiplot.c new file mode 100755 index 0000000..ce6d5e8 --- /dev/null +++ b/Docs/asciiplot.c @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include + +#define print printf + +void graph(uint32_t width, uint32_t height, float *values, uint32_t count) +{ + float max = FLT_MIN; + float min = FLT_MAX; + for (int i = 0; i < count; i++) { + float f = values[i]; + if (f < min) min = f; + if (f > max) max = f; + } + + float ystep = (max - min) / (float)height; + int xstep = count / width; + + printf("min %f max %f\r\n", min, max); + + for (int i = height-1; i >= 0; i--) { + float thr = i*ystep; + for (int j = 0; j < width; j++) { + float acu = 0; + int cnt = 0; + for (int k = j*xstep; k < (j+1)*xstep && k < count; k++, cnt++) { + acu += values[k]; + } + //acu /= (float)cnt; + + float sample = acu;//values[j*xstep]; + if (sample >= thr) { + print("#"); + } else { + print(" "); + } + } + print("\r\n"); + } +} + +void graphx(uint32_t width, uint32_t height, float *values, uint32_t count, float xbin) +{ + printf("Count: %d\r\n", count); + + float max = FLT_MIN; + float min = FLT_MAX; + for (int i = 0; i < count; i++) { + float f = values[i]; + if (f < min) min = f; + if (f > max) max = f; + } + printf("Min: %f, Max: %f\r\n", min, max); + + float ystep = (max - min) / height; + int xstep = count / width; + printf("Step: Y %f, X %d\r\n", ystep, xstep); + + for (int i = height-1; i >= 0; i--) { + float thr = i*ystep; + printf("%9.3f ", thr); + for (int j = 0; j < width; j++) { + float sample = values[j*xstep]; + if (sample >= thr) { + printf("#"); + } else { + printf(" "); + } + } + printf("\r\n"); + } + + printf(" "); + for (int j = 0; j < width; j += 9) { + printf("^%-7.1f ", j*xstep*xbin); + } + printf("\r\n"); +} + + +void graph_notxt(uint32_t width, uint32_t height, float *values, uint32_t count) +{ + float max = FLT_MIN; + float min = FLT_MAX; + for (int i = 0; i < count; i++) { + float f = values[i]; + if (f < min) min = f; + if (f > max) max = f; + } + + float ystep = (max - min) / height; + int xstep = count / width; + + for (int i = height-1; i >= 0; i--) { + float thr = i*ystep; + for (int j = 0; j < width; j++) { + float sample = values[j*xstep]; + if (sample >= thr) { + printf("#"); + } else { + printf(" "); + } + } + printf("\r\n"); + } +} + + +int main() { + float values[] = { + 7.9122, 15.4885, 14.0256, 11.1204, 5.1178, 2.6390, 7.9967, 8.5742, 10.3803, 30.2162, 14.8622, 11.3653, 6.8459, 4.3735, 3.9876, 5.9205, 10.6627, 7.7333, 9.6134, 8.2269, 5.7907, 4.3758, 4.5274, 6.7128, 8.7482, 7.9532, 9.2303, 8.2405, 6.5423, 6.6210, 6.8379, 7.5010, 10.1984, 9.7803, 8.4056, 7.1655, 7.0155, 7.6882, 8.8738, 8.3281, 9.3178, 7.4093, 7.1354, 6.2562, 6.8689, 9.0996, 10.5141, 10.5319, 7.7416, 5.1560, 4.4137, 4.3777, 6.3691, 9.2786, 10.5320, 10.2588, 7.8968, 3.2069, 2.3211, 1.8063, 5.3873, 8.1751, 7.4886, 10.7107, 15.6457, 5.6788, 3.3284, 3.1329, 2.9618, 2.5223, 3.9515, 5.8041, 7.9539, 5.8484, 5.4875, 4.5542, 2.8538, 1.9458, 2.8056, 4.2853, 5.7298, 7.7727, 6.0443, 4.9757, 3.8207, 3.3878, 3.6531, 3.5916, 5.3526, 6.9882, 5.1091, 4.1503, 4.1155, 3.4408, 3.8566, 3.6218, 1.2501, 6.4602, 3.7347, 4.1925, 4.7306, 4.6737, 4.0282, 1.8586, 4.3765, 2.3229, 1.0740, 2.3407, 3.3380, 3.0223, 2.9634, 2.2029, 3.0592, 1.8562, 1.2132, 1.8783, 3.0253, 3.0674, 1.9376, 1.2596, 4.0257, 2.8297, 1.7539, .4097, 1.8720, 1.4616, 1.6670, 3.7295, 5.8980, 4.8732, 5.3492, 3.6543, 3.3389, 2.4343, 2.6613, 2.9141, 5.3350, 4.2145, 5.1110, 4.5290, 3.7612, 2.4055, 2.1686, 2.9036, 4.3619, 5.4208, 4.4054, 3.6352, 3.8976, 2.9880, 2.9534, 3.5572, 4.3405, 4.1525, 3.3131, 3.1148, 3.4181, 2.9501, 3.4882, 3.7625, 3.9005, 4.8383, 3.6994, 3.3247, 3.5891, 3.1072, 3.4966, 3.6136, 1.2855, 2.2557, 1.8968, 2.2898, 2.8533, 2.6284, 2.8373, 2.5571, 1.2642, 1.2734, .5556, 1.5960, 2.1394, 1.9587, 1.8949, .5686, 2.1763, 1.0300, 1.0305, .4355, 1.0321, .6552, .5473, 2.1480, 4.8649, 6.6942, 3.9553, 2.9643, 2.3177, 1.5238, 1.4269, 1.3847, 3.4890, 5.0525, 4.3353, 3.6110, 1.9356, 1.2295, 1.3110, 1.6193, 3.4029, 3.8891, 4.0635, 3.7704, 3.1042, 2.7323, 3.0874, 3.2893, 3.5264, 2.7416, 2.7293, 2.9464, 3.1851, 2.4064, 2.8488, 3.5234, 4.0049, 3.6930, 4.0918, 3.6662, 3.2726, 3.6437, 3.6651, 4.8180, 2.6633, 3.3513, 1.7259, 2.3791, 2.7765, 2.8950, 3.2874, 3.9055, .8976, .4165, 1.3985, 1.9336, 1.7956, 2.0202, 2.0239, 2.4125, .8405, 1.7271, 1.3820, .1073, 1.1518, 1.2711, .1840, 3.4166, 8.9001, 3.7830, 2.0859, 2.7311, 2.8627, 1.8624, 1.5272, .7393, 5.6784, 8.5273, 2.9838, 2.9936, 3.2163, 3.1172, 3.1722, 3.0817, 4.9154, 4.9335, 4.8573, 4.4012, 3.7569, 3.6366, 3.3958, 4.5656, 4.9252, 2.0287, 3.1920, 3.3289, 3.4142, 3.1629, 3.1271, 4.5701, 1.5533, 3.2518, 3.8073, 2.9001, 2.8968, 3.8769, 4.1020, 7.8684, 2.1236, 1.6868, 1.7023, 2.2462, 1.8722, 2.9638, 3.5711, 8.4603, 4.0744, .3085, .5369, .8964, 1.2363, 2.7718, 4.2328, 10.8456, 4.6507, .4370, .6030, 1.2642, 1.7562, 2.0253, 1.7721, 6.1142, 1.6511, 3.9602, 2.8512, 2.2518, 1.8157, 1.7400, .4071, .4452, .8210, 3.3484, 3.3767, 3.3707, 2.5932, 1.5860, 1.6496, 1.3624, 2.1473, 2.9355, 3.3317, 2.8792, 2.7265, 1.9056, 1.8979, 2.9130, 2.1400, 2.5999, 2.7493, 2.8211, 1.9164, 2.2649, 1.6781, 3.8375, 4.0695, 1.2247, 3.4738, 3.1840, 3.0826, 3.5416, 3.7712, 4.3819, 2.6160, .7620, 2.3114, 1.9893, 2.2001, 3.1579, 3.4090, 3.6613, .3611, 1.0522, .4859, .6775, 1.8368, 2.8693, 2.7450, 1.4946, 3.0855, 1.1593, .7523, .6521, 1.6794, 1.9549, .9588, 2.2955, .7199, .9664, .6348, 2.4077, 2.7459, 1.7274, .8986, 1.1171, 2.0476, 1.8678, 2.1912, 3.5698, 3.1827, 2.5690, 1.6740, 1.2870, 2.3683, 3.3240, 3.4424, 3.6908, 3.4183, 2.3208, 2.0847, 2.1928, 2.3461, 4.0773, 4.0457, 3.5052, 3.0517, 2.4563, 3.0366, 3.5991, 2.7896, 3.0155, 2.2135, 3.4312, 3.5615, 3.1951, 4.2116, 4.5400, 3.3959, 2.1494, 1.4433, 2.8180, 2.6516, 3.5310, 4.1773, 3.6040, 3.0339, 2.3910, 1.5410, 1.7103, 1.9205, 2.7075, 2.9913, 4.9059, 2.0915, 1.7890, 1.4500, 1.3811, 1.7994, 2.4421, 1.3852, 1.4849, 1.7717, 1.4743, 2.0103, 3.3933, 3.0824, 1.2299, .6821, 1.8469, 1.0739, 1.7390, 2.8815, 4.0901, 4.5316, 3.2601, 2.0226, 1.6857, 4.0506, 3.8988, 4.4013, 5.1447, 4.4952, 3.7147, 3.4192, 3.7969, 6.2508, 5.5000, 4.7111, 5.1983, 4.4876, 3.8144, 4.3992, 2.4931, 5.2745, 4.4066, 3.3767, 4.1854, 3.6291, 3.7902, 5.3007, 5.4523, 4.8626, 4.0116, 2.7825, 3.1969, 3.4395, 4.1534, 4.7302, 3.9756, 3.3272, 3.0657, 1.5616, 1.9079, 2.0840, 3.6461, 5.0424, 5.2633, 3.7599, 2.3404, 1.5188, 1.4977, 1.8091, 2.5423, 3.9926, 4.0317 + }; + + float values2[] = {16.4778,.0152,.0485,.0549,.0683,.0300,.0902,.0408,.0459,.0368,.0568,.1400,.0161,.0116,.0305,.0532,.0519,.0271,.0525,.0851,.0174,.0211,.0347,.0796,.0294,.0252,.1227,.0382,.0091,.0251,.0346,.0954,.0211,.0600,.0789,.0777,.0194,.0248,.0120,.0358,.0823,.0278,.0494,.1074,.0114,.0284,.0208,.0360,.0629,.0331,.0665,.0301,.0384,.0058,.0117,.0504,.0364,.0418,.1033,.0423,.0197,.0186,.0119,.0434,.0633,.0214,.0332,.0976,.0462,.0365,.0522,.0195,.0371,.0207,.0461,.0778,.0379,.0503,.0092,.0494,.0217,.0220,.0977,.1793,.0082,.0184,.0288,.0822,.0113,.0459,.0891,.0706,.0267,.0075,.0119,.0669,.0258,.0343,.0442,.1912,.0198,.0356,.0428,.0150,.1746,.0226,.1366,.0719,.0251,.0396,.0251,.0252,.0673,.0617,.0220,.1093,.0242,.0489,.0194,.0423,.0044,.0031,.1262,.0570,.0749,.0396,.0266,.0226,.0112,.0334,.0332,.0578,.0447,.0520,.0275,.0421,.0036,.0105,.0464,.1251,.0488,.0148,.0282,.0147,.0380,.0305,.1203,.1539,.0265,.0129,.0346,.0747,.0237,.0468,.0169,.0482,.0360,.0297,.0234,.0255,.0313,.0465,.0617,.0245,.0248,.0292,.0175,.0315,.3682,.0380,.0561,.0484,.0393,.0522,.0381,.0166,.0291,.0403,.0817,.0559,.0085,.0255,.0182,.0556,.0095,.0371,.0177,.0547,.0458,.0297,.0117,.0135,.0549,.0303,.0488,.0857,.0287,.0449,.0338,.0409,.0593,.0167,.0220,.0368,.0242,.0384,.0103,.0322,.0111,.0398,.0363,.0643,.0419,.0507,.0353,.0609,.0226,.0201,.0878,.1060,.0346,.0507,.0316,.0339,.0292,.0412,.1011,.1131,.0238,.0182,.0367,.0265,.4082,.0317,.0758,.0869,.0220,.0246,.0807,.0251,.0274,.0263,.0309,.0991,.0672,.0117,.0074,.0446,.0305,.0200,.0383,.0644,.0465,.0381,.0116,.0209,.0898,.0111,.0795,.0583,.0398,.0420,.0338,.0117,.0127,.0145,.0281,.0248,.0666,.0304,.0389,.0385,.0333,.0372,.0270,.1239,.0243,.0343,.0248,.1920,.0371,.0361,.0850,.1027,.0418,.0415,.0428,.0685,.0338,.0136,.0553,.0267,.0286,.0734,.0659,.0429,.1652,.0292,.0546,.0367,.0274,.0419,.0213,.0100,.0311,.0445,.0536,.0182,.0183,.0188,.0182,.0404,.0213,.0549,.0806,.0344,.0130,.0455,.0190,.0773,.0160,.0256,.0859,.0593,.0289,.0645,.0499,.0278,.0043,.0049,.0714,.1081,.0537,.0128,.0459,.0592,.0356,.0701,.0573,.1237,.0443,.0182,.0230,.5030,.0214,.0469,.0241,.0654,.0394,.0254,.0465,.0374,.0233,.0430,.0552,.1338,.0230,.0366,.0539,.0545,.0466,.0280,.1164,.0277,.0125,.0131,.0255,.0187,.0262,.0644,.0588,.0150,.0592,.0273,.0212,.0566,.0265,.0246,.1553,.0597,.0355,.0540,.0130,.0543,.0324,.0179,.0363,.1126,.0321,.0148,.0564,.0352,.0694,.0239,.0550,.0696,.0589,.0399,.0321,.0431,.0194,.0188,.0768,.0958,.0379,.0227,.0164,.4803,.0212,.0343,.0981,.1997,.0176,.0534,.0536,.0670,.0341,.0215,.0745,.0744,.0369,.0340,.0282,.0211,.0469,.0174,.0553,.0611,.0090,.0696,.0432,.0104,.0116,.0182,.0297,.0670,.0201,.0286,.0159,.0379,.0439,.0513,.1406,.0893,.0356,.0191,.0147,.0250,.0232,.0378,.0902,.2414,.0109,.0478,.0311,.0426,.0173,.0248,.0317,.0432,.0094,.0155,.0288,.0308,.0252,.0306,.0529,.1098,.0483,.0586,.0114,.2164,.0067,.0153,.1510,.0960,.0550,.0283,.0215,.0398,.0647,.0389,.0879,.0376,.0213,.0355,.0275,.0316,.0744,.0007,.0453,.1154,.0493,.0225,.0371,.0209,.0769,.0302,.1804,.0264,.0186,.0502,.0115,.0251,.0104,.0230,.0678,.0126,.0061,.0146,.0570,.0263,10.4977,.0325,.0357,.0677,.0594,.0473,.1246,.0734,.2829,.0637,.0227,.1208,.0421,.0248,.0079,.0710,.1917,.0548,.0876,.2174,.0232,.0097,.0688,.1140,.0974,.0431,.0905,.1107,.0618,.0304,.0790,.0766,.0633,.0533,.0746,.0803,.0377,.0140,.0343,.0686,.0392,.0581,.1085,.0472,.0083,.0398,.0619,.1247,.0862,.0602,.0820,.0660,.0415,.0190,.0163,.1657,.0412,.0451,.0993,.0352,.0583,.0263,.0356,.3486,2.1308,.0653,.0715,.0660,.0259,.0277,.0342,.0575,.3096,.0626,.0464,.0551,.0458,.0762,.0355,.0780,.1687,.0737,.0656,.1577,.0297,.0257,.0215,.1464,.0649,.0299,.0209,.0548,.0468,.0156,.0840,.0706,.0840,.0639,.0497,.1987,.0211,.0085,.0122,.0705,.2125,.0478,.0764,.0534,.0183,.0357,.0625,.0922,.0705,.0605,.1382,.0335,.0328,.0903,.0553,.0912,.0553,.0384,.1005,.0527,.0833,.0243,.0476,.3440,1.1950,.0332,.1074,.0858,.0193,.0560,.0424,.0669,.2699,.0684,.0244,.1469,.0187,.0470,.0772,.0854,.1347,.0910,.0994,.0795,.0520,.0181,.0723,.2011,.0774,.0537,.0226,.0793,.0558,.0019,.0427,.0652,.0725,.0439,.1101,.0955,.0251,.0352,.0288,.0919,.8730,.0536,.0816,.0720,.0503,.0419,.0363,.0913,.0796,.0497,.0819,.0468,.0356,.0362,.0586,.2251,.0551,.0504,.0704,.0073,.0559,.0509,.0634,.4504,.7419,.0232,.0317,.0718,.0487,.0100,.0238,.0738,.2188,.0619,.0496,.0686,.0286,.0336,.0283,.0623,.1322,.0171,.0627,.0620,.0272,.0548,.0038,.1845,.0873,.0520,.0968,.0589,.0471,.0640,.0500,.0724,.0442,.0194,.1255,.0823,.0191,.0596,.0522,.0829,.6633,.0759,.0396,.1256,.0412,.0347,.0547,.1141,.0819,.0357,.0489,.1018,.0555,.0128,.0362,.1604,.0836,.0159,.1187,.0317,.0347,.0211,.0322,.5518,.6692,.0552,.0864,.0543,.0290,.0205,.0123,.0869,.2125,.0593,.0122,.0484,.0552,.0379,.0305,.0644,.1563,.0313,.0671,.1229,.0208,.0405,.0668,.2046,.1025,.0834,.0945,.1341,.0342,.0309,.0130,.0446,.0416,.0057,.1114,.1764,.0219,.0602,.0621,.0762,.1253,.0503,.0721,.0623,.0430,.0611,.0700,.1406,.0429,.0138,.0697,.0430,.0422,.0750,.0539,.2063,.0796,.0583,.1218,.0568,.0115,.0178,.0421,.6342,.4985,.0429,.0699,.0679,.0568,.0318,.0504,.0281,.1852,.0656,.0991,.0821,.0375,.0374,.0144,.1010,.1036,.0345,.1205,.1436,.0588,.0393,.0771,2.3870,.0860,.0639,.0686,.0973,.0147,.0243,.0316,.0557,.0882,.0425,.1057,.1913,.0544,.0641,.0880,.0750,.1715,.0122,.1227,.0372,.0398,.0246,.0756,.1267,.0495,.0656,.1121,.0535,.0506,.0330,.0435,.2454,.0830,.0499,.0858,.0825,.0323,.0543,.0589,.9529,.4282,.0496,.0447,.1849,.0377,.0420,.0693,.0433,.2064,.0552,.0666,.1293,.0612,.0588,.0213,.1039,.0884,.0367,.0376,.1198,.0260,.0383,.0364,.4076,.1022,.0525,.0192,.0279,.0173,.0415,.0132,.0537,.0601,.0478,.0255,.0731,.0604,.0246,.0284,.1075,.1490,.0310,.0619,.0690,.0518,.0470,.0488,.1686,.0648,.0653,.0899,.0787,.0314,.0576,.0256,.2681,.0487,.0216,.0311,.0385,.0248,.0296,.0530,1.4637,.3347,.0194,.0567,.0592,.0395,.0513,.0694,.0719,.1327,.0698,.0715,.0608,.0194,.0256,.0142,.0699,.1080,.0187,.0077,.0387,.0492,.0504,.0363,.1628,.0507,.0413,.1119,.1031,.0556,.0259,.0296,.0704,.0180,.0804,.0500,.0853,.0260,.0344,.0295,.0872,.1355,.0274,.1091,.0752,.0311,.0325,.0111,.1644,.0149,.0299,.0847,.0429,.0137,.0291,.0543,.3282,.0561,.0174,.0595,.0358,.0301,.0351,.0666,3.4704}; + + //graph(70, 20, values, 512, 1); + graph(70, 20, values2+1, 1024-1); + + return 0; +} diff --git a/Docs/bees-downscaled.mp4 b/Docs/bees-downscaled.mp4 new file mode 100755 index 0000000..a0de529 Binary files /dev/null and b/Docs/bees-downscaled.mp4 differ diff --git a/Docs/data/msg.csv b/Docs/data/msg.csv new file mode 100755 index 0000000..a9cc60a --- /dev/null +++ b/Docs/data/msg.csv @@ -0,0 +1,40 @@ +Counter Date Temperature [°C] Humidity [%RH] Pressure [hPa] Gas_R [Ohm] +0 2017-11-19T00:28:25.886114104Z 18.38 43.15 980.36 3269 +0 2017-11-19T00:30:11.242872073Z 18.31 45 980.38 2544 +1 2017-11-19T00:45:11.1945072Z 18.02 45.25 980.4 1179 +2 2017-11-19T01:00:11.450923042Z 17.7 45.99 980.48 1167 +3 2017-11-19T01:15:11.407529109Z 17.32 45.51 980.48 1177 +4 2017-11-19T01:30:11.37267056Z 16.96 46.01 980.44 1199 +5 2017-11-19T01:45:11.353315634Z 16.73 46.89 980.4 1199 +6 2017-11-19T02:00:11.330342269Z 16.5 47.15 980.24 1217 +7 2017-11-19T02:15:11.311856626Z 16.46 47.19 980.08 1215 +8 2017-11-19T02:30:11.276571465Z 16.37 47.28 979.98 1227 +9 2017-11-19T02:45:11.234077769Z 16.17 48.77 979.93 1246 +10 2017-11-19T03:00:11.18933877Z 15.98 49.66 979.87 1265 +11 2017-11-19T03:15:11.189330414Z 15.83 49.38 979.77 1285 +12 2017-11-19T03:30:11.106471894Z 15.72 49.34 979.71 1303 +13 2017-11-19T03:45:11.091081014Z 15.66 49.36 979.69 1331 +14 2017-11-19T04:00:11.018839733Z 15.4 49.67 979.61 1356 +15 2017-11-19T04:15:10.976218379Z 15.28 49.64 979.51 1369 +16 2017-11-19T04:30:10.925454084Z 15.21 49.66 979.37 1374 +17 2017-11-19T04:45:10.883011396Z 15.08 50.09 979.24 1400 +18 2017-11-19T05:00:10.839025456Z 15.02 49.96 979.18 1402 +19 2017-11-19T05:15:10.791999181Z 14.9 50.39 979.08 1433 +20 2017-11-19T05:30:10.747466238Z 14.84 50.55 979.1 1457 +21 2017-11-19T05:45:10.698752662Z 14.79 51.28 979 1488 +22 2017-11-19T06:00:10.654520149Z 14.83 51.23 978.94 1481 +23 2017-11-19T06:15:10.616740706Z 14.73 51.18 978.86 1500 +24 2017-11-19T06:30:10.563964392Z 14.63 51.08 978.86 1527 +25 2017-11-19T06:45:10.527035761Z 14.72 51.08 978.9 1531 +26 2017-11-19T07:00:10.481701498Z 14.62 51.23 978.98 1558 +27 2017-11-19T07:15:10.450052347Z 14.62 51.81 979.04 1547 +28 2017-11-19T07:30:10.400036074Z 14.58 51.46 979.08 1568 +29 2017-11-19T07:45:10.351304737Z 14.61 51.33 979.08 1626 +30 2017-11-19T08:00:10.316030924Z 14.71 50.78 979.12 1626 +31 2017-11-19T08:15:10.265904687Z 14.83 51.1 979.18 1609 +32 2017-11-19T08:30:10.225971031Z 14.93 50.43 979.22 1590 +33 2017-11-19T08:45:10.184208058Z 15.02 51.01 979.24 1601 +34 2017-11-19T09:00:10.13619287Z 15.24 50.22 979.22 1594 +35 2017-11-19T09:15:10.096224322Z 15.46 49.12 979.33 1578 +0 2017-11-19T09:25:02.750364716Z 14.57 47.09 979.39 4898 +0 2017-11-19T09:25:15.740755787Z 14.6 46.93 979.37 4631 diff --git a/Docs/data/msg.json b/Docs/data/msg.json new file mode 100755 index 0000000..e245ff3 --- /dev/null +++ b/Docs/data/msg.json @@ -0,0 +1 @@ +[{"port": 0, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-02T22:41:41.034841089Z", "gateways": [{"snr": -13, "rssi": -120, "time": "2017-11-02T22:42:04.570533Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 244389452}, {"snr": -2.2, "rssi": -111, "time": "2017-11-02T22:41:40.981456Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 6, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 1967542572, "location_source": "registry"}, {"snr": 0.2, "rssi": -119, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 477647364, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": null, "hardware_serial": "333934374F357D14"},{"port": 0, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-02T22:41:50.866283704Z", "gateways": [{"snr": -12.8, "rssi": -121, "time": "2017-11-02T22:42:14.568072Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 254393892}, {"snr": -2.2, "rssi": -110, "time": "2017-11-02T22:41:50.981772Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 0, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 1977547012, "location_source": "registry"}, {"snr": -1, "rssi": -107, "time": "2017-11-02T22:41:50.936852Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 340, "latitude": 50.06284, "rf_chain": 0, "longitude": 14.43201, "timestamp": 2272721788}, {"snr": 0.8, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 487651804, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": null, "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-03T00:18:32.08432495Z", "gateways": [{"snr": -11.2, "rssi": -120, "time": "2017-11-03T00:18:31.345076Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3500130036}, {"snr": -11, "rssi": -119, "time": "2017-11-03T00:18:56.056892Z", "gtw_id": "eui-1dee148a60342739", "channel": 5, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1760519548}, {"snr": -6.2, "rssi": -109, "time": "2017-11-03T00:18:32.072866Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 5, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 3483672492, "location_source": "registry"}, {"snr": -3.8, "rssi": -119, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1993777588, "location_source": "registry"}, {"snr": 5, "rssi": -104, "time": "2017-11-03T00:18:32.028434Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43206, "timestamp": 3778846684}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-03T00:18:42.097090067Z", "gateways": [{"snr": -11, "rssi": -119, "time": "2017-11-03T00:19:06.062757Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1770524964}, {"snr": -3.5, "rssi": -110, "time": "2017-11-03T00:18:42.083247Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 1, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 3493677908, "location_source": "registry"}, {"snr": -3, "rssi": -105, "time": "2017-11-03T00:18:42.033849Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43206, "timestamp": 3788852100}, {"snr": -0.2, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2003783004, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 2, "metadata": {"time": "2017-11-03T00:21:00.450739707Z", "gateways": [{"snr": -16.8, "rssi": -119, "time": "2017-11-03T00:21:24.364466Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1908818588}, {"snr": -13.2, "rssi": -120, "time": "2017-11-03T00:20:59.640829Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3648428924}, {"snr": -6.5, "rssi": -112, "time": "2017-11-03T00:21:00.366019Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 6, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 3631971532, "location_source": "registry"}, {"snr": -6, "rssi": -119, "time": "2017-11-03T00:21:00.327451Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43206, "timestamp": 3927145716}, {"snr": 5.5, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2142076628, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDI=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 3, "metadata": {"time": "2017-11-03T00:21:12.107548791Z", "gateways": [{"snr": -19.8, "rssi": -120, "time": "2017-11-03T00:21:36.087603Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1920540724}, {"snr": -11, "rssi": -110, "time": "2017-11-03T00:21:12.04957Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43206, "timestamp": 3938867836}, {"snr": -4.8, "rssi": -111, "time": "2017-11-03T00:21:12.088081Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 0, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 3643693660, "location_source": "registry"}, {"snr": 3, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2153798764, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMTY=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-03T00:23:16.686639707Z", "gateways": [{"snr": -16, "rssi": -118, "time": "2017-11-03T00:23:15.925794Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3784705932}, {"snr": -9.8, "rssi": -111, "time": "2017-11-03T00:23:16.646708Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 5, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 3768248660, "location_source": "registry"}, {"snr": -3.2, "rssi": -118, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2278353772, "location_source": "registry"}, {"snr": 7, "rssi": -102, "time": "2017-11-03T00:23:16.604548Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43208, "timestamp": 4063422828}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "confirmed": true, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-03T00:23:25.443539562Z", "gateways": [{"snr": -8.5, "rssi": -110, "time": "2017-11-03T00:23:25.355716Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 1, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 3776977164, "location_source": "registry"}, {"snr": 1.2, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2287082268, "location_source": "registry"}, {"snr": 2, "rssi": -107, "time": "2017-11-03T00:23:25.333043Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43208, "timestamp": 4072151324}], "data_rate": "SF9BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "confirmed": true, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 2, "metadata": {"time": "2017-11-03T00:23:45.991639357Z", "gateways": [{"snr": -7, "rssi": -108, "time": "2017-11-03T00:23:45.914145Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43208, "timestamp": 4092732428}, {"snr": -3, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2307663380, "location_source": "registry"}], "data_rate": "SF9BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "confirmed": true, "payload_raw": "SEVMTE8tMDI=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 3, "metadata": {"time": "2017-11-03T00:24:04.651238516Z", "gateways": [{"snr": -6.5, "rssi": -112, "time": "2017-11-03T00:24:04.536166Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 1, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 3816159004, "location_source": "registry"}, {"snr": -4, "rssi": -107, "time": "2017-11-03T00:24:04.514879Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43208, "timestamp": 4111333164}, {"snr": -1.8, "rssi": -119, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2326264116, "location_source": "registry"}], "data_rate": "SF9BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "confirmed": true, "payload_raw": "SEVMTE8tMDQ=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 4, "metadata": {"time": "2017-11-03T00:24:23.308729592Z", "gateways": [{"snr": -7.2, "rssi": -110, "time": "2017-11-03T00:24:23.135359Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 1, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 3834762668, "location_source": "registry"}, {"snr": -3.5, "rssi": -117, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2344867780, "location_source": "registry"}, {"snr": 2, "rssi": -106, "time": "2017-11-03T00:24:23.118533Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43208, "timestamp": 4129936820}], "data_rate": "SF9BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "confirmed": true, "payload_raw": "SEVMTE8tMDY=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 5, "metadata": {"time": "2017-11-03T00:24:41.833678276Z", "gateways": [{"snr": -3, "rssi": -106, "time": "2017-11-03T00:24:41.719259Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43208, "timestamp": 4148537548}], "data_rate": "SF9BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "confirmed": true, "payload_raw": "SEVMTE8tMDg=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-03T00:26:02.293321523Z", "gateways": [{"snr": -16.8, "rssi": -120, "time": "2017-11-03T00:26:01.557111Z", "gtw_id": "eui-0000024b080e0539", "channel": 3, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3950343492}, {"snr": -15.8, "rssi": -121, "time": "2017-11-03T00:26:26.296546Z", "gtw_id": "eui-1dee148a60342739", "channel": 3, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2210733452}, {"snr": -15.8, "rssi": -112, "time": "2017-11-03T00:26:02.287755Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 3, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 3933886380, "location_source": "registry"}, {"snr": 7, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2443991508, "location_source": "registry"}, {"snr": 12, "rssi": -101, "time": "2017-11-03T00:26:02.242243Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43207, "timestamp": 4229060540}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-03T00:26:12.287360148Z", "gateways": [{"snr": -11, "rssi": -109, "time": "2017-11-03T00:26:12.29809Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 2, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 3943891796, "location_source": "registry"}, {"snr": -1, "rssi": -104, "time": "2017-11-03T00:26:12.24765Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43207, "timestamp": 4239065948}, {"snr": -0.5, "rssi": -96, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2453996916, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-03T00:27:52.907172955Z", "gateways": [{"snr": -16.2, "rssi": -121, "time": "2017-11-03T00:28:16.737612Z", "gtw_id": "eui-1dee148a60342739", "channel": 5, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2321165804}, {"snr": -16, "rssi": -119, "time": "2017-11-03T00:27:51.988706Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 4060775732}, {"snr": -9.8, "rssi": -111, "time": "2017-11-03T00:27:52.711793Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 5, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 4044318724, "location_source": "registry"}, {"snr": 0, "rssi": -106, "time": "2017-11-03T00:27:52.674551Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43206, "timestamp": 44525564}, {"snr": 1, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2554423852, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-03T00:28:02.909220741Z", "gateways": [{"snr": -16.5, "rssi": -121, "time": "2017-11-03T00:28:26.747768Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2331171220}, {"snr": -7, "rssi": -110, "time": "2017-11-03T00:28:02.679966Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43206, "timestamp": 54530980}, {"snr": -3.8, "rssi": -110, "time": "2017-11-03T00:28:02.732164Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 0, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 4054324140, "location_source": "registry"}, {"snr": 3, "rssi": -110, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2564429268, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 2, "metadata": {"time": "2017-11-03T00:30:21.074004595Z", "gateways": [{"snr": -15.5, "rssi": -120, "time": "2017-11-03T00:30:20.285551Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 4209074620}, {"snr": -8.8, "rssi": -113, "time": "2017-11-03T00:30:21.014978Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 7, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 4192617756, "location_source": "registry"}, {"snr": 0, "rssi": -113, "time": "2017-11-03T00:30:20.973559Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06281, "rf_chain": 0, "longitude": 14.43207, "timestamp": 192824588}, {"snr": 8.2, "rssi": -106, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2702722900, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDI=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 3, "metadata": {"time": "2017-11-03T00:30:32.939843196Z", "gateways": [{"snr": -13.2, "rssi": -120, "time": "2017-11-03T00:30:56.768884Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2481186964}, {"snr": -8, "rssi": -106, "time": "2017-11-03T00:30:32.695678Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.06281, "rf_chain": 0, "longitude": 14.43207, "timestamp": 204546708}, {"snr": -6.8, "rssi": -110, "time": "2017-11-03T00:30:32.747104Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 1, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 4204339884, "location_source": "registry"}, {"snr": 2, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2714445020, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMTY=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 4, "metadata": {"time": "2017-11-03T00:32:49.447299719Z", "gateways": [{"snr": -17.5, "rssi": -121, "time": "2017-11-03T00:33:13.359621Z", "gtw_id": "eui-1dee148a60342739", "channel": 3, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2617763860}, {"snr": 5.8, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2851021932, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMTc=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 5, "metadata": {"time": "2017-11-03T00:33:03.212558779Z", "gateways": [{"snr": -13, "rssi": -119, "time": "2017-11-03T00:33:02.711406Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43207, "timestamp": 354562452}, {"snr": -6.2, "rssi": -111, "time": "2017-11-03T00:33:02.761988Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 0, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 59388332, "location_source": "registry"}, {"snr": 4.5, "rssi": -107, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2864460772, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMzE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-04T22:35:48.157444574Z", "gateways": [{"snr": -17.2, "rssi": -120, "time": "2017-11-04T22:35:47.344061Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2632173964}, {"snr": -15.8, "rssi": -110, "time": "2017-11-04T22:35:47.96492Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 4, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 2615875508, "location_source": "registry"}, {"snr": -13, "rssi": -119, "time": "2017-11-04T22:36:23.144788Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 892730492}, {"snr": 4.8, "rssi": -117, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1125990084, "location_source": "registry"}, {"snr": 10, "rssi": -102, "time": "2017-11-04T22:35:47.92224Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43204, "timestamp": 2911033628}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-04T22:35:58.168265075Z", "gateways": [{"snr": -10.8, "rssi": -112, "time": "2017-11-04T22:35:57.965251Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 0, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 2625880916, "location_source": "registry"}, {"snr": 0.8, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1135995492, "location_source": "registry"}, {"snr": 3, "rssi": -104, "time": "2017-11-04T22:35:57.927639Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43203, "timestamp": 2921039028}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-04T22:36:54.924007444Z", "gateways": [{"snr": -9.5, "rssi": -111, "time": "2017-11-04T22:36:54.723865Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 7, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 2682628092, "location_source": "registry"}, {"snr": 3.2, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1192742684, "location_source": "registry"}, {"snr": 11, "rssi": -101, "time": "2017-11-04T22:36:54.674816Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43203, "timestamp": 2977786212}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-04T22:37:04.750177489Z", "gateways": [{"snr": -13, "rssi": -114, "time": "2017-11-04T22:37:04.680223Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43203, "timestamp": 2987791620}, {"snr": -2.8, "rssi": -100, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1202748092, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-04T22:38:11.449804752Z", "gateways": [{"snr": -14.5, "rssi": -120, "time": "2017-11-04T22:38:46.492416Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1036075396}, {"snr": -12.5, "rssi": -112, "time": "2017-11-04T22:38:11.302994Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 4, "altitude": 260, "latitude": 50.088226, "rf_chain": 0, "longitude": 14.395939, "timestamp": 2759220396, "location_source": "registry"}, {"snr": -10.8, "rssi": -119, "time": "2017-11-04T22:38:10.68794Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2775518716}, {"snr": 0, "rssi": -119, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1269334980, "location_source": "registry"}, {"snr": 12, "rssi": -100, "time": "2017-11-04T22:38:11.267096Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43203, "timestamp": 3054378500}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-04T22:38:21.500620084Z", "gateways": [{"snr": -3, "rssi": -106, "time": "2017-11-04T22:38:21.272503Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43202, "timestamp": 3064383908}, {"snr": 0.2, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1279340396, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-04T22:39:42.927439674Z", "gateways": [{"snr": -17.2, "rssi": -119, "time": "2017-11-04T22:39:42.116004Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2866946452}, {"snr": -14.8, "rssi": -119, "time": "2017-11-04T22:40:17.926968Z", "gtw_id": "eui-1dee148a60342739", "channel": 5, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1127503228}, {"snr": -3, "rssi": -98, "time": "2017-11-04T22:39:42.694901Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43203, "timestamp": 3145806316}, {"snr": 3.5, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1360762812, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-04T22:39:52.933159794Z", "gateways": [{"snr": -9.8, "rssi": -107, "time": "2017-11-04T22:39:52.737776Z", "gtw_id": "eui-fcc23dfffe0e61bd", "channel": 2, "altitude": 260, "latitude": 50.088226, "rf_chain": 1, "longitude": 14.395939, "timestamp": 2860653636, "location_source": "registry"}, {"snr": -7, "rssi": -104, "time": "2017-11-04T22:39:52.700308Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43202, "timestamp": 3155811724}, {"snr": -3.2, "rssi": -110, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1370768220, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-15T23:05:22.781684465Z", "gateways": [{"snr": 6.8, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 4113174348, "location_source": "registry"}, {"snr": 7, "rssi": -106, "time": "2017-11-15T23:05:22.632174Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06281, "rf_chain": 0, "longitude": 14.43204, "timestamp": 1603116964}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-18T22:23:37.446306318Z", "gateways": [{"snr": -15.2, "rssi": -118, "time": "2017-11-18T22:23:36.76924Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 320014244}, {"snr": -12.2, "rssi": -120, "time": "2017-11-18T22:24:08.771109Z", "gtw_id": "eui-1dee148a60342739", "channel": 5, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2876763580}, {"snr": -4, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3109998428, "location_source": "registry"}, {"snr": 7, "rssi": -100, "time": "2017-11-18T22:23:37.427023Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 326, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.4321, "timestamp": 599905500}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-18T22:24:22.004727891Z", "gateways": [{"snr": -15.2, "rssi": -120, "time": "2017-11-18T22:24:21.353334Z", "gtw_id": "eui-0000024b080e0539", "channel": 3, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 364603324}, {"snr": -9.8, "rssi": -120, "time": "2017-11-18T22:24:53.361993Z", "gtw_id": "eui-1dee148a60342739", "channel": 3, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2921352716}, {"snr": 6.5, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3154587564, "location_source": "registry"}, {"snr": 12, "rssi": -103, "time": "2017-11-18T22:24:22.016146Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 326, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.4321, "timestamp": 644494628}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDA=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-18T22:25:22.007552504Z", "gateways": [{"snr": -16, "rssi": -119, "time": "2017-11-18T22:25:53.374191Z", "gtw_id": "eui-1dee148a60342739", "channel": 2, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2981355892}, {"snr": -4, "rssi": -103, "time": "2017-11-18T22:25:22.019298Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.06281, "rf_chain": 0, "longitude": 14.4321, "timestamp": 704497788}, {"snr": -1.2, "rssi": -106, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3214590732, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "SEVMTE8tMDE=", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-18T23:40:20.729572197Z", "gateways": [{"snr": -19, "rssi": -118, "time": "2017-11-18T23:40:52.213573Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3184930700}, {"snr": -11, "rssi": -119, "time": "2017-11-18T23:40:19.868744Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 628176588}, {"snr": 4.2, "rssi": -110, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3418165308, "location_source": "registry"}, {"snr": 9, "rssi": -104, "time": "2017-11-18T23:40:20.560002Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 318, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.4321, "timestamp": 908071748}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "AAAAALP4AAAAAA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-18T23:41:24.530813117Z", "gateways": [{"snr": -1, "rssi": -110, "time": "2017-11-18T23:41:24.437715Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 318, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.4321, "timestamp": 971949468}, {"snr": 1.5, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3482043044, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CFMSsjMjAAAFxA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-18T23:41:57.061017678Z", "gateways": [{"snr": -18.5, "rssi": -123, "time": "2017-11-18T23:42:28.783874Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3281488532}, {"snr": -8.8, "rssi": -119, "time": "2017-11-18T23:41:56.4303Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 724734316}, {"snr": 6.8, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3514723140, "location_source": "registry"}, {"snr": 9, "rssi": -104, "time": "2017-11-18T23:41:57.117799Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 319, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.4321, "timestamp": 1004629556}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CFYSwzMhAAAFkA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-18T23:42:57.080330464Z", "gateways": [{"snr": -15.2, "rssi": -119, "time": "2017-11-18T23:43:28.79216Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 3341491716}, {"snr": -2, "rssi": -106, "time": "2017-11-18T23:42:57.120951Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 320, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.4321, "timestamp": 1064632716}, {"snr": 4.2, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3574726308, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CFYSwjMhAAAFDw==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 2, "metadata": {"time": "2017-11-18T23:44:25.566032369Z", "gateways": [{"snr": -13.8, "rssi": -119, "time": "2017-11-18T23:44:57.092016Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3429786604}, {"snr": -7.8, "rssi": -119, "time": "2017-11-18T23:44:24.728486Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 873032236}, {"snr": -2, "rssi": -114, "time": "2017-11-18T23:44:25.41582Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.4321, "timestamp": 1152927596}, {"snr": 8.2, "rssi": -105, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3663021196, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CFYStzMhAAAFtQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 3, "metadata": {"time": "2017-11-18T23:45:25.570266287Z", "gateways": [{"snr": -15.8, "rssi": -119, "time": "2017-11-18T23:45:57.091966Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 3489787828}, {"snr": 2, "rssi": -103, "time": "2017-11-18T23:45:25.417021Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43209, "timestamp": 1212928804}, {"snr": 4, "rssi": -110, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3723022420, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CFgSrDMdAAAF5Q==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 4, "metadata": {"time": "2017-11-18T23:46:53.758306695Z", "gateways": [{"snr": -20, "rssi": -119, "time": "2017-11-18T23:47:25.393252Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3578082716}, {"snr": -11, "rssi": -119, "time": "2017-11-18T23:46:53.025711Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1021328196}, {"snr": 7.2, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3811317300, "location_source": "registry"}, {"snr": 12, "rssi": -102, "time": "2017-11-18T23:46:53.711882Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43209, "timestamp": 1301223676}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CFgSrzMfAAAGDg==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 5, "metadata": {"time": "2017-11-18T23:47:57.082987267Z", "gateways": [{"snr": -8, "rssi": -107, "time": "2017-11-18T23:47:57.124074Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 318, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.4321, "timestamp": 1364635876}, {"snr": -2.5, "rssi": -106, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3874729508, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CE0P/jMdAAAGoA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 6, "metadata": {"time": "2017-11-18T23:49:21.945048938Z", "gateways": [{"snr": -16.2, "rssi": -120, "time": "2017-11-18T23:49:53.700416Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3726378844}, {"snr": -6.8, "rssi": -117, "time": "2017-11-18T23:49:21.314047Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1169624172}, {"snr": -2, "rssi": -114, "time": "2017-11-18T23:49:22.007968Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 317, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43209, "timestamp": 1449519780}, {"snr": 8.5, "rssi": -105, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3959613420, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CAUQnjMfAAAHGQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 7, "metadata": {"time": "2017-11-18T23:50:25.562543208Z", "gateways": [{"snr": -18.5, "rssi": -123, "time": "2017-11-18T23:50:57.115872Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 3789791052}, {"snr": -13.5, "rssi": -120, "time": "2017-11-18T23:50:24.726425Z", "gtw_id": "eui-0000024b080e0539", "channel": 0, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 1233036316}, {"snr": -7, "rssi": -102, "time": "2017-11-18T23:50:25.420152Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 315, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.4321, "timestamp": 1512931972}, {"snr": 4.5, "rssi": -106, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 4023025628, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B8kQTzMdAAAHfQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 8, "metadata": {"time": "2017-11-18T23:51:50.443499076Z", "gateways": [{"snr": -13.8, "rssi": -121, "time": "2017-11-18T23:52:22.01241Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3874674980}, {"snr": -7.8, "rssi": -120, "time": "2017-11-18T23:51:49.614346Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1317920156}, {"snr": -4, "rssi": -117, "time": "2017-11-18T23:51:50.304062Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 315, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43208, "timestamp": 1597815892}, {"snr": 2.8, "rssi": -105, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 4107909556, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B5cQxzMdAAAHyw==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 9, "metadata": {"time": "2017-11-18T23:52:53.767176646Z", "gateways": [{"snr": -16.2, "rssi": -121, "time": "2017-11-18T23:53:25.42362Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 3938086236}, {"snr": 4, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 4171320796, "location_source": "registry"}, {"snr": 6, "rssi": -103, "time": "2017-11-18T23:52:53.715286Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 313, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43209, "timestamp": 1661227124}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B3kQyTMZAAAIBQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 10, "metadata": {"time": "2017-11-18T23:54:18.631190769Z", "gateways": [{"snr": -14.8, "rssi": -120, "time": "2017-11-18T23:54:17.907315Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1466216164}, {"snr": -13, "rssi": -107, "time": "2017-11-18T23:54:18.600172Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 313, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43209, "timestamp": 1746112020}, {"snr": 0.8, "rssi": -117, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 4256205708, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B1MQjTMZAAAIaw==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 11, "metadata": {"time": "2017-11-18T23:55:21.954755836Z", "gateways": [{"snr": -12.8, "rssi": -121, "time": "2017-11-18T23:55:53.731602Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 4086382412}, {"snr": -10, "rssi": -104, "time": "2017-11-18T23:55:22.011412Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 314, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43208, "timestamp": 1809523268}, {"snr": 3.8, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 24649668, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B0cQ/jMVAAAIjw==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 12, "metadata": {"time": "2017-11-18T23:56:46.81338336Z", "gateways": [{"snr": -17, "rssi": -118, "time": "2017-11-18T23:57:18.616373Z", "gtw_id": "eui-1dee148a60342739", "channel": 5, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 4171267332}, {"snr": -14.5, "rssi": -117, "time": "2017-11-18T23:56:46.199388Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1614512196}, {"snr": -4, "rssi": -110, "time": "2017-11-18T23:56:46.896313Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 315, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43207, "timestamp": 1894408180}, {"snr": 2.5, "rssi": -117, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 109534596, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B0EQozMXAAAIsQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 13, "metadata": {"time": "2017-11-18T23:57:50.460417576Z", "gateways": [{"snr": -4, "rssi": -103, "time": "2017-11-18T23:57:50.307554Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 317, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43208, "timestamp": 1957819428}, {"snr": 5.2, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 172945852, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BzkQzDMTAAAI2Q==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 14, "metadata": {"time": "2017-11-18T23:59:15.321209903Z", "gateways": [{"snr": -12.5, "rssi": -120, "time": "2017-11-18T23:59:14.503441Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1762808236}, {"snr": 6.2, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 257830780, "location_source": "registry"}, {"snr": 9, "rssi": -104, "time": "2017-11-18T23:59:15.192463Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 320, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.4321, "timestamp": 2042704348}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BysQ0jMVAAAJGA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 15, "metadata": {"time": "2017-11-19T00:00:18.6294823Z", "gateways": [{"snr": -15.8, "rssi": -123, "time": "2017-11-19T00:00:50.342055Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 88007508}, {"snr": -15.5, "rssi": -119, "time": "2017-11-19T00:00:17.907862Z", "gtw_id": "eui-0000024b080e0539", "channel": 0, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 1826219444}, {"snr": 5, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 321242044, "location_source": "registry"}, {"snr": 6, "rssi": -102, "time": "2017-11-19T00:00:18.603711Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 319, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43212, "timestamp": 2106115604}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "ByAQ0zMPAAAJUg==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 16, "metadata": {"time": "2017-11-19T00:01:43.5111664Z", "gateways": [{"snr": -13, "rssi": -119, "time": "2017-11-19T00:02:15.238461Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 172894396}, {"snr": -7, "rssi": -119, "time": "2017-11-19T00:01:42.797278Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1911106244}, {"snr": 6, "rssi": -105, "time": "2017-11-19T00:01:43.490581Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 320, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43211, "timestamp": 2191002484}, {"snr": 8, "rssi": -107, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 406128932, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BxgQ2zMPAAAJdQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 17, "metadata": {"time": "2017-11-19T00:02:46.828405694Z", "gateways": [{"snr": -7, "rssi": -107, "time": "2017-11-19T00:02:46.899877Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43211, "timestamp": 2254411788}, {"snr": -3.2, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 469538252, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bw0Q6TMRAAAJsQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 18, "metadata": {"time": "2017-11-19T00:04:11.893481519Z", "gateways": [{"snr": -15, "rssi": -110, "time": "2017-11-19T00:04:11.967403Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 319, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.4321, "timestamp": 2339479324}, {"snr": -10.5, "rssi": -111, "time": "2017-11-19T00:04:11.272813Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2059582964}, {"snr": -3, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 554605796, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BwgRvTMNAAAJ0A==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 19, "metadata": {"time": "2017-11-19T00:05:15.349476579Z", "gateways": [{"snr": 0, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 617834452, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "ByIS6DMRAAAJbA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 20, "metadata": {"time": "2017-11-19T00:06:40.388638797Z", "gateways": [{"snr": -16.8, "rssi": -121, "time": "2017-11-19T00:07:12.023649Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 469667460}, {"snr": -14.2, "rssi": -120, "time": "2017-11-19T00:06:39.567197Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2207879004}, {"snr": 3.2, "rssi": -110, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 702901980, "location_source": "registry"}, {"snr": 4, "rssi": -109, "time": "2017-11-19T00:06:40.263545Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 317, "latitude": 50.06277, "rf_chain": 0, "longitude": 14.43209, "timestamp": 2487775484}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B0gS3jMNAAAJFg==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 21, "metadata": {"time": "2017-11-19T00:07:43.508730657Z", "gateways": [{"snr": -15, "rssi": -121, "time": "2017-11-19T00:08:15.262465Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 532898060}, {"snr": 0, "rssi": -102, "time": "2017-11-19T00:07:43.494129Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 317, "latitude": 50.06277, "rf_chain": 0, "longitude": 14.4321, "timestamp": 2551006076}, {"snr": 0.5, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 766132580, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B20S+DMRAAAI1w==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 22, "metadata": {"time": "2017-11-19T00:09:08.578058312Z", "gateways": [{"snr": -13.2, "rssi": -117, "time": "2017-11-19T00:09:07.861493Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2356175004}, {"snr": -11.2, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 851198132, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B4oSujMRAAAIwA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 23, "metadata": {"time": "2017-11-19T00:10:11.705133628Z", "gateways": [{"snr": -15.5, "rssi": -121, "time": "2017-11-19T00:10:43.566293Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 681196164}, {"snr": -11.8, "rssi": -119, "time": "2017-11-19T00:10:11.097601Z", "gtw_id": "eui-0000024b080e0539", "channel": 0, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 2419407484}, {"snr": 0, "rssi": -104, "time": "2017-11-19T00:10:11.792183Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 319, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43213, "timestamp": 2699304148}, {"snr": 0.8, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 914430676, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B7ISqjMNAAAImA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 24, "metadata": {"time": "2017-11-19T00:11:36.769710908Z", "gateways": [{"snr": -15.2, "rssi": -121, "time": "2017-11-19T00:12:08.640818Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 766259748}, {"snr": -10.2, "rssi": -120, "time": "2017-11-19T00:11:36.163291Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2504470980}, {"snr": 6, "rssi": -107, "time": "2017-11-19T00:11:36.855749Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 318, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43214, "timestamp": 2784367724}, {"snr": 6.5, "rssi": -104, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 999494268, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B8ASrjMJAAAIiw==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 25, "metadata": {"time": "2017-11-19T00:12:40.210538932Z", "gateways": [{"snr": -12, "rssi": -114, "time": "2017-11-19T00:12:39.389259Z", "gtw_id": "eui-0000024b080e0539", "channel": 2, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 2567705412}, {"snr": -6.8, "rssi": -105, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1062728740, "location_source": "registry"}, {"snr": 0, "rssi": -104, "time": "2017-11-19T00:12:40.090213Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 316, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43215, "timestamp": 2847602196}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B8wSoDMHAAAIgA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 26, "metadata": {"time": "2017-11-19T00:14:05.266783172Z", "gateways": [{"snr": -11, "rssi": -117, "time": "2017-11-19T00:14:04.458768Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2652766956}, {"snr": -4.5, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1147790380, "location_source": "registry"}, {"snr": -1, "rssi": -110, "time": "2017-11-19T00:14:05.151827Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 319, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43213, "timestamp": 2932663820}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B9YSnzMJAAAIfQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 27, "metadata": {"time": "2017-11-19T00:15:08.399385195Z", "gateways": [{"snr": -5.5, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1211024852, "location_source": "registry"}, {"snr": -2, "rssi": -105, "time": "2017-11-19T00:15:08.386283Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 320, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43212, "timestamp": 2995898284}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B+USoDMFAAAIdA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 28, "metadata": {"time": "2017-11-19T00:16:33.458098974Z", "gateways": [{"snr": -14, "rssi": -120, "time": "2017-11-19T00:17:05.251149Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1062851996}, {"snr": -6.2, "rssi": -118, "time": "2017-11-19T00:16:32.749939Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2801062924}, {"snr": -3, "rssi": -117, "time": "2017-11-19T00:16:33.447897Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 320, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43212, "timestamp": 3080959908}, {"snr": 6, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1296086492, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B+wSsTMBAAAIYA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-19T00:17:14.39382616Z", "gateways": [{"snr": -12.2, "rssi": -120, "time": "2017-11-19T00:17:13.633757Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2841948324}, {"snr": 6.5, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1336971932, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B/8SsDL9AAAOkQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-19T00:17:31.233577783Z", "gateways": [{"snr": -13.5, "rssi": -114, "time": "2017-11-19T00:17:30.657056Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2858967476}, {"snr": -1.8, "rssi": -125, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1353991092, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CAIStzL7AAANTg==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-19T00:19:31.271316407Z", "gateways": [{"snr": -15.5, "rssi": -120, "time": "2017-11-19T00:20:03.168659Z", "gtw_id": "eui-1dee148a60342739", "channel": 2, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1240757108}, {"snr": -2, "rssi": -106, "time": "2017-11-19T00:19:31.352955Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 317, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43212, "timestamp": 3258864988}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CAUSszL9AAAGNw==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-19T00:20:38.476565561Z", "gateways": [{"snr": -17, "rssi": -121, "time": "2017-11-19T00:21:10.281036Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1307863396}, {"snr": -11.8, "rssi": -121, "time": "2017-11-19T00:20:37.763979Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3046074068}, {"snr": 6.5, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1541097892, "location_source": "registry"}, {"snr": 9, "rssi": -105, "time": "2017-11-19T00:20:38.459235Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 316, "latitude": 50.06277, "rf_chain": 0, "longitude": 14.43213, "timestamp": 3325971276}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CBESyzL5AAAItg==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-19T00:21:54.089542102Z", "gateways": [{"snr": -13.8, "rssi": -121, "time": "2017-11-19T00:22:25.871854Z", "gtw_id": "eui-1dee148a60342739", "channel": 3, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1383449964}, {"snr": 5.8, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1616684452, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CBwSoDLwAAAI3w==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-19T00:22:29.398592597Z", "gateways": [{"snr": -10.8, "rssi": -120, "time": "2017-11-19T00:22:28.638191Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3156951604}, {"snr": 6.2, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1651975524, "location_source": "registry"}, {"snr": 9, "rssi": -103, "time": "2017-11-19T00:22:29.336846Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 316, "latitude": 50.06277, "rf_chain": 0, "longitude": 14.43212, "timestamp": 3436848900}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CBkSrjL4AAAIbQ==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-19T00:23:06.745476669Z", "gateways": [{"snr": -15, "rssi": -121, "time": "2017-11-19T00:23:38.669137Z", "gtw_id": "eui-1dee148a60342739", "channel": 3, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1456236628}, {"snr": 4, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1689471108, "location_source": "registry"}, {"snr": 7, "rssi": -106, "time": "2017-11-19T00:23:06.832417Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 315, "latitude": 50.06277, "rf_chain": 0, "longitude": 14.43212, "timestamp": 3474344476}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "CBwSpjL4AAAHtA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-19T00:25:06.743284438Z", "gateways": [{"snr": -13.2, "rssi": -120, "time": "2017-11-19T00:25:38.670571Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1576237124}, {"snr": -1, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1809471588, "location_source": "registry"}, {"snr": 8, "rssi": -101, "time": "2017-11-19T00:25:06.832867Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 314, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43211, "timestamp": 3594344940}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B/QQ3jL0AAAFnA==", "hardware_serial": "333934374F357D14"},{"port": 42, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 2, "metadata": {"time": "2017-11-19T00:27:06.733983291Z", "gateways": [{"snr": -17.8, "rssi": -119, "time": "2017-11-19T00:27:38.681313Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1696237636}, {"snr": -14, "rssi": -114, "time": "2017-11-19T00:27:06.127995Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3434447900}, {"snr": 5.2, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1929472092, "location_source": "registry"}, {"snr": 13, "rssi": -101, "time": "2017-11-19T00:27:06.83334Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 316, "latitude": 50.06276, "rf_chain": 0, "longitude": 14.43209, "timestamp": 3714345428}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "B7UQyDL0AAAGSw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-19T00:28:25.886114104Z", "gateways": [{"snr": -13, "rssi": -112, "time": "2017-11-19T00:28:25.042062Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3513353924}, {"snr": -6.5, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2008378196, "location_source": "registry"}, {"snr": 0, "rssi": -106, "time": "2017-11-19T00:28:25.739418Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 319, "latitude": 50.06276, "rf_chain": 0, "longitude": 14.4321, "timestamp": 3793251516}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "By4Q2zLsAAAMxQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-19T00:30:11.242872073Z", "gateways": [{"snr": -12.5, "rssi": -113, "time": "2017-11-19T00:30:10.66683Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3618979580}, {"snr": -10, "rssi": -117, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2114003956, "location_source": "registry"}, {"snr": 0, "rssi": -108, "time": "2017-11-19T00:30:11.365142Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 320, "latitude": 50.06277, "rf_chain": 0, "longitude": 14.43211, "timestamp": 3898877252}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BycRlDLuAAAJ8A==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 1, "metadata": {"time": "2017-11-19T00:45:11.1945072Z", "gateways": [{"snr": -13, "rssi": -120, "time": "2017-11-19T00:45:43.248698Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2780734708}, {"snr": 0.5, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3013969116, "location_source": "registry"}, {"snr": 3, "rssi": -101, "time": "2017-11-19T00:45:11.330073Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43205, "timestamp": 503874996}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BwoRrTLwAAAEmw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 2, "metadata": {"time": "2017-11-19T01:00:11.450923042Z", "gateways": [{"snr": -15.5, "rssi": -119, "time": "2017-11-19T01:00:43.279986Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3680700076}, {"snr": -4.2, "rssi": -118, "time": "2017-11-19T01:00:10.58473Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1123940988}, {"snr": -2, "rssi": -113, "time": "2017-11-19T01:00:11.295148Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43206, "timestamp": 1403840180}, {"snr": 5.8, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3913934428, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BuoR9zL4AAAEjw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 3, "metadata": {"time": "2017-11-19T01:15:11.407529109Z", "gateways": [{"snr": -16.5, "rssi": -119, "time": "2017-11-19T01:15:10.545001Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2023905508}, {"snr": -16, "rssi": -120, "time": "2017-11-19T01:15:43.302411Z", "gtw_id": "eui-1dee148a60342739", "channel": 5, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 285698228}, {"snr": -1.8, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 518932540, "location_source": "registry"}, {"snr": -1, "rssi": -109, "time": "2017-11-19T01:15:11.26032Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43206, "timestamp": 2303805460}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BsQRxzL4AAAEmQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 4, "metadata": {"time": "2017-11-19T01:30:11.37267056Z", "gateways": [{"snr": -12.8, "rssi": -120, "time": "2017-11-19T01:30:43.331206Z", "gtw_id": "eui-1dee148a60342739", "channel": 2, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1185663828}, {"snr": -11, "rssi": -95, "time": "2017-11-19T01:30:10.498863Z", "gtw_id": "eui-0000024b080e0539", "channel": 2, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 2923870164}, {"snr": -1, "rssi": -102, "time": "2017-11-19T01:30:11.225627Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43205, "timestamp": 3203770876}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BqAR+TL0AAAErw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 5, "metadata": {"time": "2017-11-19T01:45:11.353315634Z", "gateways": [{"snr": -14.5, "rssi": -120, "time": "2017-11-19T01:45:43.361542Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2085629516}, {"snr": -4.5, "rssi": -119, "time": "2017-11-19T01:45:10.461059Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3823834916}, {"snr": 5, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2318863724, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BokSUTLwAAAErw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 6, "metadata": {"time": "2017-11-19T02:00:11.330342269Z", "gateways": [{"snr": -12.2, "rssi": -121, "time": "2017-11-19T02:00:43.382851Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2985595252}, {"snr": -10.5, "rssi": -119, "time": "2017-11-19T02:00:10.424626Z", "gtw_id": "eui-0000024b080e0539", "channel": 0, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 428832428}, {"snr": 1.8, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3218829420, "location_source": "registry"}, {"snr": 3, "rssi": -100, "time": "2017-11-19T02:00:11.156488Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 319, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43207, "timestamp": 708734660}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BnISazLgAAAEwQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 7, "metadata": {"time": "2017-11-19T02:15:11.311856626Z", "gateways": [{"snr": -10, "rssi": -120, "time": "2017-11-19T02:15:43.412831Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 3885560948}, {"snr": -4.8, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 4118795068, "location_source": "registry"}, {"snr": 1, "rssi": -101, "time": "2017-11-19T02:15:11.121898Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 327, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43206, "timestamp": 1608700180}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bm4SbzLQAAAEvw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 8, "metadata": {"time": "2017-11-19T02:30:11.276571465Z", "gateways": [{"snr": -16.8, "rssi": -119, "time": "2017-11-19T02:30:43.434687Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 490559420}, {"snr": -14.8, "rssi": -120, "time": "2017-11-19T02:30:10.346944Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2228762020}, {"snr": 6.2, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 723793492, "location_source": "registry"}, {"snr": 11, "rssi": -103, "time": "2017-11-19T02:30:11.087381Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43206, "timestamp": 2508665772}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BmUSeDLGAAAEyw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 9, "metadata": {"time": "2017-11-19T02:45:11.234077769Z", "gateways": [{"snr": -14, "rssi": -120, "time": "2017-11-19T02:45:43.46399Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1390525268}, {"snr": 1.2, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1623759292, "location_source": "registry"}, {"snr": 6, "rssi": -99, "time": "2017-11-19T02:45:11.052945Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43206, "timestamp": 3408631444}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BlETDTLBAAAE3g==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 10, "metadata": {"time": "2017-11-19T03:00:11.18933877Z", "gateways": [{"snr": -11.5, "rssi": -113, "time": "2017-11-19T03:00:10.262552Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 4028691988}, {"snr": -2, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2523725228, "location_source": "registry"}, {"snr": 3, "rssi": -105, "time": "2017-11-19T03:00:11.018646Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43207, "timestamp": 13629956}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bj4TZjK7AAAE8Q==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 11, "metadata": {"time": "2017-11-19T03:15:11.189330414Z", "gateways": [{"snr": -16.8, "rssi": -118, "time": "2017-11-19T03:15:43.525027Z", "gtw_id": "eui-1dee148a60342739", "channel": 6, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3190457228}, {"snr": -14.8, "rssi": -119, "time": "2017-11-19T03:15:10.226299Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 633689724}, {"snr": 4.5, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3423691148, "location_source": "registry"}, {"snr": 11, "rssi": -102, "time": "2017-11-19T03:15:10.984331Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43208, "timestamp": 913595748}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bi8TSjKxAAAFBQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 12, "metadata": {"time": "2017-11-19T03:30:11.106471894Z", "gateways": [{"snr": -13, "rssi": -120, "time": "2017-11-19T03:30:43.546117Z", "gtw_id": "eui-1dee148a60342739", "channel": 2, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 4090423244}, {"snr": -7, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 28689828, "location_source": "registry"}, {"snr": -4, "rssi": -102, "time": "2017-11-19T03:30:10.950064Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43209, "timestamp": 1813561588}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BiQTRjKrAAAFFw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 13, "metadata": {"time": "2017-11-19T03:45:11.091081014Z", "gateways": [{"snr": -13, "rssi": -120, "time": "2017-11-19T03:45:43.576838Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 695422028}, {"snr": -7, "rssi": -119, "time": "2017-11-19T03:45:10.91586Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06283, "rf_chain": 0, "longitude": 14.43209, "timestamp": 2713527492}, {"snr": -3.2, "rssi": -117, "time": "2017-11-19T03:45:10.148818Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2433619956}, {"snr": 5.2, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 928655852, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bh4TSDKpAAAFMw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 14, "metadata": {"time": "2017-11-19T04:00:11.018839733Z", "gateways": [{"snr": -13.5, "rssi": -121, "time": "2017-11-19T04:00:43.597299Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1595388316}, {"snr": 0.2, "rssi": -106, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1828622092, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BgQTZzKhAAAFTA==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 15, "metadata": {"time": "2017-11-19T04:15:10.976218379Z", "gateways": [{"snr": -9, "rssi": -119, "time": "2017-11-19T04:15:43.628593Z", "gtw_id": "eui-1dee148a60342739", "channel": 1, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2495354612}, {"snr": -1.5, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 6, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2728588332, "location_source": "registry"}, {"snr": 0, "rssi": -100, "time": "2017-11-19T04:15:10.847862Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 312, "latitude": 50.06288, "rf_chain": 0, "longitude": 14.4321, "timestamp": 218492412}], "data_rate": "SF12BW125", "frequency": 868.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BfgTZDKXAAAFWQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 16, "metadata": {"time": "2017-11-19T04:30:10.925454084Z", "gateways": [{"snr": -14.5, "rssi": -123, "time": "2017-11-19T04:30:43.660805Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3395320932}, {"snr": -8.8, "rssi": -119, "time": "2017-11-19T04:30:10.033033Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 838548740}, {"snr": 7.5, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3628554612, "location_source": "registry"}, {"snr": 12, "rssi": -101, "time": "2017-11-19T04:30:10.813906Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 326, "latitude": 50.06286, "rf_chain": 0, "longitude": 14.43207, "timestamp": 1118458564}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BfETZjKJAAAFXg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 17, "metadata": {"time": "2017-11-19T04:45:10.883011396Z", "gateways": [{"snr": -16.5, "rssi": -120, "time": "2017-11-19T04:45:43.680173Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 319996}, {"snr": -7.5, "rssi": -119, "time": "2017-11-19T04:45:09.99501Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1738514156}, {"snr": 6.5, "rssi": -107, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 233553620, "location_source": "registry"}, {"snr": 12, "rssi": -101, "time": "2017-11-19T04:45:10.779966Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 321, "latitude": 50.06284, "rf_chain": 0, "longitude": 14.43205, "timestamp": 2018424732}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BeQTkTJ8AAAFeA==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 18, "metadata": {"time": "2017-11-19T05:00:10.839025456Z", "gateways": [{"snr": -14, "rssi": -120, "time": "2017-11-19T05:00:43.711119Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 900286372}, {"snr": -5, "rssi": -119, "time": "2017-11-19T05:00:10.746043Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 326, "latitude": 50.06282, "rf_chain": 0, "longitude": 14.43208, "timestamp": 2918390916}, {"snr": -4, "rssi": -119, "time": "2017-11-19T05:00:09.956936Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2638479588}, {"snr": 4, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1133519924, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bd4ThDJ2AAAFeg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 19, "metadata": {"time": "2017-11-19T05:15:10.791999181Z", "gateways": [{"snr": -10, "rssi": -117, "time": "2017-11-19T05:15:09.918321Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3538445100}, {"snr": -1, "rssi": -109, "time": "2017-11-19T05:15:10.712208Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43205, "timestamp": 3818357188}, {"snr": -0.2, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2033486324, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BdITrzJsAAAFmQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 20, "metadata": {"time": "2017-11-19T05:30:10.747466238Z", "gateways": [{"snr": -15.5, "rssi": -105, "time": "2017-11-19T05:30:09.881276Z", "gtw_id": "eui-0000024b080e0539", "channel": 2, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 143443324}, {"snr": -12.8, "rssi": -113, "time": "2017-11-19T05:30:43.770752Z", "gtw_id": "eui-1dee148a60342739", "channel": 2, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2700219292}, {"snr": -2.5, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 2933452740, "location_source": "registry"}, {"snr": -1, "rssi": -101, "time": "2017-11-19T05:30:10.67838Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43203, "timestamp": 423356172}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BcwTvzJuAAAFsQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 21, "metadata": {"time": "2017-11-19T05:45:10.698752662Z", "gateways": [{"snr": -12, "rssi": -121, "time": "2017-11-19T05:45:43.793149Z", "gtw_id": "eui-1dee148a60342739", "channel": 3, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3600185796}, {"snr": -5, "rssi": -119, "time": "2017-11-19T05:45:10.6446Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43202, "timestamp": 1323322500}, {"snr": 7, "rssi": -109, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3833419188, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BccUCDJkAAAF0A==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 22, "metadata": {"time": "2017-11-19T06:00:10.654520149Z", "gateways": [{"snr": -10.8, "rssi": -116, "time": "2017-11-19T06:00:09.803304Z", "gtw_id": "eui-0000024b080e0539", "channel": 0, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 1943374428}, {"snr": -10.8, "rssi": -120, "time": "2017-11-19T06:00:43.823455Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 205184988}, {"snr": 0, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 438418316, "location_source": "registry"}, {"snr": 3, "rssi": -100, "time": "2017-11-19T06:00:10.61078Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06276, "rf_chain": 0, "longitude": 14.43203, "timestamp": 2223288788}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BcsUAzJeAAAFyQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 23, "metadata": {"time": "2017-11-19T06:15:10.616740706Z", "gateways": [{"snr": -10.8, "rssi": -119, "time": "2017-11-19T06:15:43.853763Z", "gtw_id": "eui-1dee148a60342739", "channel": 2, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 1105151468}, {"snr": -5, "rssi": -101, "time": "2017-11-19T06:15:10.576968Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 327, "latitude": 50.06277, "rf_chain": 0, "longitude": 14.43205, "timestamp": 3123255084}, {"snr": -0.8, "rssi": -112, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1338384740, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BcET/jJWAAAF3A==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 24, "metadata": {"time": "2017-11-19T06:30:10.563964392Z", "gateways": [{"snr": -13.8, "rssi": -121, "time": "2017-11-19T06:30:43.875189Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2005118092}, {"snr": -7.8, "rssi": -120, "time": "2017-11-19T06:30:09.723497Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3743305644}, {"snr": 6.8, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2238351316, "location_source": "registry"}, {"snr": 10, "rssi": -102, "time": "2017-11-19T06:30:10.543301Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 326, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43208, "timestamp": 4023221524}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BbcT9DJWAAAF9w==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 25, "metadata": {"time": "2017-11-19T06:45:10.527035761Z", "gateways": [{"snr": -11.5, "rssi": -121, "time": "2017-11-19T06:45:43.90558Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 2905084668}, {"snr": -1.8, "rssi": -115, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3138317820, "location_source": "registry"}, {"snr": 5, "rssi": -99, "time": "2017-11-19T06:45:10.509572Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 328, "latitude": 50.06278, "rf_chain": 0, "longitude": 14.43207, "timestamp": 628220604}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BcAT9DJaAAAF+w==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 26, "metadata": {"time": "2017-11-19T07:00:10.481701498Z", "gateways": [{"snr": -10, "rssi": -119, "time": "2017-11-19T07:00:09.651329Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1248269652}, {"snr": 0, "rssi": -117, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 4038284388, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BbYUAzJiAAAGFg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 27, "metadata": {"time": "2017-11-19T07:15:10.450052347Z", "gateways": [{"snr": -15.2, "rssi": -120, "time": "2017-11-19T07:15:09.607584Z", "gtw_id": "eui-0000024b080e0539", "channel": 6, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2148235292}, {"snr": 7.5, "rssi": -107, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 3, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 643283620, "location_source": "registry"}, {"snr": 11, "rssi": -102, "time": "2017-11-19T07:15:10.442188Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 323, "latitude": 50.06281, "rf_chain": 0, "longitude": 14.43206, "timestamp": 2428153428}], "data_rate": "SF12BW125", "frequency": 867.7, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BbYUPTJoAAAGCw==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 28, "metadata": {"time": "2017-11-19T07:30:10.400036074Z", "gateways": [{"snr": -7, "rssi": -100, "time": "2017-11-19T07:30:10.408537Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43203, "timestamp": 3328119884}, {"snr": -5, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 1543250204, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BbIUGjJsAAAGIA==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 29, "metadata": {"time": "2017-11-19T07:45:10.351304737Z", "gateways": [{"snr": -17.5, "rssi": -120, "time": "2017-11-19T07:45:09.532249Z", "gtw_id": "eui-0000024b080e0539", "channel": 3, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3948166636}, {"snr": -12.2, "rssi": -121, "time": "2017-11-19T07:45:44.018247Z", "gtw_id": "eui-1dee148a60342739", "channel": 3, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 2209983812}, {"snr": -1, "rssi": -116, "time": "2017-11-19T07:45:10.37483Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43207, "timestamp": 4228086284}, {"snr": 6.2, "rssi": -108, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 0, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2443216732, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BbUUDTJsAAAGWg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 30, "metadata": {"time": "2017-11-19T08:00:10.316030924Z", "gateways": [{"snr": -12.5, "rssi": -121, "time": "2017-11-19T08:00:44.049644Z", "gtw_id": "eui-1dee148a60342739", "channel": 0, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 3109950332}, {"snr": -12, "rssi": -118, "time": "2017-11-19T08:00:09.496229Z", "gtw_id": "eui-0000024b080e0539", "channel": 0, "altitude": 221, "latitude": 50.08947, "rf_chain": 1, "longitude": 14.42204, "timestamp": 553164900}, {"snr": -4, "rssi": -100, "time": "2017-11-19T08:00:10.341041Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 316, "latitude": 50.06276, "rf_chain": 0, "longitude": 14.43205, "timestamp": 833085308}, {"snr": 2, "rssi": -106, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 5, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 3343183180, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 868.1, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bb8T1jJwAAAGWg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 31, "metadata": {"time": "2017-11-19T08:15:10.265904687Z", "gateways": [{"snr": -11, "rssi": -119, "time": "2017-11-19T08:15:44.069547Z", "gtw_id": "eui-1dee148a60342739", "channel": 2, "altitude": 260, "latitude": 50.08835, "rf_chain": 1, "longitude": 14.3962, "timestamp": 4009916796}, {"snr": -5, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 7, "latitude": 50.034065, "rf_chain": 1, "longitude": 14.378666, "timestamp": 4243149588, "location_source": "registry"}, {"snr": -5, "rssi": -101, "time": "2017-11-19T08:15:10.307212Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 325, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43207, "timestamp": 1733051588}], "data_rate": "SF12BW125", "frequency": 868.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BcsT9jJ2AAAGSQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 32, "metadata": {"time": "2017-11-19T08:30:10.225971031Z", "gateways": [{"snr": -14, "rssi": -121, "time": "2017-11-19T08:30:44.099804Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 614915900}, {"snr": -11.5, "rssi": -121, "time": "2017-11-19T08:30:09.416555Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 2353095884}, {"snr": 7, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 848148636, "location_source": "registry"}, {"snr": 12, "rssi": -101, "time": "2017-11-19T08:30:10.273325Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 328, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43207, "timestamp": 2633017812}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BdUTszJ6AAAGNg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 33, "metadata": {"time": "2017-11-19T08:45:10.184208058Z", "gateways": [{"snr": -14.2, "rssi": -121, "time": "2017-11-19T08:45:44.132471Z", "gtw_id": "eui-1dee148a60342739", "channel": 7, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 1514882284}, {"snr": -9.5, "rssi": -120, "time": "2017-11-19T08:45:09.380465Z", "gtw_id": "eui-0000024b080e0539", "channel": 7, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 3253061324}, {"snr": 6.5, "rssi": -106, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 4, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 1748114972, "location_source": "registry"}, {"snr": 9, "rssi": -103, "time": "2017-11-19T08:45:10.239414Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 326, "latitude": 50.0628, "rf_chain": 0, "longitude": 14.43209, "timestamp": 3532984012}], "data_rate": "SF12BW125", "frequency": 867.9, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "Bd4T7TJ8AAAGQQ==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 34, "metadata": {"time": "2017-11-19T09:00:10.13619287Z", "gateways": [{"snr": -16.8, "rssi": -106, "time": "2017-11-19T09:00:09.338393Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 4153026636}, {"snr": -15, "rssi": -109, "time": "2017-11-19T09:00:10.20537Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 328, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43207, "timestamp": 137982788}, {"snr": 0.8, "rssi": -114, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 2648081156, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BfQTnjJ6AAAGOg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 35, "metadata": {"time": "2017-11-19T09:15:10.096224322Z", "gateways": [{"snr": -16.5, "rssi": -114, "time": "2017-11-19T09:15:09.301478Z", "gtw_id": "eui-0000024b080e0539", "channel": 5, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 758024524}, {"snr": -15, "rssi": -109, "time": "2017-11-19T09:15:10.171204Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 324, "latitude": 50.06281, "rf_chain": 0, "longitude": 14.4321, "timestamp": 1037948740}, {"snr": -2.8, "rssi": -116, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 2, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 3548047228, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.5, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BgoTMDKFAAAGKg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "metadata": {"time": "2017-11-19T09:25:02.750364716Z", "gateways": [{"snr": -12, "rssi": -120, "time": "2017-11-19T09:25:36.729674Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3907322644}, {"snr": -8, "rssi": -118, "time": "2017-11-19T09:25:01.812038Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1350531948}, {"snr": 1, "rssi": -111, "time": "2017-11-19T09:25:02.679046Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.4321, "timestamp": 1630456660}, {"snr": 5.5, "rssi": -113, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 4140555236, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BbESZTKLAAATIg==", "hardware_serial": "333934374F357D14"},{"port": 68, "app_id": "students_201710", "dev_id": "ondrej_hruska", "counter": 0, "is_retry": true, "metadata": {"time": "2017-11-19T09:25:15.740755787Z", "gateways": [{"snr": -12.8, "rssi": -120, "time": "2017-11-19T09:25:49.829863Z", "gtw_id": "eui-1dee148a60342739", "channel": 4, "altitude": 260, "latitude": 50.08835, "rf_chain": 0, "longitude": 14.3962, "timestamp": 3920420876}, {"snr": -8.5, "rssi": -120, "time": "2017-11-19T09:25:14.90271Z", "gtw_id": "eui-0000024b080e0539", "channel": 4, "altitude": 221, "latitude": 50.08947, "rf_chain": 0, "longitude": 14.42204, "timestamp": 1363630156}, {"snr": -8, "rssi": -120, "time": "2017-11-19T09:25:15.777268Z", "gtw_id": "eui-7276fffffe0109d5", "channel": 0, "altitude": 322, "latitude": 50.06279, "rf_chain": 0, "longitude": 14.43209, "timestamp": 1643554884}, {"snr": 6, "rssi": -111, "time": "", "gtw_id": "eui-7276ff0039030339", "channel": 1, "latitude": 50.034065, "rf_chain": 0, "longitude": 14.378666, "timestamp": 4153653460, "location_source": "registry"}], "data_rate": "SF12BW125", "frequency": 867.3, "modulation": "LORA", "coding_rate": "4/5"}, "payload_raw": "BbQSVTKJAAASFw==", "hardware_serial": "333934374F357D14"}] \ No newline at end of file diff --git a/Docs/data/parse.php b/Docs/data/parse.php new file mode 100755 index 0000000..e44ebdb --- /dev/null +++ b/Docs/data/parse.php @@ -0,0 +1,71 @@ + $msg['counter'], + 'date' => ((array)$msg['metadata'])['time'], + 'payload_raw' => $msg['payload_raw'], + 'payload' => parsePayload($msg['payload_raw']), + ]; + } +} + +print_r($table); + +$fil = "Counter\tDate\tTemperature [°C]\tHumidity [%RH]\tPressure [hPa]\tGas_R [Ohm]\n"; +foreach($table as $row) { + $p = $row['payload']; + $fil .= "$row[counter]\t$row[date]\t$p[temp]\t$p[hum]\t$p[press]\t$p[gas_r]\n"; +} + +file_put_contents("msg.csv", $fil); + + + + + + + +function parsePayload($pl64) { + $pl = base64_decode($pl64); + + /* + pb_i16(&pb, voc_data.temperature); // Cx100 + pb_u16(&pb, (uint16_t) (voc_data.humidity / 10)); // discard one place -> %x100 + pb_u16(&pb, (uint16_t) (voc_data.pressure - 85000)); // send offset from 850 hPa -> Pa + pb_u32(&pb, (uint16_t) (voc_data.gas_resistance)); // ohms, full size + */ + $res = []; + $t = (ord($pl[0])<<8 | ord($pl[1])); + if ($t&0x8000) $t = ~$t - 1; + $res['temp'] = $t/100; + + $t = (ord($pl[2])<<8 | ord($pl[3])); + $res['hum'] = $t/100; + + $t = (ord($pl[4])<<8 | ord($pl[5])); + $res['press'] = (85000+$t)/100; + + $t = (ord($pl[6])<<24 | ord($pl[7])<<16 | ord($pl[8])<<8 | ord($pl[9])); + $res['gas_r'] = $t; + + return $res; +} + + + + + + + + + + + + diff --git a/Docs/data/sample.ods b/Docs/data/sample.ods new file mode 100755 index 0000000..ae5a35d Binary files /dev/null and b/Docs/data/sample.ods differ diff --git a/Docs/nodered-bees.flow b/Docs/nodered-bees.flow new file mode 100755 index 0000000..af8a459 --- /dev/null +++ b/Docs/nodered-bees.flow @@ -0,0 +1,116 @@ +[ + { + "id": "39e98fa5.fea9e8", + "type": "tab", + "label": "Flow 1" + }, + { + "id": "fc3137ff.fc017", + "type": "mqtt in", + "z": "39e98fa5.fea9e8", + "name": "", + "topic": "students_201710/devices/ondrej_hruska/up", + "qos": "2", + "broker": "98e3cc43.3bd1e", + "x": 210.5, + "y": 137, + "wires": [ + [ + "5898399d.a1de7", + "da550cf8.6db248" + ] + ] + }, + { + "id": "5898399d.a1de7", + "type": "debug", + "z": "39e98fa5.fea9e8", + "name": "", + "active": true, + "console": "false", + "complete": "payload", + "x": 611.5, + "y": 96, + "wires": [] + }, + { + "id": "da550cf8.6db248", + "type": "function", + "z": "39e98fa5.fea9e8", + "name": "Extract data", + "func": "const pld = JSON.parse(msg.payload);\n\nconst bytes = Buffer.from(pld.payload_raw, 'base64');\n\n\nlet resp = {\n time_s: pld.metadata.time,\n time: Math.round((+(new Date(pld.metadata.time)))/1000), // convert to unix\n base64: pld.payload_raw\n};\n\nlet i = 0;\nlet du = () => {\n return bytes[i++]\n};\n\nresp.temp = (du()<<8 | du()) / 100;\nresp.hum = (du()<<8 | du()) / 100;\nresp.press = (85000 + (du() << 8 | du())) / 100;\nresp.gas_r = du() << 24 | du() << 16 | du() << 8 | du();\n\nreturn {payload: resp};\n", + "outputs": 1, + "noerr": 0, + "x": 386.5, + "y": 224, + "wires": [ + [ + "e983b01f.348d78", + "697a6626.6df8b8" + ] + ] + }, + { + "id": "e983b01f.348d78", + "type": "debug", + "z": "39e98fa5.fea9e8", + "name": "", + "active": true, + "console": "false", + "complete": "true", + "x": 573.5, + "y": 184, + "wires": [] + }, + { + "id": "1daeac40.f9df74", + "type": "file", + "z": "39e98fa5.fea9e8", + "name": "", + "filename": "/home/ondra/NodeRED/bees.csv", + "appendNewline": false, + "createDir": true, + "overwriteFile": "false", + "x": 776.5, + "y": 263, + "wires": [] + }, + { + "id": "697a6626.6df8b8", + "type": "csv", + "z": "39e98fa5.fea9e8", + "name": "", + "sep": ",", + "hdrin": "", + "hdrout": "", + "multi": "one", + "ret": "\\n", + "temp": "time,temp,hum,press,gas_r", + "x": 564.5, + "y": 264, + "wires": [ + [ + "1daeac40.f9df74" + ] + ] + }, + { + "id": "98e3cc43.3bd1e", + "type": "mqtt-broker", + "z": "", + "broker": "eu.thethings.network", + "port": "8883", + "tls": "", + "clientid": "", + "usetls": true, + "compatmode": true, + "keepalive": "60", + "cleansession": true, + "willTopic": "", + "willQos": "0", + "willPayload": "", + "birthTopic": "", + "birthQos": "0", + "birthPayload": "" + } +] diff --git a/Docs/peakdetect.c b/Docs/peakdetect.c new file mode 100755 index 0000000..7ab3b2f --- /dev/null +++ b/Docs/peakdetect.c @@ -0,0 +1,188 @@ +/** + * Spectral peak detection algorithm with interpolation + * + * Written by Ondřej Hruška "MightyPork", Dec 30, 2017 + * + * This source code is hereby released to the public domain + * for anyone to use for anything they want. + */ + +#include +#include +#include +#include +#include +#include +#include + +/** + * Rolling average centered at a bin + * + * @param arr - array of bins + * @param count - number of bins + * @param pos - position we're intersted in + * @param len - size of the rolling window, centered around the position + * @return average within the window, excluding bin at position 'pos' + */ +static float ravg(float *arr, uint32_t count, uint32_t pos, uint32_t len) +{ + // XXX this needs some adjustments, it's not perfectly centered + + // if we're at the end or beginning, use only bins we have available + uint32_t from = (pos > len/2 ? pos-len/2 : 0); + uint32_t to = (pos < count-len/2 ? pos+len/2 : count-1); + + float acu = 0; + for (uint32_t i = from; i <= to; i++) { + if (i == pos) continue; + acu += arr[i]; + } + acu /= (to - from); // not +1 because we skip the middle + + return acu; +} + +/** A detected peak struct */ +struct peak { + float position; // precise position, unit is 1 bin + float magnitude; // precise magnitude + float weight; // sorting weight (internal use) +}; + +/** + * Quadratic interpolation to find the real peak position and magnitude + * + * @param pk - peak struct to store the results in + * @param values - the bins array + * @param vcount - size of the bins array + * @param pos - position of the peak we're triyng to analyze + */ +static void qinterp(struct peak *pk, const float *values, uint32_t vcount, uint32_t pos) +{ + float a = (pos>0?values[pos-1]:values[pos]); + float b = values[pos]; + float c = (posposition = pos + p; + pk->magnitude = b - 0.25 * (a - c) * p; +} + +/** Copy a peak */ +static void cpy_pk(struct peak *dest, const struct peak *src) +{ + dest->position = src->position; + dest->magnitude = src->magnitude; + dest->weight = src->weight; +} + +/** + * Detect peaks in a real float spectrum + * + * @param peaks - destination for the peak detect algorithm, peaks are sorted from the most important + * @param pcount - number of peaks to detect + * @param values - the spectrum as an array of bin magnitudes + * @param vcount - number of bins in the spectrum + * @return average level (excluding the peaks) + */ +float pkdetect(struct peak *peaks, uint32_t pcount, float *values, uint32_t vcount) +{ + uint32_t used_peaks = 0; + + // clear the table + for (uint32_t i = 0; i < pcount; i++) { + peaks[i].position + = peaks[i].magnitude + = peaks[i].weight = 0; + } + + struct peak pk; // scratch peak + float prev = 0; + float sum = 0; + for (uint32_t i = 0; i < vcount; i++) { + float base = ravg(values, vcount, i, 32); + float raw = values[i]; + float normed = raw / base; + if (i > 0) { + // difference from the previous bin (this serves as the primary peak detection factor) + float diff = normed - prev; + + if (diff > 0) { + // find the precise position and magnitude + qinterp(&pk, values, vcount, i); + // weight for sorting the peaks + pk.weight = diff * pk.magnitude; + + // try to fit it in the peak list + for (uint32_t j = 0; j < pcount; j++) { + if (pk.weight > peaks[j].weight) { + for (uint32_t k = used_peaks; k > j; k--) { + cpy_pk(&peaks[k], &peaks[k-1]); + } + cpy_pk(&peaks[j], &pk); + used_peaks++; + break; + } + } + } + } + prev = normed; + sum += raw; // this is rms + } + + // now remove some area around the found peaks (NOTE: this will cause double removal if two peaks happened to be very close together) + float pksum = 0; + const uint32_t pkexpand = 4; + for (uint32_t i = 0; i < pcount; i++) { + uint32_t pos = (uint32_t)roundf(peaks[i].position); + uint32_t from = (pos > pkexpand/2 ? pos-pkexpand/2 : 0); + uint32_t to = (pos < vcount-pkexpand/2 ? pos+pkexpand/2 : vcount-1); + for (uint32_t j = from; j <= to; j++) { + pksum += values[j]; + } + } + + float noise = (sum - pksum); + if (noise < 0) noise = 0; + return noise / vcount; +} + + + +// this is just for the demo +union smp_union { + uint8_t bytes[4096]; + float floats[1024]; +}; + +union smp_union smp; + +int main (void) +{ + uint8_t b[] = { + 0x53,0x6C,0x46,0x39,0x31,0x91,0xF8,0x38,0xFA,0xF9,0x70,0x38,0xB6,0xB3,0xE8,0x38,0xB0,0xA8,0xA3,0x39,0x5C,0x98,0xAD,0x3A,0xE1,0x38,0x00,0x3B,0x4D,0x09,0x7D,0x3A,0x1A,0xD2,0x26,0x3B,0xF9,0x85,0xD7,0x3A,0x5E,0xBB,0x0B,0x3B,0xF0,0x04,0xAD,0x3A,0xDF,0x95,0xCE,0x3A,0xD1,0x94,0x2E,0x39,0x0F,0xE2,0x68,0x39,0x4C,0xE9,0x02,0x39,0xFC,0xAA,0x4B,0x3A,0xB4,0x56,0xE2,0x3A,0xF1,0xA4,0x1C,0x3A,0x7C,0x4A,0x12,0x3A,0x7A,0xE4,0xDF,0x3A,0x3B,0xD6,0x57,0x3A,0x0E,0x1E,0x35,0x38,0x66,0x52,0x32,0x39,0xD6,0x0F,0x08,0x39,0xB3,0xBC,0x6E,0x39,0x25,0x9A,0xD8,0x39,0xE0,0xC9,0xF9,0x3A,0xD0,0x09,0x66,0x3A,0xA2,0x79,0x30,0x39,0xA9,0x0F,0x6D,0x39,0xC1,0x90,0xFF,0x39,0x36,0x8B,0xE2,0x39,0x77,0x5C,0x37,0x39,0x26,0xA8,0x0F,0x3A,0x1C,0x75,0xD5,0x39,0x29,0xD1,0xA3,0x38,0x2C,0x32,0x65,0x39,0x4A,0x0F,0xC7,0x38,0x31,0xE9,0x1D,0x3A,0x31,0xB6,0x8F,0x3B,0x6F,0x8D,0x94,0x3B,0x0E,0x90,0x24,0x3A,0xAA,0x62,0x1A,0x3A,0xFB,0xF1,0x99,0x39,0x77,0xE7,0xE4,0x37,0x09,0x0D,0x1D,0x39,0x2E,0x7D,0x1F,0x38,0x86,0xC1,0x41,0x38,0x8D,0xA6,0x80,0x38,0x48,0xD5,0x25,0x38,0xB4,0xC6,0x9C,0x39,0x94,0xAE,0x1F,0x3A,0x3C,0xDF,0x4A,0x3A,0x4E,0xF6,0xE7,0x3A,0x18,0x28,0xCE,0x3A,0xB2,0xEB,0xD5,0x39,0x79,0xE3,0x7C,0x39,0xCF,0x20,0xD0,0x39,0x5C,0xD7,0x1F,0x39,0x19,0x70,0x00,0x39,0xD4,0xFD,0xA4,0x39,0x27,0x26,0x04,0x39,0x95,0xCA,0x93,0x38,0x0E,0x50,0x54,0x38,0xD6,0x89,0x32,0x38,0x3D,0x5A,0x33,0x38,0x34,0xC7,0x99,0x38,0x2F,0xF6,0x22,0x38,0x9A,0x71,0x97,0x38,0xBE,0x7A,0x82,0x38,0x7C,0x3F,0x1C,0x39,0xA8,0xFA,0x05,0x39,0x33,0xA1,0x07,0x39,0x1A,0xA6,0x39,0x39,0x83,0x9E,0x9D,0x38,0x24,0x7B,0x35,0x38,0x39,0xFA,0x28,0x38,0xF0,0x38,0x4B,0x38,0x32,0x2F,0x23,0x39,0x5D,0xBA,0x6E,0x38,0x9D,0x5D,0x7D,0x3A,0x20,0xCE,0x56,0x3A,0x3F,0xCD,0x4D,0x39,0x03,0x89,0x88,0x38,0x12,0xF9,0xB9,0x37,0x20,0xB8,0x8C,0x38,0x6F,0x9A,0x60,0x38,0x92,0x90,0x15,0x38,0xA3,0xB3,0xD9,0x38,0x3F,0x12,0x46,0x38,0x3F,0x0A,0x3F,0x38,0x3B,0x73,0xEB,0x37,0x2B,0xDC,0x46,0x38,0xED,0xA2,0xF5,0x37,0x5E,0x28,0xBE,0x38,0x1C,0x27,0xC8,0x38,0x2C,0x66,0x9C,0x37,0xCC,0x18,0x2E,0x37,0x4F,0x14,0xB9,0x37,0x19,0x72,0xBD,0x37,0xF6,0x24,0x85,0x37,0x72,0x3F,0xC9,0x37,0xEC,0x32,0xD7,0x34,0x32,0x77,0x52,0x37,0x61,0x7F,0x1A,0x37,0x7F,0x56,0xCF,0x37,0x96,0x8E,0x3F,0x38,0xE9,0xD3,0x37,0x39,0xA0,0xF5,0x60,0x39,0xE5,0x69,0x74,0x38,0xF6,0x15,0x78,0x37,0x74,0x4A,0xE2,0x37,0xEE,0x43,0x0A,0x38,0xFD,0x77,0xA6,0x37,0xDD,0xBD,0x96,0x37,0xF9,0x46,0xC1,0x37,0x1D,0x75,0x42,0x37,0xA8,0x2B,0x9E,0x36,0xC5,0xF5,0x88,0x37,0xA6,0xA6,0xE8,0x36,0x99,0x85,0x30,0x37,0x61,0x26,0x50,0x38,0x16,0x03,0xCE,0x37,0x6E,0x91,0x34,0x38,0x6F,0xC9,0x8C,0x38,0x74,0x03,0x02,0x38,0xE0,0xEF,0x8A,0x37,0x92,0xB6,0xFE,0x37,0x20,0x9E,0xE8,0x37,0x3D,0x15,0x9D,0x37,0xF7,0x03,0x9F,0x37,0x75,0xB9,0x8A,0x37,0xFD,0xE7,0xFA,0x36,0x76,0x6B,0x2B,0x37,0x36,0x09,0x84,0x36,0xC6,0x97,0x91,0x37,0x9D,0x7A,0xB4,0x37,0xFF,0xF3,0x97,0x37,0x61,0x97,0xC4,0x37,0x0C,0x42,0x39,0x37,0x65,0x10,0xBC,0x37,0x67,0xD7,0xCB,0x37,0x8A,0x7D,0xA7,0x37,0x06,0xBC,0x03,0x38,0xDA,0x35,0x7E,0x37,0x06,0x20,0x26,0x36,0x82,0x3E,0xAF,0x36,0x57,0x3E,0x14,0x37,0xED,0xFE,0x89,0x37,0x32,0xA4,0x9A,0x37,0x33,0x4E,0x05,0x37,0xDF,0x3F,0x02,0x37,0xDF,0xBE,0xD1,0x37,0xB8,0xA7,0xC2,0x37,0x7D,0x61,0xD8,0x36,0x27,0xA3,0xEC,0x36,0x6E,0x04,0x52,0x37,0x10,0xF7,0x29,0x37,0xA3,0x7E,0xD3,0x36,0xBC,0xA2,0xAC,0x37,0xD8,0x5D,0xCE,0x37,0x8F,0xD1,0xB7,0x37,0xCE,0x35,0x68,0x37,0x9D,0x14,0x82,0x37,0x86,0x54,0x4C,0x38,0x0C,0xB9,0xC3,0x37,0xE9,0xF1,0xB7,0x37,0x3C,0x7C,0xB2,0x37,0x8D,0xD4,0xD5,0x37,0x28,0xF3,0x97,0x37,0x57,0x92,0x70,0x37,0xCA,0x4E,0x68,0x36,0xED,0xC2,0x76,0x36,0xDC,0xDD,0x26,0x37,0x1A,0x70,0x91,0x37,0x86,0x64,0x65,0x37,0x9F,0xB2,0xB5,0x37,0xF5,0x6E,0xB0,0x37,0x10,0xB1,0xA4,0x37,0x7F,0x06,0x3B,0x37,0xDC,0x85,0xB9,0x37,0x3C,0xE1,0x30,0x38,0x12,0xF2,0x95,0x37,0xA8,0xB9,0x84,0x37,0x79,0xC8,0xBD,0x37,0x31,0xB9,0x95,0x37,0x92,0xFA,0x99,0x37,0x74,0x9E,0xBF,0x37,0xA0,0x52,0x2D,0x37,0x7B,0x56,0x43,0x37,0x3A,0xB3,0xBC,0x36,0x01,0xC6,0x19,0x37,0xD1,0x87,0x0E,0x38,0x77,0x9E,0x04,0x38,0x21,0xF1,0x60,0x37,0x37,0xA1,0xDB,0x37,0xE2,0xCC,0x00,0x38,0x52,0xF0,0x8C,0x37,0xCC,0x3A,0x73,0x37,0x28,0xF8,0x1A,0x37,0x19,0x73,0x80,0x37,0x36,0x79,0xBB,0x36,0x0D,0xA5,0x1F,0x37,0xAA,0x62,0xFC,0x35,0x82,0x00,0x6D,0x36,0x09,0x6D,0xEF,0x36,0x4A,0xD5,0x1C,0x37,0xFA,0xC7,0x62,0x37,0x2F,0xCB,0x2E,0x37,0x3A,0x5A,0x9B,0x37,0x4B,0x77,0x4D,0x36,0x1B,0xFA,0x9E,0x37,0x47,0xFB,0x8F,0x37,0xAA,0x49,0xAD,0x36,0xC9,0x48,0x23,0x37,0xA5,0x15,0x36,0x37,0x07,0x88,0x10,0x36,0xAB,0x59,0x27,0x37,0xF4,0xFE,0xBC,0x35,0x12,0xBE,0x3D,0x37,0x02,0x30,0x49,0x37,0xA6,0xDD,0x9B,0x36,0x6D,0xC6,0x6B,0x37,0xCD,0x55,0x4C,0x37,0xF6,0x19,0x34,0x37,0xC1,0xC1,0x80,0x37,0xBA,0x4B,0xBF,0x36,0xF5,0xC8,0x73,0x37,0x28,0xF5,0xB5,0x37,0x3C,0xE5,0x0D,0x37,0x19,0x47,0x04,0x36,0xD0,0xD2,0x2B,0x37,0x4F,0xE9,0xAF,0x37,0xA6,0x70,0x89,0x37,0x84,0x33,0x26,0x37,0xD5,0x22,0x16,0x37,0xEC,0xF3,0xB7,0x37,0xC2,0x93,0xDD,0x36,0x1B,0xED,0x67,0x37,0x73,0xB0,0x9F,0x37,0xFA,0x8D,0x69,0x37,0x3C,0xCD,0xBA,0x36,0x0A,0x34,0xC9,0x37,0x46,0xE4,0xB7,0x37,0x24,0x03,0xB4,0x37,0x08,0xB3,0x9B,0x36,0x8D,0xFD,0x5F,0x37,0x74,0x89,0x89,0x37,0x33,0x70,0x4C,0x37,0x15,0xB1,0x3C,0x37,0xC9,0x2F,0x29,0x37,0xBB,0xDC,0x9A,0x37,0xA9,0xFC,0xD6,0x36,0x3D,0x88,0xBE,0x37,0xEB,0xA8,0x2B,0x37,0xB1,0x85,0x4B,0x37,0x8F,0x84,0x9C,0x35,0xEF,0xA9,0x91,0x37,0xE3,0x89,0x8D,0x37,0x7E,0xFC,0xFE,0x36,0x59,0xCB,0x19,0x37,0xBA,0xC5,0x25,0x37,0xFB,0xE5,0x79,0x37,0xD8,0x39,0x5A,0x37,0x4C,0x91,0x9C,0x36,0xAB,0x16,0x64,0x37,0x18,0x30,0x2B,0x37,0x26,0xAD,0x77,0x35,0x28,0x0F,0xB5,0x36,0x17,0x85,0x84,0x36,0x91,0x06,0x98,0x35,0x59,0xB8,0x4D,0x37,0x8A,0x23,0x7B,0x37,0xB0,0x4D,0x89,0x37,0x95,0xF9,0x79,0x37,0xD4,0x76,0x2F,0x37,0x7A,0x4E,0x53,0x37,0x47,0x75,0x5B,0x37,0x3B,0xB7,0x75,0x37,0x3A,0x0E,0x91,0x36,0x49,0x8C,0xE5,0x37,0xE6,0x6E,0xA3,0x37,0xF7,0xFA,0xBE,0x36,0x71,0x11,0x30,0x36,0xA6,0xB5,0x5D,0x37,0x70,0x63,0xBC,0x37,0x31,0x35,0x1E,0x37,0xCE,0x6A,0x55,0x36,0xE3,0x8E,0xAE,0x36,0x51,0xB6,0x18,0x37,0xDC,0xAD,0x34,0x37,0xCE,0x79,0x61,0x37,0x92,0xC3,0xB3,0x37,0x6B,0xAB,0x22,0x37,0x0C,0xB9,0xC7,0x37,0xA3,0xCE,0x1A,0x38,0xE4,0x69,0x86,0x37,0xDD,0x7F,0x81,0x36,0x57,0x07,0x12,0x37,0xAF,0x3F,0xF9,0x35,0x22,0x1D,0x8C,0x37,0x7C,0xC7,0x24,0x37,0x3D,0xC7,0x42,0x37,0xC4,0x03,0xB9,0x37,0xE3,0xB3,0xC0,0x37,0x30,0x95,0xF5,0x37,0x32,0xB5,0xE6,0x37,0x18,0x9A,0xA9,0x37,0xC7,0x48,0xA2,0x37,0xBD,0x7E,0x64,0x37,0x26,0x01,0x07,0x37,0x57,0xBC,0xD5,0x36,0xFB,0x2C,0xBD,0x37,0x81,0x1B,0xBD,0x37,0xFD,0x31,0x04,0x37,0x46,0x10,0x40,0x37,0x9C,0x5A,0x1F,0x37,0xA5,0x46,0x6C,0x37,0x89,0xB0,0x71,0x37,0xF0,0x43,0x9F,0x37,0xD4,0x02,0x2E,0x37,0x77,0xDC,0xDB,0x37,0xF1,0x5A,0x77,0x37,0x49,0x57,0x2D,0x37,0xF3,0xB9,0x84,0x37,0xD8,0x69,0xAC,0x37,0x3F,0x2D,0x07,0x38,0x4D,0x9D,0x99,0x37,0x01,0x10,0xE0,0x36,0xD0,0xB9,0xE6,0x36,0x37,0x5D,0x3E,0x37,0x3D,0x4D,0x83,0x36,0x21,0xB7,0x43,0x37,0xBA,0x11,0x9D,0x37,0x86,0xD7,0x09,0x37,0x9B,0x4D,0x05,0x36,0x84,0x96,0x5E,0x37,0x8E,0xDB,0xA2,0x37,0x07,0x09,0x55,0x37,0x9C,0xB5,0x4E,0x37,0x6F,0x93,0xA9,0x37,0xF8,0x3C,0x73,0x37,0x79,0x84,0x76,0x37,0x32,0x00,0xD6,0x37,0x21,0xC4,0xE6,0x37,0xFB,0x4B,0xD1,0x37,0x42,0xEC,0xCB,0x37,0x0B,0x85,0x87,0x37,0x19,0x4F,0x60,0x37,0x35,0x28,0x6A,0x37,0xDE,0x8B,0x99,0x37,0xCD,0xE0,0x73,0x37,0x93,0x03,0x7D,0x37,0xC5,0x83,0xE7,0x37,0xF6,0x13,0x1D,0x38,0x71,0xA8,0xFB,0x37,0x84,0x8A,0xB8,0x37,0xD6,0xA1,0x43,0x37,0xD2,0x1B,0x6A,0x37,0x45,0xDE,0xD5,0x37,0x06,0x7A,0x5C,0x37,0x46,0xBA,0x87,0x37,0x4F,0x16,0xAB,0x36,0xF0,0x75,0x21,0x37,0x49,0xF1,0xE3,0x37,0x8F,0xE8,0x0F,0x38,0x85,0x87,0xA6,0x37,0x9F,0x87,0x40,0x37,0xBE,0x39,0x30,0x37,0x33,0x4B,0x47,0x37,0x9D,0x9B,0xBD,0x37,0x65,0x85,0x0C,0x37,0x66,0xD2,0xCD,0x36,0xA5,0xB9,0xCE,0x36,0x44,0x8F,0x05,0x37,0x2B,0x33,0x0C,0x37,0x66,0x90,0x62,0x37,0x65,0x31,0x91,0x37,0x8C,0x47,0x8D,0x37,0x9E,0x31,0x76,0x37,0xED,0xFA,0xB1,0x36,0x63,0x8C,0x9C,0x37,0x4A,0xEF,0x86,0x36,0xE5,0x6A,0xB1,0x37,0xC6,0x34,0xAC,0x37,0x61,0x09,0x73,0x37,0x3F,0x0E,0x94,0x37,0x1E,0x5F,0xD2,0x37,0x35,0xDE,0x85,0x37,0x09,0xD1,0xCE,0x36,0xE5,0x14,0x36,0x37,0xAB,0xE5,0xD3,0x36,0xB9,0x7B,0x5D,0x37,0x91,0x9C,0xB8,0x37,0x5C,0xA0,0x68,0x37,0x9D,0xBD,0x2C,0x37,0x77,0x39,0x9D,0x36,0x07,0x76,0x2D,0x37,0x1C,0x8D,0x43,0x37,0xBB,0xCB,0x07,0x38,0x8F,0x2E,0xE3,0x37,0x3C,0x61,0x43,0x36,0x9E,0x28,0x32,0x37,0x81,0x3E,0x9A,0x36,0xEE,0x03,0x51,0x37,0x72,0x25,0x48,0x36,0xFE,0x81,0x81,0x37,0x83,0xB7,0xD9,0x37,0xEA,0x53,0xD6,0x37,0x54,0xDD,0x2D,0x37,0x84,0x5E,0x8C,0x37,0xAA,0xD9,0x7D,0x37,0x98,0xEB,0x92,0x37,0x19,0xCD,0x27,0x37,0x83,0xA4,0x42,0x37,0x9E,0x72,0x6B,0x37,0xB5,0xF6,0x0E,0x37,0xFD,0x77,0x41,0x37,0xC3,0xBB,0xFB,0x36,0x3E,0x11,0x28,0x37,0x17,0xE1,0x58,0x37,0x78,0x25,0x0E,0x37,0x78,0x02,0xE5,0x36,0xCA,0xB2,0x7C,0x37,0x27,0x9C,0x9D,0x37,0x74,0xDE,0x8C,0x37,0x74,0x66,0x5E,0x37,0x9C,0x44,0x90,0x37,0x94,0x4E,0x8D,0x37,0x5F,0x83,0xC1,0x37,0xF0,0x5C,0x84,0x37,0x42,0x6B,0xFB,0x36,0x85,0x74,0x05,0x37,0xDC,0x60,0x5A,0x37,0x19,0x8A,0x85,0x37,0xFA,0x9D,0xF6,0x36,0xB7,0xB4,0x6C,0x36,0x80,0x5E,0x7B,0x37,0x25,0x57,0xB0,0x37,0x21,0x27,0x56,0x37,0xAA,0x5E,0xA4,0x36,0x24,0x90,0x92,0x37,0x95,0x50,0x74,0x37,0xEF,0xDA,0x67,0x37,0x8F,0x32,0x00,0x37,0x39,0xCD,0xA4,0x37,0xB0,0x4D,0x2B,0x37,0xC6,0xFD,0x95,0x37,0xF7,0x08,0xB4,0x37,0x14,0x22,0x98,0x37,0xCE,0xF3,0x74,0x37,0x64,0x17,0x66,0x37,0x4E,0xC2,0x87,0x36,0xF4,0xCA,0x06,0x37,0x90,0x82,0x2C,0x37,0x1A,0x52,0x7B,0x37,0x59,0x70,0x34,0x37,0x68,0xCA,0x99,0x36,0x38,0xB4,0x77,0x37,0x6D,0x62,0x78,0x37,0x50,0x6A,0x5F,0x37,0xB3,0xFC,0x07,0x37,0xE0,0x7D,0x24,0x37,0xC2,0x14,0x61,0x37,0x67,0x89,0x1B,0x37,0x57,0xF0,0x00,0x37,0xCA,0x4B,0x49,0x37,0xD9,0x5B,0x42,0x37,0x38,0xE2,0xC6,0x35,0x8B,0xF8,0x3C,0x37,0xB0,0x0E,0x8E,0x36,0x60,0xD2,0xD7,0x36,0xCE,0xF0,0x19,0x37,0x32,0x71,0x1B,0x37,0xDF,0xC6,0x33,0x37,0x6B,0xBB,0x9D,0x37,0x66,0xF9,0x9E,0x37,0xCE,0x31,0x15,0x37,0xE1,0xB7,0x25,0x37,0x94,0xBD,0x4B,0x36,0x9D,0x0B,0x73,0x37,0x5B,0x85,0x94,0x37,0x96,0x47,0xBD,0x37,0x37,0xA7,0x79,0x37,0x98,0xCB,0xB6,0x37,0x1D,0x52,0xC2,0x37,0xFD,0x79,0x25,0x37,0xB8,0x0B,0x0C,0x37,0x67,0x9D,0xB7,0x36,0xC8,0x38,0xF9,0x36,0x33,0x1B,0x8E,0x36,0x2A,0x0B,0xDA,0x36,0x1F,0xCA,0x12,0x37,0x48,0x02,0x11,0x37,0x03,0x74,0x8A,0x37,0x24,0xE9,0x9F,0x37,0x39,0xC6,0x42,0x37,0x3E,0xF4,0x8C,0x36,0x39,0xA3,0x56,0x37,0x70,0xEC,0x88,0x37,0xB6,0xE3,0x39,0x37,0xCD,0xC9,0xD2,0x35,0x8B,0x2B,0x96,0x36,0x4B,0x97,0x01,0x37,0xD4,0x9B,0xB7,0x37,0xA4,0x7E,0xD7,0x37,0x95,0xB6,0x92,0x37,0x8B,0x3F,0xA4,0x37,0x17,0xCA,0xF3,0x36,0x34,0x32,0x11,0x37,0xED,0xC1,0x2F,0x37,0x82,0x39,0xA9,0x37,0x5C,0xEC,0x38,0x37,0x49,0xE5,0x29,0x37,0xE5,0xA1,0x03,0x37,0x5E,0xA7,0xE8,0x36,0x66,0x3A,0x4E,0x37,0xA7,0x6B,0x15,0x37,0x89,0x37,0xBC,0x37,0x6A,0x9D,0xF2,0x37,0x86,0xB7,0x72,0x37,0xFD,0xAB,0x76,0x37,0xF7,0x30,0xA9,0x37,0x70,0x7F,0x78,0x37,0xD2,0xFF,0x42,0x37,0x83,0x2F,0xBD,0x37,0x42,0x46,0x33,0x37,0xD3,0x30,0x7A,0x37,0x45,0x0A,0xAA,0x37,0xE4,0xD2,0xD8,0x37,0x05,0xB8,0x8D,0x37,0x98,0x13,0xDB,0x37,0x4C,0xED,0x43,0x37,0x59,0x07,0x96,0x37,0xBE,0x50,0xF0,0x37,0xAD,0xFA,0x1F,0x38,0x20,0x8A,0x0A,0x38,0x60,0x16,0xB6,0x37,0x18,0xA7,0x58,0x37,0xB5,0x08,0x15,0x37,0x76,0x24,0x56,0x37,0xCB,0x63,0x18,0x37,0x87,0x4F,0x84,0x37,0x07,0x7B,0x18,0x37,0xB3,0x9D,0x8D,0x36,0xBA,0x9E,0xA5,0x37,0x47,0x5D,0xC0,0x37,0x1F,0x7E,0x21,0x36,0x18,0x88,0x9A,0x37,0x9B,0x10,0x16,0x37,0xDB,0x54,0x32,0x37,0xC9,0x50,0x62,0x37,0x26,0x06,0x6A,0x37,0xA9,0x48,0x0C,0x36,0xE4,0x76,0x1E,0x37,0xF8,0xF7,0x07,0x37,0x27,0x84,0x35,0x37,0xA5,0xAE,0x9B,0x36,0xEB,0x23,0x89,0x37,0x84,0x87,0x9A,0x37,0xCA,0x38,0xB5,0x37,0xE9,0x1E,0xF1,0x37,0xEE,0x25,0x55,0x37,0x65,0xE3,0x87,0x36,0xF3,0x0B,0x7C,0x37,0x14,0x86,0x87,0x37,0x8B,0xB3,0xED,0x36,0x02,0xA0,0x9C,0x37,0xBB,0xF1,0xCF,0x37,0x7A,0x61,0x0B,0x36,0x9F,0x86,0x5F,0x37,0x49,0xF3,0x8B,0x37,0x88,0x2A,0x84,0x37,0x3F,0xDD,0x26,0x37,0x03,0xA3,0x82,0x36,0x59,0xB4,0x28,0x37,0xDD,0x41,0x15,0x37,0x5A,0x83,0x85,0x37,0x4E,0x9E,0xAE,0x36,0x71,0x98,0xA8,0x37,0x8D,0xBF,0xBF,0x37,0x4D,0x45,0xE8,0x37,0xF7,0x18,0x0A,0x38,0x16,0x64,0x85,0x37,0xF8,0x85,0x79,0x36,0x86,0x4D,0x19,0x37,0xD7,0x2A,0xB7,0x37,0x2A,0xFE,0xB0,0x37,0x3E,0x79,0xAC,0x37,0x46,0xFE,0x95,0x36,0xD1,0xDC,0x91,0x37,0xF2,0x27,0x9C,0x37,0x99,0x25,0x6A,0x36,0x4C,0x17,0x62,0x37,0xE8,0x7D,0x57,0x37,0xC7,0x2F,0x18,0x37,0x02,0x07,0xE1,0x36,0x1A,0x5B,0x91,0x36,0x57,0x48,0x74,0x36,0x3C,0xE0,0x15,0x36,0x42,0x22,0x54,0x37,0x98,0xE9,0x2F,0x37,0xF4,0x9E,0xC3,0x37,0x8C,0x59,0x3B,0x38,0x77,0xCE,0x93,0x37,0xD7,0xD1,0x25,0x37,0x8D,0xF9,0xBE,0x36,0x95,0x6B,0x4E,0x36,0xED,0xEA,0xD4,0x36,0x5D,0x87,0x55,0x37,0xA4,0xBF,0xCE,0x37,0xD2,0xD1,0x8F,0x37,0xD0,0x97,0xD4,0x36,0x03,0x27,0x84,0x37,0x78,0xC4,0xCC,0x37,0xB9,0x3A,0xB4,0x37,0xFB,0xFA,0x8D,0x37,0x91,0x86,0x44,0x37,0x07,0x20,0x54,0x37,0xE6,0xFB,0xA8,0x36,0xED,0x26,0x17,0x37,0xE1,0x95,0xDF,0x36,0x52,0xAD,0x05,0x37,0xDB,0x43,0xEC,0x36,0x74,0x9E,0xF4,0x36,0x04,0x66,0x8A,0x37,0xFC,0xEB,0x61,0x37,0xA1,0x5C,0x51,0x37,0xCC,0x35,0xAD,0x37,0xA0,0x39,0x83,0x37,0xB4,0x91,0x8D,0x37,0x99,0xD3,0x2C,0x38,0x05,0x4E,0x0A,0x38,0x18,0xF3,0x52,0x37,0xE0,0xDA,0x33,0x36,0x30,0xA4,0x89,0x37,0xB0,0x66,0xB4,0x36,0xDC,0xFE,0x67,0x37,0x61,0xC0,0x0E,0x37,0x8E,0xD4,0xE4,0x36,0x1A,0xC0,0xF4,0x36,0x3E,0x8D,0xBA,0x37,0x28,0xE1,0xD4,0x36,0xFE,0xB0,0xA6,0x37,0x7E,0xDA,0xFC,0x36,0xD1,0xEC,0x18,0x38,0x60,0x0C,0xB4,0x37,0x5D,0xA4,0x3E,0x36,0x3F,0xC2,0x4C,0x36,0x10,0x0C,0x24,0x37,0x07,0xF1,0xB2,0x36,0x94,0x0A,0x25,0x37,0xF9,0x07,0x48,0x36,0x7D,0x8E,0xC0,0x36,0x2E,0xC6,0x27,0x37,0xA3,0xE7,0x0D,0x37,0x86,0xE9,0xE1,0x36,0x6C,0x54,0x91,0x37,0xAC,0x25,0xAB,0x37,0x4B,0xBE,0x7F,0x37,0x6B,0x8D,0x4B,0x37,0xCE,0xE9,0xAC,0x37,0x82,0x79,0xA6,0x37,0x81,0xEE,0x70,0x37,0x1B,0x5C,0x7E,0x37,0xA2,0x68,0xF3,0x37,0x41,0x26,0x66,0x38,0xBB,0xB7,0xBE,0x37,0x2E,0xB7,0xC1,0x37,0x47,0xA3,0xA5,0x37,0xC3,0x9D,0xB4,0x37,0x04,0xF7,0x9A,0x37,0x7E,0xE2,0x89,0x37,0xC0,0xEB,0x97,0x37,0xA5,0xA2,0x1E,0x38,0xF8,0x49,0x96,0x37,0x08,0xDF,0x81,0x37,0x3A,0x7E,0xA0,0x37,0x00,0xEC,0xEC,0x37,0xEE,0x70,0xA5,0x37,0xE0,0x72,0x5F,0x37,0xF1,0x8A,0x33,0x37,0xCC,0xB3,0x73,0x37,0xF6,0x3F,0xAB,0x36,0xDE,0xB0,0xCE,0x37,0x91,0x11,0x0B,0x38,0x8F,0x32,0x2C,0x37,0x28,0x13,0x6C,0x37,0x2F,0xF3,0x38,0x37,0x8D,0x26,0x19,0x37,0x96,0xF4,0xC6,0x37,0xEA,0xFF,0x13,0x38,0x2E,0x20,0xDD,0x37,0x27,0x58,0x2A,0x38,0xE5,0x5C,0x81,0x38,0xF1,0x43,0x07,0x38,0xDB,0x03,0xCD,0x37,0xCD,0xCB,0x4D,0x38,0xDB,0x3D,0xCA,0x37,0x31,0x5E,0x0A,0x37,0x52,0x60,0x0B,0x38,0x8C,0xF2,0x46,0x38,0xB5,0x40,0x1E,0x38,0xE4,0xD9,0xE3,0x36,0x90,0x95,0xD1,0x37,0x48,0xFC,0xF4,0x37,0xAF,0x83,0x05,0x38,0x45,0x0A,0xD2,0x37,0xA2,0x0B,0xE8,0x36,0x05,0x2B,0xD7,0x37,0xBE,0x2B,0x70,0x37,0xF6,0xA2,0x1D,0x38,0x21,0x56,0x37,0x38,0x0D,0x36,0x61,0x38,0x30,0x69,0x39,0x38,0x38,0x88,0xB6,0x37,0xB6,0xDA,0x3A,0x37,0xBE,0x42,0x8C,0x38,0xD9,0x28,0x7E,0x38,0x59,0x9C,0x06,0x38,0x9C,0x4C,0x05,0x38,0xEE,0xCE,0x8B,0x37,0x8F,0xD5,0xF6,0x37,0xF5,0xD4,0x77,0x36,0xCE,0x9B,0x19,0x38,0xE7,0x92,0x63,0x38,0xA4,0xE9,0x2B,0x38,0xE9,0xAB,0xDD,0x37,0xFD,0x63,0x1A,0x37,0x5C,0x8E,0x90,0x38,0x72,0x93,0x8E,0x38,0xCD,0x34,0x79,0x37,0xF2,0x14,0x2A,0x38,0x80,0x02,0x43,0x38,0xF5,0xA3,0xFC,0x37,0x15,0xDD,0x47,0x38,0x82,0xB9,0xA3,0x38,0xEF,0x7C,0xF4,0x37,0xD3,0xDE,0x86,0x38,0xE3,0x59,0xBE,0x38,0x50,0x27,0x55,0x38,0x21,0x1A,0x42,0x37,0x48,0x55,0xA1,0x37,0x35,0x95,0x99,0x37,0x56,0x44,0xF1,0x36,0x97,0x87,0x30,0x38,0xB8,0x3E,0x5B,0x38,0xC8,0x71,0x52,0x37,0x17,0x7C,0x26,0x37,0x9C,0x35,0x3E,0x37,0xA3,0x44,0xD8,0x37,0x40,0x94,0x32,0x38,0xA9,0xC2,0x50,0x38,0xE6,0x34,0x8D,0x38,0xA9,0xAF,0x9C,0x38,0x2A,0x2D,0x33,0x38,0x9A,0xB3,0x3C,0x38,0x8D,0x96,0x12,0x38,0x55,0xB8,0x02,0x38,0x45,0x4F,0x42,0x37,0x1A,0x42,0x97,0x37,0x8B,0xE5,0xD6,0x37,0x90,0xDF,0x64,0x37,0x70,0x42,0x03,0x38,0x47,0x20,0x15,0x38,0x3A,0xBB,0x3A,0x38,0x10,0x49,0xDB,0x37,0x8A,0xF3,0xCC,0x37,0x55,0x75,0x10,0x38,0xCE,0x13,0x8E,0x38,0x82,0x0A,0x39,0x38,0x5D,0x46,0x51,0x38,0xD8,0xFB,0xA6,0x38,0x19,0xDC,0x6C,0x38,0xA5,0xE0,0x80,0x38,0x9C,0x7D,0x52,0x38,0x72,0x5B,0x4B,0x38,0xE0,0xFC,0x62,0x38,0xFE,0xA3,0xA8,0x38,0xF8,0xC0,0x9F,0x38,0xE5,0x64,0x6A,0x38,0xB7,0x4E,0x68,0x38,0x6F,0xAD,0xCC,0x37,0xF4,0xAB,0xC8,0x36,0xB5,0xA7,0x90,0x38,0x2F,0xC8,0xAF,0x38,0x06,0x79,0x6F,0x38,0x7C,0x34,0x93,0x38,0x32,0x5B,0xF0,0x38,0x80,0xF4,0x26,0x39,0x5E,0x54,0xBD,0x38,0x7C,0x2B,0x5F,0x38,0x40,0xFF,0x6A,0x38,0x8B,0x1D,0xE3,0x37,0xDA,0x91,0x8B,0x37,0xD8,0x48,0x24,0x38,0x2C,0xC4,0xDC,0x37,0xC6,0xF0,0x39,0x38,0x79,0xBC,0xBD,0x37,0x03,0x93,0x82,0x38,0xCD,0x84,0x09,0x39,0xCC,0xBE,0xCD,0x38,0x74,0x68,0x02,0x38,0x25,0x6E,0x2E,0x38,0x98,0x59,0x23,0x38,0x3A,0x30,0x20,0x38,0xB8,0xD6,0x87,0x38,0x8B,0xBF,0x5D,0x38,0xC2,0x24,0xAF,0x37,0xBC,0x00,0x5B,0x38,0xDF,0x76,0x85,0x38,0x1D,0x9E,0x26,0x38,0x04,0x09,0xC4,0x38,0xA3,0x4C,0xEB,0x38,0x2D,0xD6,0xA7,0x38,0x54,0xCB,0xA7,0x38,0xF6,0x80,0xA3,0x38,0x2E,0x5A,0x30,0x37,0xB1,0xBC,0x83,0x38,0xA2,0xE3,0x93,0x38,0x18,0xEB,0xE7,0x37,0x3C,0x19,0xC6,0x37,0xEB,0x25,0xFC,0x37,0xE3,0x2A,0x68,0x38,0xF3,0x80,0xE4,0x37,0xE0,0xA2,0x02,0x38,0x6F,0x7F,0x12,0x38,0x1A,0x6B,0x9B,0x37,0x12,0x3C,0x8A,0x38,0x18,0x1A,0x60,0x38,0x4A,0x1D,0x5E,0x37,0x90,0xE3,0x34,0x38,0x1D,0xD2,0xB1,0x38,0x4D,0x39,0x2C,0x38,0x75,0x01,0xA7,0x37,0xD9,0x77,0x39,0x38,0xDD,0xB9,0x88,0x38,0x55,0x50,0x80,0x38,0x6B,0xD4,0x35,0x38,0x7B,0xA8,0x0D,0x38,0xBB,0x81,0xAF,0x38,0xC1,0x44,0xB5,0x38,0xC1,0x04,0x65,0x38,0x80,0x0E,0x9A,0x38,0x08,0xC6,0xCE,0x38,0xC7,0x06,0x6F,0x38,0x0D,0x5C,0xEC,0x36,0xA9,0x4F,0x5A,0x38,0x6B,0x9E,0xEF,0x37,0x0C,0xBD,0x8F,0x38,0x17,0xC7,0xA3,0x38,0x50,0x00,0x10,0x38,0x6C,0xF9,0xF4,0x37,0x7B,0xF5,0xA7,0x38,0x5D,0x3D,0xCA,0x38,0xBF,0x72,0x01,0x39,0x8A,0x5D,0xDF,0x38,0x3B,0x1B,0xAD,0x38,0x60,0xE5,0xBE,0x38,0x48,0x19,0xCC,0x38,0x11,0x47,0x80,0x38,0x72,0xD2,0xCE,0x37,0x12,0x75,0x38,0x37,0xB7,0x6E,0x26,0x38,0xB3,0x7A,0x02,0x38,0x81,0x34,0xEF,0x37,0x55,0xF9,0x70,0x38,0xB4,0x17,0x97,0x38,0x50,0x8F,0x91,0x38,0x54,0xC4,0xEC,0x37,0x36,0x96,0x84,0x38,0x71,0x8A,0x1D,0x38,0xB6,0xFB,0xD7,0x37,0xB3,0x1B,0xAE,0x37,0xF5,0x76,0x0B,0x38,0xAA,0x0E,0x11,0x38,0x38,0xC3,0x61,0x38,0x55,0x7A,0xED,0x37,0x9E,0xD6,0x9F,0x38,0x96,0x61,0x87,0x38,0xA7,0x45,0x92,0x38,0xB1,0x6B,0x67,0x38,0x71,0xF3,0x28,0x38,0x59,0x73,0xBC,0x38,0x5A,0xF9,0x9F,0x38,0x86,0x7C,0xA0,0x38,0x07,0x2C,0xD1,0x38,0x80,0xA3,0x9F,0x38,0x85,0x32,0x0D,0x38,0x98,0x82,0x93,0x38,0x88,0x34,0x4F,0x38,0xEA,0x4A,0x92,0x37,0x38,0x01,0x99,0x37,0xB5,0x04,0x94,0x37,0x8A,0xE4,0xEC,0x37,0x4B,0xA3,0x05,0x38,0xCE,0xE2,0x3E,0x38,0x4E,0x55,0x1C,0x38,0x7D,0x53,0xB0,0x38,0x40,0x34,0xF1,0x37,0x60,0x53,0x1B,0x38,0xB9,0x9E,0x2B,0x38,0x15,0xD6,0x89,0x38,0x9F,0x19,0xC5,0x38,0x12,0xA9,0x6F,0x38,0x5F,0x63,0x3B,0x38,0x03,0x5C,0x16,0x38,0x11,0x65,0x0D,0x38,0xF2,0xAD,0x49,0x38,0x53,0x2B,0x10,0x38,0x07,0x97,0xC0,0x37,0x6D,0x99,0xDF,0x37,0x24,0x73,0x36,0x38,0x10,0xBD,0x48,0x38,0xBF,0x96,0xF7,0x37,0x06,0x1D,0x7B,0x37,0x1E,0x04,0xA6,0x38,0x35,0xF5,0xBF,0x38,0x6E,0x55,0xBA,0x38,0xF9,0xC9,0x31,0x38,0x9E,0xFE,0x90,0x37,0xAE,0xE9,0x90,0x38,0x6C,0xFD,0xE2,0x38,0xEA,0x1F,0x91,0x38,0x29,0x95,0x88,0x38,0x42,0x05,0x41,0x38,0xD2,0x90,0x24,0x38,0x9E,0xCC,0x23,0x38,0x23,0x36,0x3E,0x37,0x89,0xA6,0x9E,0x37,0x4C,0x95,0x96,0x37,0xB0,0xA1,0xB6,0x37,0xB8,0x44,0x4E,0x38,0xD3,0x9C,0x92,0x37,0xD7,0xB9,0x30,0x38,0x94,0xF9,0x47,0x38,0xFE,0x46,0x4D,0x38,0x95,0xDE,0x44,0x38,0x95,0x10,0xD8,0x37,0x52,0x02,0x2D,0x38,0x8B,0x03,0x1B,0x38,0xF3,0x8B,0x13,0x38,0x8F,0x36,0x38,0x37,0x0C,0x6A,0x35,0x36,0x2D,0xC8,0xA4,0x37,0x3E,0x16,0x37,0x38,0x02,0x8A,0x9F,0x38,0xC7,0xDA,0xF6,0x37,0x88,0x19,0x2C,0x38,0xC1,0x40,0xD1,0x36,0x95,0x34,0x30,0x38,0x36,0x5F,0xBD,0x37,0x2D,0x7E,0x23,0x38,0x75,0xCD,0x15,0x38,0xC4,0xA1,0x38,0x38,0x9F,0x97,0x27,0x38,0x5D,0xCC,0x95,0x37,0x64,0x2E,0xCB,0x37,0xAB,0x90,0xAD,0x37,0x60,0x24,0x60,0x38,0xD2,0x58,0x42,0x38,0x6B,0x12,0x3B,0x37,0x09,0x3E,0xE6,0x37,0xFC,0x8A,0xE2,0x37,0x84,0x87,0x84,0x36,0xCF,0xC7,0xD3,0x37,0x49,0x55,0xD6,0x37,0x54,0x30,0xF8,0x37,0x3C,0xA9,0x2D,0x38,0xF0,0x34,0x18,0x38,0x8E,0x8A,0x17,0x38,0x3C,0x00,0x83,0x38,0x7C,0x08,0x09,0x38,0x0F,0x55,0x72,0x38,0x14,0xD3,0x75,0x38,0x2A,0x9C,0xB3,0x37,0x5C,0xC0,0x59,0x37,0x45,0xC8,0xE0,0x37,0x81,0xE0,0xCF,0x37,0x0E,0x9E,0x1A,0x37,0xD0,0x3E,0x8B,0x37,0x4B,0xBA,0x83,0x37,0xF7,0x2D,0x80,0x37,0xD8,0x11,0xAE,0x37,0xD4,0xDE,0xF7,0x37,0xB2,0x54,0xFB,0x37,0x76,0x02,0xB9,0x37,0x5D,0x9F,0x8A,0x37,0x58,0x36,0x10,0x38,0x69,0xF9,0x04,0x37,0xCD,0xF0,0x42,0x37,0x57,0x03,0xB4,0x37,0xA2,0x6A,0x46,0x37,0xE6,0x8F,0x5C,0x37,0x8F,0x96,0xD9,0x36,0x64,0x11,0x93,0x37,0x3E,0xE2,0xB0,0x37,0x37,0x75,0x9A,0x37,0x1B,0x57,0x85,0x37,0xD2,0xA6,0xAA,0x37,0x92,0xA4,0x87,0x37,0x9D,0xEA,0xE3,0x37,0x49,0xF9,0x10,0x37,0x9D,0x06,0xB9,0x37,0x4D,0xF4,0xFB,0x37,0xA2,0x6A,0x99,0x36,0x57,0x03,0xA2,0x37,0x22,0x91,0xA3,0x37,0x31,0x78,0xB5,0x37,0x67,0xDB,0xBD,0x36,0x53,0x10,0xAA,0x37,0x46,0xFD,0x29,0x37,0x0F,0x05,0x6A,0x36,0x39,0xBA,0x81,0x37,0x4F,0x34,0xAE,0x37,0x0D,0x65,0x9A,0x37,0x35,0x13,0x0E,0x38,0xD9,0x2D,0xCB,0x37,0xD9,0x47,0x19,0x38,0x2C,0x40,0x2D,0x37,0xEF,0x20,0x6E,0x36,0x6B,0x83,0x3E,0x37,0x4D,0x46,0x29,0x35 + }; + memcpy(smp.bytes, b, 4096); + uint32_t sample_count = 2048; + uint32_t bins_count = 1024; + + // Peaks go here + struct peak peaks[10]; + + // Magic * *# @ * / + + float floor = pkdetect(&peaks[0], 10, smp.floats, bins_count); + + // Show the results... + float bin = 21.7; + for (int i = 0; i < 10; i++) { + printf("pk %d ... %f @ %f Hz (weight %f)\r\n", i, + peaks[i].magnitude, + peaks[i].position*bin, + peaks[i].weight); + } + + printf("Noise power per bin is %f\r\n", floor); + + return 0; +} diff --git a/junk/gpio.c b/junk/gpio.c deleted file mode 100755 index be285f0..0000000 --- a/junk/gpio.c +++ /dev/null @@ -1,138 +0,0 @@ -/** - ****************************************************************************** - * File Name : gpio.c - * Description : This file provides code for the configuration - * of all used GPIO pins. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "gpio.h" -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/*----------------------------------------------------------------------------*/ -/* Configure GPIO */ -/*----------------------------------------------------------------------------*/ -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** Configure pins as - * Analog - * Input - * Output - * EVENT_OUT - * EXTI - * Free pins are configured automatically as Analog (this feature is enabled through - * the Code Generation settings) -*/ -void MX_GPIO_Init(void) -{ - - GPIO_InitTypeDef GPIO_InitStruct; - - /* GPIO Ports Clock Enable */ - __HAL_RCC_GPIOC_CLK_ENABLE(); - __HAL_RCC_GPIOH_CLK_ENABLE(); - __HAL_RCC_GPIOA_CLK_ENABLE(); - __HAL_RCC_GPIOB_CLK_ENABLE(); - __HAL_RCC_GPIOD_CLK_ENABLE(); - - /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = B1_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct); - - /*Configure GPIO pin : PH1 */ - GPIO_InitStruct.Pin = GPIO_PIN_1; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); - - /*Configure GPIO pins : PC0 PC1 PC2 PC3 - PC4 PC5 PC6 PC7 - PC8 PC9 PC10 PC11 - PC12 */ - GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 - |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7 - |GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11 - |GPIO_PIN_12; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - - /*Configure GPIO pins : PA0 PA1 PA8 PA11 - PA12 PA15 */ - GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_8|GPIO_PIN_11 - |GPIO_PIN_12|GPIO_PIN_15; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /*Configure GPIO pins : PB0 PB1 PB2 PB10 - PB11 PB12 PB13 PB14 - PB15 PB3 PB4 PB5 - PB6 PB7 */ - GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10 - |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14 - |GPIO_PIN_15|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5 - |GPIO_PIN_6|GPIO_PIN_7; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - - /*Configure GPIO pin : PD2 */ - GPIO_InitStruct.Pin = GPIO_PIN_2; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; - GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - -} - -/* USER CODE BEGIN 2 */ - -/* USER CODE END 2 */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/gpio.h b/junk/gpio.h deleted file mode 100755 index 864f17e..0000000 --- a/junk/gpio.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - ****************************************************************************** - * File Name : gpio.h - * Description : This file contains all the functions prototypes for - * the gpio - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __gpio_H -#define __gpio_H -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" -#include "main.h" - -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -void MX_GPIO_Init(void); - -/* USER CODE BEGIN Prototypes */ - -/* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ pinoutConfig_H */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/i2c.c b/junk/i2c.c deleted file mode 100755 index bcb3931..0000000 --- a/junk/i2c.c +++ /dev/null @@ -1,149 +0,0 @@ -/** - ****************************************************************************** - * File Name : I2C.c - * Description : This file provides code for the configuration - * of the I2C instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "i2c.h" - -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -I2C_HandleTypeDef hi2c1; - -/* I2C1 init function */ -void MX_I2C1_Init(void) -{ - - hi2c1.Instance = I2C1; - hi2c1.Init.Timing = 0x00506682; - hi2c1.Init.OwnAddress1 = 0; - hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; - hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; - hi2c1.Init.OwnAddress2 = 0; - hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK; - hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; - hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; - if (HAL_I2C_Init(&hi2c1) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - - /**Configure Analogue filter - */ - if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - - /**Configure Digital filter - */ - if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - -} - -void HAL_I2C_MspInit(I2C_HandleTypeDef* i2cHandle) -{ - - GPIO_InitTypeDef GPIO_InitStruct; - if(i2cHandle->Instance==I2C1) - { - /* USER CODE BEGIN I2C1_MspInit 0 */ - - /* USER CODE END I2C1_MspInit 0 */ - - /**I2C1 GPIO Configuration - PB8 ------> I2C1_SCL - PB9 ------> I2C1_SDA - */ - GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; - GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; - GPIO_InitStruct.Pull = GPIO_PULLUP; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF4_I2C1; - HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - - /* I2C1 clock enable */ - __HAL_RCC_I2C1_CLK_ENABLE(); - /* USER CODE BEGIN I2C1_MspInit 1 */ - - /* USER CODE END I2C1_MspInit 1 */ - } -} - -void HAL_I2C_MspDeInit(I2C_HandleTypeDef* i2cHandle) -{ - - if(i2cHandle->Instance==I2C1) - { - /* USER CODE BEGIN I2C1_MspDeInit 0 */ - - /* USER CODE END I2C1_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_I2C1_CLK_DISABLE(); - - /**I2C1 GPIO Configuration - PB8 ------> I2C1_SCL - PB9 ------> I2C1_SDA - */ - HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9); - - /* USER CODE BEGIN I2C1_MspDeInit 1 */ - - /* USER CODE END I2C1_MspDeInit 1 */ - } -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/i2c.h b/junk/i2c.h deleted file mode 100755 index f07170d..0000000 --- a/junk/i2c.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - ****************************************************************************** - * File Name : I2C.h - * Description : This file provides code for the configuration - * of the I2C instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __i2c_H -#define __i2c_H -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" -#include "main.h" - -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -extern I2C_HandleTypeDef hi2c1; - -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -extern void _Error_Handler(char *, int); - -void HW_I2C_Init(void); - -/* USER CODE BEGIN Prototypes */ - -/* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ i2c_H */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/main.c b/junk/main.c deleted file mode 100755 index 1e76d31..0000000 --- a/junk/main.c +++ /dev/null @@ -1,231 +0,0 @@ -/** - ****************************************************************************** - * File Name : main.c - * Description : Main program body - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" -#include "stm32l0xx_hal.h" -#include "i2c.h" -#include "rtc.h" -#include "spi.h" -#include "usart.h" -#include "gpio.h" - -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE BEGIN PV */ -/* Private variables ---------------------------------------------------------*/ - -/* USER CODE END PV */ - -/* Private function prototypes -----------------------------------------------*/ -void SystemClock_Config(void); - -/* USER CODE BEGIN PFP */ -/* Private function prototypes -----------------------------------------------*/ - -/* USER CODE END PFP */ - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -int main(void) -{ - - /* USER CODE BEGIN 1 */ - - /* USER CODE END 1 */ - - /* MCU Configuration----------------------------------------------------------*/ - - /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ - HAL_Init(); - - /* USER CODE BEGIN Init */ - - /* USER CODE END Init */ - - /* Configure the system clock */ - SystemClock_Config(); - - /* USER CODE BEGIN SysInit */ - - /* USER CODE END SysInit */ - - /* Initialize all configured peripherals */ - MX_GPIO_Init(); - MX_I2C1_Init(); - MX_SPI1_Init(); - MX_USART1_UART_Init(); - MX_USART2_UART_Init(); - MX_RTC_Init(); - - /* USER CODE BEGIN 2 */ - - /* USER CODE END 2 */ - - /* Infinite loop */ - /* USER CODE BEGIN WHILE */ - while (1) - { - /* USER CODE END WHILE */ - - /* USER CODE BEGIN 3 */ - - } - /* USER CODE END 3 */ - -} - -/** System Clock Configuration -*/ -void SystemClock_Config(void) -{ - - RCC_OscInitTypeDef RCC_OscInitStruct; - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_PeriphCLKInitTypeDef PeriphClkInit; - - /**Configure the main internal regulator output voltage - */ - __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); - - /**Initializes the CPU, AHB and APB busses clocks - */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI; - RCC_OscInitStruct.HSIState = RCC_HSI_ON; - RCC_OscInitStruct.HSICalibrationValue = 16; - RCC_OscInitStruct.LSIState = RCC_LSI_ON; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; - RCC_OscInitStruct.PLL.PLLMUL = RCC_PLLMUL_3; - RCC_OscInitStruct.PLL.PLLDIV = RCC_PLLDIV_2; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - - /**Initializes the CPU, AHB and APB busses clocks - */ - RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK - |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - - PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART1|RCC_PERIPHCLK_USART2 - |RCC_PERIPHCLK_I2C1|RCC_PERIPHCLK_RTC; - PeriphClkInit.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2; - PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1; - PeriphClkInit.I2c1ClockSelection = RCC_I2C1CLKSOURCE_PCLK1; - PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSI; - if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - - /**Configure the Systick interrupt time - */ - HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000); - - /**Configure the Systick - */ - HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK); - - /* SysTick_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); -} - -/* USER CODE BEGIN 4 */ - -/* USER CODE END 4 */ - -/** - * @brief This function is executed in case of error occurrence. - * @param None - * @retval None - */ -void _Error_Handler(char * file, int line) -{ - /* USER CODE BEGIN Error_Handler_Debug */ - /* User can add his own implementation to report the HAL error return state */ - while(1) - { - } - /* USER CODE END Error_Handler_Debug */ -} - -#ifdef USE_FULL_ASSERT - -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t* file, uint32_t line) -{ - /* USER CODE BEGIN 6 */ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - /* USER CODE END 6 */ - -} - -#endif - -/** - * @} - */ - -/** - * @} -*/ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/rtc.c b/junk/rtc.c deleted file mode 100755 index 642213b..0000000 --- a/junk/rtc.c +++ /dev/null @@ -1,114 +0,0 @@ -/** - ****************************************************************************** - * File Name : RTC.c - * Description : This file provides code for the configuration - * of the RTC instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "rtc.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -RTC_HandleTypeDef hrtc; - -/* RTC init function */ -void MX_RTC_Init(void) -{ - - /**Initialize RTC Only - */ - hrtc.Instance = RTC; - hrtc.Init.HourFormat = RTC_HOURFORMAT_24; - hrtc.Init.AsynchPrediv = 127; - hrtc.Init.SynchPrediv = 255; - hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; - hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE; - hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; - hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; - if (HAL_RTC_Init(&hrtc) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - -} - -void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle) -{ - - if(rtcHandle->Instance==RTC) - { - /* USER CODE BEGIN RTC_MspInit 0 */ - - /* USER CODE END RTC_MspInit 0 */ - /* RTC clock enable */ - __HAL_RCC_RTC_ENABLE(); - /* USER CODE BEGIN RTC_MspInit 1 */ - - /* USER CODE END RTC_MspInit 1 */ - } -} - -void HAL_RTC_MspDeInit(RTC_HandleTypeDef* rtcHandle) -{ - - if(rtcHandle->Instance==RTC) - { - /* USER CODE BEGIN RTC_MspDeInit 0 */ - - /* USER CODE END RTC_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_RTC_DISABLE(); - /* USER CODE BEGIN RTC_MspDeInit 1 */ - - /* USER CODE END RTC_MspDeInit 1 */ - } -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/rtc.h b/junk/rtc.h deleted file mode 100755 index cfe5391..0000000 --- a/junk/rtc.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - ****************************************************************************** - * File Name : RTC.h - * Description : This file provides code for the configuration - * of the RTC instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __rtc_H -#define __rtc_H -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" -#include "main.h" - -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -extern RTC_HandleTypeDef hrtc; - -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -extern void _Error_Handler(char *, int); - -void MX_RTC_Init(void); - -/* USER CODE BEGIN Prototypes */ - -/* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ rtc_H */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/spi.c b/junk/spi.c deleted file mode 100755 index 98aa777..0000000 --- a/junk/spi.c +++ /dev/null @@ -1,142 +0,0 @@ -/** - ****************************************************************************** - * File Name : SPI.c - * Description : This file provides code for the configuration - * of the SPI instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "spi.h" - -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -SPI_HandleTypeDef hspi1; - -/* SPI1 init function */ -void MX_SPI1_Init(void) -{ - - hspi1.Instance = SPI1; - hspi1.Init.Mode = SPI_MODE_MASTER; - hspi1.Init.Direction = SPI_DIRECTION_2LINES; - hspi1.Init.DataSize = SPI_DATASIZE_8BIT; - hspi1.Init.CLKPolarity = SPI_POLARITY_LOW; - hspi1.Init.CLKPhase = SPI_PHASE_1EDGE; - hspi1.Init.NSS = SPI_NSS_HARD_OUTPUT; - hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; - hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB; - hspi1.Init.TIMode = SPI_TIMODE_DISABLE; - hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; - hspi1.Init.CRCPolynomial = 7; - if (HAL_SPI_Init(&hspi1) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - -} - -void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle) -{ - - GPIO_InitTypeDef GPIO_InitStruct; - if(spiHandle->Instance==SPI1) - { - /* USER CODE BEGIN SPI1_MspInit 0 */ - - /* USER CODE END SPI1_MspInit 0 */ - /* SPI1 clock enable */ - __HAL_RCC_SPI1_CLK_ENABLE(); - - /**SPI1 GPIO Configuration - PA4 ------> SPI1_NSS - PA5 ------> SPI1_SCK - PA6 ------> SPI1_MISO - PA7 ------> SPI1_MOSI - */ - GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF0_SPI1; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* USER CODE BEGIN SPI1_MspInit 1 */ - - /* USER CODE END SPI1_MspInit 1 */ - } -} - -void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle) -{ - - if(spiHandle->Instance==SPI1) - { - /* USER CODE BEGIN SPI1_MspDeInit 0 */ - - /* USER CODE END SPI1_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_SPI1_CLK_DISABLE(); - - /**SPI1 GPIO Configuration - PA4 ------> SPI1_NSS - PA5 ------> SPI1_SCK - PA6 ------> SPI1_MISO - PA7 ------> SPI1_MOSI - */ - HAL_GPIO_DeInit(GPIOA, GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7); - - /* USER CODE BEGIN SPI1_MspDeInit 1 */ - - /* USER CODE END SPI1_MspDeInit 1 */ - } -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/spi.h b/junk/spi.h deleted file mode 100755 index 174549d..0000000 --- a/junk/spi.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - ****************************************************************************** - * File Name : SPI.h - * Description : This file provides code for the configuration - * of the SPI instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __spi_H -#define __spi_H -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" -#include "main.h" - -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -extern SPI_HandleTypeDef hspi1; - -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -extern void _Error_Handler(char *, int); - -void MX_SPI1_Init(void); - -/* USER CODE BEGIN Prototypes */ - -/* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ spi_H */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/stm32l0xx_hal_conf.h b/junk/stm32l0xx_hal_conf.h deleted file mode 100755 index 50600da..0000000 --- a/junk/stm32l0xx_hal_conf.h +++ /dev/null @@ -1,311 +0,0 @@ -/** - ****************************************************************************** - * @file stm32l0xx_hal_conf.h - * @brief HAL configuration file. - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2017 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32L0xx_HAL_CONF_H -#define __STM32L0xx_HAL_CONF_H - -#ifdef __cplusplus - extern "C" { -#endif - -#include "main.h" -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ - -/* ########################## Module Selection ############################## */ -/** - * @brief This is the list of modules to be used in the HAL driver - */ - -#define HAL_MODULE_ENABLED -/*#define HAL_ADC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_COMP_MODULE_ENABLED */ -/*#define HAL_CRC_MODULE_ENABLED */ -/*#define HAL_CRYP_MODULE_ENABLED */ -/*#define HAL_DAC_MODULE_ENABLED */ -/*#define HAL_FIREWALL_MODULE_ENABLED */ -/*#define HAL_I2S_MODULE_ENABLED */ -/*#define HAL_IWDG_MODULE_ENABLED */ -/*#define HAL_LCD_MODULE_ENABLED */ -/*#define HAL_LPTIM_MODULE_ENABLED */ -/*#define HAL_RNG_MODULE_ENABLED */ -#define HAL_RTC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -/*#define HAL_TIM_MODULE_ENABLED */ -/*#define HAL_TSC_MODULE_ENABLED */ -#define HAL_UART_MODULE_ENABLED -/*#define HAL_USART_MODULE_ENABLED */ -/*#define HAL_IRDA_MODULE_ENABLED */ -/*#define HAL_SMARTCARD_MODULE_ENABLED */ -/*#define HAL_SMBUS_MODULE_ENABLED */ -/*#define HAL_WWDG_MODULE_ENABLED */ -/*#define HAL_PCD_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED - -/* ########################## Oscillator Values adaptation ####################*/ -/** - * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSE is used as system clock source, directly or through the PLL). - */ -#if !defined (HSE_VALUE) - #define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined (HSE_STARTUP_TIMEOUT) - #define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */ -#endif /* HSE_STARTUP_TIMEOUT */ - -/** - * @brief Internal Multiple Speed oscillator (MSI) default value. - * This value is the default MSI range value after Reset. - */ -#if !defined (MSI_VALUE) - #define MSI_VALUE ((uint32_t)2097000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* MSI_VALUE */ - -/** - * @brief Internal High Speed oscillator (HSI) value. - * This value is used by the RCC HAL module to compute the system frequency - * (when HSI is used as system clock source, directly or through the PLL). - */ -#if !defined (HSI_VALUE) - #define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - -/** - * @brief Internal High Speed oscillator for USB (HSI48) value. - */ -#if !defined (HSI48_VALUE) -#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB in Hz. - The real value may vary depending on the variations - in voltage and temperature. */ -#endif /* HSI48_VALUE */ - -/** - * @brief Internal Low Speed oscillator (LSI) value. - */ -#if !defined (LSI_VALUE) - #define LSI_VALUE ((uint32_t)37000U) /*!< LSI Typical Value in Hz*/ -#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz - The real value may vary depending on the variations - in voltage and temperature.*/ -/** - * @brief External Low Speed oscillator (LSE) value. - * This value is used by the UART, RTC HAL module to compute the system frequency - */ -#if !defined (LSE_VALUE) - #define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/ -#endif /* LSE_VALUE */ - -#if !defined (LSE_STARTUP_TIMEOUT) - #define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */ -#endif /* LSE_STARTUP_TIMEOUT */ - -/* Tip: To avoid modifying this file each time you need to use different HSE, - === you can define the HSE value in your toolchain compiler preprocessor. */ - -/* ########################### System Configuration ######################### */ -/** - * @brief This is the HAL system configuration section - */ -#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */ -#define TICK_INT_PRIORITY ((uint32_t)0U) /*!< tick interrupt priority */ -#define USE_RTOS 0U -#define PREFETCH_ENABLE 0U -#define PREREAD_ENABLE 1U -#define BUFFER_CACHE_DISABLE 0U - -/* ########################## Assert Selection ############################## */ -/** - * @brief Uncomment the line below to expanse the "assert_param" macro in the - * HAL drivers code - */ -/* #define USE_FULL_ASSERT 1U */ - -/* Includes ------------------------------------------------------------------*/ -/** - * @brief Include module's header file - */ - -#ifdef HAL_RCC_MODULE_ENABLED - #include "stm32l0xx_hal_rcc.h" -#endif /* HAL_RCC_MODULE_ENABLED */ - -#ifdef HAL_GPIO_MODULE_ENABLED - #include "stm32l0xx_hal_gpio.h" -#endif /* HAL_GPIO_MODULE_ENABLED */ - -#ifdef HAL_DMA_MODULE_ENABLED - #include "stm32l0xx_hal_dma.h" -#endif /* HAL_DMA_MODULE_ENABLED */ - -#ifdef HAL_CORTEX_MODULE_ENABLED - #include "stm32l0xx_hal_cortex.h" -#endif /* HAL_CORTEX_MODULE_ENABLED */ - -#ifdef HAL_ADC_MODULE_ENABLED - #include "stm32l0xx_hal_adc.h" -#endif /* HAL_ADC_MODULE_ENABLED */ - -#ifdef HAL_COMP_MODULE_ENABLED - #include "stm32l0xx_hal_comp.h" -#endif /* HAL_COMP_MODULE_ENABLED */ - -#ifdef HAL_CRC_MODULE_ENABLED - #include "stm32l0xx_hal_crc.h" -#endif /* HAL_CRC_MODULE_ENABLED */ - -#ifdef HAL_CRYP_MODULE_ENABLED - #include "stm32l0xx_hal_cryp.h" -#endif /* HAL_CRYP_MODULE_ENABLED */ - -#ifdef HAL_DAC_MODULE_ENABLED - #include "stm32l0xx_hal_dac.h" -#endif /* HAL_DAC_MODULE_ENABLED */ - -#ifdef HAL_FIREWALL_MODULE_ENABLED - #include "stm32l0xx_hal_firewall.h" -#endif /* HAL_FIREWALL_MODULE_ENABLED */ - -#ifdef HAL_FLASH_MODULE_ENABLED - #include "stm32l0xx_hal_flash.h" -#endif /* HAL_FLASH_MODULE_ENABLED */ - -#ifdef HAL_I2C_MODULE_ENABLED - #include "stm32l0xx_hal_i2c.h" -#endif /* HAL_I2C_MODULE_ENABLED */ - -#ifdef HAL_I2S_MODULE_ENABLED - #include "stm32l0xx_hal_i2s.h" -#endif /* HAL_I2S_MODULE_ENABLED */ - -#ifdef HAL_IWDG_MODULE_ENABLED - #include "stm32l0xx_hal_iwdg.h" -#endif /* HAL_IWDG_MODULE_ENABLED */ - -#ifdef HAL_LCD_MODULE_ENABLED - #include "stm32l0xx_hal_lcd.h" -#endif /* HAL_LCD_MODULE_ENABLED */ - -#ifdef HAL_LPTIM_MODULE_ENABLED -#include "stm32l0xx_hal_lptim.h" -#endif /* HAL_LPTIM_MODULE_ENABLED */ - -#ifdef HAL_PWR_MODULE_ENABLED - #include "stm32l0xx_hal_pwr.h" -#endif /* HAL_PWR_MODULE_ENABLED */ - -#ifdef HAL_RNG_MODULE_ENABLED - #include "stm32l0xx_hal_rng.h" -#endif /* HAL_RNG_MODULE_ENABLED */ - -#ifdef HAL_RTC_MODULE_ENABLED - #include "stm32l0xx_hal_rtc.h" - -#endif /* HAL_RTC_MODULE_ENABLED */ - -#ifdef HAL_SPI_MODULE_ENABLED - #include "stm32l0xx_hal_spi.h" -#endif /* HAL_SPI_MODULE_ENABLED */ - -#ifdef HAL_TIM_MODULE_ENABLED - #include "stm32l0xx_hal_tim.h" -#endif /* HAL_TIM_MODULE_ENABLED */ - -#ifdef HAL_TSC_MODULE_ENABLED - #include "stm32l0xx_hal_tsc.h" -#endif /* HAL_TSC_MODULE_ENABLED */ - -#ifdef HAL_UART_MODULE_ENABLED - #include "stm32l0xx_hal_uart.h" -#endif /* HAL_UART_MODULE_ENABLED */ - -#ifdef HAL_USART_MODULE_ENABLED - #include "stm32l0xx_hal_usart.h" -#endif /* HAL_USART_MODULE_ENABLED */ - -#ifdef HAL_IRDA_MODULE_ENABLED - #include "stm32l0xx_hal_irda.h" -#endif /* HAL_IRDA_MODULE_ENABLED */ - -#ifdef HAL_SMARTCARD_MODULE_ENABLED - #include "stm32l0xx_hal_smartcard.h" -#endif /* HAL_SMARTCARD_MODULE_ENABLED */ - -#ifdef HAL_SMBUS_MODULE_ENABLED - #include "stm32l0xx_hal_smbus.h" -#endif /* HAL_SMBUS_MODULE_ENABLED */ - -#ifdef HAL_WWDG_MODULE_ENABLED - #include "stm32l0xx_hal_wwdg.h" -#endif /* HAL_WWDG_MODULE_ENABLED */ - -#ifdef HAL_PCD_MODULE_ENABLED - #include "stm32l0xx_hal_pcd.h" -#endif /* HAL_PCD_MODULE_ENABLED */ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef USE_FULL_ASSERT -/** - * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function - * which reports the name of the source file and the source - * line number of the call that failed. - * If expr is true, it returns no value. - * @retval None - */ - #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) -/* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t* file, uint32_t line); -#else - #define assert_param(expr) ((void)0U) -#endif /* USE_FULL_ASSERT */ - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32L0xx_HAL_CONF_H */ - - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/stm32l0xx_hal_msp.c-mx b/junk/stm32l0xx_hal_msp.c-mx deleted file mode 100755 index 79aac7b..0000000 --- a/junk/stm32l0xx_hal_msp.c-mx +++ /dev/null @@ -1,83 +0,0 @@ -/** - ****************************************************************************** - * File Name : stm32l0xx_hal_msp.c - * Description : This file provides code for the MSP Initialization - * and de-Initialization codes. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" - -extern void _Error_Handler(char *, int); -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ -/** - * Initializes the Global MSP. - */ -void HAL_MspInit(void) -{ - /* USER CODE BEGIN MspInit 0 */ - - /* USER CODE END MspInit 0 */ - - __HAL_RCC_SYSCFG_CLK_ENABLE(); - __HAL_RCC_PWR_CLK_ENABLE(); - - /* System interrupt init*/ - /* SVC_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(SVC_IRQn, 0, 0); - /* PendSV_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(PendSV_IRQn, 0, 0); - /* SysTick_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); - - /* USER CODE BEGIN MspInit 1 */ - - /* USER CODE END MspInit 1 */ -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/stm32l0xx_it.c-mx b/junk/stm32l0xx_it.c-mx deleted file mode 100755 index 63ff080..0000000 --- a/junk/stm32l0xx_it.c-mx +++ /dev/null @@ -1,99 +0,0 @@ -/** - ****************************************************************************** - * @file stm32l0xx_it.c - * @brief Interrupt Service Routines. - ****************************************************************************** - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" -#include "stm32l0xx.h" -#include "stm32l0xx_it.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -/* External variables --------------------------------------------------------*/ - -/******************************************************************************/ -/* Cortex-M0+ Processor Interruption and Exception Handlers */ -/******************************************************************************/ - -/** -* @brief This function handles System service call via SWI instruction. -*/ -void SVC_Handler(void) -{ - /* USER CODE BEGIN SVC_IRQn 0 */ - - /* USER CODE END SVC_IRQn 0 */ - /* USER CODE BEGIN SVC_IRQn 1 */ - - /* USER CODE END SVC_IRQn 1 */ -} - -/** -* @brief This function handles Pendable request for system service. -*/ -void PendSV_Handler(void) -{ - /* USER CODE BEGIN PendSV_IRQn 0 */ - - /* USER CODE END PendSV_IRQn 0 */ - /* USER CODE BEGIN PendSV_IRQn 1 */ - - /* USER CODE END PendSV_IRQn 1 */ -} - -/** -* @brief This function handles System tick timer. -*/ -void SysTick_Handler(void) -{ - /* USER CODE BEGIN SysTick_IRQn 0 */ - - /* USER CODE END SysTick_IRQn 0 */ - HAL_IncTick(); - HAL_SYSTICK_IRQHandler(); - /* USER CODE BEGIN SysTick_IRQn 1 */ - - /* USER CODE END SysTick_IRQn 1 */ -} - -/******************************************************************************/ -/* STM32L0xx Peripheral Interrupt Handlers */ -/* Add here the Interrupt Handlers for the used peripherals. */ -/* For the available peripheral interrupt handler names, */ -/* please refer to the startup file (startup_stm32l0xx.s). */ -/******************************************************************************/ - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/stm32l0xx_it.h b/junk/stm32l0xx_it.h deleted file mode 100755 index c70422a..0000000 --- a/junk/stm32l0xx_it.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - ****************************************************************************** - * @file stm32l0xx_it.h - * @brief This file contains the headers of the interrupt handlers. - ****************************************************************************** - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32L0xx_IT_H -#define __STM32L0xx_IT_H - -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" -#include "main.h" -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ - -void SVC_Handler(void); -void PendSV_Handler(void); -void SysTick_Handler(void); - -#ifdef __cplusplus -} -#endif - -#endif /* __STM32L0xx_IT_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/system_stm32l0xx.c- b/junk/system_stm32l0xx.c- deleted file mode 100755 index 9ec790e..0000000 --- a/junk/system_stm32l0xx.c- +++ /dev/null @@ -1,285 +0,0 @@ -/** - ****************************************************************************** - * @file system_stm32l0xx.c - * @author MCD Application Team - * @brief CMSIS Cortex-M0+ Device Peripheral Access Layer System Source File. - * - * This file provides two functions and one global variable to be called from - * user application: - * - SystemInit(): This function is called at startup just after reset and - * before branch to main program. This call is made inside - * the "startup_stm32l0xx.s" file. - * - * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used - * by the user application to setup the SysTick - * timer or configure other parameters. - * - * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must - * be called whenever the core clock is changed - * during program execution. - * - * - ****************************************************************************** - * @attention - * - *

© COPYRIGHT(c) 2016 STMicroelectronics

- * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32l0xx_system - * @{ - */ - -/** @addtogroup STM32L0xx_System_Private_Includes - * @{ - */ - -#include "stm32l0xx.h" - -#if !defined (HSE_VALUE) - #define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */ -#endif /* HSE_VALUE */ - -#if !defined (MSI_VALUE) - #define MSI_VALUE ((uint32_t)2000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* MSI_VALUE */ - -#if !defined (HSI_VALUE) - #define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/ -#endif /* HSI_VALUE */ - - -/** - * @} - */ - -/** @addtogroup STM32L0xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32L0xx_System_Private_Defines - * @{ - */ -/************************* Miscellaneous Configuration ************************/ - -/*!< Uncomment the following line if you need to relocate your vector Table in - Internal SRAM. */ -/* #define VECT_TAB_SRAM */ -#define VECT_TAB_OFFSET 0x00U /*!< Vector Table base offset field. - This value must be a multiple of 0x200. */ -/******************************************************************************/ -/** - * @} - */ - -/** @addtogroup STM32L0xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32L0xx_System_Private_Variables - * @{ - */ - /* This variable is updated in three ways: - 1) by calling CMSIS function SystemCoreClockUpdate() - 2) by calling HAL API function HAL_RCC_GetHCLKFreq() - 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency - Note: If you use this function to configure the system clock; then there - is no need to call the 2 first functions listed above, since SystemCoreClock - variable is updated automatically. - */ - uint32_t SystemCoreClock = 2000000U; - const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; - const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; - const uint8_t PLLMulTable[9] = {3U, 4U, 6U, 8U, 12U, 16U, 24U, 32U, 48U}; - -/** - * @} - */ - -/** @addtogroup STM32L0xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32L0xx_System_Private_Functions - * @{ - */ - -/** - * @brief Setup the microcontroller system. - * @param None - * @retval None - */ -void SystemInit (void) -{ -/*!< Set MSION bit */ - RCC->CR |= (uint32_t)0x00000100U; - - /*!< Reset SW[1:0], HPRE[3:0], PPRE1[2:0], PPRE2[2:0], MCOSEL[2:0] and MCOPRE[2:0] bits */ - RCC->CFGR &= (uint32_t) 0x88FF400CU; - - /*!< Reset HSION, HSIDIVEN, HSEON, CSSON and PLLON bits */ - RCC->CR &= (uint32_t)0xFEF6FFF6U; - - /*!< Reset HSI48ON bit */ - RCC->CRRCR &= (uint32_t)0xFFFFFFFEU; - - /*!< Reset HSEBYP bit */ - RCC->CR &= (uint32_t)0xFFFBFFFFU; - - /*!< Reset PLLSRC, PLLMUL[3:0] and PLLDIV[1:0] bits */ - RCC->CFGR &= (uint32_t)0xFF02FFFFU; - - /*!< Disable all interrupts */ - RCC->CIER = 0x00000000U; - - /* Configure the Vector Table location add offset address ------------------*/ -#ifdef VECT_TAB_SRAM - SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ -#else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ -#endif -} - -/** - * @brief Update SystemCoreClock according to Clock Register Values - * The SystemCoreClock variable contains the core clock (HCLK), it can - * be used by the user application to setup the SysTick timer or configure - * other parameters. - * - * @note Each time the core clock (HCLK) changes, this function must be called - * to update SystemCoreClock variable value. Otherwise, any configuration - * based on this variable will be incorrect. - * - * @note - The system frequency computed by this function is not the real - * frequency in the chip. It is calculated based on the predefined - * constant and the selected clock source: - * - * - If SYSCLK source is MSI, SystemCoreClock will contain the MSI - * value as defined by the MSI range. - * - * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*) - * - * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**) - * - * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**) - * or HSI_VALUE(*) multiplied/divided by the PLL factors. - * - * (*) HSI_VALUE is a constant defined in stm32l0xx_hal.h file (default value - * 16 MHz) but the real value may vary depending on the variations - * in voltage and temperature. - * - * (**) HSE_VALUE is a constant defined in stm32l0xx_hal.h file (default value - * 8 MHz), user has to ensure that HSE_VALUE is same as the real - * frequency of the crystal used. Otherwise, this function may - * have wrong result. - * - * - The result of this function could be not correct when using fractional - * value for HSE crystal. - * @param None - * @retval None - */ -void SystemCoreClockUpdate (void) -{ - uint32_t tmp = 0U, pllmul = 0U, plldiv = 0U, pllsource = 0U, msirange = 0U; - - /* Get SYSCLK source -------------------------------------------------------*/ - tmp = RCC->CFGR & RCC_CFGR_SWS; - - switch (tmp) - { - case 0x00U: /* MSI used as system clock */ - msirange = (RCC->ICSCR & RCC_ICSCR_MSIRANGE) >> 13U; - SystemCoreClock = (32768U * (1U << (msirange + 1U))); - break; - case 0x04U: /* HSI used as system clock */ - SystemCoreClock = HSI_VALUE; - break; - case 0x08U: /* HSE used as system clock */ - SystemCoreClock = HSE_VALUE; - break; - case 0x0CU: /* PLL used as system clock */ - /* Get PLL clock source and multiplication factor ----------------------*/ - pllmul = RCC->CFGR & RCC_CFGR_PLLMUL; - plldiv = RCC->CFGR & RCC_CFGR_PLLDIV; - pllmul = PLLMulTable[(pllmul >> 18U)]; - plldiv = (plldiv >> 22U) + 1U; - - pllsource = RCC->CFGR & RCC_CFGR_PLLSRC; - - if (pllsource == 0x00U) - { - /* HSI oscillator clock selected as PLL clock entry */ - SystemCoreClock = (((HSI_VALUE) * pllmul) / plldiv); - } - else - { - /* HSE selected as PLL clock entry */ - SystemCoreClock = (((HSE_VALUE) * pllmul) / plldiv); - } - break; - default: /* MSI used as system clock */ - msirange = (RCC->ICSCR & RCC_ICSCR_MSIRANGE) >> 13U; - SystemCoreClock = (32768U * (1U << (msirange + 1U))); - break; - } - /* Compute HCLK clock frequency --------------------------------------------*/ - /* Get HCLK prescaler */ - tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U)]; - /* HCLK clock frequency */ - SystemCoreClock >>= tmp; -} - - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/usart.c b/junk/usart.c deleted file mode 100755 index 4fadf42..0000000 --- a/junk/usart.c +++ /dev/null @@ -1,200 +0,0 @@ -/** - ****************************************************************************** - * File Name : USART.c - * Description : This file provides code for the configuration - * of the USART instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "usart.h" - -#include "gpio.h" - -/* USER CODE BEGIN 0 */ - -/* USER CODE END 0 */ - -UART_HandleTypeDef huart1; -UART_HandleTypeDef huart2; - -/* USART1 init function */ - -void MX_USART1_UART_Init(void) -{ - - huart1.Instance = USART1; - huart1.Init.BaudRate = 115200; - huart1.Init.WordLength = UART_WORDLENGTH_7B; - huart1.Init.StopBits = UART_STOPBITS_1; - huart1.Init.Parity = UART_PARITY_NONE; - huart1.Init.Mode = UART_MODE_TX_RX; - huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; - huart1.Init.OverSampling = UART_OVERSAMPLING_16; - huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; - huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; - if (HAL_UART_Init(&huart1) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - -} -/* USART2 init function */ - -void MX_USART2_UART_Init(void) -{ - - huart2.Instance = USART2; - huart2.Init.BaudRate = 115200; - huart2.Init.WordLength = UART_WORDLENGTH_7B; - huart2.Init.StopBits = UART_STOPBITS_1; - huart2.Init.Parity = UART_PARITY_NONE; - huart2.Init.Mode = UART_MODE_TX_RX; - huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; - huart2.Init.OverSampling = UART_OVERSAMPLING_16; - huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; - huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; - if (HAL_UART_Init(&huart2) != HAL_OK) - { - _Error_Handler(__FILE__, __LINE__); - } - -} - -void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) -{ - - GPIO_InitTypeDef GPIO_InitStruct; - if(uartHandle->Instance==USART1) - { - /* USER CODE BEGIN USART1_MspInit 0 */ - - /* USER CODE END USART1_MspInit 0 */ - /* USART1 clock enable */ - __HAL_RCC_USART1_CLK_ENABLE(); - - /**USART1 GPIO Configuration - PA9 ------> USART1_TX - PA10 ------> USART1_RX - */ - GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_PULLUP; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF4_USART1; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* USER CODE BEGIN USART1_MspInit 1 */ - - /* USER CODE END USART1_MspInit 1 */ - } - else if(uartHandle->Instance==USART2) - { - /* USER CODE BEGIN USART2_MspInit 0 */ - - /* USER CODE END USART2_MspInit 0 */ - /* USART2 clock enable */ - __HAL_RCC_USART2_CLK_ENABLE(); - - /**USART2 GPIO Configuration - PA2 ------> USART2_TX - PA3 ------> USART2_RX - */ - GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_PULLUP; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF4_USART2; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /* USER CODE BEGIN USART2_MspInit 1 */ - - /* USER CODE END USART2_MspInit 1 */ - } -} - -void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) -{ - - if(uartHandle->Instance==USART1) - { - /* USER CODE BEGIN USART1_MspDeInit 0 */ - - /* USER CODE END USART1_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_USART1_CLK_DISABLE(); - - /**USART1 GPIO Configuration - PA9 ------> USART1_TX - PA10 ------> USART1_RX - */ - HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10); - - /* USER CODE BEGIN USART1_MspDeInit 1 */ - - /* USER CODE END USART1_MspDeInit 1 */ - } - else if(uartHandle->Instance==USART2) - { - /* USER CODE BEGIN USART2_MspDeInit 0 */ - - /* USER CODE END USART2_MspDeInit 0 */ - /* Peripheral clock disable */ - __HAL_RCC_USART2_CLK_DISABLE(); - - /**USART2 GPIO Configuration - PA2 ------> USART2_TX - PA3 ------> USART2_RX - */ - HAL_GPIO_DeInit(GPIOA, USART_TX_Pin|USART_RX_Pin); - - /* USER CODE BEGIN USART2_MspDeInit 1 */ - - /* USER CODE END USART2_MspDeInit 1 */ - } -} - -/* USER CODE BEGIN 1 */ - -/* USER CODE END 1 */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/junk/usart.h b/junk/usart.h deleted file mode 100755 index f8e2190..0000000 --- a/junk/usart.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - ****************************************************************************** - * File Name : USART.h - * Description : This file provides code for the configuration - * of the USART instances. - ****************************************************************************** - ** This notice applies to any and all portions of this file - * that are not between comment pairs USER CODE BEGIN and - * USER CODE END. Other portions of this file, whether - * inserted by the user or by software development tools - * are owned by their respective copyright owners. - * - * COPYRIGHT(c) 2017 STMicroelectronics - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of STMicroelectronics nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************** - */ -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __usart_H -#define __usart_H -#ifdef __cplusplus - extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l0xx_hal.h" -#include "main.h" - -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -extern UART_HandleTypeDef huart1; -extern UART_HandleTypeDef huart2; - -/* USER CODE BEGIN Private defines */ - -/* USER CODE END Private defines */ - -extern void _Error_Handler(char *, int); - -void MX_USART1_UART_Init(void); -void MX_USART2_UART_Init(void); - -/* USER CODE BEGIN Prototypes */ - -/* USER CODE END Prototypes */ - -#ifdef __cplusplus -} -#endif -#endif /*__ usart_H */ - -/** - * @} - */ - -/** - * @} - */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/