{"id":52,"date":"2013-03-06T23:10:05","date_gmt":"2013-03-06T22:10:05","guid":{"rendered":"http:\/\/www.sevenwatt.com\/main\/?p=52"},"modified":"2015-03-02T23:16:51","modified_gmt":"2015-03-02T22:16:51","slug":"jeenode-rfm12b-configuration-commands","status":"publish","type":"post","link":"https:\/\/www.sevenwatt.com\/main\/jeenode-rfm12b-configuration-commands\/","title":{"rendered":"Jeenode RFM12B configuration commands"},"content":{"rendered":"<p>The following table shows the differences in intialisations of the RFM12B for the JeeNode applicaiton to receiver weather station data from both FSK and OOK stations, and send it to the JeeNode home sensor network, and eventually to HouseMon:<br \/>\n<span style=\"line-height: 1.714285714; font-size: 1rem;\">\n<table id=\"tablepress-1\" class=\"tablepress tablepress-id-1\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">JeeLib native<\/th><th class=\"column-2\">WH1080 FSK<\/th><th class=\"column-3\">JeeLib OOK<\/th><th class=\"column-4\">Jeelib native remark<\/th><th class=\"column-5\">WH1080 FSK Remark<\/th><th class=\"column-6\">JeeLib OOK<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">0x8205<\/td><td class=\"column-2\">0x820D<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">disable some circuits<\/td><td class=\"column-5\">disable some circuits<\/td><td class=\"column-6\"><\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">0x80E7<\/td><td class=\"column-2\">0x80E7<\/td><td class=\"column-3\"><\/td><td class=\"column-4\"> 868 Mhz, enable tx+rx<\/td><td class=\"column-5\">identical<\/td><td class=\"column-6\">disable TX and RX buf<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">0xA640<\/td><td class=\"column-2\">0xA67C<\/td><td class=\"column-3\">0xA68A<\/td><td class=\"column-4\">frequency<\/td><td class=\"column-5\"><\/td><td class=\"column-6\"><\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">0xC613<\/td><td class=\"column-2\">0xC613<\/td><td class=\"column-3\">0xC691<\/td><td class=\"column-4\">bitrate<\/td><td class=\"column-5\"><\/td><td class=\"column-6\">N\/A ?<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">0x94A2<\/td><td class=\"column-2\">0x94A0<\/td><td class=\"column-3\">0x9489<\/td><td class=\"column-4\">134kHz, -0dBm, 91dBm <\/td><td class=\"column-5\">134kHz, -0dB, 103dBm<\/td><td class=\"column-6\">200khz, -6db, 97dbm<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">0xC2AC<\/td><td class=\"column-2\"><\/td><td class=\"column-3\">0xC220<\/td><td class=\"column-4\">datafilter = digital<\/td><td class=\"column-5\"><\/td><td class=\"column-6\">datafilter = OOK<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">0xCA83<\/td><td class=\"column-2\">0xCA83<\/td><td class=\"column-3\">0xCA00<\/td><td class=\"column-4\"><\/td><td class=\"column-5\">identical<\/td><td class=\"column-6\">FIFO disabled<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">0xCEnn<\/td><td class=\"column-2\">0xCED4<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">group ID<\/td><td class=\"column-5\">groupID=0xD4!<\/td><td class=\"column-6\"><\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">0xC483<\/td><td class=\"column-2\">0xC49F<\/td><td class=\"column-3\">0xC473<\/td><td class=\"column-4\">AFC auto, free, DQD4<\/td><td class=\"column-5\">AFC manual slow +-16 DQD2<\/td><td class=\"column-6\">AFC @PWR, auto, +-4 DQD4<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-1\">0x9850<\/td><td class=\"column-2\"><\/td><td class=\"column-3\"><\/td><td class=\"column-4\"><\/td><td class=\"column-5\"><\/td><td class=\"column-6\"><\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-1\">0xCC77<\/td><td class=\"column-2\">0xCC67<\/td><td class=\"column-3\">0xCC67<\/td><td class=\"column-4\"><\/td><td class=\"column-5\">PLL don't care<\/td><td class=\"column-6\">PLL don't care<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-1\">0xE000<\/td><td class=\"column-2\">0xE105<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">wakeup timer<\/td><td class=\"column-5\">don't care<\/td><td class=\"column-6\"><\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-1\">0xC800<\/td><td class=\"column-2\">0xC80E<\/td><td class=\"column-3\">0xC800<\/td><td class=\"column-4\"><\/td><td class=\"column-5\">disable low duty cycle<\/td><td class=\"column-6\"><\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-1\">0xC049<\/td><td class=\"column-2\">0xC006<\/td><td class=\"column-3\">0xC040<\/td><td class=\"column-4\">clock out, low batt level<\/td><td class=\"column-5\">don't care<\/td><td class=\"column-6\">don't care<\/td>\n<\/tr>\n<tr class=\"row-16\">\n\t<td class=\"column-1\"><\/td><td class=\"column-2\">0XB800<\/td><td class=\"column-3\">0XB800<\/td><td class=\"column-4\"><\/td><td class=\"column-5\">clear transmit buffer<\/td><td class=\"column-6\">clear transmit buffer<\/td>\n<\/tr>\n<tr class=\"row-17\">\n\t<td class=\"column-1\">0x82DD<\/td><td class=\"column-2\">0x82DD<\/td><td class=\"column-3\">0x82C0<\/td><td class=\"column-4\">enable relevant circuits<\/td><td class=\"column-5\">identical<\/td><td class=\"column-6\">enab receiver, baseband<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-1 from cache --><\/span><\/p>\n<p>taking a look at the differences between the native-FSK and WH1080-foreign-FSK, there seem to be some obvious required differences, but also some differences that may not matter that much. For example the auto frequency control (AFC) settings, auto-mode, unrestricted, versus manual, slow, restricted to +\/-16steps may not a big deal. So I tested this by making a sketch that receives foreign-FSK, and as soon as a signal is received, it programs the RFM12B to native mode and transmits the package into the sensor network. I extended the RF12 driver with functions below, which speak for themselves. The minimal set of changes can be seen in the following functions:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\nvoid configureWH1080 () {\r\n    rf12_setGroup(0xD4);\r\n    rf12_setBitrate(0x13);          \/\/ 17.24 kbps\r\n    rf12_setFrequency(0x67C);       \/\/ 868.300 MHz\r\n    rf12_setFixedLength(LEN_MAX);   \/\/ receive fixed number of bytes\r\n}\r\n\r\nvoid deconfigureWH1080 () {\r\n    rf12_setGroup(GROUP_ID);\r\n    rf12_setBitrate(0x06);          \/\/ 49.2 kbps\r\n    rf12_setFrequency(0x640);       \/\/ 868.000MHz\r\n    rf12_setFixedLength(0);         \/\/ number of bytes to be received in packet header\r\n}\r\n<\/pre>\n<p>This approach avoids using the slightly costly rf12_initialize() funnction which reprograms the SPI bus and resets the RFM12B.<\/p>\n<p>If you made it to here, but think what is this all about. See this:<\/p>\n<p><a title=\"OOK2\" href=\"http:\/\/jeelabs.net\/projects\/cafe\/wiki\/Decoding_the_Oregon_Scientific_V2_protocol\">Decoding the Oregon Scientific V2 protocol<\/a><br \/>\n<a title=\"OOK1\" href=\"http:\/\/jeelabs.net\/projects\/cafe\/wiki\/Receiving_OOKASK_with_a_modified_RFM12B\">Receiving OOKASK with a modified RFM12B<\/a><br \/>\n<a title=\"FSK1\" href=\"http:\/\/jeelabs.net\/boards\/6\/topics\/1203\">FSK 868MHz weather stations on JeeNode<\/a><br \/>\n<a href=\"http:\/\/www.sevenwatt.com\/main\/wh1080-protocol-v2-fsk\/\" title=\"FSK2\">WH1080 protocol V2 \u2013 FSK<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following table shows the differences in intialisations of the RFM12B for the JeeNode applicaiton to receiver weather station data from both FSK and OOK stations, and send it to the JeeNode home sensor network, and eventually to HouseMon: taking a look at the differences between the native-FSK and WH1080-foreign-FSK, there seem to be some [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[12,1],"tags":[32,38,28,37],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-jeenode","category-weatherstations","tag-arduino","tag-jeelib","tag-jeenode","tag-rfm12b"],"_links":{"self":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":17,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":79,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/posts\/52\/revisions\/79"}],"wp:attachment":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}