The function web.GotText isn't work! (with wifi ESP8266)

23 views
Skip to first unread message

пВ Нет

unread,
Aug 12, 2019, 8:06:32 AM8/12/19
to MIT App Inventor Forum
Hello! I'm new and sorry for my english and other, but the problem needs to be solved soon.
I spent a lot of time looking for a solution to this issue, but this question is still open (almost one year?) and not only mine.
My program on Lua (not 'C'), but it's insignificant. The problem is the same and not in module or program for it.
With browser this unit work well! First see:
Then new:

My:
InitialNet1="HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nConnection: keep-alive\r\n"
InitialNet2="Content-Lenght: 6\r\n\r\nHello!"
--Create Server
sv=net.createServer(net.TCP,30)
if sv then
  print("Server open")
  sv:listen(80, function(conn)
    conn:send(InitialNet1)
    conn:send(InitialNet2)
-- This instruction for browser:
--    conn:send("<html><h1>"..LEDstate..TempMeans.."</h1></html>")
    conn:on("receive", receiver)
  end)
end

The function www.GotText has never even been called. 
Otherwise, the screen would appear colored spots that can not be overlooked.
The unit can receive data and send it too, but inventor's application can't get a single byte anyway from it.
Help if your can. Who is able to, it is better in Russian.

i2-ESPwifi.jpg

пВ Нет

unread,
Aug 12, 2019, 8:29:11 AM8/12/19
to MIT App Inventor Forum

ABG

unread,
Aug 12, 2019, 2:01:10 PM8/12/19
to MIT App Inventor Forum
Reply all
Reply to author
Forward
0 new messages