adampolar
Posts: 2
Joined: Tue Jan 05, 2016 9:38 pm

Passing data from raw TCP socket to the console

Tue Jan 05, 2016 11:12 pm

Hi all,

I'm new to the EMW3165, lua and wifiMCU but I've been playing around with them and ended up writing some code which allows you pass through data from a tcp socket to the lua interpreter, so I thought I'd share in case anyone was interested (as this is one of the first examples on nodeMCU's site, and I couldn't find an example for WiFiMCU, and allows you to access the lua interpreter from programs such as PuTTY for example). (N.B. this doesn't seem to work on firmware <= 0.9.5 due to issues with loadstring).

code is here https://github.com/adampolar/WiFiMCURawTCPSocketLuaInterpreter/blob/master/WiFiMCURawTCPSocketLuaInterpreter.lua

Any advice appreciated.

Thanks,

Adam

loboris
Posts: 40
Joined: Tue Sep 15, 2015 7:47 am
Location: Zagreb, Croatia

Re: Passing data from raw TCP socket to the console

Wed Jan 06, 2016 9:44 am

Have you looked at telnetserv.lua example in my version of WiFiMCU Lua ?

In my version internal dostring function has full redirection to tcp socket, so you get all the output redirected back to socket when executed from remote console.

adampolar
Posts: 2
Joined: Tue Jan 05, 2016 9:38 pm

Re: Passing data from raw TCP socket to the console

Wed Jan 06, 2016 9:19 pm

I hadn't, at least there is a more obvious link now for people to find out how to do this. That's great, will this change be merged with the main project?

angelaruck
Posts: 1
Joined: Mon Feb 08, 2016 6:26 am

Passing data from raw TCP socket to the console

Sat Feb 20, 2016 8:20 am

Im having some problems making this work. Im confused as to where youre getting the return OK from the called form. I assume that is a button but Im not sure.


Return to “WiFiMCU”

Who is online

Users browsing this forum: No registered users and 2 guests