As the title says... Chat on...

User avatar
By DeadRabbit
#20435 Hey there,
maybe I'm too dump, or I can't use google how I should,
but I can't find any possibilities how to communicate over wifi with my ESP

I have opened a tcp-server on port 80 and want to send tcp packages like
" echo "gpio.write(4, gpio.HIGH" > /dev/tcp/my-ip/80 "
to the ESP, but all I found is how to print it on the console, but that doesn't fix my issue, as you may see :P

hope there is a easy way to make it...

greetings,

Rabbit
User avatar
By DeadRabbit
#20439 Big thanks,

that is getting me realy close to my target :D

Two more things about that:

First, when I telnet to my ESP, I can't leave it again, except to shutdown my terminal, is there an other way?

Second, do you know, if there is a possibility to easily send a command like " echo command > telnet my-ip 2323 "?

Edit :D

Got it:

Code: Select all#!/bin/bash

befehl="gpio.write(4, gpio.HIGH)\r"

(
sleep 3
echo -e $befehl
sleep 3
#echo -e "exit\r"
) | telnet 192.168.xxx.xxx 2323

User avatar
By HermannSW
#20453 Hi,

you already found answer for 2nd question.

> First, when I telnet to my ESP, I can't leave it again, except to shutdown my terminal, is there an other way?
>
From "man telnet"
The line ~^] escapes to the normal telnet escape prompt.

From there just "q" and enter and you are back.


I really like telnetting into NodeMCU, what I saw sometimes is that no ">" command prompt appeared. First I thought the session got killed (motor sometimes send spiked and resets ESP8266-01), but that was not always the case. Sometimes NodeMCU just forgets to display command prompt, but works fine on new commands. But then for all following commands the command promt is missing as well (the prompt is missing for the initial command always, so I mostly start with just hitting enter key).

Hermann.