From c63fa018f5618951ab3bcd7c2aec923d7575ad3d Mon Sep 17 00:00:00 2001 From: ToSa27 Date: Sat, 23 Aug 2014 23:59:49 +0200 Subject: [PATCH 01/10] Improved documentation and minor fixes removed examples compiled with outdated MySensors protocol and instead included documentation how to add self-compiled sketches --- Bootloader/Readme.md | 1 + NodeJsController/BlinkGreen.hex | 71 - NodeJsController/BlinkRed.hex | 71 - .../DallasTemperatureSensor.cpp.hex | 1222 ----------------- .../DallasTemperatureSensor.ino | 69 - NodeJsController/NodeJsController.js | 4 +- NodeJsController/{Readme.html => Readme.md} | 19 +- 7 files changed, 12 insertions(+), 1445 deletions(-) create mode 100644 Bootloader/Readme.md delete mode 100644 NodeJsController/BlinkGreen.hex delete mode 100644 NodeJsController/BlinkRed.hex delete mode 100644 NodeJsController/DallasTemperatureSensor.cpp.hex delete mode 100644 NodeJsController/DallasTemperatureSensor/DallasTemperatureSensor.ino rename NodeJsController/{Readme.html => Readme.md} (91%) diff --git a/Bootloader/Readme.md b/Bootloader/Readme.md new file mode 100644 index 0000000..810b16a --- /dev/null +++ b/Bootloader/Readme.md @@ -0,0 +1 @@ +See NodeJsController/Readme.md for usage instructions... \ No newline at end of file diff --git a/NodeJsController/BlinkGreen.hex b/NodeJsController/BlinkGreen.hex deleted file mode 100644 index 00c3de6..0000000 --- a/NodeJsController/BlinkGreen.hex +++ /dev/null @@ -1,71 +0,0 @@ -:100000000C9461000C947E000C947E000C947E0095 -:100010000C947E000C947E000C947E000C947E0068 -:100020000C947E000C947E000C947E000C947E0058 -:100030000C947E000C947E000C947E000C947E0048 -:100040000C949A000C947E000C947E000C947E001C -:100050000C947E000C947E000C947E000C947E0028 -:100060000C947E000C947E00000000002400270009 -:100070002A0000000000250028002B0000000000DE -:1000800023002600290004040404040404040202DA -:100090000202020203030303030301020408102007 -:1000A0004080010204081020010204081020000012 -:1000B0000007000201000003040600000000000029 -:1000C000000011241FBECFEFD8E0DEBFCDBF11E08E -:1000D000A0E0B1E0E4E5F4E002C005900D92A030AC -:1000E000B107D9F711E0A0E0B1E001C01D92A9303D -:1000F000B107E1F70E9418020C9428020C9400004A -:1001000087E061E00E94C4016AEF70E080E090E067 -:100110000E941D0187E060E00E94C4016AEF70E068 -:1001200080E090E00E941D01089587E061E00E9458 -:10013000850108951F920F920FB60F9211242F93ED -:100140003F938F939F93AF93BF93809104019091BE -:100150000501A0910601B0910701309108010196B7 -:10016000A11DB11D232F2D5F2D3720F02D57019696 -:10017000A11DB11D209308018093040190930501F6 -:10018000A0930601B09307018091000190910101B5 -:10019000A0910201B09103010196A11DB11D8093B0 -:1001A000000190930101A0930201B0930301BF915C -:1001B000AF919F918F913F912F910F900FBE0F9014 -:1001C0001F901895789484B5826084BD84B5816051 -:1001D00084BD85B5826085BD85B5816085BDEEE64F -:1001E000F0E0808181608083E1E8F0E0108280812E -:1001F00082608083808181608083E0E8F0E080819C -:1002000081608083E1EBF0E0808184608083E0EBBB -:10021000F0E0808181608083EAE7F0E080818460A3 -:1002200080838081826080838081816080838081FF -:10023000806880831092C1000895EF92FF920F931F -:100240001F93CF93DF937B018C013FB7F89480918C -:10025000000190910101A0910201B091030126B526 -:10026000A89B05C02F3F19F00196A11DB11D3FBFEE -:10027000BA2FA92F982F8827820F911DA11DB11D7C -:1002800052E0880F991FAA1FBB1F5A95D1F7EC01A6 -:1002900030C00E9427023FB7F894809100019091EE -:1002A0000101A0910201B091030126B5A89B05C0F0 -:1002B0002F3F19F00196A11DB11D3FBFBA2FA92FE5 -:1002C000982F8827820F911DA11DB11D32E0880F44 -:1002D000991FAA1FBB1F3A95D1F78C1B9D0B885EF7 -:1002E0009340B8F20894E108F10801091109C851D6 -:1002F000DC4FE114F1040105110559F6DF91CF91AE -:100300001F910F91FF90EF900895CF93DF93482FA7 -:1003100050E0CA0186569F4FFC0134914A575F4F07 -:10032000FA018491882369F190E0880F991FFC01FC -:10033000E859FF4FA591B491FC01EE58FF4FC591CC -:10034000D491662351F42FB7F8948C91932F909504 -:1003500089238C93888189230BC0623061F42FB785 -:10036000F8948C91932F909589238C938881832B7B -:1003700088832FBF06C09FB7F8948C91832B8C93F2 -:100380009FBFDF91CF910895482F50E0CA01825559 -:100390009F4FFC012491CA0186569F4FFC01949106 -:1003A0004A575F4FFA013491332309F440C02223A6 -:1003B00051F1233071F0243028F42130A1F02230A3 -:1003C00011F514C02630B1F02730C1F02430D9F433 -:1003D00004C0809180008F7703C0809180008F7D62 -:1003E0008093800010C084B58F7702C084B58F7D64 -:1003F00084BD09C08091B0008F7703C08091B000A8 -:100400008F7D8093B000E32FF0E0EE0FFF1FEE58DA -:10041000FF4FA591B4912FB7F894662321F48C91E6 -:100420009095892302C08C91892B8C932FBF0895BE -:10043000CF93DF930E94E2000E949500C0E0D0E0DD -:100440000E9480002097E1F30E940000F9CF0895F8 -:04045000F894FFCF4E -:00000001FF diff --git a/NodeJsController/BlinkRed.hex b/NodeJsController/BlinkRed.hex deleted file mode 100644 index 3f2c259..0000000 --- a/NodeJsController/BlinkRed.hex +++ /dev/null @@ -1,71 +0,0 @@ -:100000000C9461000C947E000C947E000C947E0095 -:100010000C947E000C947E000C947E000C947E0068 -:100020000C947E000C947E000C947E000C947E0058 -:100030000C947E000C947E000C947E000C947E0048 -:100040000C949A000C947E000C947E000C947E001C -:100050000C947E000C947E000C947E000C947E0028 -:100060000C947E000C947E00000000002400270009 -:100070002A0000000000250028002B0000000000DE -:1000800023002600290004040404040404040202DA -:100090000202020203030303030301020408102007 -:1000A0004080010204081020010204081020000012 -:1000B0000007000201000003040600000000000029 -:1000C000000011241FBECFEFD8E0DEBFCDBF11E08E -:1000D000A0E0B1E0E4E5F4E002C005900D92A030AC -:1000E000B107D9F711E0A0E0B1E001C01D92A9303D -:1000F000B107E1F70E9418020C9428020C9400004A -:1001000086E061E00E94C4016AEF70E080E090E068 -:100110000E941D0186E060E00E94C4016AEF70E069 -:1001200080E090E00E941D01089586E061E00E9459 -:10013000850108951F920F920FB60F9211242F93ED -:100140003F938F939F93AF93BF93809104019091BE -:100150000501A0910601B0910701309108010196B7 -:10016000A11DB11D232F2D5F2D3720F02D57019696 -:10017000A11DB11D209308018093040190930501F6 -:10018000A0930601B09307018091000190910101B5 -:10019000A0910201B09103010196A11DB11D8093B0 -:1001A000000190930101A0930201B0930301BF915C -:1001B000AF919F918F913F912F910F900FBE0F9014 -:1001C0001F901895789484B5826084BD84B5816051 -:1001D00084BD85B5826085BD85B5816085BDEEE64F -:1001E000F0E0808181608083E1E8F0E0108280812E -:1001F00082608083808181608083E0E8F0E080819C -:1002000081608083E1EBF0E0808184608083E0EBBB -:10021000F0E0808181608083EAE7F0E080818460A3 -:1002200080838081826080838081816080838081FF -:10023000806880831092C1000895EF92FF920F931F -:100240001F93CF93DF937B018C013FB7F89480918C -:10025000000190910101A0910201B091030126B526 -:10026000A89B05C02F3F19F00196A11DB11D3FBFEE -:10027000BA2FA92F982F8827820F911DA11DB11D7C -:1002800052E0880F991FAA1FBB1F5A95D1F7EC01A6 -:1002900030C00E9427023FB7F894809100019091EE -:1002A0000101A0910201B091030126B5A89B05C0F0 -:1002B0002F3F19F00196A11DB11D3FBFBA2FA92FE5 -:1002C000982F8827820F911DA11DB11D32E0880F44 -:1002D000991FAA1FBB1F3A95D1F78C1B9D0B885EF7 -:1002E0009340B8F20894E108F10801091109C851D6 -:1002F000DC4FE114F1040105110559F6DF91CF91AE -:100300001F910F91FF90EF900895CF93DF93482FA7 -:1003100050E0CA0186569F4FFC0134914A575F4F07 -:10032000FA018491882369F190E0880F991FFC01FC -:10033000E859FF4FA591B491FC01EE58FF4FC591CC -:10034000D491662351F42FB7F8948C91932F909504 -:1003500089238C93888189230BC0623061F42FB785 -:10036000F8948C91932F909589238C938881832B7B -:1003700088832FBF06C09FB7F8948C91832B8C93F2 -:100380009FBFDF91CF910895482F50E0CA01825559 -:100390009F4FFC012491CA0186569F4FFC01949106 -:1003A0004A575F4FFA013491332309F440C02223A6 -:1003B00051F1233071F0243028F42130A1F02230A3 -:1003C00011F514C02630B1F02730C1F02430D9F433 -:1003D00004C0809180008F7703C0809180008F7D62 -:1003E0008093800010C084B58F7702C084B58F7D64 -:1003F00084BD09C08091B0008F7703C08091B000A8 -:100400008F7D8093B000E32FF0E0EE0FFF1FEE58DA -:10041000FF4FA591B4912FB7F894662321F48C91E6 -:100420009095892302C08C91892B8C932FBF0895BE -:10043000CF93DF930E94E2000E949500C0E0D0E0DD -:100440000E9480002097E1F30E940000F9CF0895F8 -:04045000F894FFCF4E -:00000001FF diff --git a/NodeJsController/DallasTemperatureSensor.cpp.hex b/NodeJsController/DallasTemperatureSensor.cpp.hex deleted file mode 100644 index a714a35..0000000 --- a/NodeJsController/DallasTemperatureSensor.cpp.hex +++ /dev/null @@ -1,1222 +0,0 @@ -:100000000C94AE020C94311F0C945E1F0C94D6021B -:100010000C94D6020C94D6020C9455140C94D6026F -:100020000C94D6020C94D6020C94D6020C94D602F0 -:100030000C94D6020C94D6020C94D6020C94D602E0 -:100040000C948B1F0C94D6020C9461220C94E42225 -:100050000C94D6020C94D6020C94D6020C94D602C0 -:100060000C94D6020C94D602303B303B25643B25E1 -:10007000643B0072643D636C6561720A0069643DB3 -:1000800025640A0066756C6C0A006E6577207061E5 -:1000900072656E743D25642C20643D25640A0076EB -:1000A000657273696F6E206D69736D61746368004A -:1000B000726561643A2025642D25642D25642073C2 -:1000C0003D25642C633D25642C743D25642C70749F -:1000D0003D25642C6C3D25643A25730A0073656EDA -:1000E000643A2025642D25642D25642D2564207314 -:1000F0003D25642C633D25642C743D25642C70746F -:100100003D25642C6C3D25642C73743D25733A2584 -:10011000730A00726571206E6F64652069640A005D -:10012000636865636B2077697265730A00257320C5 -:10013000737461727465642C2069642025640A00FC -:100140000001020304050A0B0C0D0E0F111213140B -:100150001516A702AD02B302BB02C402CE02D7023B -:10016000DE02E602ED02F402FC02504120506F77FD -:10017000657209203D2025530D0A00435243204C4F -:10018000656E67746809203D2025530D0A004D6F88 -:1001900064656C0909203D2025530D0A00446174F3 -:1001A00061205261746509203D2025530D0A0044E9 -:1001B000594E50442F4645415455524500434F4EE9 -:1001C0004649470052465F53455455500052465FDA -:1001D000434800454E5F52584144445200454E5FEB -:1001E00041410052585F50575F50302D36005458EF -:1001F0005F414444520052585F414444525F503280 -:100200002D350052585F414444525F50302D31002B -:100210000D0A00253032780020307800255309255A -:1002200063203D000D0A002030782530327800250B -:1002300053092563203D004F4253455256455F54B4 -:10024000583D253032783A20504F4C535F434E543E -:100250003D2578204152435F434E543D25780D0A99 -:10026000005354415455530909203D20307825301E -:1002700032782052585F44523D25782054585F44CC -:10028000533D2578204D41585F52543D25782052EA -:10029000585F505F4E4F3D25782054585F46554C6F -:1002A0004C3D25780D0A00314D42505300324D42ED -:1002B0005053003235304B425053006E5246323468 -:1002C0004C3031006E524632344C30312B00446990 -:1002D0007361626C65640038206269747300313642 -:1002E00020626974730050415F4D494E0050415F78 -:1002F0004C4F570050415F484947480050415F4DBF -:10030000415800005EBCE2613FDD83C29C7E20A3B9 -:10031000FD1F419DC3217FFCA2401E5F01E3BD3E46 -:100320006082DC237D9FC1421CFEA0E1BF5D038093 -:10033000DE3C62BEE0025CDF81633D7C22C09E1D2C -:1003400043A1FF4618FAA427799BC584DA3866E5ED -:10035000BB5907DB856739BAE406581947A5FB780E -:1003600026C49A653BD987045AB8E6A7F91B45C647 -:10037000987A24F8A6441A99C7257B3A6486D85BF4 -:1003800005E7B98CD2306EEDB3510F4E10F2AC2FA1 -:100390007193CD114FADF3702ECC92D38D6F31B2DE -:1003A000EC0E50AFF1134DCE90722C6D33D18F0CFB -:1003B00052B0EE326C8ED0530DEFB1F0AE4C1291C4 -:1003C000CF2D73CA947628ABF517490856B4EA695D -:1003D00037D58B5709EBB536688AD495CB2977F496 -:1003E000AA4816E9B7550B88D6346A2B7597C94ABF -:1003F00014F6A8742AC896154BA9F7B6E80A54D77C -:10040000896B3500000000240027002A000000004E -:1004100000250028002B00000000002300260029F2 -:10042000000404040404040404020202020202039D -:1004300003030303030102040810204080010204A7 -:10044000081020010204081020000000070002012B -:100450000000030406000000000000000000407AD5 -:1004600010F35A00A0724E18090010A5D4E800003D -:10047000E87648170000E40B54020000CA9A3B00DB -:100480000000E1F505000080969800000040420F52 -:10049000000000A08601000000102700000000E816 -:1004A00003000000006400000000000A00000000DB -:1004B000000100000000002C76D888DC674F08237C -:1004C000DFC1DFAE59E1B1B796E5E3E453C63AE6E2 -:1004D00051997696E8E6C28426EB898C9B62ED40C2 -:1004E0007C6FFCEFBC9C9F40F2BAA56FA5F4900511 -:1004F0005A2AF75C936B6CF9676DC11BFCE0E40D45 -:1005000047FEF520E6B500D0ED902E030094357738 -:10051000050080841E080000204E0A000000C80C60 -:10052000333333330F986E12831141EF8D211489C9 -:100530003BE65516CFFEE6DB18D1844B381BF77C23 -:100540001D901DA4BBE424203284725E228100C968 -:10055000F124ECA1E53D27003F09972211241FBE9D -:10056000CFEFD8E0DEBFCDBF11E0A0E0B1E0E4EE18 -:10057000FBE402C005900D92A036B107D9F713E055 -:10058000A0E6B1E001C01D92A930B107E1F715E086 -:10059000CCE5D5E004C02297FE010E94A125C83514 -:1005A000D107C9F70E940A230C94F0250C9400008F -:1005B000EF92FF920F931F93F22FF02E47FD02C090 -:1005C000E4E001C0E4E1242F332727FD309537FF15 -:1005D00003C0309521953F4F4F2D512F0F2FEE2EF9 -:1005E0000E9455068F2D912F1F910F91FF90EF9034 -:1005F0000895FC0188279927E89421912032E9F396 -:10060000293010F02E30C8F32B3241F02D3239F45E -:10061000689404C00E94DA03820F911D2191205337 -:100620002A30C0F31EF4909581959F4F08951F9333 -:10063000FC0199278827BC01E89411911032E9F355 -:10064000193010F01E30C8F31B3251F01D3249F43E -:10065000689406C00E94C503610F711D811D911D24 -:10066000119110531A30B0F33EF490958095709527 -:1006700061957F4F8F4F9F4F1F910895FB01DC01C4 -:1006800001900D920020E1F70895FB01DC0141503B -:10069000504048F001900D920020C9F701C01D9212 -:1006A00041505040E0F70895A0E0B0E0EAE5F3E003 -:1006B0000C94C3257C01EB018A01690109C0CE01BC -:1006C0002196F6010995F70181937F0101501040B1 -:1006D00001151105A1F7CDB7DEB7E8E00C94DF25D1 -:1006E000FB019F01E8944230C4F04532B4F44A3033 -:1006F00029F497FB1EF4909581959F4F642F7727DF -:100700000E94A525805D8A330CF0895D8193CB0121 -:100710000097A1F716F45DE251931082C9010C9481 -:10072000A508FA01CF93FF93EF93223044F12532CD -:1007300034F5C22FE894CA3049F497FB3EF4909503 -:100740008095709561957F4F8F4F9F4F2C2F33274A -:1007500044275527FF93EF930E947D25EF91FF914A -:10076000605D6A330CF0695D6193B901CA01605044 -:1007700070408040904051F716F4CDE2C193108252 -:100780008F919F91CF910C94A508592F482F372F07 -:10079000262F660F771F881F991F660F771F881FE8 -:1007A000991F620F731F841F951F660F771F881F85 -:1007B000991F08957AE0979F902D879F802D910D26 -:1007C00011240895FA01CF93FF93EF932230CCF0D8 -:1007D0002532BCF4C22F2C2F332744275527FF93F3 -:1007E000EF930E947D25EF91FF91605D6A330CF0DD -:1007F000695D6193B901CA016050704080409040CA -:1008000051F710828F919F91CF910C94A508FB0115 -:100810009F01423074F0453264F4642F77270E94C0 -:10082000A525805D8A330CF0895D8193CB0100970B -:10083000A1F71082C9010C94A508AEE0B0E0E3E294 -:10084000F4E00C94C7250D891E898F89988D97FF38 -:1008500002C080E090E801979E838D831A8309830C -:100860008EE08C839E01255E3F4FCE010196698DFF -:100870007A8DA9010E9478044D815E8157FD0AC0DE -:100880002F813885421753070CF49A01020F131F6A -:10089000F80110822E96E4E00C94E325AEE0B0E07F -:1008A000E4E5F4E00C94C7258C0177FF02C060E01A -:1008B00070E8615070407E836D831A8309838EE0F7 -:1008C0008C83CE010196BA01A9010E9478042D8182 -:1008D0003E8137FD09C0EF81F8852E173F070CF4E4 -:1008E000F901E00FF11F10822E96E4E00C94E3254D -:1008F000ABE0B0E0EEE7F4E00C94B9253C012B014D -:100900005A01FC0117821682838181FD03C06FEFBB -:100910007FEFC6C19AE0892E1E010894211C311C6C -:10092000F3012381F20123FD859123FF81912F01A2 -:10093000882309F4B2C1853239F423FD859123FF60 -:1009400081912F01853229F490E0B3010E94B5080E -:10095000E7CF982FFF24EE249924FFE1FF15D0F074 -:100960009B3269F09C3228F4903259F0933291F422 -:100970000EC09D3249F0903369F441E024C052E04A -:10098000F52A84E0F82A28C098E0F92A25C0E0E199 -:10099000FE2A22C0F7FC29C0892F80538A3070F4C8 -:1009A000F6FE05C0989C902C1124980E15C0E89C6A -:1009B000E02C1124E80EF0E2FF2A0EC09E3229F44A -:1009C000F6FC6BC140E4F42A07C09C3619F450E8E9 -:1009D000F52A02C0983649F4F20123FD959123FFD0 -:1009E00091912F01992309F0B8CF892F8554833035 -:1009F00018F08052833038F444E050E0A40EB51E65 -:100A00005FE359830FC0933631F0933779F0933514 -:100A100009F056C020C0F5018081898342E050E092 -:100A2000A40EB51E610101E010E012C0F501C08006 -:100A3000D180F6FC03C06FEF7FEF02C0692D70E03C -:100A400042E050E0A40EB51EC6010E949A088C0137 -:100A50005FE7F52214C0F501C080D180F6FC03C029 -:100A60006FEF7FEF02C0692D70E042E050E0A40E0E -:100A7000B51EC6010E948F088C0150E8F52AF3FECE -:100A800007C01AC080E290E0B3010E94B508EA9462 -:100A90008E2D90E008171907A8F30EC0F601F7FC99 -:100AA0008591F7FE81916F0190E0B3010E94B50836 -:100AB000E110EA94015010400115110579F7EAC0E0 -:100AC000943611F0993669F5F7FE08C0F5012081DA -:100AD00031814281538184E090E00AC0F501808138 -:100AE00091819C01442737FD4095542F82E090E08E -:100AF000A80EB91E9FE6F92257FF09C050954095F0 -:100B0000309521953F4F4F4F5F4FE0E8FE2ACA01D5 -:100B1000B901A1012AE030E00E94E108D82ED218E4 -:100B200040C0953729F41F2D1F7E2AE030E01DC0FC -:100B30001F2D197F9F3661F0903720F4983509F00A -:100B4000ACC00FC0903739F0983709F0A6C004C088 -:100B500028E030E00AC0106114FD146020E130E0AC -:100B600004C014FD166020E132E017FF08C0F50153 -:100B7000608171818281938144E050E008C0F50179 -:100B800080819181BC0180E090E042E050E0A40EC1 -:100B9000B51EA1010E94E108D82ED2188FE7F82EC9 -:100BA000F122F6FE0BC05EEFF522D91438F4F4FE04 -:100BB00007C0F2FC05C08FEEF82202C01D2D01C057 -:100BC000192DF4FE0DC0FE01ED0DF11D8081803365 -:100BD00019F499EEF92208C01F5FF2FE05C003C0A8 -:100BE0008F2D867809F01F5F0F2DF3FC14C0F0FEE7 -:100BF0000FC01E1510F09D2C0BC09D2C9E0C911A41 -:100C00001E2D06C080E290E0B3010E94B5081F5F70 -:100C10001E15C0F304C01E1510F4E11A01C0EE2425 -:100C200004FF0FC080E390E0B3010E94B50802FF0B -:100C30001DC001FD03C088E790E00EC088E590E08C -:100C40000BC0802F867891F001FF02C08BE201C0BB -:100C500080E2F7FC8DE290E0B3010E94B50806C087 -:100C600080E390E0B3010E94B5089A94D914C0F3D0 -:100C7000DA94F101ED0DF11D808190E0B3010E9445 -:100C8000B508DD20A9F706C080E290E0B3010E941C -:100C9000B508EA94EE20C1F743CEF301668177816F -:100CA000CB012B96E2E10C94D525A9E0B0E0EBE571 -:100CB000F6E00C94BD256A01122FA02EBE2C2BE36A -:100CC000201718F42CE3922E02C0902E9394AE01BC -:100CD0004F5F5F4F27E0092D0E94B707BC01898154 -:100CE000E82EFF24C70189709070019711F4ADE2DE -:100CF00009C0B1FE02C0ABE205C0B0FC02C0A0E07A -:100D000001C0A0E2E3FE3BC0AA2311F423E001C02E -:100D100024E0211710F020E002C0121B212FEB2C41 -:100D2000B4FE02C0322F0AC0F601322F80E202C0A8 -:100D3000819331503323E1F7C20ED11CAA2319F05D -:100D4000F601A1936F01F6013196E2FE05C09EE423 -:100D5000D6019C9381E404C09EE6D6019C9381E673 -:100D600011968C9391833296DF01832F90E202C01B -:100D70009D9381508823E1F7E30FF11D40C0E2FE0F -:100D800042C0AA2311F423E001C024E0211710F08F -:100D900020E002C0121B212FEB2CB4FE02C0922FC8 -:100DA0000AC0F601922F80E202C0819391509923EC -:100DB000E1F7C20ED11CAA2319F0F601A1936F012D -:100DC000F6013196E2FE08C089E4D6018C938EE4E8 -:100DD00011968C9386E407C089E6D6018C938EE643 -:100DE00011968C9386E681833296DF01892F20E26B -:100DF00002C02D9381508823E1F7E90FF11D108285 -:100E00002EEF3FEFAFC0161617061CF041E050E082 -:100E100003C0AB014F5F5F4FAA2019F480E090E060 -:100E200003C08A2D90E0019620E030E0AA2311F063 -:100E300021E030E0240F351F280F391F812F90E06B -:100E40002817390714F020E002C0121B212F4B2D68 -:100E500050E0CA0180719070B4FC0DC0B3FC0BC0AF -:100E6000F601322F40E202C0419331503323E1F7C3 -:100E7000C20ED11C01C0322FAA2319F0F601A19392 -:100E80006F01892B11F0132F0AC0F601132F80E395 -:100E900002C0819311501123E1F7C30ED11C092D1B -:100EA000060FBA8090E1892E912C8E209F20E4FEBF -:100EB00004C0F1E3BF1609F40150101614F001E06C -:100EC00003C0093008F008E09B0177FF02C020E072 -:100ED00030E0CB010196821B930BFE013196E80FA7 -:100EE000F91F8EE2F82E3B01601A71088A2D90E0FE -:100EF00044275527481B590B8FEF2F3F380719F40C -:100F0000D601FD926D01621773072CF0621673060D -:100F100014F4808101C080E32150304031962417C1 -:100F2000350724F0D6018D936D01E6CF26173707DC -:100F300049F4B5E3BB1528F0BB1621F481149104E4 -:100F400009F481E3F6018193D601812F90E202C07A -:100F50009C93815011968823D9F7E10FF11D1082DF -:100F600020E030E0C9012996EEE00C94D925283024 -:100F700008F027E03327DA01990F311D87FD9160D2 -:100F800000966105710539F432602E5F3D9330E3C0 -:100F90002A95E1F708959F3F30F08038710561058B -:100FA00009F03C5F3C5F3D93913008F08068911DF3 -:100FB000DF93CF931F930F93FF92EF92192F987F98 -:100FC0009695E92F96959695E90FFF27E954FB4FE3 -:100FD00099273327EE24FF24A701E7010590089401 -:100FE000079428F4360FE71EF81E491F511D660F9F -:100FF000771F881F991F0694A1F70590079428F47E -:10100000E70EF81E491F561FC11D770F881F991F35 -:10101000661F0694A1F70590079428F4F80E491F5F -:10102000561FC71FD11D880F991F661F771F069473 -:10103000A1F70590079420F4490F561FC71FD81F2A -:10104000990F661F771F881F0694A9F78491109542 -:10105000177041F0D695C79557954795F794E79443 -:101060001A95C1F7EDE5F4E0689415901591359166 -:101070006591959105907FE27395E118F10A430B14 -:10108000560BC90BD009C0F7E10CF11E431F561FC8 -:10109000C91FD01D7EF4703311F48A95E6CFE89411 -:1010A000015030F0080F0AF40027021708F4202F2F -:1010B0002395022F7A3328F079E37D932A95E9F777 -:1010C00010C07D932A9589F6069497956795379574 -:1010D00017951794E118F10A430B560BC90BD00969 -:1010E00098F023957E9173957A3308F070E37C93A2 -:1010F0002013B8F77E9170617D9330F0839571E392 -:101100007D9370E32A95E1F71124EF90FF900F9102 -:101110001F91CF91DF91992787FD90950895FC014C -:101120000590615070400110D8F7809590958E0F12 -:101130009F1F0895FC016150704001900110D8F785 -:10114000809590958E0F9F1F0895DC01FC01672FFD -:1011500071917723E1F7329704C07C916D9370838E -:101160006291AE17BF07C8F308950F931F93CF93F3 -:10117000DF938C01EB018B8181FF1BC082FF0DC0CF -:101180002E813F818C819D812817390764F4E88185 -:10119000F9810193F983E88306C0E885F985802FFA -:1011A0000995892B31F48E819F8101969F838E83CF -:1011B00002C00FEF1FEFC801DF91CF911F910F9178 -:1011C0000895FA01AA27283051F1203181F1E894DD -:1011D0006F936E7F6E5F7F4F8F4F9F4FAF4FB1E02A -:1011E0003ED0B4E03CD0670F781F891F9A1FA11D25 -:1011F000680F791F8A1F911DA11D6A0F711D811D26 -:10120000911DA11D20D009F468943F912AE0269FEA -:1012100011243019305D3193DEF6CF010895462F49 -:101220004770405D4193B3E00FD0C9F7F6CF462F2A -:101230004F70405D4A3318F0495D31FD4052419393 -:1012400002D0A9F7EACFB4E0A69597958795779550 -:101250006795BA95C9F700976105710508959B01D7 -:10126000AC010A2E06945795479537952795BA9560 -:10127000C9F7620F731F841F951FA01D08950F9358 -:101280001F9300E611E0C80163E00E94C61D8EE6D0 -:1012900091E0B8010E941D1980E891E069E04AE000 -:1012A0000E94F71389E392E060E040E00E94410A67 -:1012B0001F910F910895CF92DF92EF92FF920F93BB -:1012C0001F93CF93DF9380E891E00E94870D8EE615 -:1012D00091E00E94121A87EFC82E81E0D82EC0E05C -:1012E000D0E056C080E891E00E94290B882331F0BD -:1012F0008EE691E06C2F0E94351B05C08EE691E0D2 -:101300006C2F0E945C1B20E030E040E251E40E9420 -:101310001A250E943724882777FD8095982F0E94F0 -:101320006A2420E030E040E251E40E94CF237B01B8 -:101330008C01F6016081718182819381A8019701FE -:101340000E94CB238823F9F0C801B70120E030E0E8 -:101350004EEF52EC0E94CB238823A9F089E392E060 -:101360006C2F0E94460AB801A70121E00E94550A8D -:10137000BC0180E891E040E00E942F12F601E0827B -:10138000F18202831383219684E090E0C80ED91E77 -:101390008091370290913802C817D90724F4C031E0 -:1013A000D10509F09FCF609140017091410180917A -:1013B0004201909143010E94262080E891E00E9422 -:1013C000870D609144017091450180E891E00E9491 -:1013D0008E0CDF91CF911F910F91FF90EF90DF90D6 -:1013E000CF900895AF92BF92CF92EF92FF920F935A -:1013F000CF93DF938EE691E00E946B1B80E891E033 -:1014000060E070E04FEF20E00FEFE3E0EE2EF12C14 -:101410005CE4C52E32E0A32EB12C0E94C11280E8FC -:1014200091E060E071E043E151E020E00E94BF11F3 -:101430008EE691E00E942B198093370210923802B9 -:10144000C0E0D0E008C080E891E06C2F46E020E0EA -:101450000E940D1221968091370290913802C81790 -:10146000D9071CF4C031D10571F7DF91CF910F91ED -:10147000FF90EF90CF90BF90AF900895FC01148241 -:101480000895FC011482668345830895FC016683F8 -:101490000895FC01808187708860808381818F70CE -:1014A000806181836783CF010895CF92DF92EF92AD -:1014B000FF920F931F937C01F7E0CF2ED12CC80E23 -:1014C000D91ECB01BA0142E086010E94D802F60182 -:1014D00001900020E9F73197EC19FD09EE0FEE0FAE -:1014E000EE0FD7018C918770E82BEC9311968C91BD -:1014F00011978F7011968C93C7011F910F91FF90D8 -:10150000EF90DF90CF900895CF93DF93EC01DB0154 -:101510000D900020E9F71197A61B4A2F50E09A0181 -:10152000B3E0220F331FBA95E1F788818770822BD1 -:10153000888389818F708983A93110F049E150E057 -:10154000CE0107960E944503CE01DF91CF91089509 -:10155000FC01818182958F7090E0009731F00197B6 -:1015600011F080E0089587810895CF0107960E94C9 -:10157000F9020895FC01818182958F7090E00097B7 -:1015800061F0059729F020E030E040E050E00EC027 -:10159000278130854185528509C0CF0107960E9479 -:1015A0001703AC01CB01DA019C01AD01B901CA01FD -:1015B0000895CF93DF93FC01EB01818182958F70B9 -:1015C00031F43796CB01BF010E943E0336C061154E -:1015D000710599F18330B9F0843028F4813041F0FD -:1015E000823059F508C08430A9F0853031F51CC02F -:1015F000878190E002C087819085BE014AE050E07B -:101600000E9470031AC0878190854AE050E00E94D2 -:10161000070413C06781708581859285AE012AE039 -:1016200030E00E94910309C06781708581859285B1 -:10163000AE012AE030E00E94E203CE01DF91CF91BB -:1016400008959C01F999FECF32BD21BDF89A80B56D -:101650000895FC0181890895EF92FF920F931F93E3 -:10166000DF93CF93CDB7DEB7CC52D1400FB6F8940D -:10167000DEBF0FBECDBFC95CDE4FE880F980C75327 -:10168000D140CB5CDE4FA881B981C553D14054967F -:101690008C91882389F1EDB7FEB73A970FB6F8948D -:1016A000FEBF0FBEEDBF31968E010F5F1F4FADB76E -:1016B000BEB712961C930E9311978BE291E0938321 -:1016C000828388E690E09583848383E090E097832B -:1016D000868389E090E0918780870E941D04EDB7A2 -:1016E000FEB73A960FB6F894FEBF0FBEEDBF88E680 -:1016F00092E0B8010E946223FE01E75CFE4FCB5CE2 -:10170000DE4FA881B981C553D14054968C919E017A -:101710002F5F3F4F882359F0C9016CE370E0A701A8 -:101720009F010E944E048AE08CAF1DAE07C0C90124 -:101730006BE271E0A7019F010E944E0488E692E0EF -:10174000BE016F5F7F4F0E94622388E692E00E9495 -:10175000EF21C45DDE4F0FB6F894DEBF0FBECDBFE4 -:10176000CF91DF911F910F91FF90EF900895CF934C -:10177000DF93EB010CC08AE592E069E070E040E0A5 -:1017800050E020E030E00E940714C054DF41809117 -:10179000480190914901892B89F08FE1C034D80725 -:1017A00054F7B3C08AE592E068E070E040E050E0B2 -:1017B00020E030E00E940714C05ADF4080914801C9 -:1017C00090914901892B81F087E0C03DD80764F0F2 -:1017D0008AE592E067E070E040E050E020E030E031 -:1017E0000E940714C05DD740809148019091490143 -:1017F000892B81F083E0C83ED80764F08AE592E047 -:1018000066E070E040E050E020E030E00E94071425 -:10181000C85ED3408091480190914901892B81F0A5 -:1018200081E0C43FD80764F08AE592E065E070E0AB -:1018300040E050E020E030E00E940714C45FD14057 -:101840008091480190914901892B79F0CA3FD105D7 -:1018500064F08AE592E064E070E040E050E020E06F -:1018600030E00E940714CA5FD040809148019091F7 -:101870004901892B79F0CD37D10564F08AE592E0F2 -:1018800063E070E040E050E020E030E00E940714A8 -:10189000C857D0408091480190914901892B71F03F -:1018A000C034D1055CF08AE592E062E070E040E08F -:1018B00050E020E030E00E940714EC97809148014E -:1018C00090914901892B71F0C032D1055CF08AE515 -:1018D00092E061E070E040E050E020E030E00E9403 -:1018E00007146E978091480190914901892B99F0D6 -:1018F00060978CF08AE592E060E070E040E050E0B4 -:1019000020E030E00E94071406C08FE0C03AD807FC -:101910000CF454CF47CFDF91CF910895EF92FF920F -:101920000F931F938C017B0188E692E00E94EF21C8 -:10193000C8010E942C1881E090E0909349018093A7 -:101940004801C801B7010E94B70B1F910F91FF908A -:10195000EF9008955F926F927F928F929F92AF92D5 -:10196000BF92CF92DF92EF92FF920F931F93CF938C -:10197000DF937C01562EEA01822E8881982E969460 -:1019800096949694D7011E969C919B83887F826043 -:101990008883DE2CCF2CC7010E941118C7010E943A -:1019A000411830E040E050E060E070E080E090E01E -:1019B000052DF1E03D3F08F4F0E0E1E0423E08F49F -:1019C000E0E031EEA32EAF0EE060F1E0593A08F40A -:1019D000F0E028EAB22EBE0EE1E0B8EABB1608F04D -:1019E000E0E0FE2BA1E0693A08F4A0E0BF2FB85573 -:1019F000E1E0B83A08F0E0E0AE2BF1E0772309F43B -:101A0000F0E0E1E0882309F4E0E08D2D9C2D1CEF4F -:101A100095014B2F5A2F6F2F7E2F0E945216892D22 -:101A200090E04A9714F040E202C0492D495F8D2DA5 -:101A30009C2DBE01282D0E940516682E8D2D9C2DF3 -:101A40000E945C18BA80AB809C808E8019817D805A -:101A50000881662029F497E1C92E91E0D92E04C0AF -:101A60008CE1C82E81E0D82EB701695A7F4FCE0194 -:101A70000E94D90AEDB7FEB77A970FB6F894FEBF69 -:101A80000FBEEDBF3196ADB7BEB71296FC92EE9287 -:101A900011972DED30E033832283B4821582A68224 -:101AA0001782508611869286138684861586212F8A -:101AB00030E02770307037872687708A118A129538 -:101AC0001F70128B138A069506950695048B158A4E -:101AD000D78AC68A918F808F0E942C0BEDB7FEB7F4 -:101AE0007A960FB6F894FEBF0FBEEDBF862DDF913C -:101AF000CF911F910F91FF90EF90DF90CF90BF900B -:101B0000AF909F908F907F906F905F9008954F92CD -:101B10005F926F927F928F929F92AF92BF92CF927D -:101B2000DF92EF92FF920F931F93DF93CF930F9269 -:101B3000CDB7DEB74C01582E492C8E010F5F1F4FD9 -:101B4000B8010E94F217882309F4D5C28981873031 -:101B500008F0D1C2C4010E940215482F65E1662E2B -:101B6000712C680C791CC401B3010E94F815C401E2 -:101B70006981A80121E00E949414D40155960C912A -:101B800006950695069510E0F401E00FF11F148EFE -:101B9000F401E788D08CC18CB38CF688A28CB40198 -:101BA000695A7F4FC3010E94D90A2DB73EB726510B -:101BB00030400FB6F8943EBF0FBE2DBFEDB7FEB755 -:101BC0003196ADB7BEB712969C928E92119720EBCC -:101BD00030E033832283E4821582D6821782C08666 -:101BE0001186B28613862F2D30E02770307035872E -:101BF0002487A6861786F2945FE0F522F08A118A80 -:101C0000138B028B958B848B0E942C0BF40185899E -:101C100087702DB73EB72A5E3F4F0FB6F8943EBF90 -:101C20000FBE2DBF8230B1F000D000D0ADB7BEB72F -:101C300012969C928E9211978FE990E014969C9345 -:101C40008E9313970E942C0B80E00F900F900F90B3 -:101C50000F9052C2F4012689022F0770128DE78877 -:101C6000F08C318D9289992379F1033069F5173021 -:101C700059F50E94D31F7370807090700E942620C7 -:101C8000D4011E968C911E9757968C935797599610 -:101C9000EC9259978FEF5B968C935B9788E05A96FE -:101CA0008C935A9756968C915697807F8360569660 -:101CB0008C935697C30150966C910E94490AAC01CF -:101CC000C4016E2D21E0F5C1F4018685381709F0B5 -:101CD000DBC123FF21C0D401D696759681E2019025 -:101CE0000D928150E1F7D401D7968C91D797877FD9 -:101CF000D7968C93D7971E968C911E97D8968C93D7 -:101D0000D89757968C915797DA968C93B4016A5C62 -:101D10007F4FC4010E945011F4018289882319F178 -:101D20008785F81601F12E2D30E081E790E0880ECE -:101D3000991ED401ED91FC918FE89FEF880E991EBA -:101D4000E20FF31F80818F1571F0F082F999FECFB9 -:101D50001FBA2D5F3F4F32BD21BDF0BC0FB6F894C6 -:101D6000FA9AF99A0FBE033009F081C1183009F0D0 -:101D700053C0D40154968C91882309F04DC0C301FF -:101D80000E94A80A482F282F30E0F401808990E0B3 -:101D90000197281739070CF0AEC14F5F408B278998 -:101DA0002787F999FECF1FBA81E090E092BD81BDEF -:101DB00020BD0FB6F894FA9AF99A0FBED401509646 -:101DC0003C91F999FECF1FBA82E090E092BD81BDAF -:101DD00030BD0FB6F894FA9AF99A0FBEEDB7FEB778 -:101DE00038970FB6F894FEBF0FBEEDBF3196ADB772 -:101DF000BEB712969C928E9211978AE890E09383D8 -:101E0000828324831582368317820E942C0B80E004 -:101E1000EDB7FEB73896A3C0EE2009F028C1163002 -:101E200009F4A3C0173038F4113009F40FC114308D -:101E300009F061C112C01A3009F4B0C01D3009F0B8 -:101E40005AC128E088E190E00FB6F894A8958093F5 -:101E500060000FBE20936000FFCFD4011E968C91CE -:101E60008F3F09F048C1C3010E94A80AF401868788 -:101E70008F3FA9F400D000D0ADB7BEB712969C92A8 -:101E80008E92119784E890E014969C938E9313970A -:101E90000E942C0B0F900F900F900F90FFCF282FC8 -:101EA00030E040E050E060E070E080E090E0E22E62 -:101EB00001E03D3F08F400E011E0423E08F410E08C -:101EC0000F511060E1E0593A08F4E0E01855F1E0F4 -:101ED000183A08F0F0E0EF2BF1E0693A08F4F0E08E -:101EE000BE2FB855E1E0B83A08F0E0E0FE2BA1E0E3 -:101EF000772309F4A0E0E1E0882309F4E0E0852DF0 -:101F0000942D61E04CEFF42E2B2F3F2F4A2F5E2FA4 -:101F10000E947317F4012685F999FECF1FBA12BCEF -:101F200011BC20BD0FB6F894FA9AF99A0FBE00D0F2 -:101F300000D000D0EDB7FEB73196ADB7BEB7129660 -:101F40009C928E9211978DE790E0938382832483F5 -:101F500015820E942C0B80E0EDB7FEB736960FB6C7 -:101F6000F894FEBF0FBEEDBFC7C0C3010E94A80A10 -:101F700020E08D3409F421E0D40151968C915197E1 -:101F8000821709F4B8C051962C93F999FECF1FBA65 -:101F900083E091E092BD81BD20BDA8C0F40182899B -:101FA000882309F4A8C0C3010E94A80A833409F059 -:101FB000A2C000D000D0ADB7BEB712969C928E9250 -:101FC000119783E790E014969C938E9313970E9449 -:101FD0002C0B20E030E00F900F900F900F90D40169 -:101FE000AF58BF4F9FEFED91FC911197E20FF31F98 -:101FF00080818F3F81F09083F999FECF1FBA2D5FCA -:102000003F4F32BD21BD2350304090BD0FB6F894F4 -:10201000FA9AF99A0FBE2F5F3F4F2230310519F718 -:10202000F4018685878B118E8FEF838F8AE0828FF4 -:102030008689807F8360868BC3016FE171E00E9497 -:10204000840ABC01C4010E94501155C023E730E04E -:10205000820E931ED4010D911C910115110509F4F6 -:102060004AC0C3010E94BA0AF801099544C0E5E7D5 -:10207000F0E08E0E9F1ED401ED91FC91309711F08F -:10208000C301099581E038C09923A9F18981813084 -:1020900091F584010F581F4FD801ED91FC91E30F8A -:1020A000F11D6081862F81508E3F30F4C401A30161 -:1020B00020E00E94AA0C1FC0C401F4016785A3019F -:1020C00020E00E94AA0C6E2D70E0D801ED91FC91E9 -:1020D000E60FF71F80818F1571F0F082F999FECF1E -:1020E0001FBA6D5F7F4F72BD61BDF0BC0FB6F89433 -:1020F000FA9AF99A0FBE80E00F90CF91DF911F916D -:102100000F91FF90EF90DF90CF90BF90AF909F9096 -:102110008F907F906F905F904F900895EF92FF9215 -:102120000F931F93CF93DF93EC010E94D31F7B018A -:102130008C0103C0CE010E94870D0E94D31F6E192F -:102140007F09800B910B605D77408040904090F359 -:10215000DF91CF911F910F91FF90EF900895EF9233 -:10216000FF920F931F938C0100591F4FF8011082AB -:10217000005710409FEFF801908B8685878B918FD9 -:10218000938F87E0828F8689807F8360868B75E15D -:10219000E72EF12CE00EF11EC7016FE171E00E9405 -:1021A000840AC8016FEFA70121E00E94AA0CC801B0 -:1021B0000E948E101F910F91FF90EF900895EF9263 -:1021C000FF920F931F93CF93DF93EC0100D000D0C9 -:1021D000EDB7FEB79283818383E191E0948383839B -:1021E0000E942C0B0F900F900F900F908E85282F30 -:1021F00030E040E050E060E070E080E090E0E22E0F -:1022000001E03D3F08F400E011E0423E08F410E038 -:102210000F511060E1E0593A08F4E0E01855F1E0A0 -:10222000183A08F0F0E0EF2BF1E0693A08F4F0E03A -:10223000BE2FB855E1E0B83A08F0E0E0FE2BA1E08F -:10224000772309F4A0E0E1E0882309F4E0E0CE017F -:1022500061E02CEFF22E2B2F3F2F4A2F5E2F0E9492 -:1022600073178E858F8B198E8FEF8B8F83E08A8FFC -:102270008E89807F83608E8BCE0145966FE171E001 -:102280000E94840ABC01CE010E945011CE010E941E -:102290008E10DF91CF911F910F91FF90EF900895D5 -:1022A0001F93CF93DF93EC01DB0120E011968C911B -:1022B00011978770833009F421E08E858F3F59F4A0 -:1022C000222329F015968C911597833021F0CE01A9 -:1022D0000E94DF102CC08A89882331F114969C91CA -:1022E0001497CF58DF4FE881F981C157D040E90FEB -:1022F000F11D6081862F81508E3F30F4992321F0AB -:10230000CE01AD0120E00DC0222371F015968C9115 -:102310001597843049F49F3F39F4CE016FEFAD013A -:1023200021E00E94AA0C27C08C89882311F080E04C -:1023300022C0CE016F85AD0120E00E94AA0C182FAB -:10234000882329F011E0C059DF4F188213C08B8910 -:10235000882351F0C059DF4F8881C057D040863064 -:1023600018F0CE010E94AF10FE01E059FF4F8081AE -:102370008F5F8083812FDF91CF911F910895FF920E -:102380000F931F93CF93DF93EC018A01F22E611517 -:102390007105E1F08E858F8B198E8FEF8B8F8BE01F -:1023A0008A8F30E02170307053E0220F331F5A952E -:1023B000E1F78E89807F8360822B8E8BCE014596DC -:1023C0000E94840ABC01CE010E9450110115110522 -:1023D000F1F08E858F8B198E8FEF8B8F8CE08A8F2B -:1023E0002F2D30E02170307043E0220F331F4A95CB -:1023F000E1F78E89807F8360822B8E8BCE0145969C -:10240000B8010E94840ABC01CE010E945011DF91E4 -:10241000CF911F910F91FF9008950F931F938C01FF -:10242000FC018685878B118E638F428F30E021708F -:10243000307063E0220F331F6A95E1F78689807F51 -:10244000822B868BC801459660E271E00E94840A67 -:10245000BC01C8010E9450111F910F910895DC0129 -:10246000FB011E968C911E97828350E04170507044 -:1024700083E0440F551F8A95E1F78181807F816059 -:10248000842B8183CD010E945011811181E0089538 -:102490000F931F938C0180E091E00E9419230F5845 -:1024A0001F4FF8018083918363E070E040E051E0CA -:1024B00021E23BE00E9454031F910F910895EF9297 -:1024C000FF920F931F93CF93DF93EC01E62EF42E30 -:1024D0008901C059DF4F1882C057D040CE010E94F9 -:1024E0009518CE010E947A14882389F400D000D078 -:1024F000EDB7FEB7D283C18380E291E094838383FA -:102500000E942C0B0F900F900F900F90FFCFCE01D9 -:1025100061E00E94EE15CE0162E040E00E940C17DF -:10252000CE010E943817CE016F2D0E941F16CE01DA -:102530006E2D0E94F316CE01B8010E94C216CE0184 -:1025400065E04FE00E94E415CE0162E070E00E9479 -:10255000A716CE010E945417CE0162E0EE24EA9441 -:102560002CEFF22E01EE18EA28EA30E040E050E0CD -:102570000E947317DF91CF911F910F91FF90EF9001 -:1025800008958F929F92AF92BF92CF92DF92EF9277 -:10259000FF920F931F93CF93DF93EC014B01D42E47 -:1025A000122F88E692E040E052EC61E070E026E015 -:1025B0000E9451211C8A1A8A112311F081E08A8B12 -:1025C000CB58DF4F99828882C557D0408A898823AB -:1025D00019F0CE010E944812CE01B7014C2D950191 -:1025E0000E945F12CE010E9660E070E043E050E082 -:1025F00021E23BE00E945403CE01419663E271E088 -:1026000041E050E021E23BE00E94540389898F3F82 -:1026100011F481E0898B0F3F19F00F871B8A02C0EC -:1026200081E08B8B8FEFD812DE868B89882331F087 -:102630008F858F3F19F4CE010E94AF108E858F3F9A -:1026400019F4CE010E94DF108A89882319F420E34F -:1026500031E002C027E331E0ADB7BEB718970FB63F -:10266000F894BEBF0FBEADBFEDB7FEB73196129660 -:10267000DC93CE9311978DE291E09383828335832F -:1026800024838E85868317820E942C0BDC2ECD2E10 -:102690008DB79EB708960FB6F8949EBF0FBE8DBF3C -:1026A0008E85282F30E040E050E060E070E080E070 -:1026B00090E0E22E01E03D3F08F400E011E0423EF0 -:1026C00008F410E00F511060E1E0593A08F4E0E03E -:1026D0001855F1E0183A08F0F0E0EF2BF1E0693A14 -:1026E00008F4F0E0BE2FB855E1E0B83A08F0E0E0B9 -:1026F000FE2BA1E0772309F4A0E0E1E0882309F4B0 -:10270000E0E08D2D9C2D60E04CEFF42E2B2F3F2F21 -:102710004A2F5E2F0E9473178E85282F30E040E0ED -:1027200050E060E070E080E090E0E22E01E03D3FAC -:1027300008F400E011E0423E08F410E00F51106090 -:10274000E1E0593A08F4E0E01855F1E0183A08F0F1 -:10275000F0E0EF2BF1E0693A08F4F0E0BE2FB85555 -:10276000E1E0B83A08F0E0E0FE2BA1E0772309F4BD -:10277000A0E0E1E0882309F4E0E08D2D9C2D61E0EC -:102780003CEFF32E2B2F3F2F4A2F5E2F0E94731703 -:102790008A89882311F441E101C042E1CE016FEF43 -:1027A00020E00E940D128E858F8B198E8FEF8B8FFC -:1027B00086E08A8F8E89807F83608E8BCE014596DE -:1027C0006F850E94490ABC01CE010E945011CE01C2 -:1027D0000E948E10DF91CF911F910F91FF90EF908B -:1027E000DF90CF90BF90AF909F908F9008950F9300 -:1027F0001F938C010E946914C80145960E943E0AED -:10280000C801C6960E943E0A1F910F910895411576 -:10281000510529F480917A008F7780937A006A308D -:102820007105B9F063FD02C0E8E001C0E8E2862F5F -:102830008770E82B88E190E00FB6F894A895809314 -:1028400060000FBEE0936000809160008064809320 -:102850006000232BA1F483B7817F846083BFF89449 -:1028600083B7816083BF85B7806685BF8F7D85BF55 -:102870007894889583B78E7F83BF78940EC083B792 -:10288000817F846083BFF89483B7816083BF78942D -:10289000889583B78E7F83BF7894452B29F48091E8 -:1028A0007A00806880937A0008951F920F920FB685 -:1028B0000F9211248F9388E10FB6F89480936000F3 -:1028C000109260000FBE8F910F900FBE0F901F905F -:1028D0001895FC01608341831282138280E2848315 -:1028E0001582168217821086118612861386148628 -:1028F00015860895FC0183810895FF920F931F931D -:102900008C01F62E81E00E94E71880E00E94F0180A -:1029100084E00E94F518F80181816F2D0E94CD207E -:102920001F910F91FF900895EF92FF920F931F93C5 -:10293000CF93DF93EC01162F042FF52EE22E60E0EB -:102940000E947D141770186A1EBD0DB407FEFDCFDE -:10295000802F9F2D9C01F9012E2D213208F020E2BD -:102960008EB508C080818EBD0DB407FEFDCF3196B7 -:102970008EB521502223B1F7CE0161E00E947D1473 -:10298000DF91CF911F910F91FF90EF900895CF931A -:10299000DF93EC0160E00E947D1480E58EBD0DB4F4 -:1029A00007FEFDCF8EB583E78EBD0DB407FEFDCFCC -:1029B0008EB5CE0161E00E947D14DF91CF91089524 -:1029C0001F93CF93DF93EC01162F60E00E947D14DC -:1029D0001EBD0DB407FEFDCF1EB5CE0161E00E9405 -:1029E0007D14812FDF91CF911F9108956FEF0E9489 -:1029F000E014089561EE0E94E014089562EE0E94D2 -:102A0000E01408951F93CF93DF93EC0160E00E94E0 -:102A10007D1480E68EBD0DB407FEFDCF8EB58FEF21 -:102A20008EBD0DB407FEFDCF1EB5CE0161E00E9444 -:102A30007D14113220F0CE010E94FE1410E0812F8F -:102A4000DF91CF911F910895EF92FF920F931F9303 -:102A5000CF93DF93EC01F62EE72E9C81142F941771 -:102A600008F4192F8D81882311F000E002C0092F8E -:102A7000011BCE0160E00E947D1481E68EBD0DB485 -:102A800007FEFDCF8F2D9E2D9C01F901FEB49FEF17 -:102A900007C09EBD0DB407FEFDCF8EB581931150CA -:102AA0001123B9F707C08EBD0DB407FEFDCF9EB54B -:102AB000015001C08FEF0023B1F7CE0161E00E9409 -:102AC0007D148F2DDF91CF911F910F91FF90EF908B -:102AD0000895DF92EF92FF920F931F93CF93DF93AE -:102AE000EC01E62ED72EF22E9C81142F941708F4B9 -:102AF000192F8D81882311F000E002C0092F011BDE -:102B0000CE0160E00E947D14FEBC0DB407FEFDCF37 -:102B10008E2D9D2D9C01F901FEB408C080818EBDD3 -:102B20000DB407FEFDCF31968EB511501123B1F7CC -:102B300006C01EBC0DB407FEFDCF8EB501500023AC -:102B4000C1F7CE0161E00E947D148F2DDF91CF91FE -:102B50001F910F91FF90EF90DF900895CF93DF9337 -:102B6000EC01222311F420EA01C020EBCE010E94E7 -:102B70006915888161E00E94CD20888160E00E9413 -:102B8000CD20DF91CF9108950F931F93CF93DF93C3 -:102B9000EC01162F042F60E00E947D141F7110625B -:102BA0001EBD0DB407FEFDCF1EB50EBD0DB407FE54 -:102BB000FDCF8EB5CE0161E00E947D14812FDF91A3 -:102BC000CF911F910F910895262F4F702295207F4E -:102BD000242B64E0422F0E94C4150895662319F047 -:102BE00061E04FE302C061E040E00E94C415089537 -:102BF0000F931F938C010E942415C80167E040E7E2 -:102C00000E94C4151F910F910895CF93DF93EC019B -:102C10000E94AE15CE010E94F6148073D9F3CE0146 -:102C200067E040E70E94C41584FD02C081E004C053 -:102C3000CE010E94FA1480E0DF91CF910895462FD3 -:102C4000603808F04FE765E00E94C4150895EF92E0 -:102C5000FF920F931F93CF93DF937C01162FEA010E -:102C6000022F60E00E947D141F7110621EBD0DB422 -:102C700007FEFDCF1EB508C088818EBD0DB407FECE -:102C8000FDCF21968EB501500023B1F7C70161E059 -:102C90000E947D14812FDF91CF911F910F91FF90A2 -:102CA000EF900895EF92FF920F931F93DF93CF93CE -:102CB000CDB7DEB728970FB6F894DEBF0FBECDBFF5 -:102CC0007C0109831A832B833C834D835E836F834E -:102CD00078878E010F5F1F4F6AE0A80125E00E94F0 -:102CE0002716C70160E1A80125E00E942716C70149 -:102CF00061E1F70144810E94C41528960FB6F8944B -:102D0000DEBF0FBECDBFCF91DF911F910F91FF901E -:102D1000EF9008951F93CF93DF93EC01162F60E09F -:102D20000E947D141F711EBD0DB407FEFDCF8EB530 -:102D30008FEF8EBD0DB407FEFDCF1EB5CE0161E055 -:102D40000E947D14812FDF91CF911F9108950F93E1 -:102D50001F93CF93DF938C01EB0160E00E948A16F2 -:102D6000482F437F209729F0219711F4486001C034 -:102D70004C60C80160E00E94C415DF91CF911F91A3 -:102D80000F910895FF920F931F93CF93DF93EC0160 -:102D90008B0166E00E948A161A82F7EDFF2EF82258 -:102DA0000230110511F480E206C00130110529F44A -:102DB00081E08A8388E0F82A01C01A82CE0166E0A9 -:102DC0004F2D0E94C415CE0166E00E948A168F1511 -:102DD00011F481E002C01A8280E0DF91CF911F914F -:102DE0000F91FF9008951F93CF93DF93EC01162F5F -:102DF00066E00E948A16143010F04CE003C0412FA8 -:102E0000440F4F5F887F482BCE0166E00E94C415B7 -:102E1000DF91CF911F9108950F931F93CF93DF936D -:102E2000EC01162F042F6730F0F461E00E948A163F -:102E3000282F002351F081E090E002C0880F991FF5 -:102E40001A95E2F7422F482B0AC081E090E002C0B9 -:102E5000880F991F1A95E2F7482F40954223CE011B -:102E600061E00E94C415DF91CF911F910F910895E9 -:102E70000F931F938C010E94C714C8016DE10E943B -:102E80008A16482F4660C8016DE10E94C415C8012A -:102E90006CE10E948A16482F4360C8016CE10E94D1 -:102EA000C4151F910F9108950F931F938C010E94D9 -:102EB000C714C8016DE10E948A16482F4460C801FA -:102EC0006DE10E94C415C8016CE10E948A16482F6A -:102ED0004F63C8016CE10E94C41581E0F80185834D -:102EE0001F910F910895BF92CF92DF92EF92FF92C0 -:102EF0000F931F93DF93CF93CDB7DEB728970FB60D -:102F0000F894DEBF0FBECDBF6C01B62EE982FA8207 -:102F10000B831C832D833E834F835887662389F45C -:102F2000F601E6828A8187838B8180878C81818705 -:102F30008D8182878E8183878F818487888585872D -:102F400007C0F6E0F61708F43DC081E0681761F4A9 -:102F5000EB2DF0E0EA5BFE4FE491C6016E2FAE016F -:102F60004F5F5F4F25E00BC0E62FF0E0EA5BFE4FBE -:102F7000E491C6016E2FAE014F5F5F4F21E00E94CA -:102F800027160B2D10E0F801E45BFE4FE491C6011B -:102F90006E2FF60144810E94C415C60162E00E94B2 -:102FA0008A16005C1E4FF801649121E030E002C0F7 -:102FB000220F331F6A95E2F7482F422BC60162E0C9 -:102FC0000E94C41528960FB6F894DEBF0FBECDBF81 -:102FD000CF91DF911F910F91FF90EF90DF90CF90F5 -:102FE000BF9008950F931F93CF93DF93EC018B0154 -:102FF00067E10E948A1680FF02C080E00DC00115C3 -:10300000110549F0CE010E94F61490E09595879540 -:103010008770F801808381E0DF91CF911F910F913C -:103020000895CF93DF93EC0160E00E948A1681FD42 -:1030300010C0CE0160E00E948A16482F4260CE0187 -:1030400060E00E94C41565E070E080E090E00E94BE -:103050002620DF91CF9108950F931F938C01FC01DF -:10306000808160E00E94CD20C80160E00E948A1645 -:10307000482F4D7FC80160E00E94C4151F910F9139 -:1030800008950F931F938C01FC01808160E00E94E2 -:10309000CD20C8010E94FA14C8010E94FE14C80184 -:1030A00060E00E948A16482F4E7FC80160E00E94AF -:1030B000C4151F910F910895CF93DF93EC010E94E7 -:1030C0001118CE0160E00E948A16482F4160CE019F -:1030D00060E00E94C415CE0167E040E70E94C4157D -:1030E0008E819F81892B9885892B9985892B9A853B -:1030F000892B9B85892B9C85892B9D85892B41F06C -:10310000AE014A5F5F4FCE016AE025E00E942716BC -:10311000CE010E94FE14CE010E94FA14888161E063 -:103120000E94CD20DF91CF910895CF93DF93EC01E2 -:10313000888161E00E948E20898161E00E948E205A -:103140000E940619888160E00E94CD20CE0161E0D6 -:103150000E947D1465E070E080E090E00E942620EF -:10316000CE0165E04FE00E94E415CE0162E070E020 -:103170000E94C216882311F081E08B83CE0160E0AB -:1031800070E00E94C216CE0162E070E00E94A716B5 -:10319000CE0167E040E70E94C415CE016CE40E94B6 -:1031A0001F16CE010E94FE14CE010E94FA14CE0119 -:1031B0000E941118CE0160E00E948A16482F4E7FAF -:1031C000CE0160E00E94C415DF91CF91089588235D -:1031D00019F48CB5806202C08CB58F7D8CBD0895CA -:1031E0009CB5937F982B9CBD08952CB5382F3370D8 -:1031F0002C7F322B3CBD2DB590E09595879595950C -:10320000879581702E7F822B8DBD08958AE061E0C5 -:103210000E94CD208AE061E00E948E208CB5806102 -:103220008CBD8CB580648CBD8DE061E00E948E20E9 -:103230008BE061E00E948E200895FC0185EE99E10B -:10324000918B808B75836483138210828FE190E071 -:10325000928381830895FC01838108956F927F9208 -:103260008F929F92AF92BF92CF92DF92EF92FF9296 -:103270000F931F93CF93DF93FB01EA01998180E0C5 -:10328000288130E0282B392BE081E23231F0E8321E -:1032900021F0E03109F084C04BC04C814F3329F15B -:1032A000403420F44F3109F07BC02FC04F3579F006 -:1032B0004F3709F075C0B901882777FD8095982FA1 -:1032C0000E946A2420E030E040E85DE32EC035959E -:1032D0002795B901882777FD8095982F0E946A2449 -:1032E00020E030E040E05EE320C03595279535953D -:1032F0002795B901882777FD8095982F0E946A2429 -:1033000020E030E040E85EE310C093E0359527957B -:103310009A95E1F7B901882777FD8095982F0E944B -:103320006A2420E030E040E05FE30E941A2532C0CA -:10333000EF8035952795B901882777FD8095982FDF -:103340000E946A2420E030E040E85EE30E946623A9 -:103350003B014C016E2D70E02E81621B71098827A4 -:1033600077FD8095982F0E946A245B016C01FF24F1 -:1033700000E010E0C801B7010E9468249B01AC0185 -:10338000C601B5010E94CF239B01AC01C401B3016A -:103390000E9467239B01AC01832F942F752F00C0DF -:1033A000262F382F492F572FB901CA01DF91CF910E -:1033B0001F910F91FF90EF90DF90CF90BF90AF9053 -:1033C0009F908F907F906F9008950895EF92FF9255 -:1033D0000F931F938C017B01FC01848195810E94D6 -:1033E000E51CF80184819581B7010E94C41CF80195 -:1033F0008481958164EB40E00E947F1CF801848108 -:1034000095810E94FA1BF82EF801848195810E9413 -:10341000E51C80E0FF2009F481E01F910F91FF90EF -:10342000EF9008950F931F938C01FC018481958187 -:103430000E94E51CF801848195810E94BF1CF8015F -:103440008481958164E440810E947F1CF801818120 -:1034500092818F33910551F08F35910561F04F972F -:1034600079F46EE570E080E090E00EC06CEB70E007 -:1034700080E090E009C067E771E080E090E004C080 -:103480006EEE72E080E090E00E9426201F910F9186 -:103490000895CF92DF92EF92FF920F931F938C01CA -:1034A0006B017A01FC01848195810E94E51CF80181 -:1034B00084819581B6010E94C41CF80184819581A4 -:1034C0006EEB40E00E947F1CF801848195810E9490 -:1034D0002E1CF7018083F801848195810E942E1CA7 -:1034E000F7018183F801848195810E942E1CF701E8 -:1034F0008283F801848195810E942E1CF7018383C9 -:10350000F801848195810E942E1CF7018483F801C3 -:10351000848195810E942E1CF7018583F8018481A6 -:1035200095810E942E1CF7018683F8018481958184 -:103530000E942E1CF7018783F801848195810E94E7 -:103540002E1CF7018087F801848195810E94E51C7B -:103550001F910F91FF90EF90DF90CF9008950F9300 -:103560001F938A010E94491AC80168E00E94E91B62 -:1035700020E0F8019085891709F421E0822F1F913E -:103580000F910895CF92DF92EF92FF920F931F93C6 -:10359000DF93CF93CDB7DEB729970FB6F894DEBF90 -:1035A0000FBECDBF8C017B016E010894C11CD11CE4 -:1035B000A6010E94AF1A882329F460E070E08EEF24 -:1035C00092EC05C0C801B701A6010E942E192996E8 -:1035D0000FB6F894DEBF0FBECDBFCF91DF911F9124 -:1035E0000F91FF90EF90DF90CF9008950F931F936E -:1035F0008B01CB0167E00E94E91B20E0F801978175 -:10360000891709F421E0822F1F910F910895EF92FD -:10361000FF920F931F93CF93DF93EC017B01042F55 -:103620008C819D810E94DC1B10E007C0CE01B70198 -:103630000E94F61A8823A9F00AC08C819D81B701E7 -:103640000E94301D882329F0101759F4EFCF81E034 -:1036500001C080E0DF91CF911F910F91FF90EF901B -:1036600008951F5F0117A8F3E8CFEF92FF920F9321 -:103670001F93DF93CF93CDB7DEB728970FB6F8949B -:10368000DEBF0FBECDBF7C01462F8E010F5F1F4FE7 -:10369000B8010E94071BC701B8010E94C21A2896F0 -:1036A0000FB6F894DEBF0FBECDBFCF91DF911F9153 -:1036B0000F91FF90EF9008950E94351B26E636E6A5 -:1036C00046EE5FE30E941A2520E030E040E052E43D -:1036D0000E94672308959F92AF92BF92CF92DF928C -:1036E000EF92FF920F931F93DF93CF93CDB7DEB787 -:1036F00061970FB6F894DEBF0FBECDBF8C01FC0101 -:10370000848195810E94DC1BF80113827E0108945C -:10371000E11CF11CE9E0AE2EB12CAC0EBD1E7FE722 -:10372000C72ED12C992493942DC0C801B7010E94B3 -:10373000F61A882339F1F8018081882341F4C80101 -:10374000B7010E94E619882311F0F8019082C801A0 -:10375000B701A5010E94491A8981803121F4F8013D -:10376000D282C1820BC08D85282F30E0F801818183 -:1037700092818217930714F432832183F8018381A5 -:103780008F5F8383F80184819581B7010E94301D8A -:10379000882359F661960FB6F894DEBF0FBECDBFF1 -:1037A000CF91DF911F910F91FF90EF90DF90CF901D -:1037B000BF90AF909F900895FC01138615861486E4 -:1037C00087E090E012863197009711F00197FACFC9 -:1037D0000895DC0180E00BC0E82FF0E08D9190E0CF -:1037E000E827F927ED5FFC4FE49161508E2F6623A7 -:1037F00099F70895DF92EF92FF920F931F93FC01C8 -:10380000E08001811281F894F80181818E29818301 -:103810008281DE2CD0948D21828383E090E00E940F -:10382000E11FF80181818D2181838AE090E00E946F -:10383000E11FF8010081789485E390E00E94E11F88 -:1038400080E010E0FF240E211F21012B09F081E010 -:103850001F910F91FF90EF90DF900895EF92FF92EC -:103860000F931F93CF93DF937C0101E010E0C0E042 -:10387000D0E0C7010E94FA1B8111102B000F219686 -:10388000C830D105B1F7812FDF91CF911F910F91F2 -:10389000FF90EF9008951F93CF93DF93FC01108169 -:1038A000C181D281912F909560FF12C0F8948A81D6 -:1038B00089238A838981812B89838AE090E00E9411 -:1038C000E11F8A81812B8A83789487E390E011C07D -:1038D000F8948A8189238A838981812B898381E471 -:1038E00090E00E94E11F8A81812B8A83789485E091 -:1038F00090E00E94E11FDF91CF911F910895CF9238 -:10390000DF92EF92FF920F931F93CF93DF938C017F -:10391000E42EFF24F394C0E0D0E0C62EDD2460E066 -:103920008F2D90E08C219D21892B09F061E0C80149 -:103930000E944B1CFF0C2196C830D10581F7EE2068 -:10394000A9F4F894D8011196ED91FC911297918108 -:103950008C918095982391831196ED91FC9112970B -:1039600092818C918095982392837894DF91CF9166 -:103970001F910F91FF90EF90DF90CF9008956CEC26 -:1039800040E00E947F1C0895EF92FF920F931F93D7 -:10399000CF93DF938C017B0165E540E00E947F1CA3 -:1039A000C0E0D0E0F701EC0FFD1FC801608140E0EE -:1039B0000E947F1C2196C830D105A1F7DF91CF91DD -:1039C0001F910F91FF90EF900895DF92EF92FF9279 -:1039D0000F931F93CF93DF93FC010081C181D281AC -:1039E000F8948981D02ED0948D21898378941DE715 -:1039F000E02EFF24115059F182E090E00E94E11F77 -:103A0000888190E08E219F21892BA1F3F8948A81EF -:103A10008D218A838981802B8983789484EF91E03A -:103A20000E94E11FF89489818D21898380E590E0CF -:103A30000E94E11F888110E090E0E822F922EF283F -:103A400009F411E0789484EA91E00E94E11F812F4B -:103A5000DF91CF911F910F91FF90EF90DF9008952C -:103A6000AF92BF92DF92EF92FF920F931F93CF938B -:103A7000DF93EC015B018D85882309F061C0CE01E5 -:103A80000E94E51C882329F41B861D861C8690E075 -:103A90006BC0CE0160EF40E00E947F1C01E0DD249E -:103AA000EE24FF24F394CE010E94FA1B182FCE01BE -:103AB0000E94FA1B113019F48130E1F439C0181753 -:103AC00009F58B85081770F460E0FE01EE0DF11D1D -:103AD000838190E02F2D30E082239323181619065E -:103AE0004CF003C060E0081729F0093008F04CC022 -:103AF0000C874AC0FE01EE0DF11D83818F2983835F -:103B000061E009C0612FFE01EE0DF11D9F2D909522 -:103B1000838189238383CE010E944B1C0F5FFF0C9E -:103B200019F4E394FF24F39487E08E1508F0BBCFDB -:103B3000013430F0DB86DD2011F581E08D871FC078 -:103B40001B861D861C8690E0DE0120E030E0F5013A -:103B5000E20FF31F13968C91139780832F5F3F4FD3 -:103B600011962830310599F7892FDF91CF911F9158 -:103B70000F91FF90EF90DF90BF90AF9008958B81F1 -:103B80008823F1F291E0E0CFD02EBDCFFF920F93CA -:103B90001F938C01F62E862F60E00E948E208F2DC1 -:103BA00090E0FC01EB5CFB4FE491D801EC938F5D5E -:103BB0009B4FFC016491E62FF0E0EE0FFF1FE95EE2 -:103BC000FB4F8591949112969C938E9311971B961F -:103BD0001C921B971D961C921D971C961C92F80117 -:103BE00087E090E012863197009711F00197FACFA5 -:103BF0001F910F91FF9008950F931F93CF93DF9321 -:103C0000BC018230910510F462E070E0E09107039E -:103C1000F091080340E050E0A0E0B0E024C08081D3 -:103C2000918186179707D0F08617970771F48281E4 -:103C30009381109729F013969C938E9312972CC022 -:103C4000909308038093070327C04115510519F08D -:103C50008417950718F48D01AC01EF01DF01828113 -:103C600093819C01F9013097D1F641155105F9F086 -:103C7000CA01861B970B8430910580F48A819B8151 -:103C80000115110521F0F8019383828304C09093FC -:103C9000080380930703FE01329645C0FE01E80F3A -:103CA000F91F619371930297998388833CC0809137 -:103CB000050390910603892B41F480914C0190916A -:103CC0004D01909306038093050340914E0150915E -:103CD0004F014115510541F44DB75EB780914A013E -:103CE00090914B01481B590B20910503309106031D -:103CF00024173507B0F4CA01821B930B8617970768 -:103D000080F0AB014E5F5F4F8417950750F0420F74 -:103D1000531F5093060340930503F9016193719378 -:103D200002C0E0E0F0E0CF01DF91CF911F910F9151 -:103D30000895CF93DF939C01009709F48FC0EC01A5 -:103D400022971B821A826091070370910803611504 -:103D5000710581F488819981820F931F2091050359 -:103D6000309106032817390739F5D0930603C0931D -:103D7000050374C0DB0140E050E0AC17BD0708F15B -:103D8000BB83AA83FE0121913191E20FF31FAE178D -:103D9000BF0779F48D919C911197280F391F2E5FE1 -:103DA0003F4F3983288312968D919C9113979B8363 -:103DB0008A834115510571F4D0930803C09307031A -:103DC0004DC012968D919C911397AD01009711F003 -:103DD000DC01D3CFDA011396DC93CE931297FA016C -:103DE00021913191E20FF31FCE17DF0769F488812B -:103DF0009981280F391F2E5F3F4FFA0131832083AD -:103E00008A819B8193838283E0E0F0E0DB0112965C -:103E10008D919C911397009719F0BC01FD01F6CF8D -:103E2000AB014E5F5F4FDB018D919C91840F951F1D -:103E300020910503309106032817390779F430974C -:103E400029F4109208031092070302C01382128211 -:103E5000425050405093060340930503DF91CF91A9 -:103E600008951F920F920FB60F9211242F933F9334 -:103E70004F935F936F937F938F939F93AF93BF9372 -:103E8000EF93FF9380915B0290915C02892B29F064 -:103E9000E0915B02F0915C020995FF91EF91BF9177 -:103EA000AF919F918F917F916F915F914F913F91D2 -:103EB0002F910F900FBE0F901F9018951F920F9289 -:103EC0000FB60F9211242F933F934F935F936F93ED -:103ED0007F938F939F93AF93BF93EF93FF938091C3 -:103EE0005D0290915E02892B29F0E0915D02F091D4 -:103EF0005E020995FF91EF91BF91AF919F918F91D4 -:103F00007F916F915F914F913F912F910F900FBED5 -:103F10000F901F9018951F920F920FB60F921124B9 -:103F20002F933F938F939F93AF93BF93809163029F -:103F300090916402A0916502B0916602309167028F -:103F40000196A11DB11D232F2D5F2D3720F02D5778 -:103F50000196A11DB11D2093670280936302909387 -:103F60006402A0936502B093660280915F02909113 -:103F70006002A0916102B09162020196A11DB11D83 -:103F800080935F0290936002A0936102B0936202FB -:103F9000BF91AF919F918F913F912F910F900FBE45 -:103FA0000F901F9018958FB7F8942091630230916D -:103FB000640240916502509166028FBFB901CA0147 -:103FC0000895019739F0880F991F880F991F02975C -:103FD0000197F1F70895789484B5826084BD84B523 -:103FE000816084BD85B5826085BD85B5816085BDF4 -:103FF000EEE6F0E0808181608083E1E8F0E010820D -:10400000808182608083808181608083E0E8F0E04D -:10401000808181608083E1EBF0E080818460808337 -:10402000E0EBF0E0808181608083EAE7F0E080816E -:1040300084608083808182608083808181608083CE -:104040008081806880831092C1000895EF92FF9272 -:104050000F931F93CF93DF937B018C013FB7F894AD -:1040600080915F0290916002A0916102B091620222 -:1040700026B5A89B05C02F3F19F00196A11DB11DC3 -:104080003FBFBA2FA92F982F8827820F911DA11DFE -:10409000B11D52E0880F991FAA1FBB1F5A95D1F777 -:1040A000EC0130C00E9465233FB7F89480915F0215 -:1040B00090916002A0916102B091620226B5A89B26 -:1040C00005C02F3F19F00196A11DB11D3FBFBA2FAA -:1040D000A92F982F8827820F911DA11DB11D32E0B5 -:1040E000880F991FAA1FBB1F3A95D1F78C1B9D0BF8 -:1040F000885E9340B8F20894E108F10801091109BB -:10410000C851DC4FE114F1040105110559F6DF91A6 -:10411000CF911F910F91FF90EF900895CF93DF9370 -:10412000482F50E0CA018B5C9B4FFC0134914F5DDE -:104130005B4FFA018491882369F190E0880F991F01 -:10414000FC01ED5FFB4FA591B491FC01E35FFB4FD8 -:10415000C591D491662351F42FB7F8948C91932F85 -:10416000909589238C93888189230BC0623061F4F8 -:104170002FB7F8948C91932F909589238C938881F5 -:10418000832B88832FBF06C09FB7F8948C91832B15 -:104190008C939FBFDF91CF910895482F50E0CA01C3 -:1041A000875B9B4FFC012491CA018B5C9B4FFC01F8 -:1041B00094914F5D5B4FFA013491332309F440C071 -:1041C000222351F1233071F0243028F42130A1F062 -:1041D000223011F514C02630B1F02730C1F0243060 -:1041E000D9F404C0809180008F7703C08091800053 -:1041F0008F7D8093800010C084B58F7702C084B516 -:104200008F7D84BD09C08091B0008F7703C08091FD -:10421000B0008F7D8093B000E32FF0E0EE0FFF1F22 -:10422000E35FFB4FA591B4912FB7F894662321F477 -:104230008C919095892302C08C91892B8C932FBFF0 -:104240000895DC015C968C915C97FD01E80FF11DEF -:10425000E35AFF4F20815C968C915C9790E0019629 -:104260008F7390705C968C935C975696ED91FC9151 -:10427000579720835096ED91FC91519780818064EF -:1042800080835B969C915B975C968C915C9798176A -:1042900039F45296ED91FC91539780818F7D808304 -:1042A0000895DF92EF92FF920F931F93CF93DF93C6 -:1042B000EC017A018B01D22EE889F98982E08083B2 -:1042C000403081EE580780E0680780E07807A1F071 -:1042D00060E079E08DE390E0A80197010E947D25E0 -:1042E000215030404040504056954795379527958E -:1042F00080E12030380798F0E889F989108260E879 -:1043000074E88EE190E0A80197010E947D2521507C -:104310003040404050405695479537952795EC855D -:10432000FD853083EE85FF852083188EEC89FD891D -:10433000D082EA89FB89808180618083EA89FB8958 -:10434000808188608083EA89FB898081806880839E -:10435000EA89FB8980818F7D8083DF91CF911F91D6 -:104360000F91FF90EF90DF900895FC01218D828DD9 -:1043700030E0205C3F4F281B31092F733070C9019A -:104380000895FC01918D828D981719F42FEF3FEF5E -:1043900006C0828DE80FF11D858D282F30E0C90100 -:1043A0000895DC0159969C9159975A968C915A9789 -:1043B000981719F42FEF3FEF10C05A968C915A9727 -:1043C000FD01E80FF11D958D5A968C915A978F5FDC -:1043D0008F735A968C93292F30E0C9010895CF939B -:1043E000DF93EC01888D882361F419C08C9185FFDF -:1043F0000AC0E889F989808185FF05C0CE010E9445 -:104400002121AA89BB898C9185FD05C0E889F9899C -:10441000808186FD04C00FB607FEE8CFF4CFDF91A0 -:10442000CF9108950F931F93CF93DF93EC01062F45 -:104430009B8D8C8D981791F5E889F989808185FF8E -:104440002DC0EE89FF896083E889F98980818064C5 -:1044500080831DC00FB607FC08C0E889F9898081F8 -:1044600085FF03C0CE010E9421218C8D181791F386 -:104470008B8DFE01E80FF11DE35AFF4F00831B8F68 -:10448000EA89FB8980818062808381E0888F81E076 -:1044900090E0DF91CF911F910F9108951B8D1F5FC9 -:1044A0001F73E3CF8AED92E2892B51F080E090E018 -:1044B000892B31F00E94DA22882311F00E9400003B -:1044C00008951F920F920FB60F9211242F938F937E -:1044D0009F93EF93FF93E0917802F09179028081AE -:1044E00082FD16C0E0917E02F0917F0220819091C2 -:1044F00081029F5F9F7380918202981771F0E09113 -:104500008102F0E0E859FD4F258F9093810205C0AC -:10451000E0917E02F0917F02E081FF91EF919F9107 -:104520008F912F910F900FBE0F901F9018951092A2 -:104530006B0210926A0288EE93E0A0E0B0E08093F4 -:104540006C0290936D02A0936E02B0936F0284E5AB -:1045500091E0909369028093680285EC90E09093DB -:1045600075028093740284EC90E0909377028093BC -:10457000760280EC90E0909379028093780281EC4F -:1045800090E090937B0280937A0282EC90E090938B -:104590007D0280937C0286EC90E090937F02809372 -:1045A0007E02109281021092820210928302109277 -:1045B0008402089588E692E00E94B52120E0892BCC -:1045C00009F021E0822F08951F920F920FB60F92EB -:1045D00011242F933F934F935F936F937F938F9308 -:1045E0009F93AF93BF93EF93FF9388E692E00E946F -:1045F0002121FF91EF91BF91AF919F918F917F9179 -:104600006F915F914F913F912F910F900FBE0F903F -:104610001F901895CF93DF930E94EB1F0E94F20921 -:10462000C2E5D2E20E945B092097E1F30E94522288 -:10463000F9CF0E94FC1D0895CF92DF92EF92FF9276 -:104640000F931F93CF93DF937C016B018A01C0E02E -:10465000D0E00FC0D6016D916D01D701ED91FC91B5 -:104660000190F081E02DC7010995C80FD91F0150B5 -:1046700010400115110571F7CE01DF91CF911F9107 -:104680000F91FF90EF90DF90CF900895CF93DF933D -:10469000EC016115710519F420E030E00FC0DB0179 -:1046A0000D900020E9F71197A61BB70BE881F9815F -:1046B0000280F381E02DAD0109959C01C901DF91D4 -:1046C000CF9108950E944623089508955058BB271E -:1046D000AA270ED075C166D130F06BD120F031F42D -:1046E0009F3F11F41EF45BC10EF4E095E7FB51C14E -:1046F000E92F77D180F3BA1762077307840795070C -:1047000018F071F49EF58FC10EF4E0950B2EBA2FC0 -:10471000A02D0B01B90190010C01CA01A0011124C7 -:10472000FF27591B99F0593F50F4503E68F11A1673 -:10473000F040A22F232F342F4427585FF3CF469504 -:1047400037952795A795F0405395C9F77EF41F1626 -:10475000BA0B620B730B840BBAF09150A1F0FF0FF0 -:10476000BB1F661F771F881FC2F70EC0BA0F621FDC -:10477000731F841F48F4879577956795B795F795CC -:104780009E3F08F0B3CF9395880F08F09927EE0F5E -:10479000979587950895D9D008F481E008950CD0B5 -:1047A0000FC107D140F0FED030F021F45F3F19F087 -:1047B000F0C0511139C1F3C014D198F39923C9F352 -:1047C0005523B1F3951B550BBB27AA276217730717 -:1047D000840738F09F5F5F4F220F331F441FAA1FCB -:1047E000A9F333D00E2E3AF0E0E830D0915050408B -:1047F000E695001CCAF729D0FE2F27D0660F771F39 -:10480000881FBB1F261737074807AB07B0E809F01A -:10481000BB0B802DBF01FF2793585F4F2AF09E3FAF -:10482000510568F0B6C000C15F3FECF3983EDCF381 -:10483000869577956795B795F7959F5FC9F7880F28 -:10484000911D9695879597F90895E1E0660F771F7A -:10485000881FBB1F621773078407BA0720F0621B0B -:10486000730B840BBA0BEE1F88F7E095089504D004 -:104870006894B111D9C00895BCD088F09F5790F0CA -:10488000B92F9927B751A0F0D1F0660F771F881F75 -:10489000991F1AF0BA95C9F712C0B13081F0C3D090 -:1048A000B1E00895C0C0672F782F8827B85F39F02E -:1048B000B93FCCF3869577956795B395D9F73EF4D4 -:1048C00090958095709561957F4F8F4F9F4F08957C -:1048D000E89409C097FB3EF490958095709561959A -:1048E0007F4F8F4F9F4F9923A9F0F92F96E9BB2750 -:1048F0009395F695879577956795B795F111F8CFCC -:10490000FAF4BB0F11F460FF1BC06F5F7F4F8F4F36 -:104910009F4F16C0882311F096E911C0772321F02C -:104920009EE8872F762F05C0662371F096E8862FC4 -:1049300070E060E02AF09A95660F771F881FDAF71B -:10494000880F9695879597F90895990F0008550F48 -:10495000AA0BE0E8FEEF16161706E807F907C0F005 -:1049600012161306E407F50798F0621B730B840B0D -:10497000950B39F40A2661F0232B242B252B21F4E7 -:1049800008950A2609F4A140A6958FEF811D811D87 -:10499000089597F99F6780E870E060E008959FEFC1 -:1049A00080EC089500240A941616170618060906C6 -:1049B000089500240A941216130614060506089595 -:1049C000092E0394000C11F4882352F0BB0F40F41D -:1049D000BF2B11F460FF04C06F5F7F4F8F4F9F4F5D -:1049E000089557FD9058440F551F59F05F3F71F0DF -:1049F0004795880F97FB991F61F09F3F79F0879546 -:104A00000895121613061406551FF2CF4695F1DFCE -:104A100008C0161617061806991FF1CF869571055E -:104A2000610508940895E894BB2766277727CB0192 -:104A300097F908950BD0C4CFB5DF28F0BADF18F08E -:104A4000952309F0A6CFABCF1124EECFCADFA0F398 -:104A5000959FD1F3950F50E0551F629FF001729F13 -:104A6000BB27F00DB11D639FAA27F00DB11DAA1F32 -:104A7000649F6627B00DA11D661F829F2227B00D7F -:104A8000A11D621F739FB00DA11D621F839FA00D0A -:104A9000611D221F749F3327A00D611D231F849F5A -:104AA000600D211D822F762F6A2F11249F575040B1 -:104AB0008AF0E1F088234AF0EE0FFF1FBB1F661F4C -:104AC000771F881F91505040A9F79E3F510570F005 -:104AD00060CFAACF5F3FECF3983EDCF386957795E5 -:104AE0006795B795F795E7959F5FC1F7FE2B880F00 -:104AF000911D9695879597F90895A1E21A2EAA1B04 -:104B0000BB1BFD010DC0AA1FBB1FEE1FFF1FA2177D -:104B1000B307E407F50720F0A21BB30BE40BF50B7A -:104B2000661F771F881F991F1A9469F76095709503 -:104B3000809590959B01AC01BD01CF010895EE0FCA -:104B4000FF1F0590F491E02D0994AA1BBB1B51E1B6 -:104B500007C0AA1FBB1FA617B70710F0A61BB70BED -:104B6000881F991F5A95A9F780959095BC01CD0192 -:104B700008952F923F924F925F926F927F928F9201 -:104B80009F92AF92BF92CF92DF92EF92FF920F93DC -:104B90001F93CF93DF93CDB7DEB7CA1BDB0B0FB6E6 -:104BA000F894DEBF0FBECDBF09942A8839884888A3 -:104BB0005F846E847D848C849B84AA84B984C88439 -:104BC000DF80EE80FD800C811B81AA81B981CE0F30 -:104BD000D11D0FB6F894DEBF0FBECDBFED01089515 -:044BE000F894FFCF77 -:104BE40054656D70657261747572652053656E737A -:104BF4006F7200312E30006661696C006F6B0000CB -:104C0400312E346231202831383834386132290069 -:104C140073656E736F72007265706561746572009E -:104C240030750000307500000100800009030000A9 -:104C34000000000012221C23B521D121C121EF2143 -:00000001FF diff --git a/NodeJsController/DallasTemperatureSensor/DallasTemperatureSensor.ino b/NodeJsController/DallasTemperatureSensor/DallasTemperatureSensor.ino deleted file mode 100644 index 3ac3888..0000000 --- a/NodeJsController/DallasTemperatureSensor/DallasTemperatureSensor.ino +++ /dev/null @@ -1,69 +0,0 @@ -// Example sketch showing how to send in OneWire temperature readings -#include -#include -#include -#include - -#define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected -#define MAX_ATTACHED_DS18B20 16 -unsigned long WAIT_TIME = 30000; // Wait for feedback from controller after sending and before going to sleep (in milliseconds) -unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) -OneWire oneWire(ONE_WIRE_BUS); -DallasTemperature sensors(&oneWire); -MySensor gw; -float lastTemperature[MAX_ATTACHED_DS18B20]; -int numSensors=0; -boolean receivedConfig = false; -boolean metric = true; -// Initialize temperature message -MyMessage msg(0,V_TEMP); - -void setup() -{ - // Startup OneWire - sensors.begin(); - - // Startup and initialize MySensors library. Set callback for incoming messages. - gw.begin(); - - // Send the sketch version information to the gateway and Controller - gw.sendSketchInfo("Temperature Sensor", "1.0"); - - // Fetch the number of attached temperature sensors - numSensors = sensors.getDeviceCount(); - - // Present all sensors to controller - for (int i=0; i(static_cast((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.; - - // Only send data if temperature has changed and no error - if (lastTemperature[i] != temperature && temperature != -127.00) { - - // Send in the new temperature - gw.send(msg.setSensor(i).set(temperature,1)); - lastTemperature[i]=temperature; - } - } - delay(WAIT_TIME); - gw.process(); - gw.sleep(SLEEP_TIME); -} - - diff --git a/NodeJsController/NodeJsController.js b/NodeJsController/NodeJsController.js index 6c52630..53639a2 100644 --- a/NodeJsController/NodeJsController.js +++ b/NodeJsController/NodeJsController.js @@ -11,8 +11,8 @@ const dbAddress = '127.0.0.1'; const dbPort = 27017; const dbName = 'MySensorsDb'; -const fwHexFiles = [ 'BlinkRed.hex', 'BlinkGreen.hex', 'DallasTemperatureSensor.cpp.hex' ]; -const fwDefaultType = 2; // index of hex file from array above +const fwHexFiles = [ ]; +const fwDefaultType = 0xFFFF; // index of hex file from array above (0xFFFF == none defined) const FIRMWARE_BLOCK_SIZE = 16; const BROADCAST_ADDRESS = 255; diff --git a/NodeJsController/Readme.html b/NodeJsController/Readme.md similarity index 91% rename from NodeJsController/Readme.html rename to NodeJsController/Readme.md index 6766851..98dee49 100644 --- a/NodeJsController/Readme.html +++ b/NodeJsController/Readme.md @@ -1,5 +1,4 @@

MySensors with NodeJS Controller and OTA bootloader on RPi

-

My RPi runs Arduino to compile and flash sketches and the bootloader. With this setup no separate PC/Mac is needed. Exactly the same could be achieved (faster) using a PC/Mac for all the Arduino compilation and flashing activities – just skip the steps and execute on PC/Mac instead.

Hardware

Headless Raspberry Pi model B with wired Ethernet

I'm connecting a monitor only for first time boot to get the IP address and then connect via Putty/xRDP

@@ -140,8 +139,6 @@ export PATH

  • git checkout development
  • cd NodeJsController
  • npm install -
  • nano NodeJsController.js (optional : removing sample firmwares) -

    const fwHexFiles = [ ];

  • to confirm that the NodeJsController is working as expected and connects to the local mongo DB: "node NodeJsController.js" which should start the controller, connect to the database and run into an error connecting to the gateway. Stop node again via Ctrl-c

    Start NodeJsController on boot

    @@ -215,7 +212,7 @@ Arduino RESET <-> Raspberry Pi GPIO22 (pin 15)

    //const gwType = 'Serial';
    //const gwPort = '/dev/ttyAMA0';
    //const gwBaud = 115200;

    -
  • sudo service mysensors restart +
  • sudo service mysensors restart (at this point stop/restart doesn't work. use "sudo killall node" followed by "sudo service mysensors start" instead)

    Ethernet Gateway

    @@ -262,7 +259,7 @@ IPAddress myIp (10, 0, 1, 99);

    • nano ~/Arduino/NodeJsController/NodeJsController.js

      const gwAddress = '10.0.1.99';

      -
    • sudo service mysensors restart +
    • sudo service mysensors restart (at this point stop/restart doesn't work. use "sudo killall node" followed by "sudo service mysensors start" instead)

    Sensor Node Bootloader

    @@ -291,12 +288,14 @@ ISP_MCU = m328p

    End-to-End Test

    -

    Add Firmware to Controller

    +

    Add Firmware to Controller (here: DallasTemperatureSensor)

      +
    • use Arduino IDE or codebender or whatever other way to compile your sketch +
    • copy the compiled DallasTemperatureSensor.cpp.hex file to the NodeJsController directory (if using the Arduino IDE, enable verbose logging in preferences and then watch the compilation process to find the temp directory where the output is stored)
    • nano ~/Arduino/NodeJsController/NodeJsController.js -

      const fwHexFiles = [ 'DallasTemperatureSensor.cpp.hex' ];
      -const fwDefaultType = 0;

      -
    • sudo service mysensors restart +

      const fwHexFiles = [ 'DallasTemperatureSensor.cpp.hex' ];
      +const fwDefaultType = 0;

      +
    • sudo service mysensors restart (at this point stop/restart doesn't work. use "sudo killall node" followed by "sudo service mysensors start" instead)

    Flash Firmware OTA

      @@ -305,5 +304,5 @@ const fwDefaultType = 0;

    Check functionality

      -
    • in addition to watching the log file (tail command above) you can connect to the mongo db using a client (e.g. Robomongo) and check if new values are written to the database as a real end-to-end test +
    • in addition to watching the log file (tail command above) you can connect to the mongo db using a client (e.g. Robomongo) and check if new values are written to the database as a real end-to-end test once the bootloader finished uploading the firmware
    From cd84e410fa2dd38acd4334840d38748cb695aeb2 Mon Sep 17 00:00:00 2001 From: ToSa27 Date: Mon, 25 Aug 2014 17:38:25 +0200 Subject: [PATCH 02/10] use codebender to compile sketches I had codebender username/password included originally but compiling works without. Codebender usage guidelines allow "usage via API". --- NodeJsController/NodeJsController.js | 179 +++++++++++++++------------ NodeJsController/package.json | 1 + 2 files changed, 103 insertions(+), 77 deletions(-) diff --git a/NodeJsController/NodeJsController.js b/NodeJsController/NodeJsController.js index 53639a2..fbe1470 100644 --- a/NodeJsController/NodeJsController.js +++ b/NodeJsController/NodeJsController.js @@ -1,18 +1,18 @@ -const gwType = 'Ethernet'; -const gwAddress = '10.0.1.99'; -const gwPort = 9999; +//const gwType = 'Ethernet'; +//const gwAddress = '10.0.1.99'; +//const gwPort = 9999; -//const gwType = 'Serial'; +const gwType = 'Serial'; //const gwPort = 'COM4'; -//const gwPort = '/dev/ttyUSB0'; -//const gwBaud = 115200; +const gwPort = '/dev/ttyAMA0'; +const gwBaud = 115200; const dbAddress = '127.0.0.1'; const dbPort = 27017; const dbName = 'MySensorsDb'; -const fwHexFiles = [ ]; -const fwDefaultType = 0xFFFF; // index of hex file from array above (0xFFFF == none defined) +const fwSketches = [ '../libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino' ]; +const fwDefaultType = 0; // index of hex file from array above const FIRMWARE_BLOCK_SIZE = 16; const BROADCAST_ADDRESS = 255; @@ -117,6 +117,8 @@ const P_ULONG32 = 5; const P_CUSTOM = 6; var fs = require('fs'); +var path = require('path'); +var requestify = require('requestify'); var appendedString=""; function crcUpdate(old, value) { @@ -146,76 +148,99 @@ function pushDWord(arr, val) { arr.push((val >> 24) & 0x000000FF); } -function loadFirmware(fwtype, fwversion, filename, db) { - console.log("loading firmware: " + filename); - fwdata = []; - var start = 0; - var end = 0; - var pos = 0; - var hex = fs.readFileSync(filename).toString().split("\n"); - for(l in hex) { - line = hex[l].trim(); - if (line.length > 0) { - while (line.substring(0, 1) != ":") - line = line.substring(1); - var reclen = parseInt(line.substring(1, 3), 16); - var offset = parseInt(line.substring(3, 7), 16); - var rectype = parseInt(line.substring(7, 9), 16); - var data = line.substring(9, 9 + 2 * reclen); - var chksum = parseInt(line.substring(9 + (2 * reclen), 9 + (2 * reclen) + 2), 16); - if (rectype == 0) { - if ((start == 0) && (end == 0)) { - if (offset % 128 > 0) - throw new Error("error loading hex file - offset can't be devided by 128"); - start = offset; - end = offset; +function loadFirmware(fwtype, fwversion, sketch, db) { + var filename = path.basename(sketch); + console.log("compiling firmware: " + filename); + var req = { + files: [{ + filename: filename, + content: fs.readFileSync(sketch).toString() + }], + format: "hex", + version: "105", + build: { + mcu: "atmega328p", + f_cpu: "16000000L", + core: "arduino", + variant: "standard" + } + }; + requestify.post('https://codebender.cc/utilities/compile/', req).then(function(res) { + var body = JSON.parse(res.getBody()); + if (body.success) { + console.log("loading firmware: " + filename); + fwdata = []; + var start = 0; + var end = 0; + var pos = 0; + var hex = body.output.split("\n"); + for(l in hex) { + line = hex[l].trim(); + if (line.length > 0) { + while (line.substring(0, 1) != ":") + line = line.substring(1); + var reclen = parseInt(line.substring(1, 3), 16); + var offset = parseInt(line.substring(3, 7), 16); + var rectype = parseInt(line.substring(7, 9), 16); + var data = line.substring(9, 9 + 2 * reclen); + var chksum = parseInt(line.substring(9 + (2 * reclen), 9 + (2 * reclen) + 2), 16); + if (rectype == 0) { + if ((start == 0) && (end == 0)) { + if (offset % 128 > 0) + throw new Error("error loading hex file - offset can't be devided by 128"); + start = offset; + end = offset; + } + if (offset < end) + throw new Error("error loading hex file - offset lower than end"); + while (offset > end) { + fwdata.push(255); + pos++; + end++; + } + for (var i = 0; i < reclen; i++) { + fwdata.push(parseInt(data.substring(i * 2, (i * 2) + 2), 16)); + pos++; + } + end += reclen; + } } - if (offset < end) - throw new Error("error loading hex file - offset lower than end"); - while (offset > end) { - fwdata.push(255); - pos++; - end++; - } - for (var i = 0; i < reclen; i++) { - fwdata.push(parseInt(data.substring(i * 2, (i * 2) + 2), 16)); - pos++; - } - end += reclen; + } + var pad = end % 128; // ATMega328 has 64 words per page / 128 bytes per page + for (var i = 0; i < 128 - pad; i++) { + fwdata.push(255); + pos++; + end++; } - } - } - var pad = end % 128; // ATMega328 has 64 words per page / 128 bytes per page - for (var i = 0; i < 128 - pad; i++) { - fwdata.push(255); - pos++; - end++; - } - var blocks = (end - start) / FIRMWARE_BLOCK_SIZE; - var crc = 0xFFFF; - for (var i = 0; i < blocks * FIRMWARE_BLOCK_SIZE; ++i) { - var v = crc; - crc = crcUpdate(crc, fwdata[i]); - } - db.collection('firmware', function(err, c) { - c.update({ - 'type': fwtype, - 'version': fwversion - }, { - $set: { - 'filename': filename, - 'blocks': blocks, - 'crc': crc, - 'data': fwdata + var blocks = (end - start) / FIRMWARE_BLOCK_SIZE; + var crc = 0xFFFF; + for (var i = 0; i < blocks * FIRMWARE_BLOCK_SIZE; ++i) { + var v = crc; + crc = crcUpdate(crc, fwdata[i]); } - }, { - upsert: true - }, function(err, result) { - if (err) - console.log('Error writing firmware to database'); - }); - }); - console.log("loading firmware done. blocks: " + blocks + " / crc: " + crc); + db.collection('firmware', function(err, c) { + c.update({ + 'type': fwtype, + 'version': fwversion + }, { + $set: { + 'filename': filename, + 'blocks': blocks, + 'crc': crc, + 'data': fwdata + } + }, { + upsert: true + }, function(err, result) { + if (err) + console.log('Error writing firmware to database'); + }); + }); + console.log("loading firmware done. blocks: " + blocks + " / crc: " + crc); + } else { + console.log("error: %j", res.body); + } + }); } /* @@ -645,8 +670,8 @@ dbc.connect('mongodb://' + dbAddress + ':' + dbPort + '/' + dbName, function(err db.createCollection('firmware', function(err, collection) { }); // ToDo : check for new hex files / only load if new / get type and version from filename - for (var i = 0; i < fwHexFiles.length; i++) - loadFirmware(i, 1, fwHexFiles[i], db); + for (var i = 0; i < fwSketches.length; i++) + loadFirmware(i, 1, fwSketches[i], db); var gw; if (gwType == 'Ethernet') { diff --git a/NodeJsController/package.json b/NodeJsController/package.json index a4866a6..eaffa4a 100644 --- a/NodeJsController/package.json +++ b/NodeJsController/package.json @@ -5,6 +5,7 @@ "dependencies": { "mongodb": "~1.4.7", "net": "~1.0.2", + "requestify": "^0.1.16", "serialport": "^1.4.5" } } From 1dbe7497bdfb47e043402ae77036f9df26de5732 Mon Sep 17 00:00:00 2001 From: ToSa27 Date: Mon, 25 Aug 2014 18:34:51 +0200 Subject: [PATCH 03/10] Added technical details for controller developers regarding OTA bootloader --- Bootloader/Readme.md | 48 +++++++++++++++++++++++++++- NodeJsController/NodeJsController.js | 4 +-- NodeJsController/Readme.md | 4 +-- 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/Bootloader/Readme.md b/Bootloader/Readme.md index 810b16a..b6d7e33 100644 --- a/Bootloader/Readme.md +++ b/Bootloader/Readme.md @@ -1 +1,47 @@ -See NodeJsController/Readme.md for usage instructions... \ No newline at end of file +See NodeJsController/Readme.md for usage instructions... + +

    Technical details to write your own controller

    +All initialization the bootloader does (finding parent / requesting nodeId on first start) uses the same packets as a normal MySensors sketch. There is no need for the controller to distinguish between packets from the bootloader and packets from normal sketch execution. The controller only needs to care about two additional request/response communications. All communication is binary. +

    FirmwareConfig

    +
      +
    • the bootloader sends a FirmwareConfigRequest packet to the gateway to request information about the firmware it should execute: +

      +typedef struct
      +{
      + uint16_t type;
      + uint16_t version;
      +} FirmwareConfigRequest; +

      +
    • the gateway (the controller) responds with a FirmwareConfigResponse including details about the firmware the sensor should execute: +

      +typedef struct
      +{
      + uint16_t type;
      + uint16_t version;
      + uint16_t blocks;
      + uint16_t crc;
      +} FirmwareConfigResponse; +

      +
    +

    Firmware

    +
      +
    • the bootloader sends a FirmwareRequest packet to the gateway to request a specific subset (block) of the compiled firmware: +

      +typedef struct
      +{
      + uint16_t type;
      + uint16_t version;
      + uint16_t block;
      +} FirmwareRequest; +

      +
    • the gateway (the controller) responds with a FirmwareResponse including the specific block of the compiled firmware: +
    +

    +typedef struct
    +{
    + uint16_t type;
    + uint16_t version;
    + uint16_t block;
    + uint8_t data[FIRMWARE_BLOCK_SIZE];
    +} FirmwareResponse; +

    diff --git a/NodeJsController/NodeJsController.js b/NodeJsController/NodeJsController.js index fbe1470..8bb67da 100644 --- a/NodeJsController/NodeJsController.js +++ b/NodeJsController/NodeJsController.js @@ -11,8 +11,8 @@ const dbAddress = '127.0.0.1'; const dbPort = 27017; const dbName = 'MySensorsDb'; -const fwSketches = [ '../libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino' ]; -const fwDefaultType = 0; // index of hex file from array above +const fwSketches = [ ]; +const fwDefaultType = 0xFFFF; // index of hex file from array above (0xFFFF const FIRMWARE_BLOCK_SIZE = 16; const BROADCAST_ADDRESS = 255; diff --git a/NodeJsController/Readme.md b/NodeJsController/Readme.md index 98dee49..d8b364b 100644 --- a/NodeJsController/Readme.md +++ b/NodeJsController/Readme.md @@ -290,10 +290,8 @@ ISP_MCU = m328p

    End-to-End Test

    Add Firmware to Controller (here: DallasTemperatureSensor)

      -
    • use Arduino IDE or codebender or whatever other way to compile your sketch -
    • copy the compiled DallasTemperatureSensor.cpp.hex file to the NodeJsController directory (if using the Arduino IDE, enable verbose logging in preferences and then watch the compilation process to find the temp directory where the output is stored)
    • nano ~/Arduino/NodeJsController/NodeJsController.js -

      const fwHexFiles = [ 'DallasTemperatureSensor.cpp.hex' ];
      +

      const fwHexFiles = [ '../libraries/MySensors/examples/DallasTemperatureSensor/DallasTemperatureSensor.ino' ];
      const fwDefaultType = 0;

    • sudo service mysensors restart (at this point stop/restart doesn't work. use "sudo killall node" followed by "sudo service mysensors start" instead)
    From 724567e295236436fb84e55f6adfc486c6360072 Mon Sep 17 00:00:00 2001 From: Daniel Wiegert Date: Wed, 27 Aug 2014 15:24:04 +0200 Subject: [PATCH 04/10] Bugfixes and rewrite parts of code --- libraries/MySensors/MyMQTT.cpp | 364 +++++++++--------- libraries/MySensors/MyMQTT.h | 29 +- .../examples/MQTTGateway/MQTTGateway.ino | 79 ++-- 3 files changed, 215 insertions(+), 257 deletions(-) mode change 100644 => 100755 libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino diff --git a/libraries/MySensors/MyMQTT.cpp b/libraries/MySensors/MyMQTT.cpp index 0884906..2ab42b5 100755 --- a/libraries/MySensors/MyMQTT.cpp +++ b/libraries/MySensors/MyMQTT.cpp @@ -12,71 +12,89 @@ version 2 as published by the Free Software Foundation. #include "MyMQTT.h" #include "utility/MsTimer2.h" +char V_0[] PROGMEM = "TEMP"; //V_TEMP +char V_1[] PROGMEM = "HUM"; //V_HUM +char V_2[] PROGMEM = "LIGHT"; //V_LIGHT +char V_3[] PROGMEM = "DIMMER"; //V_DIMMER +char V_4[] PROGMEM = "PRESSURE"; //V_PRESSURE +char V_5[] PROGMEM = "FORECAST"; //V_FORECAST +char V_6[] PROGMEM = "RAIN"; //V_RAIN +char V_7[] PROGMEM = "RAINRATE"; //V_RAINRATE +char V_8[] PROGMEM = "WIND"; //V_WIND +char V_9[] PROGMEM = "GUST"; //V_GUST +char V_10[] PROGMEM = "DIRECTON"; //V_DIRECTON +char V_11[] PROGMEM = "UV"; //V_UV +char V_12[] PROGMEM = "WEIGHT"; //V_WEIGHT +char V_13[] PROGMEM = "DISTANCE"; //V_DISTANCE +char V_14[] PROGMEM = "IMPEDANCE"; //V_IMPEDANCE +char V_15[] PROGMEM = "ARMED"; //V_ARMED +char V_16[] PROGMEM = "TRIPPED"; //V_TRIPPED +char V_17[] PROGMEM = "WATT"; //V_WATT +char V_18[] PROGMEM = "KWH"; //V_KWH +char V_19[] PROGMEM = "SCENE_ON"; //V_SCENE_ON +char V_20[] PROGMEM = "SCENE_OFF"; //V_SCENE_OFF +char V_21[] PROGMEM = "HEATER"; //V_HEATER +char V_22[] PROGMEM = "HEATER_SW"; //V_HEATER_SW +char V_23[] PROGMEM = "LIGHT_LEVEL"; //V_LIGHT_LEVEL +char V_24[] PROGMEM = "VAR1"; //V_VAR1 +char V_25[] PROGMEM = "VAR2"; //V_VAR2 +char V_26[] PROGMEM = "VAR3"; //V_VAR3 +char V_27[] PROGMEM = "VAR4"; //V_VAR4 +char V_28[] PROGMEM = "VAR5"; //V_VAR5 +char V_29[] PROGMEM = "UP"; //V_UP +char V_30[] PROGMEM = "DOWN"; //V_DOWN +char V_31[] PROGMEM = "STOP"; //V_STOP +char V_32[] PROGMEM = "IR_SEND"; //V_IR_SEND +char V_33[] PROGMEM = "IR_RECEIVE"; //V_IR_RECEIVE +char V_34[] PROGMEM = "FLOW"; //V_FLOW +char V_35[] PROGMEM = "VOLUME"; //V_VOLUME +char V_36[] PROGMEM = "LOCK_STATUS"; //V_LOCK_STATUS +char V_37[] PROGMEM = "DUST_LEVEL"; //V_DUST_LEVEL +char V_38[] PROGMEM = "VOLTAGE"; //V_VOLTAGE +char V_39[] PROGMEM = "CURRENT"; //V_CURRENT +char V_40[] PROGMEM = ""; // +char V_41[] PROGMEM = ""; // +char V_42[] PROGMEM = ""; // +char V_43[] PROGMEM = ""; // +char V_44[] PROGMEM = ""; // +char V_45[] PROGMEM = ""; // +char V_46[] PROGMEM = ""; // +char V_47[] PROGMEM = ""; // +char V_48[] PROGMEM = ""; // +char V_49[] PROGMEM = ""; // +char V_50[] PROGMEM = ""; // +char V_51[] PROGMEM = ""; // +char V_52[] PROGMEM = ""; // +char V_53[] PROGMEM = ""; // +char V_54[] PROGMEM = ""; // +char V_55[] PROGMEM = ""; // +char V_56[] PROGMEM = ""; // +char V_57[] PROGMEM = ""; // +char V_58[] PROGMEM = ""; // +char V_59[] PROGMEM = ""; // +char V_60[] PROGMEM = "Started!\n"; //Custom for MQTTGateway +char V_61[] PROGMEM = "SKETCH_NAME"; //Custom for MQTTGateway +char V_62[] PROGMEM = "SKETCH_VERSION"; //Custom for MQTTGateway +char V_63[] PROGMEM = "UNKNOWN"; //Custom for MQTTGateway + +////////////////////////////////////////////////////////////////// + +PROGMEM const char *vType[] = { + V_0, V_1, V_2, V_3, V_4, V_5, V_6, V_7, V_8, V_9, V_10, + V_11, V_12, V_13, V_14, V_15, V_16, V_17, V_18, V_19, V_20, + V_21, V_22, V_23, V_24, V_25, V_26, V_27, V_28, V_29, V_30, + V_31, V_32, V_33, V_34, V_35, V_36, V_37, V_38, V_39, V_40, + V_41, V_42, V_43, V_44, V_45, V_46, V_47, V_48, V_49, V_50, + V_51, V_52, V_53, V_54, V_55, V_56, V_57, V_58, V_59, V_60, + V_61, V_62, V_63 +}; char broker[] PROGMEM = MQTT_BROKER_PREFIX; -char S_0[] PROGMEM = "Temperature"; //V_TEMP -char S_1[] PROGMEM = "Humidity"; //V_HUM -char S_2[] PROGMEM = "Light"; //V_LIGHT -char S_3[] PROGMEM = "Dimmer"; //V_DIMMER -char S_4[] PROGMEM = "Pressure"; //V_PRESSURE -char S_5[] PROGMEM = "Forecast"; //V_FORECAST -char S_6[] PROGMEM = "Rain"; //V_RAIN -char S_7[] PROGMEM = "Rainrate"; //V_RAINRATE -char S_8[] PROGMEM = "Wind"; //V_WIND -char S_9[] PROGMEM = "Gust"; //V_GUST -char S_10[] PROGMEM = "Direction"; //V_DIRECTION -char S_11[] PROGMEM = "UV"; //V_UV -char S_12[] PROGMEM = "Weight"; //V_WEIGHT -char S_13[] PROGMEM = "Distance"; //V_DISTANCE -char S_14[] PROGMEM = "Impedance"; //V_IMPEDANCE -char S_15[] PROGMEM = "Armed"; //V_ARMED -char S_16[] PROGMEM = "Tripped"; //V_TRIPPED -char S_17[] PROGMEM = "Watt"; //V_WATT -char S_18[] PROGMEM = "KWH"; //V_KWH -char S_19[] PROGMEM = "Scene_ON"; //V_SCENE_ON -char S_20[] PROGMEM = "Scene_OFF"; //V_SCENE_OFF -char S_21[] PROGMEM = "Heater"; //V_HEATER -char S_22[] PROGMEM = "Heater_SW"; //V_HEATER_SW -char S_23[] PROGMEM = "LightLevel"; //V_LIGHT_LEVEL -char S_24[] PROGMEM = "Var1"; //V_VAR1 -char S_25[] PROGMEM = "Var2"; //V_VAR2 -char S_26[] PROGMEM = "Var3"; //V_VAR3 -char S_27[] PROGMEM = "Var4"; //V_VAR4 -char S_28[] PROGMEM = "Var5,"; //V_VAR5 -char S_29[] PROGMEM = "Up"; //V_UP -char S_30[] PROGMEM = "Down"; //V_DOWN -char S_31[] PROGMEM = "Stop"; //V_STOP -char S_32[] PROGMEM = "IR_Send"; //V_IR_SEND -char S_33[] PROGMEM = "IR_Receive"; //V_IR_RECEIVE -char S_34[] PROGMEM = "Flow"; //V_FLOW -char S_35[] PROGMEM = "Volume"; //V_VOLUME -char S_36[] PROGMEM = "Lock_Status";//V_LOCK_STATUS -char S_37[] PROGMEM = "DustLevel"; //V_DUST_LEVEL -char S_38[] PROGMEM = ""; -char S_39[] PROGMEM = ""; -char S_40[] PROGMEM = ""; -char S_41[] PROGMEM = ""; -char S_42[] PROGMEM = ""; -char S_43[] PROGMEM = ""; -char S_44[] PROGMEM = ""; -char S_45[] PROGMEM = "Volt_Batt"; // Does not exist in MyMessage.h! -char S_46[] PROGMEM = ""; -char S_47[] PROGMEM = ""; -char S_48[] PROGMEM = ""; -char S_49[] PROGMEM = "Sketch_name"; // Does not exist in MyMessage.h! -char S_50[] PROGMEM = "Sketch_version"; // Does not exist in MyMessage.h! - - -PROGMEM const char *sType[] = { - S_0, S_1, S_2, S_3, S_4, S_5, S_6, S_7, S_8, S_9, S_10, - S_11, S_12, S_13, S_14, S_15, S_16, S_17, S_18, S_19, S_20, - S_21, S_22, S_23, S_24, S_25, S_26, S_27, S_28, S_29, S_30, - S_31, S_32, S_33, S_34, S_35, S_36, S_37, S_38, S_39, S_40, - S_41, S_42, S_43, S_44, S_45, S_46, S_47, S_48, S_49, S_50 -}; - +#define S_FIRSTCUSTOM 60 +#define TYPEMAXLEN 20 +#define V_TOTAL (sizeof(vType)/sizeof(char *))-1 extern volatile uint8_t countRx; extern volatile uint8_t countTx; @@ -90,11 +108,32 @@ MySensor(_cepin, _cspin) { } -void MyMQTT::begin(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataRate, void (*inDataCallback)(const char *, int *), uint8_t _rx, uint8_t _tx, uint8_t _er) { +inline MyMessage& build (MyMessage &msg, uint8_t sender, uint8_t destination, uint8_t sensor, uint8_t command, uint8_t type, bool enableAck) { + msg.destination = destination; + msg.sender = sender; + msg.sensor = sensor; + msg.type = type; + mSetCommand(msg,command); + mSetRequestAck(msg,enableAck); + mSetAck(msg,false); + return msg; +} + +char *getType(char *b, const char **index) { + char *q = b; + char *p = (char *)pgm_read_ptr(index); + while (*q++ = pgm_read_byte(p++)); + *q=0; + return b; +} + +void MyMQTT::begin(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataRate, void (*inDataCallback) + (const char *, uint8_t *), uint8_t _rx, uint8_t _tx, uint8_t _er) { Serial.begin(BAUD_RATE); repeaterMode = true; isGateway = true; MQTTClientConnected = false; + setupRepeaterMode(); dataCallback = inDataCallback; @@ -117,10 +156,7 @@ void MyMQTT::begin(rf24_pa_dbm_e paLevel, uint8_t channel, rf24_datarate_e dataR MsTimer2::set(200, ledTimersInterrupt); MsTimer2::start(); - - // Send startup log message on serial - //Serial.print(PSTR("Started\n"));//TODO: progmem gives error..? error: sType causes a section type conflict with __c - Serial.print("Started\n");//TODO: fix this... + Serial.print(getType(convBuf, &vType[S_FIRSTCUSTOM])); } void MyMQTT::processRadioMessage() { @@ -134,104 +170,97 @@ void MyMQTT::processRadioMessage() { } -void MyMQTT::processMQTTMessage(char *inputString, int inputPos) { +void MyMQTT::processMQTTMessage(char *inputString, uint8_t inputPos) { char *str, *p; - char i = 0; + uint8_t i = 0; buffer[0]= 0; buffsize = 0; -#ifdef TCPDUMP - Serial.print("<<"); - char buf[4]; - for (int a=0; a> 4 == MQTTCONNECT) { + + if ((uint8_t)inputString[0] >> 4 == MQTTCONNECT) { buffer[buffsize++] = MQTTCONNACK << 4; - buffer[buffsize++] = 0x02; // Remaining length - buffer[buffsize++] = 0x00; // Connection accepted - buffer[buffsize++] = 0x00; // Reserved - MQTTClientConnected=true; + buffer[buffsize++] = 0x02; // Remaining length + buffer[buffsize++] = 0x00; // Connection accepted + buffer[buffsize++] = 0x00; // Reserved + MQTTClientConnected=true; // We have connection! } - if ((byte)inputString[0] >> 4 == MQTTPINGREQ) { + if ((uint8_t)inputString[0] >> 4 == MQTTPINGREQ) { buffer[buffsize++] = MQTTPINGRESP << 4; buffer[buffsize++] = 0x00; } - if ((byte)inputString[0] >> 4 == MQTTSUBSCRIBE) { - buffer[buffsize++] = MQTTSUBACK << 4; // Just ack everything, we actually dont really care! - buffer[buffsize++] = 0x03; // Remaining length - buffer[buffsize++] = (byte)inputString[2]; // Message ID MSB - buffer[buffsize++] = (byte)inputString[3]; // Message ID LSB - buffer[buffsize++] = MQTTQOS0; // QOS level + if ((uint8_t)inputString[0] >> 4 == MQTTSUBSCRIBE) { + buffer[buffsize++] = MQTTSUBACK << 4; // Just ack everything, we actually dont really care! + buffer[buffsize++] = 0x03; // Remaining length + buffer[buffsize++] = (uint8_t)inputString[2]; // Message ID MSB + buffer[buffsize++] = (uint8_t)inputString[3]; // Message ID LSB + buffer[buffsize++] = MQTTQOS0; // QOS level } - if ((byte)inputString[0] >> 4 == MQTTUNSUBSCRIBE) { + if ((uint8_t)inputString[0] >> 4 == MQTTUNSUBSCRIBE) { buffer[buffsize++] = MQTTUNSUBACK << 4; - buffer[buffsize++] = 0x02; // Remaining length - buffer[buffsize++] = (byte)inputString[2]; // Message ID MSB - buffer[buffsize++] = (byte)inputString[3]; // Message ID LSB + buffer[buffsize++] = 0x02; // Remaining length + buffer[buffsize++] = (uint8_t)inputString[2]; // Message ID MSB + buffer[buffsize++] = (uint8_t)inputString[3]; // Message ID LSB } - if ((byte)inputString[0] >> 4 == MQTTDISCONNECT) { - MQTTClientConnected=false; + if ((uint8_t)inputString[0] >> 4 == MQTTDISCONNECT) { + MQTTClientConnected=false; // We lost connection! } if (buffsize > 0) { -#ifdef TCPDUMP - Serial.print(">>"); - char buf[4]; - for (int a=0; a> 4 == MQTTPUBLISH || (MQTT_SEND_SUBSCRIPTION && (byte)inputString[0] >> 4 == MQTTSUBSCRIBE)) { + if ((uint8_t)inputString[0] >> 4 == MQTTPUBLISH || (MQTT_SEND_SUBSCRIPTION && (uint8_t)inputString[0] >> 4 == MQTTSUBSCRIBE)) { buffer[0]= 0; buffsize = 0; - if ((byte)inputString[0] >> 4 == MQTTSUBSCRIBE) { + // Cut out address and payload depending on message type. + if ((uint8_t)inputString[0] >> 4 == MQTTSUBSCRIBE) { strncat(buffer,inputString+6,inputString[5]); } else { strncat(buffer,inputString+4,inputString[3]); } - msg.sender = GATEWAY_ADDRESS; - for (str = strtok_r(buffer,"/",&p) ; str && i<4 ; str = strtok_r(NULL,"/",&p)) { //split using semicolon - // TODO: Check if we should send ack or not. + + // TODO: Check if we should send ack or not. + for (str = strtok_r(buffer,"/",&p) ; str && i<4 ; str = strtok_r(NULL,"/",&p)) { if (i == 0) { - if (strcmp_P(str,broker)!=0) { - return; //Message not for us or malformatted! + if (strcmp_P(str,broker)!=0) { //look for MQTT_BROKER_PREFIX + return; //Message not for us or malformatted! } } else if (i==1) { - msg.destination = atoi(str); + msg.destination = atoi(str); //NodeID } else if (i==2) { - msg.sensor = atoi(str); + msg.sensor = atoi(str); //SensorID } else if (i==3) { - char match=0; - for (int j=0; strcpy_P(convBuf, (char*)pgm_read_word(&(sType[j]))) ; j++) { - if (strcmp(str,convBuf)==0) { + char match=0; //SensorType + //strcpy(str,(char*)&str[2]); //Strip V_ + + for (uint8_t j=0; strcpy_P(convBuf, (char*)pgm_read_word(&(vType[j]))) ; j++) { + if (strcmp((char*)&str[2],convBuf)==0) { //Strip V_ and compare match=j; break; } + if (j >= V_TOTAL) { // No match found! + match=V_TOTAL; // last item. + break; + } } msg.type = match; } i++; - } - if ((char)inputString[1] > (char)(inputString[3]+2) && !((byte)inputString[0] >> 4 == MQTTSUBSCRIBE)) { + } //Check if packge has payload + if ((uint8_t)inputString[1] > (uint8_t)(inputString[3]+2) && !((uint8_t)inputString[0] >> 4 == MQTTSUBSCRIBE)) { strcpy(convBuf,inputString+(inputString[3]+4)); - msg.set(convBuf); + msg.set(convBuf); //Payload } else { - msg.set(""); + msg.set(""); //No payload } - msg.sender = GATEWAY_ADDRESS; - mSetCommand(msg,C_SET); - mSetRequestAck(msg,false); - mSetAck(msg,false); - mSetVersion(msg, PROTOCOL_VERSION); txBlink(1); - if (!sendRoute(msg)) errBlink(1); + if (!sendRoute(build(msg, GATEWAY_ADDRESS, msg.destination, msg.sensor, C_SET, msg.type, 0))) errBlink(1); + } } - void MyMQTT::SendMQTT(MyMessage &msg) { - //serial(PSTR("%d;%d;%d;%d;%s\n"),msg.sender, msg.sensor, mGetCommand(msg), msg.type, msg.getString(convBuf)); buffsize = 0; - if (!MQTTClientConnected) return; + if (!MQTTClientConnected) return; //We have no connections - return if (msg.isAck()) { Serial.println("msg is ack!"); if (msg.sender==255 && mGetCommand(msg)==C_INTERNAL && msg.type==I_ID_REQUEST) { @@ -246,95 +275,52 @@ void MyMQTT::SendMQTT(MyMessage &msg) { if (msg.sender==newNodeID) { saveState(EEPROM_LATEST_NODE_ADDRESS,newNodeID); } - if (mGetCommand(msg)==C_INTERNAL && msg.type==I_CONFIG) { // CONFIG - // As for now there is only one 'config' request. - // We force SI! Resistance is futile! - // - // Todo : Support for more config types, Maybe just read from own EEPROM? - // Use internal EEPROM_CONTROLLER_CONFIG_ADDRESS and special MQTT address to write to - // EEPROM_CONTROLLER_CONFIG_ADDRESS & EEPROM_LOCAL_CONFIG_ADDRESS - msg.destination = msg.sender; //NodeID - msg.sender = GATEWAY_ADDRESS; - msg.sensor = 255; //SensorID - msg.type = I_CONFIG; //msgType - mSetCommand(msg,C_INTERNAL);//Subtype - mSetRequestAck(msg,false); - mSetAck(msg,false); - msg.set("M"); - mSetVersion(msg, PROTOCOL_VERSION); - txBlink(1); - if (!sendRoute(msg)) errBlink(1); - } else if (mGetCommand(msg)==C_PRESENTATION && (msg.type==S_ARDUINO_NODE || msg.type==S_ARDUINO_REPEATER_NODE)) { - //Doesnt work to check new sensorID here, this message does not always arrive.. See above. - } else if (msg.sender==255 && mGetCommand(msg)==C_INTERNAL && msg.type==I_ID_REQUEST) { - unsigned char newNodeID = loadState(EEPROM_LATEST_NODE_ADDRESS)+1; - if (newNodeID <= MQTT_FIRST_SENSORID) newNodeID = MQTT_FIRST_SENSORID; - if (newNodeID >= MQTT_LAST_SENSORID) return; // Sorry no more id's left :( - msg.destination = msg.sender; //NodeID - msg.sender = GATEWAY_ADDRESS; - msg.sensor = 255; //SensorID - msg.type = I_ID_RESPONSE; //MsgType - mSetCommand(msg,C_INTERNAL); //Subtype - mSetRequestAck(msg,false); //Request ack doesn't work, node/gateway gets stuck in enless loop. - mSetAck(msg,false); - msg.set((uint8_t)newNodeID); //Payload - mSetVersion(msg, PROTOCOL_VERSION); - txBlink(1); - if (!sendRoute(msg)) errBlink(1); - // if (sendRoute(msg)) saveState(EEPROM_LATEST_NODE_ADDRESS,newNodeID); // If send OK save to eeprom. DOES NOT ALWAYS RETURN 'OK'!? + if (mGetCommand(msg)==C_INTERNAL) { + if (msg.type==I_CONFIG) { + txBlink(1); + if (!sendRoute(build(msg, GATEWAY_ADDRESS, msg.sender, 255, C_INTERNAL, I_CONFIG, 0).set("M"))) errBlink(1); + } else if (msg.type==I_ID_REQUEST && msg.sender==255) { + uint8_t newNodeID = loadState(EEPROM_LATEST_NODE_ADDRESS)+1; + if (newNodeID <= MQTT_FIRST_SENSORID) newNodeID = MQTT_FIRST_SENSORID; + if (newNodeID >= MQTT_LAST_SENSORID) return; // Sorry no more id's left :( + txBlink(1); + if (!sendRoute(build(msg, GATEWAY_ADDRESS, msg.sender, 255, C_INTERNAL, I_ID_RESPONSE, 0).set(newNodeID))) errBlink(1); + } } else if (mGetCommand(msg)!=0) { - if (mGetCommand(msg)==3) msg.type=msg.type+38; - buffer[buffsize++] = MQTTPUBLISH << 4; // 0: - buffer[buffsize++] = 0x09; // 1: Remaining length with no payload, we'll set this later to correct value, buffsize -2 - buffer[buffsize++] = 0x00; // 2: Length MSB (Remaing length can never exceed ff,so MSB must be 0!) - buffer[buffsize++] = 0x08; // 3: Length LSB (ADDR), We'll set this later + if (mGetCommand(msg)==3) msg.type=msg.type+(S_FIRSTCUSTOM-10); //Special message + + buffer[buffsize++] = MQTTPUBLISH << 4; // 0: + buffer[buffsize++] = 0x09; // 1: Remaining length with no payload, we'll set this later to correct value, buffsize -2 + buffer[buffsize++] = 0x00; // 2: Length MSB (Remaing length can never exceed ff,so MSB must be 0!) + buffer[buffsize++] = 0x08; // 3: Length LSB (ADDR), We'll set this later + if (msg.type > V_TOTAL) msg.type=V_TOTAL;// If type > defined types set to unknown. strcpy_P(buffer+4, broker); buffsize+=strlen_P(broker); - buffsize+=sprintf(&buffer[buffsize],"/%i/%i/",msg.sender,msg.sensor); - buffsize+=strncpysType_retL(buffer,msg.type,buffsize); - buffer[3]=buffsize-4; // Set correct address length on byte 4. + buffsize+=sprintf(&buffer[buffsize],"/%i/%i/V_%s",msg.sender,msg.sensor,getType(convBuf, &vType[msg.type])); + buffer[3]=buffsize-4; // Set correct address length on byte 4. #ifdef DEBUG Serial.println((char*)&buffer[4]); #endif msg.getString(convBuf); - for (unsigned int a=0; a>"); - char buf[4]; - for (int a=0; a0) otherwise the code might do strange things. -/////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////// #define EEPROM_LATEST_NODE_ADDRESS ((uint8_t)EEPROM_LOCAL_CONFIG_ADDRESS) #define MQTT_MAX_PACKET_SIZE 100 @@ -56,29 +55,27 @@ version 2 as published by the Free Software Foundation. class MyMQTT : public MySensor { + public: MyMQTT(uint8_t _cepin=5, uint8_t _cspin=6); - void begin(rf24_pa_dbm_e paLevel=RF24_PA_LEVEL_GW, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE, void (*dataCallback)(const char *, int *)=NULL, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4 ); + void begin(rf24_pa_dbm_e paLevel=RF24_PA_LEVEL_GW, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE, void (*dataCallback) + (const char *, uint8_t *)=NULL, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4 ); void processRadioMessage(); - void processMQTTMessage(char *inputString, int inputPos); + void processMQTTMessage(char *inputString, uint8_t inputPos); private: - bool MQTTClientConnected; - char buffer[MQTT_MAX_PACKET_SIZE]; - int buffsize; - char convBuf[MAX_PAYLOAD*2+1]; - boolean useWriteCallback; - void (*dataCallback)(const char *, int *); + void (*dataCallback)(const char *, uint8_t *); void SendMQTT(MyMessage &msg); - char strncpysType_retL(char *str, unsigned char index, char start); - - void ledTimers(); void rxBlink(uint8_t cnt); void txBlink(uint8_t cnt); void errBlink(uint8_t cnt); + + bool MQTTClientConnected; + char buffer[MQTT_MAX_PACKET_SIZE]; + char convBuf[MAX_PAYLOAD*2+1]; + uint8_t buffsize; }; extern void ledTimersInterrupt(); - #endif diff --git a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino old mode 100644 new mode 100755 index 3cb651a..29f6551 --- a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino +++ b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino @@ -31,18 +31,19 @@ This will listen on your selected TCP_IP:TCP_PORT below, Please change TCP_MAC y message has any length or not. Example: if (msg.type==V_LIGHT && strlen(msg.getString())>0) otherwise the code might do strange things. -* Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/[SensorType] +* Address-layout is : [MQTT_BROKER_PREFIX]/[NodeID]/[SensorID]/V_[SensorType] NodeID and SensorID is uint8 (0-255) number. Last segment is translation of the sensor type, look inside MyMQTT.cpp for the definitions. User can change this to their needs. We have also left some space for custom types. Special: (sensor 255 reserved for special commands) -You can receive a node sketch name with MyMQTT/20/255/Sketch_name (or version with _version) +You can receive a node sketch name with MyMQTT/20/255/V_Sketch_name (or version with _version) To-do: Special commands : clear or set EEPROM Values, Send REBOOT and Receive reboot for MyMQTT itself. Be able to send ACK so client returns the data being sent. ... Please come with ideas! +What to do with publish messages. Test in more MQTT clients, So far tested in openhab and MyMQTT for Android (Not my creation) - http://www.openhab.org/ @@ -50,51 +51,16 @@ Test in more MQTT clients, So far tested in openhab and MyMQTT for Android (Not ... Please notify me if you use this broker with other software. -* Example Openhab configuration: -openhab.cfg ---- -mqtt:mysensor.url=tcp://192.168.0.234:1883 -mqtt:mysensor.clientId=MQTT ---- - -items/test.items ---- -Group test -Number Temp_test "Temp [%.1f °C]" (test) {mqtt="<[mysensor:MyMQTT/20/#/Temperature:state:default]"} -Number Hum_test "Hum [%.1f %%]" (test) {mqtt="<[mysensor:MyMQTT/20/#/Humidity:state:default]"} -Number test_test "test [%s]" (test) {mqtt="<[mysensor:MyMQTT/20/3/#:state:default]"} -Switch sw1 "sw 1" (test) {mqtt="<[mysensor:MyMQTT/21/1/Light:command:MAP(1on0off.map)]"} -Switch sw2 "sw2 recieve example" (test) {mqtt=">[mysensor:MyMQTT/21/2/Light:command:ON:1], - >[mysensor:MyMQTT/21/2/Light:command:OFF:0]"} -Switch sw3 "sw2 send + recieve example" (test) {mqtt=">[mysensor:MyMQTT/21/2/Light:command:ON:1], - >[mysensor:MyMQTT/21/2/Light:command:OFF:0],<[mysensor:MyMQTT/21/2/Light:command:MAP(1on0off.map)]"} -String sketch20 "Node 20 Sketch name [%s]" (test) {mqtt="<[mysensor:MyMQTT/20/255/Sketch_name:state:default]"} -String sketch21 "Node 21 Sketch name [%s]" (test) {mqtt="<[mysensor:MyMQTT/21/255/Sketch_name:state:default]"} ---- (Note; # = Wildcard character) - -sitemap/test.site ---- -sitemap demo label="Menu" -Frame label="Openhab" { - Group item=test label="Test group" -} ---- - -transform/1on0off.map ---- -1=ON -0=OFF ---- +* How to set-up Openhab and MQTTGateway: +http://forum.mysensors.org/topic/303/mqtt-broker-gateway */ - #include #include #include - -// Use this for IBOARD modded to use standard MISO/MOSI/SCK, see note *1 above! +// * Use this for IBOARD modded to use standard MISO/MOSI/SCK, see note *1 above! /* #define RADIO_CE_PIN 3 // radio chip enable #define RADIO_SPI_SS_PIN 8 // radio SPI serial select @@ -102,7 +68,7 @@ transform/1on0off.map #define RADIO_RX_LED_PIN A1 // Receive led pin #define RADIO_TX_LED_PIN A0 // the PCB, on board LED*/ -//Use this for default configured pro mini / nano etc : +// * Use this for default configured pro mini / nano etc : ///* #define RADIO_CE_PIN 5 // radio chip enable #define RADIO_SPI_SS_PIN 6 // radio SPI serial select @@ -110,19 +76,18 @@ transform/1on0off.map #define RADIO_RX_LED_PIN 8 // Receive led pin #define RADIO_TX_LED_PIN 9 // the PCB, on board LED*/ -#define TCP_PORT 1883 // Set your MQTT Broker Listening port. -IPAddress TCP_IP ( 192, 168, 0, 234 ); // Configure your static ip-address here -byte TCP_MAC[] = { 0x02, 0xDE, 0xAD, 0x00, 0x00, 0x42 }; // Mac-address - You should change this! see note *2 above! +#define TCP_PORT 1883 // Set your MQTT Broker Listening port. +IPAddress TCP_IP ( 192, 168, 0, 234 ); // Configure your static ip-address here +uint8_t TCP_MAC[] = { 0x02, 0xDE, 0xAD, 0x00, 0x00, 0x42 }; // Mac-address - You should change this! see note *2 above! + +////////////////////////////////////////////////////////////////// EthernetServer server = EthernetServer(TCP_PORT); MyMQTT gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN); -// -- Uncomment this constructor if you have leds and include button attached to your gateway -//MyMQTT gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN); - void processEthernetMessages() { char inputString[MQTT_MAX_PACKET_SIZE] = ""; - int inputSize = 0; + uint8_t inputSize = 0; EthernetClient client = server.available(); if (client) { while (client.available()) { @@ -130,23 +95,33 @@ void processEthernetMessages() { inputString[inputSize] = inChar; inputSize++; } +#ifdef TCPDUMP + Serial.print("<<"); + char buf[4]; + for (uint8_t a=0; a>"); + char buf[4]; + for (uint8_t a=0; a<*writeSize; a++) { sprintf(buf,"%02X ",(uint8_t)writeBuffer[a]); Serial.print(buf); } Serial.println(""); +#endif + server.write((const uint8_t *)writeBuffer, *writeSize); } + int main(void) { init(); Ethernet.begin(TCP_MAC, TCP_IP); delay(1000); // Wait for Ethernet to get configured. - gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet); + gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN); server.begin(); while (1) { processEthernetMessages(); gw.processRadioMessage(); } } - From 6dde2e428a35e8930214d816df3144fdf09e5985 Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Wed, 27 Aug 2014 21:24:00 +0200 Subject: [PATCH 05/10] Need to include MySensor.h for gateway examples to work in codebender. --- README.md | 2 +- libraries/MySensors/Version.h | 2 +- .../MySensors/examples/EthernetGateway/EthernetGateway.ino | 5 +++-- libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino | 1 + libraries/MySensors/examples/SerialGateway/SerialGateway.ino | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4df7c40..ebb4f31 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Arduino ======= -MySensors Arduino Library +MySensors Arduino Library v1.4 Please visit www.mysensors.org for more information diff --git a/libraries/MySensors/Version.h b/libraries/MySensors/Version.h index bc5edc4..026d736 100644 --- a/libraries/MySensors/Version.h +++ b/libraries/MySensors/Version.h @@ -6,6 +6,6 @@ #ifndef Version_h #define Version_h -#define LIBRARY_VERSION "1.4b1 (18848a2)" +#define LIBRARY_VERSION "1.4" #endif diff --git a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino index 5932de6..df3b935 100644 --- a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino +++ b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino @@ -45,14 +45,15 @@ */ #include +#include #include #include // Use this if you have attached a Ethernet ENC28J60 shields -#include +//#include // Use this fo WizNET module and Arduino Ethernet Shield -//#include +#include #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled diff --git a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino index 29f6551..5050b59 100755 --- a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino +++ b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino @@ -57,6 +57,7 @@ http://forum.mysensors.org/topic/303/mqtt-broker-gateway */ #include +#include #include #include diff --git a/libraries/MySensors/examples/SerialGateway/SerialGateway.ino b/libraries/MySensors/examples/SerialGateway/SerialGateway.ino index a59de08..8c3a7dd 100644 --- a/libraries/MySensors/examples/SerialGateway/SerialGateway.ino +++ b/libraries/MySensors/examples/SerialGateway/SerialGateway.ino @@ -22,6 +22,7 @@ */ #include +#include #include #include From cc00bedaa1bb926da1f2a803cabd17e8a47130e7 Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Wed, 27 Aug 2014 21:53:57 +0200 Subject: [PATCH 06/10] Classify method. --- libraries/MySensors/MyMQTT.cpp | 2 +- libraries/MySensors/MyMQTT.h | 2 ++ libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) mode change 100755 => 100644 libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino diff --git a/libraries/MySensors/MyMQTT.cpp b/libraries/MySensors/MyMQTT.cpp index 2ab42b5..f080790 100755 --- a/libraries/MySensors/MyMQTT.cpp +++ b/libraries/MySensors/MyMQTT.cpp @@ -119,7 +119,7 @@ inline MyMessage& build (MyMessage &msg, uint8_t sender, uint8_t destination, ui return msg; } -char *getType(char *b, const char **index) { +char *MyMQTT::getType(char *b, const char **index) { char *q = b; char *p = (char *)pgm_read_ptr(index); while (*q++ = pgm_read_byte(p++)); diff --git a/libraries/MySensors/MyMQTT.h b/libraries/MySensors/MyMQTT.h index 76d0830..e5d5447 100755 --- a/libraries/MySensors/MyMQTT.h +++ b/libraries/MySensors/MyMQTT.h @@ -14,6 +14,7 @@ version 2 as published by the Free Software Foundation. #include "MySensor.h" + ////////////////////////////////////////////////////////////////// #ifdef DEBUG @@ -74,6 +75,7 @@ private: char buffer[MQTT_MAX_PACKET_SIZE]; char convBuf[MAX_PAYLOAD*2+1]; uint8_t buffsize; + char *getType(char *b, const char **index); }; extern void ledTimersInterrupt(); diff --git a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino old mode 100755 new mode 100644 index 5050b59..bbd44dd --- a/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino +++ b/libraries/MySensors/examples/MQTTGateway/MQTTGateway.ino @@ -61,6 +61,7 @@ http://forum.mysensors.org/topic/303/mqtt-broker-gateway #include #include + // * Use this for IBOARD modded to use standard MISO/MOSI/SCK, see note *1 above! /* #define RADIO_CE_PIN 3 // radio chip enable From ba098a95e20c55dc00f847f36c3746efa840bb87 Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Wed, 27 Aug 2014 22:55:52 +0200 Subject: [PATCH 07/10] Fix compiler error. --- libraries/MySensors/MyMQTT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/MySensors/MyMQTT.cpp b/libraries/MySensors/MyMQTT.cpp index f080790..610414e 100755 --- a/libraries/MySensors/MyMQTT.cpp +++ b/libraries/MySensors/MyMQTT.cpp @@ -121,7 +121,7 @@ inline MyMessage& build (MyMessage &msg, uint8_t sender, uint8_t destination, ui char *MyMQTT::getType(char *b, const char **index) { char *q = b; - char *p = (char *)pgm_read_ptr(index); + char *p = (char *)pgm_read_word(index); while (*q++ = pgm_read_byte(p++)); *q=0; return b; From 159c22388245bb0f6686efacc3c7ad2204b85e0d Mon Sep 17 00:00:00 2001 From: Daniel Wiegert Date: Thu, 28 Aug 2014 14:30:42 +0200 Subject: [PATCH 08/10] Include more debug text in MINIMAL definition, and enable MINIMAL as default, saves 432bytes --- libraries/MySensors/utility/RF24.cpp | 3 ++- libraries/MySensors/utility/RF24.h | 4 ++-- libraries/MySensors/utility/RF24_config.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 libraries/MySensors/utility/RF24.cpp mode change 100644 => 100755 libraries/MySensors/utility/RF24.h mode change 100644 => 100755 libraries/MySensors/utility/RF24_config.h diff --git a/libraries/MySensors/utility/RF24.cpp b/libraries/MySensors/utility/RF24.cpp old mode 100644 new mode 100755 index 2efb7bb..38053ab --- a/libraries/MySensors/utility/RF24.cpp +++ b/libraries/MySensors/utility/RF24.cpp @@ -270,6 +270,7 @@ uint8_t RF24::get_status(void) } /****************************************************************************/ +#if !defined (MINIMAL) void RF24::print_status(uint8_t status) { @@ -325,7 +326,7 @@ void RF24::print_address_register(const char* name, uint8_t reg, uint8_t qty) printf_P(PSTR("\r\n")); } - +#endif /****************************************************************************/ RF24::RF24(uint8_t _cepin, uint8_t _cspin): diff --git a/libraries/MySensors/utility/RF24.h b/libraries/MySensors/utility/RF24.h old mode 100644 new mode 100755 index 55253bb..89ed231 --- a/libraries/MySensors/utility/RF24.h +++ b/libraries/MySensors/utility/RF24.h @@ -863,7 +863,7 @@ private: * @return Current value of status register */ uint8_t get_status(void); - +#if !defined (MINIMAL) /** * Decode and print the given status to stdout * @@ -907,7 +907,7 @@ private: * @param qty How many successive registers to print */ void print_address_register(const char* name, uint8_t reg, uint8_t qty = 1); - +#endif /** * Turn on or off the special features of the chip * diff --git a/libraries/MySensors/utility/RF24_config.h b/libraries/MySensors/utility/RF24_config.h old mode 100644 new mode 100755 index b7154a5..55962f1 --- a/libraries/MySensors/utility/RF24_config.h +++ b/libraries/MySensors/utility/RF24_config.h @@ -21,7 +21,7 @@ #include //TMRh20: - //#define MINIMAL + #define MINIMAL // saves 432 bytes! // Define _BV for non-Arduino platforms and for Arduino DUE #if defined (ARDUINO) From b97372ed015fdd61f54af628950202cf572e9df6 Mon Sep 17 00:00:00 2001 From: Patrick Fallberg Date: Fri, 10 Oct 2014 22:34:14 +0200 Subject: [PATCH 09/10] Added .gitignore to filter stino settings files Stino is a plugin for SublimeText to allow SublimeText to act as an Arduino IDE. --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..619eb92 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +stino.settings From f5ef71230882388da82c5f4571923902a9f0d03c Mon Sep 17 00:00:00 2001 From: Patrick Fallberg Date: Fri, 10 Oct 2014 22:24:19 +0200 Subject: [PATCH 10/10] Support for WIZnet W5100 ethernet module SPI_EN The W5100 module has a SPI_EN signal that enables or disables the SPI bus. A bug in the module causes MISO to be continously driven by the module when SPI_EN is pulled high. This is described in this application note: https://www.google.se/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCAQFjAA&url=http%3A%2F%2Fwww.wiznet.co.kr%2FUpLoad_Files%2FReferenceFiles%2FW5100_AN_SPI.pdf&ei=ij84VK7uM6nNygPqvICYDw&usg=AFQjCNGz1qttBEwG1azc1Eza4j69v1rpDQ&sig2=UUUtb4Dr0F35g8ByHMsyig&bvm=bv.77161500,d.bGQ This commit changes the Ethernet gateway sketch to drive SPI_EN high or low, depending on which module is in use (SPI bus is shared between Ethernet and RF modules). The pin attached to SPI_EN is defined by W5100_SPI_EN. This define can be commented out if SPI_EN is not needed (different module) or if the module manages SPI_EN in hardware (some W5100 shields does this). --- .../EthernetGateway/EthernetGateway.ino | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino index df3b935..e4d8309 100644 --- a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino +++ b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino @@ -2,7 +2,7 @@ /* * Copyright (C) 2013 Henrik Ekblad * - * Contribution by a-lurker + * Contribution by a-lurker and Anticimex * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -38,6 +38,7 @@ * 7 Radio error LED (optional) +5V -> LED -> 270-330 Ohm resistor -> pin 7. * 6 Radio SPI Slave Select * 5 Radio Chip Enable + * 4 Ethernet SPI Enable (optional if using a shield/module that manages SPI_EN signal) * 3 Inclusion mode button (optional), 10K pull down to GND, button to VCC) * 2 Radio IRQ pin (optional), W5100 Int, if linked to pin 2) * ----------------------------------------------------------------------------------------------------------- @@ -59,6 +60,7 @@ #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled #define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button +#define W5100_SPI_EN 4 // Ethernet SPI enable #define RADIO_CE_PIN 5 // radio chip enable #define RADIO_SPI_SS_PIN 6 // radio SPI serial select #define RADIO_ERROR_LED_PIN 7 // Error led pin @@ -86,23 +88,46 @@ MyGateway gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN, INCLUSION_MODE_TIME); char inputString[MAX_RECEIVE_LENGTH] = ""; // A string to hold incoming commands from serial/ethernet interface int inputPos = 0; +void w5100_spi_en(boolean enable) +{ +#ifdef W5100_SPI_EN + if (enable) + { + // Pull up pin + pinMode(W5100_SPI_EN, INPUT); + digitalWrite(W5100_SPI_EN, HIGH); + } + else + { + // Ground pin + pinMode(W5100_SPI_EN, OUTPUT); + digitalWrite(W5100_SPI_EN, LOW); + } +#endif +} + void setup() { - // Initialize gateway at maximum PA level, channel 70 and callback for write operations - gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet); - + w5100_spi_en(true); + Ethernet.begin(mac); Ethernet.begin(mac, myIp); // give the Ethernet interface a second to initialize delay(1000); + // Initialize gateway at generic GW PA level, channel 70 and callback for write operations + w5100_spi_en(false); + gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet); + // start listening for clients server.begin(); } // This will be called when data should be written to ethernet void writeEthernet(char *writeBuffer) { + w5100_spi_en(true); server.write(writeBuffer); + w5100_spi_en(false); } @@ -110,6 +135,7 @@ void loop() { // if an incoming client connects, there will be // bytes available to read via the client object + w5100_spi_en(true); EthernetClient client = server.available(); if (client) { @@ -128,7 +154,9 @@ void loop() // echo the string to the serial port Serial.print(inputString); + w5100_spi_en(false); gw.parseAndSend(inputString); + w5100_spi_en(true); // clear the string: inputPos = 0; @@ -143,6 +171,7 @@ void loop() } } } + w5100_spi_en(false); gw.processRadioMessage(); }