{"id":785,"date":"2015-07-06T21:31:41","date_gmt":"2015-07-06T19:31:41","guid":{"rendered":"http:\/\/blog.prunk.si\/?p=785"},"modified":"2015-07-25T10:51:49","modified_gmt":"2015-07-25T08:51:49","slug":"rescue-mode-for-fonera-fon2201-wi-fi-router","status":"publish","type":"post","link":"https:\/\/blog.janprunk.com\/?p=785","title":{"rendered":"Rescue mode for Fonera+ (FON2201) Wi-Fi router \/ OpenWRT \/ Redboot \/ Wlan-si"},"content":{"rendered":"<p><a href=\"http:\/\/blog.prunk.si\/wp-uploads\/\/2015\/07\/fon-la-fonera-970-80.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft wp-image-797 size-medium\" src=\"http:\/\/blog.prunk.si\/wp-uploads\/\/2015\/07\/fon-la-fonera-970-80-300x225.jpg\" alt=\"fon-la-fonera-970-80\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.janprunk.com\/wp-content\/uploads\/2015\/07\/fon-la-fonera-970-80-300x225.jpg 300w, https:\/\/blog.janprunk.com\/wp-content\/uploads\/2015\/07\/fon-la-fonera-970-80.jpg 970w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>Running customized <a title=\"OpenWRT\" href=\"http:\/\/www.openwrt.org\" target=\"_blank\">OpenWRT<\/a>\/<a title=\"Wlan-SI\" href=\"http:\/\/www.wlan-si.net\" target=\"_blank\">Wlan-SI<\/a> image for a long time and then upgrading the router caused it to crash, the error was probably triggered with the telnet\/ssh timeouts and probably a high CPU load on the router which disconnected me several times before I managed to write in the image. As suggested on Wlan-SI website, you should upgrade this type of router (and others) using their &#8220;<a title=\"Nodeupgrade\" href=\"https:\/\/dev.wlan-si.net\/wiki\/Flashing\/Nodeupgrade\">nodeupgrade<\/a>&#8221; [1] application. If you fail to boot into the new image, there is one thing you can still do to reflash over ethernet. A good idea is to put Redboot as the rescue method prior to flashing (but this manual won&#8217;t cover that step). So considering that Redboot is already installed here is how to proceed:<\/p>\n<p>1. Install required\u00c2\u00a0 packages on a PC.<\/p>\n<p><strong># apt-get install tftpd-hpa tftp telnet netcat<br \/>\n<\/strong><\/p>\n<p>Configure tftpd-hpa download directory in \/etc\/default\/tftpd-hpa where you will put firmware images.<\/p>\n<p>2. Set your PC to listen on 192.168.1.2\/255.255.255.0. Connect your PC ethernet port with any of the two ethernet ports on Fonera router.<\/p>\n<p>3. If Redboot is installed on Fonera router, it will listen for a few seconds on IP 192.168.1.1 or 192.168.1.254 port 9000, simply <a title=\"Redboot\" href=\"http:\/\/wiki.openwrt.org\/doc\/techref\/bootloader\/redboot\" target=\"_blank\">telnet there<\/a> [2] , you will see a message like this one:<\/p>\n<pre>== Executing boot script in 8.530 seconds - enter ^C to abort\r\n^C\r\nRedBoot&gt;\r\n\r\n<strong>Press Ctrl+c in your terminal to enter<\/strong>\r\n\r\nIf you have problems here that Ctrl+c doesn't work \r\n(and router therefore already bypasses the escape sequence into failed boot mode) you can try the following <a title=\"http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?p=81815&amp;sid=81c212ea61683ac3bbb9b626bc553ecd\" href=\"http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?p=81815&amp;sid=81c212ea61683ac3bbb9b626bc553ecd\" target=\"_blank\">trick<\/a> [3]:\r\n\r\n<strong><span class=\"postbody\"># echo -e \"\\0377\\0364\\0377\\0375\\0006\" &gt;break.bin \r\n# nc 192.168.1.1 9000 &lt;break.bin\r\n\r\n<\/span><\/strong><span class=\"postbody\">Just press \"enter\" or t<\/span><span class=\"postbody\">elnet again to 192.168.1.1 9000, and<\/span><span class=\"postbody\"> you entered Redboot.\r\n\r\n4. Installing firmware into Redboot [4]<\/span>\r\n\r\nRedBoot&gt; \r\nRedBoot&gt; <strong>ip_address -l 192.168.1.1\/24<\/strong>\r\nIP: 192.168.1.1\/255.255.255.0, Gateway: 0.0.0.0\r\nDefault server: 192.168.1.254\r\nRedBoot&gt;<strong> ip_address -h 192.168.1.2<\/strong>\r\nIP: 192.168.1.1\/255.255.255.0, Gateway: 0.0.0.0\r\nDefault server: 192.168.1.2\r\nRedBoot&gt; <strong>fis init<\/strong>\r\nAbout to initialize [format] FLASH image system - continue (y\/n)? y\r\n*** Initialize FLASH Image System\r\n... Erase from 0xa87e0000-0xa87f0000: .\r\n... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .\r\nRedBoot&gt; <strong>load -r -v -b 0x80041000 foneraplus-v2_0b_33_gbb622cc-kernel.lzma<\/strong>\r\nUsing default protocol (TFTP)\r\n-\r\nRaw file loaded 0x80041000-0x800f0fff, assumed entry at 0x80041000\r\nRedBoot&gt; <strong>fis create kernel<\/strong>\r\n... Erase from 0xa8030000-0xa80e0000: ...........\r\n... Program from 0x80041000-0x800f1000 at 0xa8030000: ...........\r\n... Erase from 0xa87e0000-0xa87f0000: .\r\n... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .\r\nRedBoot&gt; <strong>load -r -v -b 0x80041000 foneraplus-v2_0b_33_gbb622cc-root.jffs2-64k<\/strong>\r\nUsing default protocol (TFTP)\r\n|\r\nRaw file loaded 0x80041000-0x80360fff, assumed entry at 0x80041000\r\nRedBoot&gt; <strong>fis create rootfs<\/strong>\r\n... Erase from 0xa80e0000-0xa8400000: ..................................................\r\n... Program from 0x80041000-0x80361000 at 0xa80e0000: ..................................................\r\n... Erase from 0xa87e0000-0xa87f0000: .\r\n... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .\r\nRedBoot&gt; <strong>fconfig<\/strong>\r\nRun script at boot: true\r\nBoot script: \r\n.. fis load -l kernel\r\n.. exec\r\nEnter script, terminate with empty line\r\n&gt;&gt; <strong>fis load -l kernel<\/strong>\r\n&gt;&gt; <strong>exec<\/strong>\r\n&gt;&gt; <strong>(press enter here with a blank line)<\/strong>\r\nBoot script timeout (1000ms resolution): <strong>10<\/strong>\r\nUse BOOTP for network configuration: <strong>false<\/strong>\r\nGateway IP address: \r\nLocal IP address: <strong>192.168.1.1<\/strong>\r\nLocal IP address mask: <strong>255.255.255.0<\/strong>\r\nDefault server IP address: <strong>192.168.1.254<\/strong>\r\nConsole baud rate: <strong>9600<\/strong>\r\nGDB connection port: <strong>9000<\/strong>\r\nForce console for special debug messages: <strong>false<\/strong>\r\nNetwork debug at boot time: <strong>false<\/strong>\r\nUpdate RedBoot non-volatile configuration - continue (y\/n)? <strong>y<\/strong>\r\n... Erase from 0xa87e0000-0xa87f0000: .\r\n... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .\r\nRedBoot&gt; <strong>reset<\/strong><\/pre>\n<pre><strong>This is all, wait some minutes then replug router in electricity.<\/strong>\r\n\r\nAdditionally:\r\nInstead of image name <strong>foneraplus-v2_0b_33_gbb622cc-kernel.lzma \r\n<\/strong>you can use<strong> <code>openwrt-atheros-vmlinux.lzma<\/code>\r\n<\/strong>Instead of image name <strong>foneraplus-v2_0b_33_gbb622cc-root.jffs2-64k \r\n<\/strong>you can use<strong> <code>openwrt-atheros-root.squashfs<\/code><\/strong><\/pre>\n<p>Download the OpenWRT firmwares <a title=\"Download\" href=\"http:\/\/downloads.openwrt.org\/latest\/atheros\/generic\/\" target=\"_blank\">here<\/a>.<\/p>\n<p>Manuals used in this procedure:<\/p>\n<p>1. <a title=\"Nodeupgrade\" href=\"https:\/\/dev.wlan-si.net\/wiki\/Flashing\/Nodeupgrade\" target=\"_blank\">https:\/\/dev.wlan-si.net\/wiki\/Flashing\/Nodeupgrade<\/a><\/p>\n<p>2. <a title=\"Redboot\" href=\"http:\/\/wiki.openwrt.org\/doc\/techref\/bootloader\/redboot\" target=\"_blank\">http:\/\/wiki.openwrt.org\/doc\/techref\/bootloader\/redboot<\/a><\/p>\n<p>3. <a title=\"http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?p=81815&amp;sid=81c212ea61683ac3bbb9b626bc553ecd\" href=\"http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?p=81815&amp;sid=81c212ea61683ac3bbb9b626bc553ecd\" target=\"_blank\">http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?p=81815&amp;sid=81c212ea61683ac3bbb9b626bc553ecd<\/a><\/p>\n<p>4. <a title=\"http:\/\/wiki.openwrt.org\/toh\/fon\/fonera2#method_1_with_tftp_server\" href=\"http:\/\/wiki.openwrt.org\/toh\/fon\/fonera2#method_1_with_tftp_server\" target=\"_blank\">http:\/\/wiki.openwrt.org\/toh\/fon\/fonera2#method_1_with_tftp_server<\/a><\/p>\n<p><strong>I take no responsibility if you break the router using this manual (it has only been tested once), do it on your own risk !<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running customized OpenWRT\/Wlan-SI image for a long time and then upgrading the router caused it to crash, the error was probably triggered with the telnet\/ssh timeouts and probably a high CPU load on the router which disconnected me several times before I managed to write in the image. As suggested on Wlan-SI website, you should [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,12,3],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/785"}],"collection":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=785"}],"version-history":[{"count":13,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/785\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=\/wp\/v2\/posts\/785\/revisions\/802"}],"wp:attachment":[{"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.janprunk.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}