wendlers / mpfshell

A simple shell based file explorer for ESP8266 Micropython based devices ⛺
MIT License
396 stars 84 forks source link

Specify port for telnet #106

Open andrewtholt opened 2 years ago

andrewtholt commented 2 years ago

I am connecting a serial adaptor to an esp8266, then using (linux) ser2net to I can telnet to the console. All good.

I can use socat to create a pty and then use mpfshell to connect to that. It's a bit messy though, and when you exit socat exits too

what would be useful would be (or something like):

mpfshell tn:192.123.0.43:2000

or

mpfshell tn:192.123.0.43,2000

I've stated looking at the code, but your opinion and suggestions would be appreciated.

Thanks, Andrew

skorokithakis commented 2 years ago

Hm, this sounds like a useful thing to be able to do, but I'm afraid that I don't really remember much of the code at this point.

What's messy about socat? It seems like it would cleanly allow you to do this, and it'd be better to combine two utilities than overload mpfshell's functionality with something fairly orthogonal. That's not to say that I think the feature shouldn't be here, I'd just like to make sure it's necessary to be in the codebase first.

andrewtholt commented 2 years ago

If I close the connection to socat it exits. OK, I could put in a script and loop, but it just seems tidier.

On Sat, 9 Jul 2022 at 01:07, Stavros Korokithakis @.***> wrote:

Hm, this sounds like a useful thing to be able to do, but I'm afraid that I don't really remember much of the code at this point.

What's messy about socat? It seems like it would cleanly allow you to do this, and it'd be better to combine two utilities than overload mpfshell's functionality with something fairly orthogonal. That's not to say that I think the feature shouldn't be here, I'd just like to make sure it's necessary to be in the codebase first.

— Reply to this email directly, view it on GitHub https://github.com/wendlers/mpfshell/issues/106#issuecomment-1179437549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYVWSILJ2F2ZKPH6XNVLMLVTC7ETANCNFSM53BLJDEA . You are receiving this because you authored the thread.Message ID: @.***>

skorokithakis commented 2 years ago

Hmm, yeah. I'm just afraid that some TCP/telnet stuff will eventually leak up into the code, so I'm wondering if it's worth it. If it's a small change (a few tens of LoC), I think it would be fine.