{"id":1052,"date":"2014-11-17T16:37:18","date_gmt":"2014-11-17T16:37:18","guid":{"rendered":"http:\/\/evosec.eu\/?p=1052"},"modified":"2015-11-13T21:39:42","modified_gmt":"2015-11-13T21:39:42","slug":"debugging-esp8266ex","status":"publish","type":"post","link":"https:\/\/evosec.eu\/no\/debugging-esp8266ex\/","title":{"rendered":"Debugging ESP8266EX"},"content":{"rendered":"<p>One way of debugging what&#8217;s running on the ESP is using the UART console. But there is a trick &#8211; it might be locked at 74880 baudrate.<\/p>\n<p>There&#8217;s a quick fix. Modify the <strong>user_main.c\u00a0<\/strong>and add:<\/p>\n<p><code lang=\"cpp[notools]\">#include\u00a0\"driver\/uart_register.h\"<\/code><\/p>\n<p>on top of it.<\/p>\n<p>Also, in the main loop(user_init) change<\/p>\n<p><code lang=\"cpp[notools]\">void\u00a0user_init(void){<br \/>\nos_printf(\"SDK\u00a0version:%d.%d.%d\\n\"\u00a0SDK_VERSION_MAJOR,\u00a0SDK_VERSION_MINOR,\u00a0SDK_VERSION_REVISION);<\/code><\/p>\n<p>with:<\/p>\n<p><code lang=\"cpp[notools]\">void user_init(void){<br \/>\n  uart_div_modify(0,\u00a0<strong>115200<\/strong>);<br \/>\n  SET_PERI_REG_MASK(UART_CONF0(0),\u00a0UART_RXFIFO_RST\u00a0|\u00a0UART_TXFIFO_RST);<br \/>\n  CLEAR_PERI_REG_MASK(UART_CONF0(0),\u00a0UART_RXFIFO_RST\u00a0|\u00a0UART_TXFIFO_RST);<br \/>\n  os_printf(\"set\u00a0baudrate\u00a0to\u00a0115200\\n\\r\");<br \/>\n<\/code><\/p>\n<p>Modify the <strong>115200\u00a0<\/strong>with the value you want to use, but we suggest using some standard ones, like\u00a038400, 57600 and 115200.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One way of debugging what&#8217;s running on the ESP is using the UART console. But there is a trick &#8211; it might be locked at 74880 baudrate. There&#8217;s a quick fix. Modify the user_main.c\u00a0and add: #include\u00a0&#8220;driver\/uart_register.h&#8221; on top of it. Also, in the main loop(user_init) change void\u00a0user_init(void){ os_printf(&#8220;SDK\u00a0version:%d.%d.%d\\n&#8221;\u00a0SDK_VERSION_MAJOR,\u00a0SDK_VERSION_MINOR,\u00a0SDK_VERSION_REVISION); with: void &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"status","meta":{"footnotes":""},"categories":[98],"tags":[86,76,85],"class_list":["post-1052","post","type-post","status-publish","format-status","hentry","category-iot-newsupdates","tag-debug","tag-esp8266ex","tag-espressif","post_format-post-format-status"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"no","enabled_languages":["en","da","de","es","fi","fr","it","hu","nl","no","pl","pt","ru","sv"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"da":{"title":false,"content":false,"excerpt":false},"de":{"title":false,"content":false,"excerpt":false},"es":{"title":false,"content":false,"excerpt":false},"fi":{"title":false,"content":false,"excerpt":false},"fr":{"title":false,"content":false,"excerpt":false},"it":{"title":false,"content":false,"excerpt":false},"hu":{"title":false,"content":false,"excerpt":false},"nl":{"title":false,"content":false,"excerpt":false},"no":{"title":false,"content":false,"excerpt":false},"pl":{"title":false,"content":false,"excerpt":false},"pt":{"title":false,"content":false,"excerpt":false},"ru":{"title":false,"content":false,"excerpt":false},"sv":{"title":false,"content":false,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/posts\/1052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/comments?post=1052"}],"version-history":[{"count":15,"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/posts\/1052\/revisions"}],"predecessor-version":[{"id":1054,"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/posts\/1052\/revisions\/1054"}],"wp:attachment":[{"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/media?parent=1052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/categories?post=1052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/evosec.eu\/no\/wp-json\/wp\/v2\/tags?post=1052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}