WIFI for all ataris over serial!

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Sun Jun 25, 2017 10:14 am

iggydrougge wrote:I built one of these today. Worked perfectly on the first attempt thanks to Czietz's firmware. Managed to cram it all into a 5x3 cm casing by desoldering the connectors on the 5 V adaptor board and solder-mounting all pieces with some added hot glue. Haven't tried it on my ST yet, but it worked fine on my Amiga with AmiTCP.


That's great to hear!

iggydrougge wrote:If the firmware could be upgraded to support CSLIP, a bit more performance could be squeezed out.



Since the firmware uses lwIP as its network stack, that would require CSLIP support in lwIP, which isn't in there. And my knowledge of network protocols isn't so extensive that I could easily add this. Note that CSLIP requires you too keep track of every open TCP connection to compress the packet headers. Unfortunately that's nothing that can be quickly patched into existing code. :(

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1160
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: WIFI for all ataris over serial!

Postby Greenious » Mon Jun 26, 2017 12:08 am

iggydrougge wrote:I built one of these today. Worked perfectly on the first attempt thanks to Czietz's firmware. Managed to cram it all into a 5x3 cm casing by desoldering the connectors on the 5 V adaptor board and solder-mounting all pieces with some added hot glue. Haven't tried it on my ST yet, but it worked fine on my Amiga with AmiTCP.

If the firmware could be upgraded to support CSLIP, a bit more performance could be squeezed out.


Cool! What speeds have you tried out so far? The ST/STE standard serial port only manages 19200 without modding. (max 115200 modded)

Mega STE/TT/F030 got a different serial chip capable of 614400 I think. Would be fun to see how fast this can work reliably.

I did recieve the ESP8266 I ordered the other day and plan to play around with this the coming weeks.
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

iggydrougge
Atari User
Atari User
Posts: 39
Joined: Tue Jul 14, 2015 3:17 am

Re: WIFI for all ataris over serial!

Postby iggydrougge » Mon Jun 26, 2017 4:53 am

I've only run it at 19200 bps so far. There is a certain danger in upping the serial speed too far since you won't be able to login to set it back otherwise. Well, I would because I have all manners of hardware, but other users wouldn't. It would be nice if the firmware supported setting the speed without saving it to flash, since that way you could try it out before commiting.

(I do have a MegaSTE, but I gather that it's only some of the ports that can handle higher speeds?)

Another way to ensure higher speeds (and avoid packet loss even at lower speeds) would be if the firmware supported hardware handshake (RTS/CTS). Mind you, the 5V Arduino support PCB recommended does not support any other lines than RX and TX, but they could easily be extracted from two GPIO pins and the MAX232 used has two unused channels that may be used for handshaking.

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Mon Jun 26, 2017 4:25 pm

iggydrougge wrote:I've only run it at 19200 bps so far. There is a certain danger in upping the serial speed too far since you won't be able to login to set it back otherwise.


Note that if you make sure that the module connects to your Wifi network before you change the bit rate, in case of problems you can still use Telnet from another computer in your Wifi to login and reset the module. I've added this information to my website, as it was recently pointed out to me by the author of the SLIP firmware.

iggydrougge wrote:Another way to ensure higher speeds (and avoid packet loss even at lower speeds) would be if the firmware supported hardware handshake (RTS/CTS). Mind you, the 5V Arduino support PCB recommended does not support any other lines than RX and TX, but they could easily be extracted from two GPIO pins and the MAX232 used has two unused channels that may be used for handshaking.


While the ESP8266 micro-controller has hardware flow control for its UART, the corresponding GPIOs are not available on the ESP-01 board that I use. Hence I could not test such a firmware. And I don't like publishing untested stuff.

Rustynutt
Captain Atari
Captain Atari
Posts: 382
Joined: Wed Mar 21, 2012 7:38 am
Location: Oregon
Contact:

Re: WIFI for all ataris over serial!

Postby Rustynutt » Mon Jun 26, 2017 6:48 pm

May have posted this sometime back, excuse if it's duplicate.
I have a SonicView SV8000 Satellite receiver. It only has a serial port to communicate with external ISPs to do what it does ( :) ). There's a device called Wizznet which converts serial to TCIP, is easily flashed (standalone or over the network (even if an incorrect setting is made, my Asus router ID's it by MAC address and port). It works great on the receiver, will work with both static and DHCP IP.
As I read through this thread, it looks like there may be communication issues on the software side. I'm not clear on that (yet). It sets behind the router on a wireless sub router. There are different versions, might even be a wireless version, haven't looked. Price wise, it's more expensive than home brew, kind of the topic of the thread.

iggydrougge
Atari User
Atari User
Posts: 39
Joined: Tue Jul 14, 2015 3:17 am

Re: WIFI for all ataris over serial!

Postby iggydrougge » Mon Jun 26, 2017 9:34 pm

czietz wrote:Note that if you make sure that the module connects to your Wifi network before you change the bit rate, in case of problems you can still use Telnet from another computer in your Wifi to login and reset the module. I've added this information to my website, as it was recently pointed out to me by the author of the SLIP firmware.


How come I never thought of that!

czietz wrote:While the ESP8266 micro-controller has hardware flow control for its UART, the corresponding GPIOs are not available on the ESP-01 board that I use. Hence I could not test such a firmware. And I don't like publishing untested stuff.


I shouldn't have written "easily", obviously. We probably have the same ESP-01 module, though I also have a NodeMCU board laying around. That one has lots of I/O pins and might even run without the Arduino support board since it's got its own 5 V regulator.

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1160
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: WIFI for all ataris over serial!

Postby Greenious » Mon Jun 26, 2017 10:27 pm

iggydrougge wrote:I've only run it at 19200 bps so far. There is a certain danger in upping the serial speed too far since you won't be able to login to set it back otherwise. Well, I would because I have all manners of hardware, but other users wouldn't. It would be nice if the firmware supported setting the speed without saving it to flash, since that way you could try it out before commiting.

(I do have a MegaSTE, but I gather that it's only some of the ports that can handle higher speeds?)

Another way to ensure higher speeds (and avoid packet loss even at lower speeds) would be if the firmware supported hardware handshake (RTS/CTS). Mind you, the 5V Arduino support PCB recommended does not support any other lines than RX and TX, but they could easily be extracted from two GPIO pins and the MAX232 used has two unused channels that may be used for handshaking.


I also believe the MAX232 got a max rated speed of about 500kbit, the ESP about 4mbit. Another solution than the max might be needed to get the maximum speed out of this, but anything 115200 and up is still very much useable imho.
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

iggydrougge
Atari User
Atari User
Posts: 39
Joined: Tue Jul 14, 2015 3:17 am

Re: WIFI for all ataris over serial!

Postby iggydrougge » Wed Jun 28, 2017 6:37 am

Is there any ST machine that can go that far? I think the highest speed serial port I have is a theoretical 460 kbps on an Amiga IOblix card.

iggydrougge
Atari User
Atari User
Posts: 39
Joined: Tue Jul 14, 2015 3:17 am

Re: WIFI for all ataris over serial!

Postby iggydrougge » Wed Jun 28, 2017 10:10 am

czietz wrote:
iggydrougge wrote:If the firmware could be upgraded to support CSLIP, a bit more performance could be squeezed out.


Since the firmware uses lwIP as its network stack, that would require CSLIP support in lwIP, which isn't in there. And my knowledge of network protocols isn't so extensive that I could easily add this. Note that CSLIP requires you too keep track of every open TCP connection to compress the packet headers. Unfortunately that's nothing that can be quickly patched into existing code. :(


I just found out that lwIP does support PPP, both in client and server mode. According to what I remember from the 90s, this should give a performance boost equal to CSLIP.

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Wed Jun 28, 2017 3:33 pm

iggydrougge wrote:I just found out that lwIP does support PPP, both in client and server mode. According to what I remember from the 90s, this should give a performance boost equal to CSLIP.


The lwIP port for the ESP8266 doesn't include PPP, though. Any volunteers, feel free to add it, assuming it will even fit into the very limited amount of RAM available on the ESP8266. I'm happy with SLIP.

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Wed Jun 28, 2017 5:38 pm

iggydrougge wrote:I shouldn't have written "easily", obviously. We probably have the same ESP-01 module, though I also have a NodeMCU board laying around. That one has lots of I/O pins and might even run without the Arduino support board since it's got its own 5 V regulator.


I have just ordered another ESP8266-based module that has the required IOs for RTS/CTS. So I might do a firmware with hardware flow control in the future. It will be some weeks though until the module even arrives.

iggydrougge
Atari User
Atari User
Posts: 39
Joined: Tue Jul 14, 2015 3:17 am

Re: WIFI for all ataris over serial!

Postby iggydrougge » Sun Jul 09, 2017 12:48 am

Does the current firmware use any flow control at all?

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Sun Jul 09, 2017 7:01 am

iggydrougge wrote:Does the current firmware use any flow control at all?


No. As stated above, my current hardware doesn't support it. I won't release firmware that I cannot even test beforehand.

iggydrougge
Atari User
Atari User
Posts: 39
Joined: Tue Jul 14, 2015 3:17 am

Re: WIFI for all ataris over serial!

Postby iggydrougge » Mon Jul 10, 2017 12:16 am

I mean XON/XOFF, which doesn't use any extra wires.

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Mon Jul 10, 2017 6:19 am

Is XON XOFF even compatible with SLIP? I don't think so. Every occurrence of one of the "magic" characters in an IP packet will be misunderstood as flow control.

iggydrougge
Atari User
Atari User
Posts: 39
Joined: Tue Jul 14, 2015 3:17 am

Re: WIFI for all ataris over serial!

Postby iggydrougge » Mon Jul 10, 2017 10:28 am

How stupid of me, I never thought of that. SLIP already seems to implement its own internal flow control instead.

Xevious
Atarian
Atarian
Posts: 6
Joined: Wed Aug 23, 2017 6:06 am

Re: WIFI for all ataris over serial!

Postby Xevious » Wed Aug 23, 2017 6:26 am

Somehow I can't get this to work...

I'm trying this on a falcon, using STiNg (V1.26). And whatever I try, I'm not able to connect to the ESP8266, either I get a connection refused. Or It waits until it time-outs...

SoFar:
  • Programming the esp01 was successfull, so serial connection should be OK. And after programming I see a lot of traffic on the serial port.
  • I Used the STiNg example as found in the instructions, however I have the sneaky suspusion that this is all to much ST for my Falcon (Bombs away!!!)
  • Checked with a terminal program is there was traffic, and yes there is traffic
  • Also tried 192.168.240.2 iso 192.168.240.1 in examples, since I saw that that is the address used in config files.
  • Tried copying the settings from example in instruction to C: installed STiNg, still no luck.
  • Read this thread, and now out of ideas 8O

Is there anyone who got this working on a falcon? And if so, can you share your setup?

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Wed Aug 23, 2017 8:17 am

Some ideas:
  • Double check that the serial level shifter (MAX....) is wired correctly. (Or did you program the ESP via the same level shifter? Then it should be OK.)
  • As stated, the firmware will default to 19200 bit/s. Did you set your Falcon's serial port accordingly?

PS: 192.168.240.1 is the address you need to use for TELNETing to the module, 192.168.240.2 is in the config file because it will be the IP address of the Atari.
PPS: After the module has booted (maximum some seconds) there should be no more traffic on the serial link -- unless of course you're receiving data that you requested. If you see constant traffic without sending data to the module, there's something wrong.

Xevious
Atarian
Atarian
Posts: 6
Joined: Wed Aug 23, 2017 6:06 am

Re: WIFI for all ataris over serial!

Postby Xevious » Wed Aug 23, 2017 10:01 am

  • I programmed via that same level shifter, so that is not my worry :coffe:
  • Ok understood for the IP adress.
  • So i'm seeing continuus traffic coming from the esp, however the programming went "OK" according to the esp-tool.py, meaning new software was uploaded to the esp.
  • For setting the port I'm using the modem tool from the falcon diskette. and when set I can communicate with PC for instance no problem with correct baudrate etc

So the issue seems to be the continuus traffic.... If I listen in on that traffic (using connect 95, so not sending anything) it seems to be binary somewhat repetitive data.

So maybe the esp is in some kind "maintenance/debug" mode?

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Wed Aug 23, 2017 11:27 am

This repetitive, seemingly binary data could mean that the module is crashing and thus constantly rebooting. The ESP8266 will output its boot messages at the slightly unusual baudrate of 74880 bit/s. I don't know if the Falcon can be set to this, but if you connect the module to your PC again and use a terminal program there, you'll be able to see the (clear text) boot messages. They should give more information what's happening.

Xevious
Atarian
Atarian
Posts: 6
Joined: Wed Aug 23, 2017 6:06 am

Re: WIFI for all ataris over serial!

Postby Xevious » Wed Aug 23, 2017 6:52 pm

Success!!!!!! :cheers:

https://nodemcu.readthedocs.io/en/master/en/flash/#sdk-init-data.


And with a:

Code: Select all

esptool.py --port com3 write_flash -fm qio 0xfc000 esp_init_data_default.bin


I have a connection with the ESP01 :D

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Wed Aug 23, 2017 6:59 pm

Thanks for the feedback. I shall add a note to the description on my website.

Usually ESP-01 modules come pre-programmed with some firmware, e.g. the default AT command firmware, so flashing the esp_init_data_default.bin is not necessary before flashing the SLIP router firmware. But it seems your module needed this.

Xevious
Atarian
Atarian
Posts: 6
Joined: Wed Aug 23, 2017 6:06 am

Re: WIFI for all ataris over serial!

Postby Xevious » Wed Aug 23, 2017 7:02 pm

czietz wrote:Thanks for the feedback. I shall add a note to the description on my website.

Usually ESP-01 modules come pre-programmed with some firmware, e.g. the default AT command firmware, so flashing the esp_init_data_default.bin is not necessary before flashing the SLIP router firmware. But it seems your module needed this.


Almost started to :cry: I wasn't able to save the config. but after a

Code: Select all

factory reset
things are looking better.

next (baby) steps.......
Update: CAB also working....

So big thanks to Christian!!! :cheers: :thumbs:

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Sun Sep 24, 2017 3:13 pm

czietz wrote:I have just ordered another ESP8266-based module that has the required IOs for RTS/CTS. So I might do a firmware with hardware flow control in the future. It will be some weeks though until the module even arrives.


Just a short update: This is not forgotten -- although I'm currently busy with another Atari-related project. The module has of course arrived in the meantime; however it turned out not to be totally easy to add RTS/CTS flow control. The RTS pin of the ES8266 has another function during boot and it has to be kept on a specific logic level until the firmware has booted. Thus, I might have to come up with a clever circuit that only connects RTS to the Atari (via the RS232 level shifter, of course) after booting... I will have to experiment a bit.

czietz
Hardware Guru
Hardware Guru
Posts: 469
Joined: Tue May 24, 2016 6:47 pm

Re: WIFI for all ataris over serial!

Postby czietz » Tue Oct 10, 2017 7:57 pm

OK, I have a prototype of the WiFi-to-SLIP router including RTS/CTS flow control on my breadboard and I have built a firmware that supports flow control. I tested this on a TT with different serial bit rates and it is working. Using STinG I can connect to the Internet.

Depending on whether there is even still interest here, I might draw the schematic or even make a PCB...


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 8 guests