WiFi Telnet

929 views
Skip to first unread message

Chris Davis

unread,
Jan 17, 2021, 12:02:16 PM1/17/21
to Altair-Duino
I just connected to my Altair-Duino with telnet over wifi!  Only four years in the making...

I'll try to post a video later today.
IMG_6207.jpg

wils...@gmail.com

unread,
Jan 17, 2021, 12:03:45 PM1/17/21
to Altair-Duino

This is great! I had been planning on using an external terminal adapter, but this is much simpler and more discreet. 

Wayne Talbot

unread,
Jan 17, 2021, 12:16:23 PM1/17/21
to Chris Davis, Altair-Duino
What a great idea. Have you written instructions? 


--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/altair-duino/2ccc0981-afab-44c1-8688-03aab826277bn%40googlegroups.com.

Chris Davis

unread,
Jan 17, 2021, 2:17:19 PM1/17/21
to Altair-Duino
No,  I'll try to post a video later today.  

Chris Davis

unread,
Jan 17, 2021, 4:28:47 PM1/17/21
to Altair-Duino
Here's the video: https://youtu.be/98CH5FY8pLI

Charley Jones

unread,
Jan 17, 2021, 4:51:33 PM1/17/21
to Chris Davis, Altair-Duino
Nice job Chris!
Damn those esp’s are versatile.
Love my esp 8266’s
Will look into these esp01s

Sent from my iPhone Xs!

On Jan 17, 2021, at 1:28 PM, Chris Davis <famousd...@gmail.com> wrote:

Here's the video: https://youtu.be/98CH5FY8pLI

Chris Davis

unread,
Jan 19, 2021, 10:26:45 PM1/19/21
to Altair-Duino
Here's how to add wifi to the Altair-Duino Pro: https://youtu.be/kFo27CmqcBY

Don Blake

unread,
Jan 21, 2021, 12:44:34 PM1/21/21
to Altair-Duino
Nice work Chris.  I've ordered several ESP-01S and a couple of programmers.

One concern, however: the ESP8266EX data sheet indicates that the maximum I/O pin input voltage is 3.6V.  It appears that connecting the ESP-01S RXD pin to the Arduino Mega2560 D18/TX1 pin (4.2V minimum) is going to violate that.

However, I have seen a number of tutorials on the ESP-01 where the RXD pin is connected directly to an Arduino pin.

Any thoughts?

Don B.
KD2GXH

Don Blake

unread,
Jan 21, 2021, 1:27:51 PM1/21/21
to Altair-Duino
Chris, my bad!  I was thinking Arduino Mega2560.  The Arduino Due is a 3.3V board.

Don B.
KD2GXH

Charley Jones

unread,
Jan 21, 2021, 2:04:23 PM1/21/21
to Don Blake, Altair-Duino
Nice video Chris. 
Happy to write instructions with screen caps for you if needed. 

Dataman in Vegas 

Sent from my iPhone Xs!

On Jan 21, 2021, at 10:27 AM, Don Blake <donald....@gmail.com> wrote:



Chris Davis

unread,
Jan 23, 2021, 8:05:52 PM1/23/21
to Altair-Duino
Here are the instructions and links to everything you need: https://adwaterandstir.com/2021/01/23/use-telnet-over-wifi/

Al Schemmer

unread,
Jan 24, 2021, 6:50:02 PM1/24/21
to Altair-Duino
is the link wrong for the esp8266 library?

Chris Davis

unread,
Jan 24, 2021, 8:32:25 PM1/24/21
to Altair-Duino
Yeah, that's the URL on my site.

Don Blake

unread,
Jan 25, 2021, 1:03:26 PM1/25/21
to Altair-Duino
Up and running on my 2-year old Altair-Duino standard (bamboo case) with no problems!

Haven't yet decided if I'll modify my newer Altair-Duino Pro.

Don B.
KD2GXH

Altair-Duino ESP-01S.jpg

Chris Davis

unread,
Jan 25, 2021, 1:57:59 PM1/25/21
to Altair-Duino
Great!  You must have had the parts on-hand.

Don Blake

unread,
Jan 26, 2021, 11:04:14 AM1/26/21
to Altair-Duino
Chris, after you posted the video, I ordered the ESP-01S module and a programmer.  2-day Amazon Prime shipping.  I was just waiting for the firmware.

Don B.
KD2GXH

On Monday, January 25, 2021 at 1:57:59 PM:

Richard Deane

unread,
Jan 26, 2021, 6:04:13 PM1/26/21
to Chris Davis, Altair-Duino
If anyone in the UK wishes to do this, I couldn't find the Open-Smart USB to ESP01 adapter with a google search,  but I bought this from Amazon UK , then discovered when it arrived it had Open-Smart  printed on the pcb. Not tried it with Chris's software for AltairDuino, but worked ok to program stock ESP AT software. This was the only one I could find with the switch between UART and Prog. Previously I've been using an Arduino lash up with a combination of occasional user errors and loose connections, a real pain.

USB to ESP8266 ESP-01S Serial Wireless Wifi Adapter Module Wi-Fi CH340G USB to TTL driver IC onboard, 115200 Baud Rate


Of interest is that for £10.28 it comes with one ESP-01S with 4MB (32 MBIT) flash.

Richard

Roger Linhart

unread,
Jan 26, 2021, 8:16:10 PM1/26/21
to Richard Deane, Chris Davis, Altair-Duino
I just place an order for this one on Amazon (not an affiliate link) https://www.amazon.com/gp/product/B08QMMGZLB/

I wasn't sure if I needed the programmer but I thought it would be handy to have. 



--
Roger Linhart
Portland, OR  97230
Mobile: 541-690-8560

Don Blake

unread,
Jan 27, 2021, 12:09:03 PM1/27/21
to Altair-Duino
The programmer is definitely needed.  The ESP-01S comes programmed with AT command firmware.  You need to reprogram it with the WiFiModem firmware that Chris provided.

Don B.
KD2GXH

Roger Linhart

unread,
Jan 27, 2021, 1:55:31 PM1/27/21
to Don Blake, Altair-Duino
I don't plan to use the VT100 interface. Is there a way to disable it, avoiding the bodge wires from the TX and RX LEDs to the ESP header?

--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Chris Davis

unread,
Jan 27, 2021, 3:38:01 PM1/27/21
to Altair-Duino
I'll give it a try later, but I think if you just pull the PIC32 chip that would do it.

Tom Lake

unread,
Jan 27, 2021, 5:41:20 PM1/27/21
to Altair-Duino
I did it and, yes, just pulling the PIC gives you access to another serial port.

da...@hansels.net

unread,
Jan 30, 2021, 7:35:27 PM1/30/21
to Altair-Duino
Nice to see this project getting some use!

Just FYI to anybody who adds this: The same ESP8266 firmware can (in addition to letting you
connect via telnet) also make the ESP8266 emulate a Hayes-compatible modem.

Meaning that after adding this you can use your AltairDuino to dial into BBSs that are available
now on the internet. One way to do so is using the "IMP modem executive" software on the
DISK12.DSK image. The disk contains IMP.COM as well as IMP8.COM. IMP is the
original, IMP8 is a patched version that does not clear the 7th bit of
received characters. This allows 8-bit character sets to display properly.

The IMP program on that disk is set up to use the emulated 88-2SIO's *second* port to communicate.
So you need to configure the AD to map that port to the serial interface where your ESP8266
is connected (per Chris' instructions that would be the "Serial (RXL/TXL)" interface). Also make
sure you configure the Serial RXL/TXL interface for the same baud rate as your ESP8266.

Of course you can *not* do both (telnet and modem emulation) at the same time. So you'll
have to connect to your AltairDuino the regular (bluetooth/serial) way if you want to use
the modem emulation.

Here is the content of README.TXT on that disk:

To use (this version of) IMP:
=============================

- Make sure a Hayes-compatible modem is connected to port B of a 2-SIO card,
  at addres 12h/13h.
- Very useful are WiFi-connected modem emulators that can "dial" to Telnet BBSs
  http://biosrhythm.com/?page_id=1453
  https://github.com/dhansel/WifiModem
- Make sure the 2SIO and modem are configured for the same baud rate and
  serial parameters.
- Only RX/TX (and GND) lines from the modem need to be connected.
- The modem must support the [pause]+++[pause] sequence to switch from
  data mode to command mode (otherwise you can not end a call)
- It is recommended to use a terminal with ANSI support as most BBSs that
  are still make heavy use of ANSI control sequences (and colors)
- Start IMP (or IMP8)
- See the valid commands for terminal/command mode below
- Note that CAL will only pass digits through to the modem - if you need
  letters or punctuation (for IP address/host name), enter terminal mode
  and directly type the modem dial command (e.g. ATDT mono.org)


Command mode:
=============

M              - Display the menu
?              - Display current settings
E              - Terminal mode with echo
L              - Terminal mode with local echo
T [name.ext]   - Terminal mode [capture to fname.ext]
R[K] name.ext  - Receive an 8-bit binary CP/M file via XMODEM [in 1k mode]
S[K] name.ext  - Send an 8-bit binary CP/M file via XMODEM [in 1k mode]
BYE            - Disconnect, then return to CP/M
CAL nnnnnnnn   - Dial number
CPM            - Exit from this program to CP/M
DIR            - List directory and space free (may specify drive)
DSC            - Disconnect from the phone line
ERA            - Erase file (may specify drive)
LOG            - Change default drive/user no. (specify drive/user)
                 and reset disks i.e., LOG A0: or LOG B:  (user # unchanged)
SPD            - Set file output speed in terminal mode
TBM            - Toggle MODEM7/KMD batch mode selection
TCC            - Toggle CRC/Checksum mode on receive
TIG            - Toggle 'ignore CTL characters' on/off
TLF            - Toggle LF after CR in "L" or "T" mode for a disk file
TRB            - Toggle rubout to backspace conversion
WRT            - Close current capture file
^Z             - Clears screen
CTRL-X [0-9]   - Function key intercept character, then (0-9)


Terminal mode:
==============

CTRL-X E     - Exit to command mode
CTRL-X F     - Send file to remote system
CTRL-X L     - Send log-on message
CTRL-X N     - Disconnect from the phone line
CTRL-X P     - Turn printer on (or off)
CTRL-X Q     - Send break tone
CTRL-X Z     - Clears screen
CTRL-X R     - Stop copy into buffer
CTRL-X Y     - Start copy into buffer
CTRL-X [0-9] - Keyboard macros

Richard Deane

unread,
Jan 31, 2021, 3:07:26 AM1/31/21
to da...@hansels.net, Altair-Duino
Has anyone been able to use xmodem across a telnet console connection via the WiFi? I posted in retro-comp about a problem I am having on an sc126 under cpm3. Keen to know if it is a generic problem or not. For terminal software I was using either zoc or teraterm as they both support xmodem file transfer. Note that teraterm seems to only handle line based character transmission, ie doesn't send data until cr, whereas zip and putty do character based transmission.
Richard

--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Don Blake

unread,
Jan 31, 2021, 2:47:32 PM1/31/21
to Altair-Duino
XMODEM file transfers to/from the Altair-Duino over a WiFi Telnet connection using Tera Term Pro have worked fine for me.

Don B.
KD2GXH

John Kennedy

unread,
Feb 2, 2021, 6:16:56 PM2/2/21
to Altair-Duino
Hi Chris! I'm trying to do this, and I got as far as downloading WifiManager.zip - but I don't know the name of the actual project to load into the Arduino editor to build and deploy to the ESP?


On Sunday, January 17, 2021 at 9:02:16 AM UTC-8 famousd...@gmail.com wrote:

Chris Davis

unread,
Feb 2, 2021, 6:28:56 PM2/2/21
to Altair-Duino
Did you read this?  https://adwaterandstir.com/2021/01/23/use-telnet-over-wifi/ 

There's a link where it says "You can download my project for the Arduino IDE here."

John Kennedy

unread,
Feb 2, 2021, 6:58:58 PM2/2/21
to Chris Davis, Altair-Duino
Clearly not well enough! Got it now, thank you!

On Feb 2, 2021, at 3:28 PM, Chris Davis <famousd...@gmail.com> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "Altair-Duino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/altair-duino/LWzCJSlRDXQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to altair-duino...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/altair-duino/717d1889-d89b-474a-a02e-f8064130e87dn%40googlegroups.com.

John Kennedy

unread,
Feb 2, 2021, 9:34:04 PM2/2/21
to Altair-Duino

Also I am using a Mac with the latest OS, which seems to cause a compilation error.
I found a fix here:


I flashed the ESP device, and it seems to be working :-)

Chris Davis

unread,
Feb 3, 2021, 10:39:20 AM2/3/21
to Altair-Duino
Were you able to connect to "altair.local"?  I can't but it's supposed to work.

John Kennedy

unread,
Feb 3, 2021, 1:08:12 PM2/3/21
to Altair-Duino
I was not - and I tried on Mac, PC, Safari, Chrome, Edge etc. This Bonjour stuff can be a little weird.

John Kennedy

unread,
Feb 3, 2021, 2:03:32 PM2/3/21
to Altair-Duino
BTW - the ESP1s take 3.3 volts, right? Is there a level shifter on the Altair-Duino board, because it's more 5v isn't it?

Roger Linhart

unread,
Feb 3, 2021, 2:09:02 PM2/3/21
to John Kennedy, Altair-Duino
The Arduino Due is 3.3v. It is not an Arduino Mega which is 5v.
https://store.arduino.cc/usa/due

You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/altair-duino/be248bef-fb82-447c-b40e-93e42a0bbe54n%40googlegroups.com.

John Kennedy

unread,
Feb 3, 2021, 2:27:46 PM2/3/21
to Altair-Duino

Ah! That explains that! Thank you.

Chris Davis

unread,
Feb 3, 2021, 3:08:59 PM2/3/21
to Altair-Duino
Yeah I'm starting to think the documentation was wrong. I've tried on Mac/PC/Linux and "altair.local" does not work for me.

Roger Linhart

unread,
Feb 3, 2021, 3:32:48 PM2/3/21
to Chris Davis, Altair-Duino
RE: altair.local. 
It appears everyone is having problems with this. I think I'll be installing my ESP-01s to my Altair-Duino this weekend. I'll take a look at the firmware to see if I can determine if mDNS is configured. I don't know much about it but these two articles gave me the gist of how it is supposed to work. 

I know the first one is for rpi but it has a more technical description. I have "host.local" working for my two rpi Octoprint servers on my 3D printers. I wanted to see how rpi does it then compare that with how ESP8266 would do it.

If anyone out there who knows more about this can confirm mDNS is properly configured in the ESP-01s firmware I'd appreciate it.

You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/altair-duino/554be2ec-4b74-418e-a484-ce3a72036a86n%40googlegroups.com.

Gwen Patton

unread,
Feb 3, 2021, 3:53:50 PM2/3/21
to Altair-Duino
I've never been able to use that something.local address for anything. I've always had to find the IP address, and use that. 

Frank P.

unread,
Feb 3, 2021, 4:16:15 PM2/3/21
to Altair-Duino
Hi Chris... in your documentation regarding using the RXLTXL serial port at the LEDs on the Due, you say:
  • Solder wires to the left side of the LEDs. You can remove the LEDs it you prefer, but it's not necessary.
While in David's documentation, he says:
  • (Optional but recommended): remove the RX/TX LEDs...the LEDs go to +3.3V through a 1k resistor which could possibly interfere with your serial signals.)
May I therefore assume that the ESP-01S can easily sink the 1 or 2 ma. to light the LED on the RX line that it is driving (whereas TTL serial ports on other devices may have limiting resistors that preclude that, thus David's comment)?

udo....@freenet.de

unread,
Feb 3, 2021, 6:36:00 PM2/3/21
to Altair-Duino
ard...@gmail.com schrieb am Mittwoch, 3. Februar 2021 um 21:53:50 UTC+1:
I've never been able to use that something.local address for anything. I've always had to find the IP address, and use that. 

On OSX it just works, on Windows you need to install Bonjour, otherwise it won't work. And devices
of course must use mDNS, for the ESP modules there are implementations, I don't know anything
about that, other than the implementation Dave uses in the IMSAI8080esp replica does work. 

John Kennedy

unread,
Feb 3, 2021, 6:38:40 PM2/3/21
to Altair-Duino
Sadly it doesn’t work on any of my Macs (running latest Big Sur) or iOS devices.

Chris Davis

unread,
Feb 3, 2021, 6:46:49 PM2/3/21
to Altair-Duino
>  On OSX it just works 
Um, nope. 

> on Windows you need to install Bonjour
Again, nope.

I suspect my router is disallowing mDNS.

> May I therefore assume that the ESP-01S can easily sink the 1 or 2 ma. to light the LED on the RX line that it is driving (whereas TTL serial ports on other devices may have limiting resistors that preclude that, thus David's comment)?

¯\_(ツ)_/¯  

Frank P.

unread,
Feb 3, 2021, 10:05:43 PM2/3/21
to Altair-Duino
Ok, Ok... I'll look it up :)
On Wednesday, February 3, 2021 at 6:46:49 PM UTC-5 famousd...@gmail.com wrote:
¯\_(ツ)_/¯ 

udo....@freenet.de

unread,
Feb 4, 2021, 4:57:50 AM2/4/21
to Altair-Duino
Hm, with OSX I always can connect to imsai8080.local, no problems.
With Windows 10 it does not work, I have to use the IP address.
I remember that I also had it working with a Windows system sometime,
but that required additional installation or configuration work. I made
no notice though, don't know anymore what I did ¯\_(ツ)_/¯ 

udo....@freenet.de

unread,
Feb 4, 2021, 5:08:36 AM2/4/21
to Altair-Duino
And then I just tried with an iPhone, that works too. I never bothered to try this before,
because trying to operate the machine with such a small touchscreen is fiddly,
not my taste.

Chris Davis

unread,
Feb 4, 2021, 9:19:11 AM2/4/21
to Altair-Duino
I've never been able to connect to anything ".local" on my network, and my Philips Hue doesn't work, which I guess can be another sign up the router not supporting mDNS.  I just have to try setting up another router.

John Kennedy

unread,
Feb 4, 2021, 11:08:29 AM2/4/21
to Altair-Duino
I can get to IMSAI880.local. But this is altair.local :-)

It’s the implementation in this ESP code that is buggy.

Tom Wilson

unread,
Feb 4, 2021, 12:03:22 PM2/4/21
to Chris Davis, Altair-Duino
I've never heard of a SOHO router automatically adding.local as a domain suffix. 

Usually, if your machine's DNS is pointed to the router, the router will add DHCP hosts to the router's local DNS zone, so you can connect with just the host name. So you would connect with just "altair", not "altair.local". 

In my case, on Windows, I'm using several Raspberry Pis - one as a development test machine and one for my PiDP-11. I connect to both of them, both in VNC and PuttY, with just the host name. Just for fun, I'll try connecting to one Pi from the other to see if they're picking each other up on DNS. 






--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Tom Wilson

unread,
Feb 4, 2021, 12:12:59 PM2/4/21
to Altair-Duino
I've never heard of a SOHO router automatically adding.local as a domain suffix. 
Usually, if your machine's DNS is pointed to the router, the router will add DHCP hosts to the router's local DNS zone, so you can connect with just the host name. So you would connect with just "altair", not "altair.local". 


Huh... I just made a liar out of myself. My router totally does exactly that. In fact, if I ping "tompi" from my PC, the ping comes back with "tompi.local". If I ping my PC from the Pi, I have to append the .local suffix. 

For reference, Chris, my router is a Cox "Panoramic Router". 

I think my Tp-Link Archer C7 also pulls the DHCP data into DNS, but I don't have any way to test that right now, since it's configured as an access point (and so DNS and DHCP are disabled.) 

The first image is a Windows PC (the font is "Classic Console". 100% worth downloading, as it's a TrueType reproduction of the PC VGA font, and it looks fantastic when running console mode software and emulators.)

The second image is my Pi, pinging the Windows PC. 

image.png

image.png



Chris Davis

unread,
Feb 4, 2021, 12:55:55 PM2/4/21
to Altair-Duino
> I can get to IMSAI880.local. But this is altair.local :-)

> It’s the implementation in this ESP code that is buggy.

That's why I wish I could test it.  My router is a NetGear Orbi, which is well known for screwing up mDNS.  I know I have another router around here somewhere, I just need to dig it up.

udo....@freenet.de

unread,
Feb 4, 2021, 1:17:07 PM2/4/21
to Altair-Duino
Ping does a DNS lookup, not a mDNS lookup. If you ping hostname the DNS lookup assumes a host
in the same domain as the default router. If your's returns hostname.local your router is in domain .local,
which is technically OK, because .local is reserved for that is says and no DNS lookup would go outside
of your LAN.

If I do ping hostname I get hostname.something.different, .something.different is what my router
uses as domain. This is so because .local is not just reserved for a local (not Internet) domain,
but also because .local is used for special stuff inside the domain, like mDNS. I'm not sure if using
the DNS domain .local would disturb mDNS, but one could guess so, and I'm not going to try this
out.

Don Blake

unread,
Feb 4, 2021, 3:37:20 PM2/4/21
to Altair-Duino
I got "altair.local" working!

I added the following to modify WiFiModem.ino:

    at the end of setup():
    MDNS.addService( "http", "tcp", 80 );


    at the beginning of loop() :
    MDNS.update( );


Don B.
KD2GXH

Chris Davis

unread,
Feb 4, 2021, 3:56:02 PM2/4/21
to Altair-Duino
Awesome!  I found an old Linksys router here, I'm going to try and get that working.

John Kennedy

unread,
Feb 4, 2021, 3:59:12 PM2/4/21
to Don Blake, Altair-Duino
Could you provide a little more info on where you added those lines? I tried and it no longer brought up the config screen :-/ 

On Feb 4, 2021, at 12:37 PM, Don Blake <donald....@gmail.com> wrote:


--
You received this message because you are subscribed to a topic in the Google Groups "Altair-Duino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/altair-duino/LWzCJSlRDXQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to altair-duino...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/altair-duino/8d382ef1-d9ca-42a3-90ab-356ab2a3f1b5n%40googlegroups.com.

Don Blake

unread,
Feb 4, 2021, 4:52:00 PM2/4/21
to Altair-Duino
MDNS.addService( "http", "tcp", 80 ); was added in setup( ) just after resetModemState(); and just before while( Serial.available() ) Serial.read();

MDNS.update( ); was added at the beginning of loop( ) just after uint8_t i;

I'd suggest before reloading the ESP-01s, connect to it using a web browser and down at the bottom, click on Reset Wifi Settings if you need to get to the config screen.  The settings are saved in EEPROM and are remembered (even after reloading the firmware, I do believe).

Don B.
KD2GXH

John Kennedy

unread,
Feb 4, 2021, 4:58:46 PM2/4/21
to Don Blake, Altair-Duino
Thank you! YES that works. Resetting the WiFi was the secret (once I had tracked down the secret IP address it was lurking on). And now altair.local works - on my Windows computer too. Nice work, Don, nice work.

Sent from my iPad

On Feb 4, 2021, at 1:52 PM, Don Blake <donald....@gmail.com> wrote:


--
You received this message because you are subscribed to a topic in the Google Groups "Altair-Duino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/altair-duino/LWzCJSlRDXQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to altair-duino...@googlegroups.com.

John Kennedy

unread,
Feb 4, 2021, 7:50:22 PM2/4/21
to Altair-Duino
Now that Altair.Local is working (thanks again, Don)  I’ve connected the ESP to a Kim Uno and a “real” Altair 8080 (I’m waiting for a chance to take my Altair-Duino apart!). 

It’s worked perfectly with the Kim Uno, but not the Altair - not a peep from it. Perhaps some voltage levels to blame (I am using a little breakout board which takes 5v from the Altair down to 3.3 volts, but nothing comes over the serial).

Frank P.

unread,
Feb 5, 2021, 9:09:19 AM2/5/21
to Altair-Duino
So to answer my own question, I found this info (at https://tttapa.github.io/ESP8266/Chap04%20-%20Microcontroller.html):
  • Voltage and current restrictions
  • The ESP8266 is a 3.3V microcontroller, so its I/O operates at 3.3V as well. The pins are not 5V tolerant, applying more than 3.6V on any pin will kill the chip.
  • The maximum current that can be drawn from a single GPIO pin is 12mA.
Basically (assuming the UART pins are considered GPIO pins) that means that leaving the RXLTXL LEDs in place on the Due will not be an issue, just as Chris said in his instructions. Just wanted to double check before soldering.

Frank P.

unread,
Feb 6, 2021, 4:31:19 PM2/6/21
to Altair-Duino
I'm now the proud owner of an OPEN-SMART USB to ESP-01 Adapter. I set the switch to PROG, and then inserted it in a USB port on either of two different Windows 10 systems. In both cases, it comes up in device manager under "Other devices" as "USB Serial", and says it has no driver. I had expected it to appear as a COM port. I found that I needed to run Windows Update, and install (found under optional updates/drivers) a driver called "wch.cn - Ports 1/30/2019 3.5.2019.1". After doing that, the OPEN-SMART device finally appeared as "USB-SERIAL CH340 (COM15).

Did you all need to do that as well? It certainly wasn't very intuitive. It's literally the first USB device driver I've ever had to install manually in Windows 10 - usually you just plug the thing in and it finds a driver somewhere in the ether and installs it.

After figuring all that out, the Arduino IDE Upload to COM15 seemed to work fine:
Wrote 384640 bytes (272122 compressed) at 0x00000000 in 24.1 seconds (effective 127.9 kbit/s)...

I'll press onward now.

John Kennedy

unread,
Feb 6, 2021, 4:57:19 PM2/6/21
to Altair-Duino
I used Mac and didn’t need to do this. Windows often needs drivers.

Tom Wilson

unread,
Feb 6, 2021, 5:41:46 PM2/6/21
to John Kennedy, Altair-Duino
@Frank P., lots of USB devices don't have pre-installed drivers in Windows; you probably just stick to vanilla drivers that work with so-called "class drivers". A class driver is, as the name implies, one that works across multiple brands and models of the same type of device. 

A good example is a USB keyboard. All USB keyboards are HID devices and follow a specific HID profile. Since they all identify as a certain "class" of device, they can all be accessed through the built in HID Keyboard class driver in Windows. But if you install something like a Razer Chroma or a Logitech G15, those keyboards have extra features that are not available to the class driver. So Razer and Logitech supply drivers that talk to the special features - which makes those keyboards supersets of the class.

In the case of USB serial devices, there really is no class driver for USB Serial. The CH, Prolific, and FTDI devices all need distinct drivers, and to make matters worse, there are FTDI clones out there that report as FTDI serial devices but actually aren't - and at one point, the official FTDI drivers were blacklisting those devices. (I believe FTDI backed off of this stance as a PR move, which was a good call.)

@John Kennedy - MacOS is based on BSD Unix, and these serial devices are pretty well supported on Unix and Linux, often more widely than on Windows. That's probably because *nix does not have the expensive driver signing process that Microsoft has for Windows. (I believe it's a six-figure cost to have a driver WHQL signed.) I've found that most USB serial devices, but not all, USB serial cables work out of the box on my Pi. I did find one that didn't work, and so I just use it on my Windows machine. 




On Sat, Feb 6, 2021 at 1:57 PM John Kennedy <johntk...@gmail.com> wrote:
I used Mac and didn’t need to do this. Windows often needs drivers.

--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Frank P.

unread,
Feb 6, 2021, 6:20:35 PM2/6/21
to Altair-Duino
After overcoming the programmer Windows driver issue and getting the WiFiModem firmware flashed, I wired the ESP-01 in to the AD board using the RTL/TXL port and achieved complete success. Using TeraTerm, I'm able to do all the same stuff as over bluetooth, even a PCGET/XMODEM file transfer at 38,400 bps (max speed for the RXL/TXL port). And I still have my bluetooth and RS-232 ports. Have separate configurations to make each of the 5 ports primary.

Very nice job, Chris!

Frank P.

unread,
Feb 6, 2021, 7:42:11 PM2/6/21
to Altair-Duino
Is there any way to configure the ESP-01 to have a static IP address?

udo....@freenet.de

unread,
Feb 7, 2021, 12:36:06 AM2/7/21
to Altair-Duino
Frank P. schrieb am Sonntag, 7. Februar 2021 um 01:42:11 UTC+1:
Is there any way to configure the ESP-01 to have a static IP address?

You might be able to configure a fixed IP for the MAC address of the device
in the router's DHCP configuration. Then it is quasi static. 

Richard Deane

unread,
Feb 7, 2021, 2:14:39 AM2/7/21
to Altair-Duino
I also discovered that pulling the USB open smart device out while system thinks it active will blue screen windows. Dont do it.


--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.

Frank P.

unread,
Feb 7, 2021, 9:52:49 AM2/7/21
to Altair-Duino
I was aware of that but my very simplistic router doesn't have that capability. OTOH it is also relatively immune to all the various router hack-attacks.

I suppose it should be easy enough to modify the WiFiModem firmware to code-in a fixed IP of my choosing, but I doubt it can be re-flashed with the RTL/TXL port wires attached, so I'd have to unsolder, flash, resolder. Probably not worth the effort.

Curiously, when it's in server (AP) mode prior to WiFi configuration, the server appears with an SSID of Altair-Duino, but then after configuration I would have expected the SSID to go away after it became a WiFi client. But strangely the SSID of Altair-Duino goes away and an SSID of ESP-70A3D7 appears. If I connect to that SSID (no password), I am able to access the http interface and telnet to the serial port at IP 192.168.4.1. So it's like both a WiFi server (on it's own private network) and a WiFi client (of my network) at the same time!

That will make it easy to re-configure the WiFi connection should I need to switch to a different SSID in the future.

Frank P.

unread,
Feb 7, 2021, 11:17:47 AM2/7/21
to Altair-Duino
Another interesting discovery... multiple telnet clients can connect simultaneously; each can enter input, and all are able to see all output.

John Kennedy

unread,
Feb 7, 2021, 11:43:30 AM2/7/21
to Altair-Duino

I think it’s quite a simple client - I wouldn’t use it to send my bank details ;-)

Tom Wilson

unread,
Feb 7, 2021, 11:45:21 AM2/7/21
to John Kennedy, Altair-Duino
No doubt. Telnet has no encryption. 

I finally got SSH working on my terminal emulator, and I’m pretty stoked. I plan to mount a Pi inside my AD and use it as a terminal server. This might be a good use for a Pi Zero. 

--
You received this message because you are subscribed to the Google Groups "Altair-Duino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altair-duino...@googlegroups.com.
--

Don Blake

unread,
Feb 7, 2021, 12:50:39 PM2/7/21
to Altair-Duino
Good find!  My Altair-Duino shows up with an SSID of ESP-363806.  36:38:06 are the last 24-bits of its MAC address.

That will make it easy to re-configure when the ESP-01s cannot connect to the configured SSID.  Connecting to SSID ESP0363806 then using a web browser to connect to 192.168.4.1 gives access to "Reset WiFi Settrings".

Don B.
KD2GXH

Frank P.

unread,
Feb 12, 2021, 11:04:58 AM2/12/21
to Altair-Duino
I just needed to reboot my desktop computer (for a belated patch Tuesday update) and when it came back up, it could no longer see 192.168.1.20 (the AD's ESP-01) on my network. Another device that had not been rebooted could still see it. By "see it", I mean 192.168.1.20 would not respond to Telnet, HTTP, or Ping from the desktop. I powered the AD down and back up again, and then the desktop computer could once again see it.

It is possible that the ESP-01 firmware is not handling ARP properly in some sense?

Frank P.

unread,
Feb 13, 2021, 10:13:01 AM2/13/21
to Altair-Duino
I've done a couple experiments and they all point to the ESP-01 (running the WifiModem firmware) NOT responding to a broadcast ARP request for 192.168.1.20 (my DHCP-assigned IP for the ESP-01 in my AD... yours will differ). The simplest experiment that demonstrates this, using a telnet client such as PuTTY or TeraTerm on a Windows 10 system, is:

Confirm that the telnet client will connect to your AD, then disconnect it.
Open a DOS box (CMD) as administrator.
Type "arp -a" and note that your Windows IP has the IP of your AD's ESP-01 in the ARP cache.
Type "arp -d", which clears the ARP cache.
Type "arp -a" and note that your Windows IP no longer has the IP of your AD's ESP-01 in the cache.
Try to connect the telnet client to your AD now - it will not connect.
Try to ping the IP of the ESP-01 - it will not respond.
Try to open the configuration webpage of the ESP-01 - it will not open.
... at this point, since the ESP-01's IP is not in the ARP cache, the Windows machine broadcasts an ARP request asking the ESP-01's IP to respond with its MAC address. IT APPARENTLY DOES NOT DO THIS. I don't know if this is a firmware problem or a hardware problem with the ESP-01.
Power down your AD, then power it up again. The ESP-01 will re-connect to your network.
Type "arp -a" and note that your Windows IP now once again has the IP of the ESP-01 in the ARP cache, and telnet connects ok.
...I don't know what causes the Windows machine to receive the MAC address of the ESP-01 on a WiFi connect, perhaps it is a router function.

So something is amiss here. Another less-sophisticated experiment that shows the same thing is to connect with a telnet client from an iPad, then disconnect, disconnect the iPad from WiFi, the re-connect it to WiFi. At this point, the telnet client will no longer connect until the power is cycled on the AD.

David, if you're online, any comment?

Frank P.

unread,
Feb 13, 2021, 1:43:21 PM2/13/21
to Altair-Duino
I just repeated my two experiments, and this time the connects continued to work, from both Windows and iPad. This is kind of crazy, but may have something to do with the ESP-01 entering a WiFi power-saving mode after some amount of time. I found this closed issue describing a similar problem and linking it to sleep mode: https://github.com/esp8266/Arduino/issues/6886. The discussion and ultimate workaround is way over my head though, nor do i even understand to what code base this refers.

Frank P.

unread,
Feb 14, 2021, 10:13:28 AM2/14/21
to Altair-Duino
Just one more update on this... The iPad remained able to connect yesterday, but this morning it again could not (maybe it flushed its ARP cache based on elapsed time?) I connected the iPad to the AP mode SSID and could connect the telnet client to 192.168.4.1 without problem. When I again connected the iPad to my regular network AP, it still could not connect to 192.168.1.20. Mystery deepens, but no insight into a workaround. Is nobody else seeing a similar problem? Could it be some issue with my router (at no time does the router lose the IP/MAC association in its DHCP client table)? Since ARP is implemented at the data link layer, I suspect it is embedded into the ESP-01s at some level below the flashable firmware, though I don't really understand its architecture.

Chris Davis

unread,
Feb 14, 2021, 5:01:37 PM2/14/21
to Altair-Duino
Just a guess here, but I'm trying it now...

Supposedly the default ESP-01 mode is to enable "light sleep".  I added this line right before "WiFiManager wifimanager;" in the setup() function:

wifi_set_sleep_type(NONE_SLEEP_T);

Give that a try and see if it changes anything for you.

Chris Davis

unread,
Feb 14, 2021, 5:24:45 PM2/14/21
to Altair-Duino
I tried your "arp" test from the Windows command prompt and everything worked without cycling the power in the Altair-Duino.  It did take a couple minutes for the IP address to reappear in the arp cache.

Frank P.

unread,
Feb 14, 2021, 7:39:47 PM2/14/21
to Altair-Duino
I'll give that a try Chris. I think I also found a way to set it to a static IP on my network... right after creating the WiFiManager object, I'm going to try the following: wifimanager.setSTAStaticIPConfig(<static-ip>, <gateway-ip>, <network-mask>);

Maybe tomorrow - gotta pull front panel, unsolder two wires, pull module, re-flash, and put it all back together.

Frank P.

unread,
Feb 14, 2021, 7:41:32 PM2/14/21
to Altair-Duino
When I try that right after an AD reboot and for the rest of the evening, it also works. But the next day, not so. I'm hoping your sleep change will help.

Frank P.

unread,
Feb 14, 2021, 10:54:24 PM2/14/21
to Altair-Duino
I also found this issue: https://github.com/esp8266/Arduino/issues/5998 which seems to be closed by observing that either of WIFI_NONE_SLEEP or WIFI_MODEM_SLEEP cures the problem, while WIFI_LIGHT_SLEEP causes it. So I am even more hopeful that this is the fix (I'll try with WIFI_MODEM_SLEEP instead of NONE). I'm pretty much assuming that wifi_set_sleep_type() is just a lower level "C" equivalent to WiFi.setSleepMode(), and either will suffice. Something to busy myself with tomorrow. I'll report my findings.

On Sunday, February 14, 2021 at 5:01:37 PM UTC-5 famousd...@gmail.com wrote:

Frank P.

unread,
Feb 15, 2021, 9:53:48 AM2/15/21
to Altair-Duino
So I changed the WiFiModem firmware thusly (added the lines commented /*FCP*/):

  WiFi.setSleepMode(WIFI_MODEM_SLEEP); /*FCP*/
  WiFiManager wifiManager;
  IPAddress staticIP(192,168,1,120), gwIP(192,168,1,1), netMask(255,255,255,0); /*FCP*/
  wifiManager.setSTAStaticIPConfig(staticIP, gwIP, netMask); /*FCP*/
  wifiManager.autoConnect("Altair-Duino");


Notice the WIFI_MODEM_SLEEP to hopefully cure the ARP problem, and the setSTAStaticIPConfig to set up a static IP for the module in STA mode. The static IP definitely worked. The sleep change did no harm, but I'll have to wait a day or two to see if it fixes the ARP problem for good (right after rebooting the module with the updated firmware, both of my experiments connected with no problem, but then they did that before I updated the firmware too). Time will tell.

While I had the ESP-01 out, I added this little quick-disconnect so that my soldering iron can remain cool the next time I want to modify WiFiModem.ino:
IMG_8514.JPG

Frank P.

unread,
Feb 16, 2021, 1:28:40 PM2/16/21
to Altair-Duino
So it worked perfectly yesterday, but now it's a Bran Nue Dae and even though it seemed to be working early this morning, connecting started to fail again this afternoon (after clearing the ARP cache, Windows or iPad). So... now I guess I'll try WIFI_NONE_SLEEP, wait another day, and If that doesn't fix it, I suppose I'll be out of ideas.

On Monday, February 15, 2021 at 9:53:48 AM UTC-5 Frank P. wrote:
So I changed the WiFiModem firmware thusly (added the lines commented /*FCP*/):  ...

Frank P.

unread,
Feb 18, 2021, 4:00:03 PM2/18/21
to Altair-Duino
None of the WiFi sleep settings is the cure, so now I've implemented a work-around similar to the one I used on my Raspberry Pi Zero W running Raspbian (which would also stop responding to ARP requests after about a day). The solution is to periodically ping from the ESP-01 to the IP addresses I want to be able to connect to the ESP-01. I found a simple little Ping library (https://github.com/dancol90/ESP8266Ping), and modified it and WiFiModem.ino as follows:
  • In WiFiModem.ino I added an include for ESP8266Ping.h in the beginning with the other includes.
  • Modified ESP8266Ping.impl.h to set _options.recv_function to NULL, and to comment out the esp_yield() call. This has the effect that the ping() function always returns immediately after it's initiated the ICMP echo request packet (neither waits nor cares about any reply packet).
  • In WiFiModem.ino, at the very end of the loop (after webserver.handleClient();) I added the following code:
          static int count = 0;
          if((++count % 30000) == 0)
          {
            // Every 0.8-1.0 seconds (determined empirically)...
            static unsigned char node = 0;
            Ping.ping(IPAddress(192,168,1,++node),1);
          }

This causes the firmware, in addition to its other duties, to periodically (approximately once a second) initiate a ping to an IP address. The IP address is cycled to all 256 possible nodes on my network, so once every 4 minutes or so, any node on the network that has flushed the ESP-01's MAC address from its ARP cache will regain it. It's not a perfect solution, but it's been working with my Pi Zero for many months now. I have no idea what causes the Pi Zero or the ESP8266 to go tone deaf to the ARP requests after some number of hours have elapsed. All bets in both cases were on the WiFi power saving features, but I've had no success attacking it from that direction. I'll check back in with it tomorrow morning.

Chris Davis

unread,
Feb 18, 2021, 4:23:46 PM2/18/21
to Altair-Duino
Interesting.  I set sleep mode off (with "wifi_set_sleep_type(NONE_SLEEP_T);" in the setup() function) and it worked fine for more than two days.  I'd randomly connect and disconnect from multiple computers/tablets/phones and it never lost connection.

Frank P.

unread,
Feb 18, 2021, 6:02:19 PM2/18/21
to Altair-Duino
Chris,
... but did you clear the ARP cache ("arp -d" on Windows) after a day had elapsed, and then tried to connect? Before you set the WiFi sleep type to NONE_SLEEP_T, did it fail after clearing the ARP cache? If that works for you, then there is something strange about my network I suppose, or I'll go back and play with the SLEEP setting again.

Chris Davis

unread,
Feb 18, 2021, 7:18:19 PM2/18/21
to Altair-Duino
Yeah, I cleared the arp cache.  The IP comes back, but it takes a minute or so.  I'll leave it on over night and try clearing the cache again in the morning.

Chris Davis

unread,
Feb 19, 2021, 9:42:11 AM2/19/21
to Altair-Duino
It's still running.  I've cleared my arp cache several times.

Frank P.

unread,
Feb 19, 2021, 9:46:34 AM2/19/21
to Altair-Duino
Ok, I may keep playing with the WiFi sleep, or just keep my ping workaround which is doing the trick and forget about it.

Frank P.

unread,
Mar 7, 2021, 10:30:47 AM3/7/21
to Altair-Duino
So, while my ping workaround solves the ARP problem, I couldn't help but think there must be a more well-accepted workaround. Indeed there is - I found this by hunting around in the board support code (see c/Users/<you>/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/libraries/ESP8266WiFi/src/ESP8266WiFiGratuitous.*):

#include <ESP8266WiFiGartuitous.h> /*FCP*/
...
// Added this call immediately after wifiManager.autoConnect("Altair-Duino");
experimental::ESP8266WiFiGratuitous::stationKeepAliveSetIntervalMs(10000); /*FCP*/ // Every 10 seconds

I looked it up on the internet and this seems to be the accepted generic solution to "server unreachable after a while" problem.
e.g.: This will be the "server unreachable after a while" problem, which is solved solved by sending gratuitous ARP requests. In the esp8266 Arduino core 2.7 they added functions for this. The main function is experimental::ESP8266WiFiGratuitous::stationKeepAliveSetIntervalMs();. Include <#include "ESP8266WiFiGratuitous.h>

Now in Windows if I do an "arp -d", my Arduino's IP will pop right back up within 10 seconds without having to even attempt to connect via Telnet. It still doesn't explain why ARP requests don't elicit an ARP reply after some hours of time, but it effectively avoids the need for such replies. Consequently, I removed the wifi_set_sleep_type(NONE_SLEEP_T); and the pinging, so that the only mods I have to the WiFiModem firmware are my static IP address mod and this one. I suspect my ESP-01 serial port will be trouble-free from now on. I have no explanation why yours (Chris) works ok without this. I'm going to try to find a similar solution for my Pi Zero W that is experiencing the same problem.

Frank P.

unread,
Mar 7, 2021, 12:32:52 PM3/7/21
to Altair-Duino
Turns out that there is a rather simple equivalent to this for my Raspberry Pi Zero W running Raspbian. This background process does the equivalent thing on the Pi (which has a static IP of 192.168.1.186):
sudo arping -W 10 -A 192.168.1.186 >/dev/null 2>&1 &

Frank P.

unread,
Apr 14, 2021, 10:41:23 AM4/14/21
to Altair-Duino
Richard and all,
Note that when using teraterm to telnet to a system that doesn't actually implement a telnet server, there will be two problems that can be cured by changing two lines in the teraterm .INI file being used with that connection:
   a) By default, teraterm sends out telnet negotiation bytes right after connection - the target system will see these as garbage and may go into
        a strange state as a result.
   b) By default, teraterm is in Line Mode when connecting to port 23 via TCP/IP. It will switch to Character Mode if the target system responds to the
        telnet negotiation messages, but will remain in Line Mode if it doesn't.
The cure:
   In the teraterm .INI file being used for the connection, change two lines:
      Change: Telnet=on to Telnet=off
      Change: EnableLineMode=on to EnableLineMode=off
After those changes, connect to your target system and you'll see that it no longer sends garbage characters upon connection, and it sends whatever you type (or paste or send) verbatim.

Note that neither of these changes is necessary if connecting via TCP/IP to port 23 of the AltairDuino ESP-01 running WiFiModem firmware if-and-only-if the WiFiModem firmware is configured for Telnet protocol - Handle. If it's configured for Telnet protocol - Pass through, then you'll need the above changes because WiFiModem is not handling the telnet negotiation bytes; Telnet=off tells teraterm not to try to negotiate.

On Sunday, January 31, 2021 at 3:07:26 AM UTC-5 Richard Deane wrote:
Note that teraterm seems to only handle line based character transmission, ie doesn't send data until cr, whereas zip and putty do character based transmission.
Reply all
Reply to author
Forward
0 new messages