Advertisement
Guest User

Untitled

a guest
May 27th, 2015
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.13 KB | None | 0 0
  1. dofile("setup.lua")
  2. Getting aps
  3. > Getting aps
  4. New request....
  5. GET / HTTP/1.1
  6. Host: 192.168.4.1
  7. Connection: keep-alive
  8. Cache-Control: max-age=0
  9. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  10. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  11. Accept-Encoding: gzip, deflate, sdch
  12. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  13.  
  14.  
  15. Req was parsed
  16. HTTP/1.1 200 OK
  17. Content-Type: text/html; charset=utf-8
  18.  
  19. <!DOCTYPE html>
  20. <html>
  21. <head>
  22. <meta charset="UTF-8">
  23. <title>Shiny Lights</title>
  24. <link rel="stylesheet" href="/s.css">
  25. </head>
  26. <body>
  27. <h1>Confiure your shiny lights</h1>
  28. <form action="/" method="post">
  29.  
  30. nil
  31. Made this far
  32. forcing connection
  33. New request....
  34. GET / HTTP/1.1
  35. Host: 192.168.4.1
  36. Connection: keep-alive
  37. Cache-Control: max-age=0
  38. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  39. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  40. Accept-Encoding: gzip, deflate, sdch
  41. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  42.  
  43.  
  44. Req was parsed
  45. PANIC: unprotected error in call to Lua API (not enough memory)
  46. PANIC: unprotected error in call to Lua API (attempt to call a string value)
  47. c_ÇÏRSöfJSúfJSúâîø
  48.  
  49. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  50. lua: cannot open init.lua
  51. > file.remove("setup.lua");
  52. > file.open("setup.lua","w+");
  53. > w = file.writeline
  54. > w([[mac, cnt = string.gsub(wifi.ap.getmac(), "-", "")]]);
  55. > w([[cfg={}]]);
  56. > w([[cfg.ssid="LEDS:" .. mac]]);
  57. > w([[cfg.pwd="shinylights"]]);
  58. > w([[wifi.setmode(wifi.STATIONAP)]]);
  59. > w([[wifi.ap.config(cfg)]]);
  60. > w([[]]);
  61. > w([[currentAPs = {}]]);
  62. > w([[]]);
  63. > w([[newssid = ""]]);
  64. > w([[]]);
  65. > w([[function listAPs_callback(t)]]);
  66. > w([[ if(t==nil) then]]);
  67. > w([[ return]]);
  68. > w([[ end]]);
  69. > w([[ currentAPs = t]]);
  70. > w([[end]]);
  71. > w([[]]);
  72. > w([[function listAPs()]]);
  73. > w([[ print("Getting aps")]]);
  74. > w([[ wifi.sta.getap(listAPs_callback)]]);
  75. > w([[end]]);
  76. > w([[tmr.alarm(0, 15000, 1, listAPs)]]);
  77. > w([[listAPs()]]);
  78. > w([[]]);
  79. > w([[srv=net.createServer(net.TCP)]]);
  80. > w([[srv:listen(80, function(conn)]]);
  81. > w([[ conn:on("receive", function(client, payload)]]);
  82. > w([[ print("New request....")]]);
  83. > w([[ local req = dofile("http.lua").parse(payload)]]);
  84. > w([[ print("Req was parsed")]]);
  85. > w([[ local sent = dofile("setup.router.lua").route(client, req)]]);
  86. > w([[ if sent == false then]]);
  87. > w([[ print("yeh bad news bear")]]);
  88. > w([[ client:send("HTTP/1.1 400 Bad Request\r\n\r\n")]]);
  89. > w([[ }]]);
  90. > w([[ end)]]);
  91. > w([[]]);
  92. > w([[ conn:on("sent", function(client)]]);
  93. > w([[ print("Closing connection")]]);
  94. > w([[ client:close()]]);
  95. > w([[ end)]]);
  96. > w([[end)]]);
  97. > file.close();
  98. > dofile("setup.lua");
  99. setup.lua:36: unexpected symbol near '}'
  100. > file.remove("setup.lua");
  101. > file.open("setup.lua","w+");
  102. > w = file.writeline
  103. > w([[mac, cnt = string.gsub(wifi.ap.getmac(), "-", "")]]);
  104. > w([[cfg={}]]);
  105. > w([[cfg.ssid="LEDS:" .. mac]]);
  106. > w([[cfg.pwd="shinylights"]]);
  107. > w([[wifi.setmode(wifi.STATIONAP)]]);
  108. > w([[wifi.ap.config(cfg)]]);
  109. > w([[]]);
  110. > w([[currentAPs = {}]]);
  111. > w([[]]);
  112. > w([[newssid = ""]]);
  113. > w([[]]);
  114. > w([[function listAPs_callback(t)]]);
  115. > w([[ if(t==nil) then]]);
  116. > w([[ return]]);
  117. > w([[ end]]);
  118. > w([[ currentAPs = t]]);
  119. > w([[end]]);
  120. > w([[]]);
  121. > w([[function listAPs()]]);
  122. > w([[ print("Getting aps")]]);
  123. > w([[ wifi.sta.getap(listAPs_callback)]]);
  124. > w([[end]]);
  125. > w([[tmr.alarm(0, 15000, 1, listAPs)]]);
  126. > w([[listAPs()]]);
  127. > w([[]]);
  128. > w([[srv=net.createServer(net.TCP)]]);
  129. > w([[srv:listen(80, function(conn)]]);
  130. > w([[ conn:on("receive", function(client, payload)]]);
  131. > w([[ print("New request....")]]);
  132. > w([[ local req = dofile("http.lua").parse(payload)]]);
  133. > w([[ print("Req was parsed")]]);
  134. > w([[ local sent = dofile("setup.router.lua").route(client, req)]]);w([[ if sent == false then]]);
  135. > w([[ print("yeh bad news bear")]]);
  136. > w([[ client:send("HTTP/1.1 400 Bad Request\r\n\r\n")]]);
  137. > w([[ end]]);
  138. > w([[ end)]]);
  139. > w([[]]);
  140. > w([[ conn:on("sent", function(client)]]);
  141. > w([[ print("Closing connection")]]);
  142. > w([[ client:close()]]);
  143. > w([[ end)]]);
  144. > w([[end)]]);
  145. > file.close();
  146. > dofile("setup.lua");
  147. Getting aps
  148. > Getting aps
  149. file.remove("setup.index.lua");
  150. > file.open("setup.index.lua","w+");
  151. > w = file.writeline
  152. > w([[local moduleName = ...]]);
  153. > w([[local M = {}]]);
  154. New request....
  155. GET / HTTP/1.1
  156. Host: 192.168.4.1
  157. Connection: keep-alive
  158. Cache-Control: max-age=0
  159. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  160. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  161. Accept-Encoding: gzip, deflate, sdch
  162. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  163.  
  164. Req was parsed
  165. PANIC: unprotected error in call to Lua API (setup.router.lua:16: attempt to index a nil value)
  166. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  167. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  168. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  169. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  170. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  171. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  172. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  173. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  174. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  175. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  176. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  177. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  178. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  179. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  180. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  181. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  182. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  183. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  184. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  185. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  186. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  187. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  188. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  189. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  190. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  191. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  192. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  193. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  194. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  195. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  196. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  197. PAWaiting answer from ESP - Timeout reached. Command aborted.NIC: unprotected error in call to Lua API (attempt to index a nil value)
  198. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  199. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  200. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  201. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  202. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  203. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  204. PANIC: unprotected error in call to Lua API (attempt to index a nil value)
  205. PANIC: unprotected error in call to Lua API (attempt to index a c_ÇÏRSöfJSúfJSúâîø
  206.  
  207. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  208. lua: cannot open init.lua
  209. > file.remove("setup.index.lua");
  210. > file.open("setup.index.lua","w+");
  211. > w = file.writeline
  212. > w([[local moduleName = ...]]);
  213. > w([[local M = {}]]);
  214. > w([[]]);
  215. > w([[function M.render(client, req)]]);
  216. > w([[ file.open("setup.header", "r")]]);
  217. > w([[ repeat]]);
  218. > w([[ local line = file.read(1460)]]);
  219. > w([[ print(line)]]);
  220. > w([[ if line then client:send(line) end]]);
  221. > w([[ until not line ]]);
  222. > w([[ file.close()]]);
  223. > w([[ mac = wifi.sta.getmac()]]);
  224. > w([[ client:send("<p>This device's wifi mac is: " .. mac .. "</p>")]]);
  225. > w([[]]);
  226. > w([[ for ssid, v in pairs(currentAPs) do]]);
  227. > w([[ authmode, rssi, bssid, channel = string.match(v, "(%d),(-?%d+),(%x%x:%x%x:%x%x:%x%x:%x%x:%x%x),(%d+)")]]);
  228. > w([[ sssid = string.gsub(ssid, "\"", "&quot;")]]);
  229. > w([[ client:send(]]);
  230. > w([[ string.format(]]);
  231. > w([[ "<div><label><span class=\"%s\">%s</span><input type=\"radio\" name=\"ssid\" value=\"%s\">%s</label></div>",]]);
  232. > w([[ string.char(97 + tonumber(authmode)),]]);
  233. > w([[ (tonumber(authmode) < 1 and "d" or "e"),]]);
  234. > w([[ sssid,]]);
  235. > w([[ ssid]]);
  236. > w([[ ) -- rssi no rssi.. wnat rssi (a, b, c are low med high)]]);
  237. > w([[ )]]);
  238. > w([[ end]]);
  239. > w([[ client:send("<input type=\"password\" name=\"password\" placeholder=\"Password\"><br/>")]]);w([[ client:send("<input type=\"submit\" value=\"Save\">")]]);
  240. > w([[ client:send("</form></body></html>", function()]]);
  241. > w([[ print("Closing connection")]]);
  242. > w([[ client:close()]]);
  243. > w([[ end)]]);
  244. > w([[ return true]]);
  245. > w([[end]]);
  246. > w([[ ]]);
  247. > w([[return M]]);
  248. > file.close();
  249. > dofile("setup.index.lua");
  250. > file.remove("setup.lua");
  251. > file.open("setup.lua","w+");
  252. > w = file.writeline
  253. > w([[mac, cnt = string.gsub(wifi.ap.getmac(), "-", "")]]);
  254. > w([[cfg={}]]);
  255. > w([[cfg.ssid="LEDS:" .. mac]]);
  256. > w([[cfg.pwd="shinylights"]]);
  257. > w([[wifi.setmode(wifi.STATIONAP)]]);
  258. > w([[wifi.ap.config(cfg)]]);
  259. > w([[]]);
  260. > w([[currentAPs = {}]]);
  261. > w([[]]);
  262. > w([[newssid = ""]]);
  263. > w([[]]);
  264. > w([[function listAPs_callback(t)]]);
  265. > w([[ if(t==nil) then]]);
  266. > w([[ return]]);
  267. > w([[ end]]);
  268. > w([[ currentAPs = t]]);
  269. > w([[end]]);
  270. > w([[]]);
  271. > w([[function listAPs()]]);
  272. > w([[ print("Getting aps")]]);
  273. > w([[ wifi.sta.getap(listAPs_callback)]]);
  274. > w([[end]]);
  275. > w([[tmr.alarm(0, 15000, 1, listAPs)]]);
  276. > w([[listAPs()]]);
  277. > w([[]]);
  278. > w([[srv=net.createServer(net.TCP)]]);
  279. > w([[srv:listen(80, function(conn)]]);
  280. > w([[ conn:on("receive", function(client, payload)]]);
  281. > w([[ print("New request....")]]);
  282. > w([[ local req = dofile("http.lua").parse(payload)]]);
  283. > w([[ print("Req was parsed")]]);
  284. > w([[ local sent = dofile("setup.router.lua").route(client, req)]]);
  285. > w([[ if sent == false then]]);
  286. > w([[ print("yeh bad news bear")]]);
  287. > w([[ client:send("HTTP/1.1 400 Bad Request\r\n\r\n")]]);
  288. > w([[ end]]);
  289. > w([[ end)]]);
  290. > w([[]]);
  291. > w([[ conn:on("sent", function(client)]]);
  292. > w([[ print("Closing connection")]]);
  293. > w([[ client:close()]]);
  294. > w([[ end)]]);
  295. > w([[end)]]);
  296. > file.close();
  297. > dofile("setup.lua");
  298. Getting aps
  299. > Getting aps
  300. New request....
  301. GET / HTTP/1.1
  302. Host: 192.168.4.1
  303. Connection: keep-alive
  304. Cache-Control: max-age=0
  305. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  306. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  307. Accept-Encoding: gzip, deflate, sdch
  308. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  309.  
  310.  
  311. Req was parsed
  312. HTTP/1.1 200 OK
  313. Content-Type: text/html; charset=utf-8
  314.  
  315. <!DOCTYPE html>
  316. <html>
  317. <head>
  318. <meta charset="UTF-8">
  319. <title>Shiny Lights</title>
  320. <link rel="stylesheet" href="/s.css">
  321. </head>
  322. <body>
  323. <h1>Confiure your shiny lights</h1>
  324. <form action="/" method="post">
  325.  
  326. nil
  327. Getting aps
  328. Getting aps
  329. Getting aps
  330. Getting aps
  331. New request....
  332. GET / HTTP/1.1
  333. Host: 192.168.4.1
  334. Connection: keep-alive
  335. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  336. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  337. Accept-Encoding: gzip, deflate, sdch
  338. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  339.  
  340.  
  341. Req was parsed
  342. PANIC: unprotected error in call to Lua API (not enough memory)
  343. PANIC: unprotected error in call to Lua API (attempt to call a string value)
  344. _ÇÏRSöfJSúfJSüâîø
  345.  
  346. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  347. lua: cannot open init.lua
  348. > dofile("setup.lua")
  349. Getting aps
  350. > Getting aps
  351. New request....
  352. GET / HTTP/1.0
  353. Req was parsed
  354. HTTP/1.1 200 OK
  355. Content-Type: text/html; charset=utf-8
  356.  
  357. <!DOCTYPE html>
  358. <html>
  359. <head>
  360. <meta charset="UTF-8">
  361. <title>Shiny Lights</title>
  362. <link rel="stylesheet" href="/s.css">
  363. </head>
  364. <body>
  365. <h1>Confiure your shiny lights</h1>
  366. <form action="/" method="post">
  367.  
  368. nil
  369. Getting aps
  370. Getting aps
  371. Getting aps
  372. Getting aps
  373. Getting aps
  374. Getting aps
  375. Soft restart by user command
  376. node.restart()
  377. > c_ÇÏRSöfJSúfJSúâîø
  378.  
  379. Communication with MCU..Got answer! AutoDetect firmware...
  380.  
  381. Can't autodetect firmware, because proper answer not received.
  382. U 0.9.6 build 20150406 powered by Lua 5.1.4
  383. lua: cannot open init.lua
  384. > file.remove("setup.index.lua");
  385. > file.open("setup.index.lua","w+");
  386. > w = file.writeline
  387. > w([[local moduleName = ...]]);
  388. > w([[local M = {}]]);
  389. > w([[]]);
  390. > w([[function M.render(client, req)]]);
  391. > w([[ file.open("setup.header", "r")]]);
  392. > w([[ repeat]]);
  393. > w([[ local line = file.read(1460)]]);
  394. > w([[ print(line)]]);
  395. > w([[ if line then client:send(line) end]]);
  396. > w([[ until not line ]]);
  397. > w([[ file.close()]]);
  398. > w([[ mac = wifi.sta.getmac()]]);
  399. > w([[ client:send("<p>This device's wifi mac is: " .. mac .. "</p>")]]);
  400. > w([[print("here...")]]);
  401. > w([[ for ssid, v in pairs(currentAPs) do]]);
  402. > w([[ print(ssid)]]);
  403. > w([[ authmode, rssi, bssid, channel = string.match(v, "(%d),(-?%d+),(%x%x:%x%x:%x%x:%x%x:%x%x:%x%x),(%d+)")]]);
  404. > w([[ sssid = string.gsub(ssid, "\"", "&quot;")]]);
  405. > w([[ client:send(]]);
  406. > w([[ string.format(]]);
  407. > w([[ "<div><label><span class=\"%s\">%s</span><input type=\"radio\" name=\"ssid\" value=\"%s\">%s</label></div>",]]);
  408. > w([[ string.char(97 + tonumber(authmode)),]]);
  409. > w([[ (tonumber(authmode) < 1 and "d" or "e"),]]);
  410. > w([[ sssid,]]);
  411. > w([[ ssid]]);
  412. > w([[ ) -- rssi no rssi.. wnat rssi (a, b, c are low med high)]]);
  413. > w([[ )]]);
  414. > w([[ end]]);
  415. > w([[ client:send("<input type=\"password\" name=\"password\" placeholder=\"Password\"><br/>")]]);w([[ client:send("<input type=\"submit\" value=\"Save\">")]]);
  416. > w([[ print("almost done")]]);
  417. > w([[ client:send("</form></body></html>", function()]]);
  418. > w([[ print("Closing connection")]]);
  419. > w([[ client:close()]]);
  420. > w([[ end)]]);
  421. > w([[ return true]]);
  422. > w([[end]]);
  423. > w([[ ]]);
  424. > w([[return M]]);
  425. > file.close();
  426. > dofile("setup.index.lua");
  427. > Soft restart by user command
  428. node.restart()
  429. > c_ÇÏRSöfJSúfJSúâîø
  430.  
  431. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  432. lua: cannot open init.lua
  433. >
  434. Communication with MCU...
  435. Got answer! AutoDetect firmware...
  436.  
  437. NodeMCU firmware detected.
  438. =node.heap()
  439. 18976
  440. > dofile("setup.lua")
  441. Getting aps
  442. > Getting aps
  443. New request....
  444. GET / HTTP/1.0
  445. Req was parsed
  446. HTTP/1.1 200 OK
  447. Content-Type: text/html; charset=utf-8
  448.  
  449. <!DOCTYPE html>
  450. <html>
  451. <head>
  452. <meta charset="UTF-8">
  453. <title>Shiny Lights</title>
  454. <link rel="stylesheet" href="/s.css">
  455. </head>
  456. <body>
  457. <h1>Confiure your shiny lights</h1>
  458. <form action="/" method="post">
  459.  
  460. nil
  461. here...
  462. foobar2.0
  463. sarahdarren
  464. linksys
  465. TP-LINK_2.4GHz_99C47B
  466. BigPond5EB02B
  467. Javalink
  468. OPTUS_2C363E
  469. almost done
  470. Getting aps
  471. Getting aps
  472. New request....
  473. GET /s.css HTTP/1.0
  474. Req was parsed
  475. Getting aps
  476. Getting aps
  477. New request....
  478. GET /s.js HTTP/1.0
  479. Req was parsed
  480. yeh bad news bear
  481. Closing connection
  482. Getting aps
  483. Getting aps
  484. Getting aps
  485. New request....
  486. GET /j.js HTTP/1.0
  487. Req was parsed
  488. Getting aps
  489. Getting aps
  490. file.remove("setup.router.lua");
  491. > file.open("setup.router.lua","w+");
  492. > w = file.writeline
  493. > w([[local moduleName = ...]]);
  494. > w([[local M = {}]]);
  495. > w([[]]);
  496. > w([[local route = {]]);
  497. > w([[ ["GET:/"] = "setup.index.lua",]]);
  498. > w([[ ["GET:/test"] = "setup.test.lua",]]);
  499. > w([[ ["POST:/"] = "setup.save.lua",]]);
  500. > w([[ ["GET:/s.css"] = "setup.css",]]);
  501. > w([[ ["GET:/j.js"] = "setup.js"]]);
  502. > w([[}]]);
  503. > w([[]]);
  504. > w([[function M.route(client, req)]]);
  505. > w([[ local r = route[req["method"] .. ":" .. req["uri"]]]]);
  506. stdin:1: ')' expected near ']'w([[ if r == nil then return false end]]);
  507. > w([[ local ext = string.match(r, "(\.%w+)$")]]);
  508. > w([[ if ext == ".lua" or ext == ".lc" then]]);
  509. > w([[ return dofile(r).render(client, req)]]);
  510. > w([[ end]]);
  511. > w([[ return dofile("render.lua").render(r, client, req)]]);
  512. > w([[end]]);
  513. > w([[]]);
  514. > w([[return M]]);
  515. > file.close();
  516. > dofile("setup.router.lua");
  517. > local moduleName = ...
  518. > local M = {}
  519. > local route = {
  520. ["GET:/"] = "setup.index.lua",
  521. ["GET:/test"] = "setup.test.lua",
  522. >> ["POST:/"] = "setup.save.lua",
  523. ["GET:/s.css"] = "setup.css",
  524. >> ["GET:/j.js"] = "setup.js"
  525. }
  526. > function M.route(client, req)
  527. local r = route[req["method"] .. ":" .. req["uri"]]
  528. if r == nil then return false end
  529. local ext = string.match(r, "(\.%w+)$")
  530. if ext == ".lua" or ext == ".lc" then
  531. return dofile(r).render(client, req)
  532. end
  533. return dofile("render.lua").render(r, client, req)
  534. end
  535. stdin:1: attempt to index global 'M' (a nil value)Getting aps
  536. return M
  537. nil
  538. > Uploading to ESP file setup.router.lua...Success
  539.  
  540. > Getting aps
  541. Getting aps
  542. Getting aps
  543. file.remove("setup.router.lua");
  544. > file.open("setup.router.lua","w+");
  545. > w = file.writeline
  546. > w([[local moduleName = ...]]);
  547. > w([[local M = {}]]);
  548. > w([[]]);
  549. > w([[local route = {]]);
  550. > w([[ ["GET:/"] = "setup.index.lua",]]);
  551. > w([[ ["GET:/test"] = "setup.test.lua",]]);
  552. > w([[ ["POST:/"] = "setup.save.lua",]]);
  553. > w([[ ["GET:/s.css"] = "setup.css",]]);
  554. > w([[ ["GET:/j.js"] = "setup.js",]]);
  555. > w([[ ["GET:/h"] = "setup.header"]]);
  556. > w([[}]]);
  557. > w([[]]);
  558. > w([[function M.route(client, req)]]);
  559. > w([[ local r = route[req["method"] .. ":" .. req["uri"]]]]);
  560. stdin:1: ')' expected near ']'w([[ if r == nil then return false end]]);
  561. > w([[ local ext = string.match(r, "(\.%w+)$")]]);
  562. > w([[ if ext == ".lua" or ext == ".lc" then]]);
  563. > w([[ return dofile(r).render(client, req)]]);
  564. > w([[ end]]);
  565. > w([[ return dofile("render.lua").render(r, client, req)]]);
  566. > w([[end]]);
  567. > w([[]]);
  568. > w([[return M]]);
  569. > file.close();
  570. > dofile("setup.router.lua");
  571. > Uploading to ESP file setup.router.lua...Success
  572.  
  573. > Getting aps
  574. Getting aps
  575. Getting aps
  576. New request....
  577. GET /h HTTP/1.1
  578. Req was parsed
  579. Getting aps
  580. Getting aps
  581. Getting aps
  582. Getting aps
  583. Getting aps
  584. Getting aps
  585. Getting aps
  586. file.remove("setup.lua");
  587. > file.open("setup.lua","w+");
  588. > file.remove("setup.lua");
  589. file.remove("setup.lua");
  590. > file.open("setup.lua","w+");
  591. > w = file.writeline
  592. > w([[apmac, cnt = string.gsub(wifi.ap.getmac(), "-", "")]]);
  593. > w([[stamac = wifi.sta.getmac()]]);
  594. > w([[cfg={}]]);
  595. > w([[cfg.ssid="LEDS:" .. apmac]]);
  596. > w([[cfg.pwd="shinylights"]]);
  597. > w([[wifi.setmode(wifi.STATIONAP)]]);
  598. > w([[wifi.ap.config(cfg)]]);
  599. > w([[]]);
  600. > w([[currentAPs = {}]]);
  601. > w([[]]);
  602. > w([[newssid = ""]]);
  603. > w([[]]);
  604. > w([[function listAPs_callback(t)]]);
  605. > w([[ if(t==nil) then]]);
  606. > w([[ return]]);
  607. > w([[ end]]);
  608. > w([[ currentAPs = t]]);
  609. > w([[end]]);
  610. > w([[]]);
  611. > w([[function listAPs()]]);
  612. > w([[ print("Getting aps")]]);
  613. > w([[ wifi.sta.getap(listAPs_callback)]]);
  614. > w([[end]]);
  615. > w([[tmr.alarm(0, 15000, 1, listAPs)]]);
  616. > w([[listAPs()]]);
  617. > w([[]]);
  618. > w([[srv=net.createServer(net.TCP)]]);
  619. > w([[srv:listen(80, function(conn)]]);
  620. > w([[ conn:on("receive", function(client, payload)]]);
  621. > w([[ print("New request....")]]);
  622. > w([[ local req = dofile("http.lua").parse(payload)]]);
  623. > w([[ print("Req was parsed")]]);
  624. > w([[ local sent = dofile("setup.router.lua").route(client, req)]]);
  625. > w([[ if sent == false then]]);
  626. > w([[ print("yeh bad news bear")]]);
  627. > w([[ client:send("HTTP/1.1 400 Bad Request\r\n\r\n")]]);
  628. > w([[ end]]);
  629. > w([[ end)]]);
  630. > w([[]]);
  631. > w([[ conn:on("sent", function(client)]]);
  632. > w([[ print("Closing connection")]]);
  633. > w([[ client:close()]]);
  634. > w([[ end)]]);
  635. > w([[end)]]);
  636. > file.close();
  637. > dofile("setup.lua");
  638. Getting aps
  639. setup.lua:27: only one tcp server allowed
  640. > Getting aps
  641. Getting aps
  642. Getting aps
  643. Getting aps
  644. Getting aps
  645. Getting aps
  646. Getting aps
  647. Getting aps
  648. Getting aps
  649. Getting aps
  650. Getting aps
  651. Getting aps
  652. Getting aps
  653. Getting aps
  654. Getting aps
  655. Getting aps
  656. Getting aps
  657. Getting aps
  658. Getting aps
  659. Getting aps
  660. Getting aps
  661. Getting aps
  662. Getting aps
  663. Soft restart by user command
  664. node.restart()
  665. > c_ÇÏRSöfJSúfJSúâî
  666. Communication with MCU...
  667. Got answer! AutoDetect firmware...
  668.  
  669. Can't autodetect firmware, because proper answer not received.
  670.  
  671. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  672. lua: cannot open init.lua
  673. > Uploading to ESP file setup.index.lua...Success
  674.  
  675. > dofile("setup.lua")
  676. Getting aps
  677. > Getting aps
  678. New request....
  679. GET / HTTP/1.1
  680. Host: 192.168.4.1
  681. Connection: keep-alive
  682. Cache-Control: max-age=0
  683. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  684. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  685. Accept-Encoding: gzip, deflate, sdch
  686. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  687.  
  688.  
  689. Req was parsed
  690. Closing connection
  691. New request....
  692. GET /s.css HTTP/1.1
  693. Host: 192.168.4.1
  694. Connection: keep-alive
  695. Cache-Control: max-age=0
  696. Accept: text/css,*/*;q=0.1
  697. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  698. Referer: http://192.168.4.1/
  699. Accept-Encoding: gzip, deflate, sdch
  700. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  701.  
  702.  
  703. Req was parsed
  704. New request....
  705. GET /f.woff HTTP/1.1
  706. Host: 192.168.4.1
  707. Connection: keep-alive
  708. Cache-Control: max-age=0
  709. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  710. Accept: */*
  711. Referer: http://192.168.4.1/s.css
  712. Accept-Encoding: gzip, deflate, sdch
  713. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  714.  
  715.  
  716. Req was parsed
  717. yeh bad news bear
  718. Closing connection
  719. New request....
  720. GET /favicon.ico HTTP/1.1
  721. Host: 192.168.4.1
  722. Connection: keep-alive
  723. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  724. Accept: */*
  725. Referer: http://192.168.4.1/
  726. Accept-Encoding: gzip, deflate, sdch
  727. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  728.  
  729.  
  730. Req was parsed
  731. yeh bad news bear
  732. Closing connection
  733. Getting aps
  734. Getting aps
  735. l = file.list();
  736. > for k,v in pairs(l) do
  737. print("name:"..k..", size:"..v)
  738. end
  739. name:setup.js, size:1124
  740. name:render.lua, size:654
  741. name:setup.header, size:261
  742. name:setup.router.lua, size:561
  743. name:http.lua, size:514
  744. name:setup.index.lua, size:1097
  745. name:setup.save, size:449
  746. name:f.woff, size:1320
  747. name:setup.save.lua, size:644
  748. name:setup.test.lua, size:363
  749. name:setup.css, size:355
  750. name:setup.lua, size:942
  751. > Getting aps
  752. Getting aps
  753. file.remove("setup.router.lua");
  754. > file.open("setup.router.lua","w+");
  755. > w = file.writeline
  756. > w([[local moduleName = ...]]);
  757. > w([[local M = {}]]);
  758. > w([[]]);
  759. > w([[local route = {]]);
  760. > w([[ ["GET:/"] = "setup.index.lua",]]);
  761. > w([[ ["GET:/test"] = "setup.test.lua",]]);
  762. > w([[ ["POST:/"] = "setup.save.lua",]]);
  763. > w([[ ["GET:/s.css"] = "setup.css",]]);
  764. > w([[ ["GET:/j.js"] = "setup.js",]]);
  765. > w([[ ["GET:/f.woff"] = "f.woff"]]);
  766. > w([[}]]);
  767. > w([[]]);
  768. > w([[function M.route(client, req)]]);
  769. > w([[ local r = route[req["method"] .. ":" .. req["uri"]]]]);
  770. stdin:1: ')' expected near ']'w([[ if r == nil then return false end]]);
  771. > w([[ local ext = string.match(r, "(\.%w+)$")]]);
  772. > w([[ if ext == ".lua" or ext == ".lc" then]]);
  773. > w([[ return dofile(r).render(client, req)]]);
  774. > w([[ end]]);
  775. > w([[ return dofile("render.lua").render(r, client, req)]]);
  776. > w([[end]]);
  777. > w([[]]);
  778. > w([[return M]]);
  779. > file.close();
  780. > dofile("setup.router.lua");
  781. > Getting aps
  782. Uploading to ESP file setup.router.lua...Success
  783.  
  784. > New request....
  785. GET / HTTP/1.1
  786. Host: 192.168.4.1
  787. Connection: keep-alive
  788. Cache-Control: max-age=0
  789. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  790. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  791. Accept-Encoding: gzip, deflate, sdch
  792. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  793.  
  794.  
  795. Req was parsed
  796. PANIC: unprotected error in call to Lua API (not enough memory)
  797. PANIC: unprotected error in call to Lua API (attempt to call a string value)
  798. c_ÇÏRSöfJSúfJSúâîø
  799.  
  800. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  801. lua: cannot open init.lua
  802. > dofile("setup.lua")
  803. Getting aps
  804. > Getting aps
  805. New request....
  806. GET / HTTP/1.1
  807. Host: 192.168.4.1
  808. Connection: keep-alive
  809. Cache-Control: max-age=0
  810. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  811. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  812. Accept-Encoding: gzip, deflate, sdch
  813. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  814.  
  815.  
  816. Req was parsed
  817. Closing connection
  818. New request....
  819. GET /s.css HTTP/1.1
  820. Host: 192.168.4.1
  821. Connection: keep-alive
  822. Cache-Control: max-age=0
  823. Accept: text/css,*/*;q=0.1
  824. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  825. Referer: http://192.168.4.1/
  826. Accept-Encoding: gzip, deflate, sdch
  827. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  828.  
  829.  
  830. Req was parsed
  831. New request....
  832. GET /f.woff HTTP/1.1
  833. Host: 192.168.4.1
  834. Connection: keep-alive
  835. Cache-Control: max-age=0
  836. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  837. Accept: */*
  838. Referer: http://192.168.4.1/s.css
  839. Accept-Encoding: gzip, deflate, sdch
  840. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  841.  
  842.  
  843. Req was parsed
  844. New request....
  845. GET /favicon.ico HTTP/1.1
  846. Host: 192.168.4.1
  847. Connection: keep-alive
  848. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  849. Accept: */*
  850. Referer: http://192.168.4.1/
  851. Accept-Encoding: gzip, deflate, sdch
  852. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  853.  
  854.  
  855. Req was parsed
  856. yeh bad news bear
  857. Closing connection
  858. Getting aps
  859. Getting aps
  860. Getting aps
  861. Getting aps
  862. Getting aps
  863. Uploading to ESP file setup.css...Success
  864.  
  865. > New request....
  866. GET / HTTP/1.1
  867. Host: 192.168.4.1
  868. Connection: keep-alive
  869. Cache-Control: max-age=0
  870. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  871. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  872. Accept-Encoding: gzip, deflate, sdch
  873. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  874.  
  875.  
  876. Req was parsed
  877. PANIC: unprotected error in call to Lua API (not enough memory)
  878. PANIC: unprotected error in call to Lua API (attempt to call a string value)
  879. c_ÇÏRSöfJSúfJSúâîø
  880.  
  881. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  882. lua: cannot open init.lua
  883. > dofile("setup.lua")
  884. Getting aps
  885. > Getting aps
  886. New request....
  887. GET / HTTP/1.1
  888. Host: 192.168.4.1
  889. Connection: keep-alive
  890. Cache-Control: max-age=0
  891. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  892. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  893. Accept-Encoding: gzip, deflate, sdch
  894. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  895.  
  896.  
  897. Req was parsed
  898. Closing connection
  899. New request....
  900. GET /s.css HTTP/1.1
  901. Host: 192.168.4.1
  902. Connection: keep-alive
  903. Cache-Control: max-age=0
  904. Accept: text/css,*/*;q=0.1
  905. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  906. Referer: http://192.168.4.1/
  907. Accept-Encoding: gzip, deflate, sdch
  908. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  909.  
  910.  
  911. Req was parsed
  912. New request....
  913. GET /f.woff HTTP/1.1
  914. Host: 192.168.4.1
  915. Connection: keep-alive
  916. Cache-Control: max-age=0
  917. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  918. Accept: */*
  919. Referer: http://192.168.4.1/s.css
  920. Accept-Encoding: gzip, deflate, sdch
  921. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  922.  
  923.  
  924. Req was parsed
  925. New request....
  926. GET /favicon.ico HTTP/1.1
  927. Host: 192.168.4.1
  928. Connection: keep-alive
  929. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  930. Accept: */*
  931. Referer: http://192.168.4.1/
  932. Accept-Encoding: gzip, deflate, sdch
  933. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  934.  
  935.  
  936. Req was parsed
  937. yeh bad news bear
  938. Closing connection
  939. Getting aps
  940. =node.heap()
  941. 10088
  942. > New request....
  943. GET / HTTP/1.1
  944. Host: 192.168.4.1
  945. Connection: keep-alive
  946. Cache-Control: max-age=0
  947. Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  948. User-Agent: Mozilla/5.0 (Linux; Android 5.1; Nexus 6 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
  949. Accept-Encoding: gzip, deflate, sdch
  950. Accept-Language: en-AU,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
  951.  
  952.  
  953. Req was parsed
  954. PANIC: unprotected error in call to Lua API (not enough memory)
  955. PANIC: unprotected error in call to Lua API (attempt to call a string value)
  956. c_ÇÏRSöfJSúfJSúâîø
  957.  
  958. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  959. lua: cannot open init.lua
  960. > Uploading to ESP file http.lua...Success
  961.  
  962. > Uploading to ESP file render.lua...Success
  963.  
  964. > Uploading to ESP file setup.header...Success
  965.  
  966. > Uploading to ESP file setup.index.lua...Success
  967.  
  968. > Uploading to ESP file setup.lua...Success
  969.  
  970. > Uploading to ESP file setup.router.lua...Success
  971.  
  972. > Soft restart by user command
  973. node.restart()
  974. > c_ÇÏRSöfJSúfJSúâî
  975. Communication with MCU...
  976. Got answer! AutoDetect firmware...
  977.  
  978. Can't autodetect firmware, because proper answer not received.
  979.  
  980.  
  981. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  982. lua: cannot open init.lua
  983. > =node.heap()
  984. 19152
  985. > dofile("setup.lua")
  986. Getting aps
  987. > New request....
  988. Req was parsed
  989. am routing
  990. Closing connection
  991. New request....
  992. Req was parsed
  993. am routing
  994. New request....
  995. Req was parsed
  996. am routing
  997. New request....
  998. Req was parsed
  999. am routing
  1000. yeh bad news bear
  1001. Closing connection
  1002. Getting aps
  1003. Getting aps
  1004. New request....
  1005. Req was parsed
  1006. am routing
  1007. Closing connection
  1008. New request....
  1009. Req was parsed
  1010. am routing
  1011. New request....
  1012. Req was parsed
  1013. am routing
  1014. New request....
  1015. Req was parsed
  1016. am routing
  1017. New request....
  1018. Req was parsed
  1019. am routing
  1020. New request....
  1021. Req was parsed
  1022. am routing
  1023. PANIC: unprotected error in call to Lua API (not enough memory)
  1024. c_ÇÏRSöfJSúfJSúÒîø
  1025.  
  1026. NodeMCU 0.9.6 build 20150406 powered by Lua 5.1.4
  1027. lua: cannot open init.lua
  1028. >
  1029. PORT CLOSED
  1030.  
  1031. PORT OPEN 9600
  1032.  
  1033. Communication with MCU...
  1034. ..........
  1035. ..........
  1036.  
  1037. PORT CLOSED
  1038.  
  1039. PORT OPEN 9600
  1040.  
  1041. Communication with MCU...
  1042. ..........
  1043. ..........
  1044. ...
  1045. PORT CLOSED
  1046.  
  1047. PORT OPEN 9600
  1048.  
  1049. Communication with MCU...
  1050. Got answer! AutoDetect firmware...
  1051.  
  1052. NodeMCU firmware detected.
  1053. =node.heap()
  1054. 23520
  1055. >
  1056. PORT CLOSED
  1057.  
  1058. PORT OPEN 9600
  1059.  
  1060. Communication with MCU...
  1061. Got answer! AutoDetect firmware...
  1062.  
  1063. NodeMCU firmware detected.
  1064. =node.heap()
  1065. 24336
  1066. > Uploading to ESP file f.woff...Waiting answer from ESP - Timeout reached. Command aborted.c_ÇÏRSöfJSúâFjSöfîø
  1067.  
  1068. NodeMCU 0.9.6 build 20150405 powered by Lua 5.1.4
  1069. lua: cannot open init.lua
  1070. > l = file.list();
  1071. > for k,v in pairs(l) do
  1072. print("name:"..k..", size:"..v)
  1073. end
  1074. > file.format()
  1075. format done.
  1076. > Uploading to ESP file f.woff...Waiting answer from ESP - Timeout reached. Command aborted.c_ÇÏRSöfJSúâFjSöîø
  1077.  
  1078. NodeMCU 0.9.6 build 20150405 powered by Lua 5.1.4
  1079. lua: cannot open init.lua
  1080. >
  1081. Total : 507 bytes
  1082. Used : 0 bytes
  1083. Remain: 507 bytes
  1084.  
  1085. >
  1086. > file.format()
  1087. format done.
  1088. >
  1089. ----------------------------
  1090. No files found.
  1091. ----------------------------
  1092. >
  1093. Total : 507 bytes
  1094. Used : 0 bytes
  1095. Remain: 507 bytes
  1096.  
  1097. >
  1098. Total : 507 bytes
  1099. Used : 0 bytes
  1100. Remain: 507 bytes
  1101.  
  1102. > Soft restart by user command
  1103. node.restart()
  1104. > c_ÇÏRSöfJSúâFjSöfî
  1105. Communication with MCU...
  1106. Got answer! AutoDetect firmware...
  1107.  
  1108. Can't autodetect firmware, because proper answer not received.
  1109.  
  1110. NodeMCU 0.9.6 build 20150405 powered by Lua 5.1.4
  1111. lua: cannot open init.lua
  1112. >
  1113. Total : 507 bytes
  1114. Used : 0 bytes
  1115. Remain: 507 bytes
  1116.  
  1117. > Uploading to ESP file http.lua...Waiting answer from ESP - Timeout reached. Command aborted.c_ÇÏRSöfJSúâFjSöfîø
  1118.  
  1119. NodeMCU 0.9.6 build 20150405 powered by Lua 5.1.4
  1120. lua: cannot open init.lua
  1121. >
  1122. Total : 507 bytes
  1123. Used : 0 bytes
  1124. Remain: 507 bytes
  1125.  
  1126. >
  1127. PORT OPEN 9600
  1128.  
  1129. Communication with MCU...
  1130. Got answer! AutoDetect firmware...
  1131.  
  1132. NodeMCU firmware detected.
  1133. =node.heap()
  1134. 24336
  1135. >
  1136. Total : 507 bytes
  1137. Used : 0 bytes
  1138. Remain: 507 bytes
  1139.  
  1140. > file.format()
  1141. format done.
  1142. >
  1143. Total : 507 bytes
  1144. Used : 0 bytes
  1145. Remain: 507 bytes
  1146.  
  1147. >
  1148. ----------------------------
  1149. No files found.
  1150. ----------------------------
  1151. >
  1152. Total : 507 bytes
  1153. Used : 0 bytes
  1154. Remain: 507 bytes
  1155.  
  1156. > l = file.list();
  1157. > for k,v in pairs(l) do
  1158. print("name:"..k..", size:"..v)
  1159. end
  1160. >
  1161. PORT OPEN 9600
  1162.  
  1163. Communication with MCU...
  1164. Got answer! AutoDetect firmware...
  1165.  
  1166. NodeMCU firmware detected.
  1167. =node.heap()
  1168. 27808
  1169. >
  1170. ----------------------------
  1171. No files found.
  1172. ----------------------------
  1173. >
  1174. Total : 158381 bytes
  1175. Used : 0 bytes
  1176. Remain: 158381 bytes
  1177.  
  1178. > Uploading to ESP file f.woff...Success
  1179.  
  1180. > Uploading to ESP file http.lua...Success
  1181.  
  1182. > Uploading to ESP file render.lua...Success
  1183.  
  1184. > Uploading to ESP file setup.css...Success
  1185.  
  1186. > Uploading to ESP file setup.index.lua...Success
  1187.  
  1188. > Uploading to ESP file setup.js...Success
  1189.  
  1190. > Uploading to ESP file setup.lua...Success
  1191.  
  1192. > Uploading to ESP file setup.router.lua...Success
  1193.  
  1194. > Uploading to ESP file setup.save...Success
  1195.  
  1196. > Uploading to ESP file setup.save.lua...Success
  1197.  
  1198. > Uploading to ESP file setup.test.lua...Success
  1199.  
  1200. > Soft restart by user command
  1201. node.restart()
  1202. > c_ÇÏRSöfJSúâFjöâêø
  1203.  
  1204. NodeMCU 0.9.5 build 20150405 powered by Lua 5.1.4
  1205. lua: cannot open init.lua
  1206. >
  1207. Communication with MCU...
  1208. Got answer! AutoDetect firmware...
  1209.  
  1210. NodeMCU firmware detected.
  1211. =node.heap()
  1212. 27808
  1213. > dofile("setup.lua")
  1214. Getting aps
  1215. > Getting aps
  1216. Getting aps
  1217. Getting aps
  1218. Getting aps
  1219. 11336
  1220. am routing
  1221. 11952
  1222. Getting aps
  1223. 8800
  1224. am routed
  1225. 9368
  1226. Closing connection
  1227. Closing connection
  1228. 10400
  1229. am routed
  1230. 10992
  1231. yeh bad news bear
  1232. Closing connection
  1233. Closing connection
  1234. 11104
  1235. am routing
  1236. 11768
  1237. Closing connection
  1238. 10416
  1239. am routed
  1240. 11048
  1241. Closing connection
  1242. 10544
  1243. am routed
  1244. 11160
  1245. yeh bad news bear
  1246. Closing connection
  1247. Closing connection
  1248. Getting aps
  1249. 10504
  1250. am routing
  1251. 11168
  1252. Closing connection
  1253. 9976
  1254. am routed
  1255. 10568
  1256. Closing connection
  1257. 10560
  1258. am routed
  1259. 11136
  1260. yeh bad news bear
  1261. Closing connection
  1262. Closing connection
  1263. 11368
  1264. am routing
  1265. 12040
  1266. Closing connection
  1267. 10960
  1268. am routed
  1269. 11576
  1270. Closing connection
  1271. 11408
  1272. am routed
  1273. 12024
  1274. yeh bad news bear
  1275. Closing connection
  1276. Closing connection
  1277. Getting aps
  1278. Getting aps
  1279. Getting aps
  1280. Getting aps
  1281. Getting aps
  1282. Getting aps
  1283. Getting aps
  1284. Getting aps
  1285. Getting aps
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement