Go Down

Topic: Remote terminal/monitor for ESP8266 & ESP32 (Read 12403 times) previous topic - next topic

bricoleau

#15
May 05, 2020, 02:01 pm Last Edit: May 05, 2020, 02:30 pm by bricoleau
Ok, missing library is explained.

But the example from lastminuteengineers with station mode should work.
And then WiFiTerm will also work.

Sorry I can't help you much more on flashing an ESPDuino.
It is out of range of this topic.

mading

Hi there,
I bought an ESP32 WLAN DEV Kit1: https://www.ebay.it/itm/Espressif-ESP32-WLAN-Dev-Kit-Board-Development-Bluetooth-Wifi-v1-WROOM32-NodeMCU/253059783728?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Same issues as the other one: can't load the browser page of both examples (your Full Demo and the other one).

Seems that I have to work on my Zyxel router. The ESP32 is regularly present in the router device list, but is not accessible by PC or android.

btw thanks for your help.
I'm looking forward to test your remote terminal!

mading

Hi there!
Well, it was something so simple that I felt bad and happy at the same time. The ESP32 was connected to the guest wi-fi network (while the laptop was in the main one).
It worked at the first attempt, as soon as the ESP32 was connected to the main wifi network.
Sorry for multiple questions and many thanks for your work with the terminal.

best wishes

francesco

trilife

Hello Bricoleur,

Will this work with am Ethernet shield? Or only Wifi? Cheers
Never give up!

bricoleau

Sorry this library is only designed for ESPs

But it could easily be forked for standard atmega arduino.

trilife

Sorry this library is only designed for ESPs

But it could easily be forked for standard atmega arduino.

Assuming I know, what I'm doing. Which I'm not!

Thanks anyway
Never give up!

bricoleau

#21
Jan 17, 2021, 11:27 am Last Edit: Jan 17, 2021, 11:28 am by bricoleau
I received several pm from people indicating that they couldn't reply to this topic because it is locked.
So i try a new reply...

[Edit : hmmmm it seems I can reply to it. what's going on?]

bb328

Now I can reply, but recently I just got the error message saying "no posts since xxx days..." so thread was locked.

Anyway,
I found your very useful library "WiFiTerm" which works just fine on my ESP8266 D1 mini.
What I like the most is that this can be a standard way to interface with different projects without having to build individual web pages for each one of them. A cli is a very powerful and flexible tool.

But may I propose some ideas that may be worth developing ? It would be nice with a few shortcut buttons that can serve the most frequent tasks without having to type in the commands each time. Also a few other customizable items, please see a screenshot (Photoshopped) image:
https://www.dropbox.com/s/k3tpdn4x327zqna/Untitled-2.jpg?dl=0
The shortcuts behind the buttons would need a button text to be displayed and a text string to be sent via WiFiTerm, and both of them could be hard coded in the Arduino sketch.

Also, If I remember correctly, ctrl-G is ascii code for Bell. It could be useful to send a Bell signal to the client, in case an alarm was sent etc. Would that be possible ?

Thanks a lot, and best regards
Ragnar

bricoleau

#23
Jan 17, 2021, 08:28 pm Last Edit: Jan 17, 2021, 08:28 pm by bricoleau
Nice idea, I will think about it

WiFiTerm and arduino only send stream chars to each other.
I should add some kind of service messages (Window title, buttons, ...)

It could end to something like that :
Code: [Select]
const char windows_title = "my title";

const char caption1 = "action1";
void button1()
{
  //do something
}

void setup()
{
  ...
  term.setTitle(windows_title);
  term.addButton(caption1, button1);
  ...
}

bb328

Very interesting, I look forward to testing the next version. 

My plan is to use this as the heart of my home automation system. Log messages will appear as incoming messages, and commands can be sent the other way. Buttons can be used for manually turning lights on / off etc.

bb328

I just added a small command interpreter that suites my current project :
Code: [Select]

  String incoming;
  String cmd;
  int p1, p2;

  if (term.available())
  {
    incoming = term.readString();
    incoming.toUpperCase();
    term.println(incoming);
    uint8_t i = incoming.indexOf(' ');
    uint8_t j = incoming.indexOf(' ', i + 1);

    cmd = incoming.substring(0, i);
    p1 = incoming.substring(i + 1, j).toInt();
    p2 = incoming.substring(j + 1).toInt();
    //term.println(cmd);
    //term.println(p1);
    //term.println(p2);
  }


I noticed one thing that may be easily cured. The internal line buffer seems to be just 20 lines. If I leave a text log running in one browser, I can se much more than 20 lines, but if I start a new browser (or reload the page) I just get the bottom 20 lines of the previous text.
Maybe it could be a user settable variable ?

Anyway, WiFiTerm will take my projects so much further than I could imagine, so thanks again !


 

bricoleau

I noticed one thing that may be easily cured. The internal line buffer seems to be just 20 lines. If I leave a text log running in one browser, I can se much more than 20 lines, but if I start a new browser (or reload the page) I just get the bottom 20 lines of the previous text.
Maybe it could be a user settable variable ?
txbuffer default size is 300 ram bytes.

You can increase this value in the file WiFiTerm.h
Code: [Select]
...
#define WIFITERM_TX_BUF_SIZE 300
#define WIFITERM_RX_BUF_SIZE 100
...



bb328


jdgramp

Just wanted to say this is GREAT! I can imagine a number of uses for this already. My only issue is you have now provided me with me with more 'stuff' I want to do  :smiley-lol:


Once again thank you for sharing (and I've also sent this to a friend)

bricoleau

Thank you for feedback

Apologies for your issue  :)

Go Up