Giter Club home page Giter Club logo

zimodem's Introduction

Zimodem 4.0 (C)2016-2024 Bo Zimmerman
Please read the LICENSE file for license information
Please read the NOTICE file for credits information

Intro:
------
This firmware code provides an api for communication between a serial terminal and the ESP8266 or ESP32.  It simulates the old-style Hayes "AT" commands, so that the ESP8266 appears to the terminal as if it were a Hayes modem.  These "AT" commands may then be issued to the ESP8266 in order to force it to connect to a wireless access point, and from there to make one or more manageable connections to the internet.  It also includes a streaming serial "telnet" mode, and server/port listener capabilities.

The default baud rate that the firmware establishes is 1200.  Be sure to use the commands below to set this to the proper baud rate for your terminal/host computer.  If you plan on using the Commodore 8-bit utilities, keep the firmware baud rate saved at 1200.

Building:
---------
To build this firmware for the ESP-01 or ESP-12, I used the Arduino IDE rev1.8.10 with the 2.7.4 Arduino ESP8266 libraries using the Generic ESP8266 Module.  Versions newer than 2.7.4 may not work.  Install the libraries from the Boards Manager using http://arduino.esp8266.com/stable/package_esp8266com_index.json. Both versions of the firmware are built with SPIFFS enabled.  On the ESP8266, I used settings of 1M/160k, but you may want to alter that depending on your hardware and needs. 

To build this firmware for the ESP-32, I also used the Arduino IDE rev 1.8.10 with the Arduino ESP32 Dev Module installed from the board manager * , with the following settings: QIO, 8MB, 80MHZ, 921600, NONE, Avrisp Mk II **.*, and 3MB App space.  Currently on library version 2.07.

Using:
------
Upon initialization, or any time the ESP module is reset, the modem will display its version, and some information about the host hardware, and then read a configuration file from the internal SPIFFS to re-establish the previously set baud rate, and to attempt to re-connect to the previously connected wireless router.  The first time it is run, the firmware will set a baud rate of 1200 and display INITALIZED to let you know that no previous wifi configuration was found.  Once the serial terminal displays READY, it is ready to receive commands.  

AT+CONFIG: The first command you'll probably want to enter is used to connect to a wireless router, and set your flow control and other command mode settings.  

Linefeeds: If you plan to use this primarily from a computer that doesn't need linefeeds, such as the C64, you'll want to enter ATR0 to go into carriage-return only mode, and then at&w to save this setting as well.

Baud Rate: If you want to operate at a higher baud, you'll want to enter ATB9600 (or whatever baud rate you want to try), and then reconnect your terminal program to the modem at that new baud rate.  If everything looks good, and you want to keep the new baud rate across restarts, save the new baud rate with AT&W.  Warning though: Most of the example C64 programs assume the modem defaults to 1200 baud.

AT+PRINT: If you want to try printing to a CUPS/IPP-printer, enter AT+PRINT?:<host>:<port>/<path>, followed by your data.  Where ? is A)scii, P)etscii, or R)aw.  A 5 second pause in incoming data completes the document and returns to command mode.  Example: AT+PRINTR:192.168.1.10:631/ipp/printer  -- followed by ENTER and then the data to print, without any pause longer than 5 seconds.  Subsequent to doing this, using AT+PRINT will repeat the previous URL.

AT+IRC: If you want to chat on IRC, enter AT+IRC, enter a nickname and a irc host as a phone number entry, then /join channels, chat, or /quit.

AT+SHELL: ESP32 Modem users with SD-cards can enter AT+SHELL to get a shell command prompt.  Enter ? to get a list of shell commands.  

AT+PING: To check if your wifi is connected and DNS resolution is working, try AT+PING"google.com".  An OK means a response was received.

AT+COMET64: For modems with SD-cards, this puts the modem into 2400 bps, CSIP protocol mode for reading/writing directly to the card (for V-1541). +++ to exit.

AT+HOSTCM: For modems with SD-cards, this puts the modem into HOSTCM protocol mode for reading/writing directly to the card (for Commodore SupetPET SP9000). +++ to exit.

AT+1650, 1660, 1670: Puts the modem into a emulation mode for Commodore 1650, 1660, and 1670.  Changes baud rates accordingly.  Use AT&L or AT&F to clear emulation settings.

Telnet Dialing: If you want to connect to a remote telnet server, eg coffeemud.net, port 23, you'll want to enter AT&S62=1DT"coffeemud.net:23".  Don't forget to set your terminal program to the proper translation mode (ANSI, ASCII, or whatever). 

Normal Dialing: If you are using a Commodore Graphics terminal program and want to connect to a Commodore BBS, or a standard ASCII terminal program for a non-Commodore BBS, you'll want to enter e.g. ATD"cottonwoodbbs.dyndns.org:6502".  The "T" in "ATDT" is optional if register 62 is 0 (default).

Q-Link Setup: If you want to use Q-Link, you need to add a phone number alias first.  To do this, enter ATP"5551212=q-link.net:5190" or enter it from the config menu AT+CONFIG. From the C64 Q-Link client, select "Hayes compatible" 1200 baud modem when prompted.

BBS/Port Listeners: If you want to run a Commodore BBS program using the modem, you'll want to configure the BBS program to the same idle baud rate that your modem is using (1200 baud by default), configure it for a Hayes style modem (or the C=1670), and either create a persistant listener using AT+CONFIG, or use an initialization string of "ATR0E0S0=1S41=1A6400" plus any other recommended settings from the BBS program. This creates a listener at port 6400 that switches directly to stream mode on the first ring, with no linefeed carriage returns, and no keystroke echo.  Your BBS program may require you add certain other settings, such as V0 or X1.. which you should also do.

Command Set:
-----------

The command set is as follows (not case sensitive):

ATZ : closes all open socket connections (preserving the Access Point connection), stops all listeners, and resets the state of the Command processor to the saved configuration, preserving the current baud rate and wifi connection.

A/ : Repeats the previous command

ATI : re-shows the startup message, including wifi connection information.
ATI0 : same as ATI
ATI1 : Shows the current common variable settings, common 'S' registers.
ATI2 : Shows the modem's current IP address
ATI3 : Shows the modem's current Wireless Router connection
ATI4 : Shows only the firmware current version
ATI5 : Shows all the current variable settings, all 'S' registers.
ATI6 : Shows the current mac address.
ATI7 : Shows the current formatted time (see AT&T).
ATI8 : Shows the firmware build date/time
ATI9 : Same as I3, but also includes any static settings, same order as ATW
ATI10: Shows the last printer url used.

ATA  : If a server listener has generated a RING, then ATA will switch the last rung connection to Stream mode (see ATD).

ATAn : Causes the modem to create a server listening on port n.  When a connection is received, the terminal will generate 1 or more RINGs according to the ATS0 register, followed by a normal CONNECT respose. At this point, all other commands related to connections may be used normally, unless ATS41 is > 0, in which case incoming connections are automatically sent to Stream mode as per ATD or ATA. Listeners are listed along with other connections using ATC0.
ATAPn : Adding a P modifier causes all incoming connection input to be translated to PETSCII
ATATn : Adding a T modifier causes connection streaming input to be translated per TELNET when the changed to Stream mode
ATAEn : Adding a E modifier causes connection terminal echo to be enabled when the changed to Stream mode
ATAXn : Adding a X modifier causes connection XON/XOFF flow control to be enabled  when the changed to Stream mode.

ATN0 : Shuts down all listeners, leaving client connections open
ATNn : if n > 0 then closes a Server (ATA) listener with the given id; does not close any connections received from that listener.

ATE0 : Turns serial terminal echo off for command mode.
ATE1 : Turns serial terminal echo on for command mode.

ATV0 : Turns off verbose responses mode (Uses Terse Numeric response mode)
ATV1 : Turns on verbose responses mode (Uses Word response mode)

ATX0 : Turns off extended response codes (1/CONNECT instead of 5/CONNECT 2, etc..)
ATX1 : Turns on extended response codes (5/CONNECT 2 instead of 1/CONNECT, etc..)

ATF0 : Turns on rts/cts flow control.
ATF1 : Turns on xon/xoff flow control.
ATF2 : Turns on xon/xoff flow control, sets XON mode (if necessary), and, in command mode, will immediately go to XOFF when a single connection packet is received. This is very useful when the client wants to ensure it only receives one packet to process.  You can think of this as an alternative way to use xon/xoff by having XOFF automatic between packets.
ATF3 : Similar to ATF2 except that the default is XOFF, and, in command mode, a XON code from the user will immediately trigger either an empty packet response [ 0 0 0 ], or a real packet if one is available.  After this, as in ATF2, XOFF is automatically set.
ATF4 : Turns off flow control for command mode
   * : in AT+1670 mode, ATF0 will instead turn on stream mode echo, and ATF1 will turn it off.

ATQ0 : Turns off quiet mode (Sends response codes)
ATQ1 : Turns on quiet mode (Stops sending response codes)

ATR0 : Suppresses linefeed (\n $0a) in end of lines.  Will only send carriage return (\r $0d).
ATR1 : Sends \r\n ($0d0a) as end of line string.
ATR2 : Sends \n\r ($0a0d) as end of line string.
ATR3 : Suppresses carriage return (\r $0d) in end of lines.  Will only send linefeed (\n $0a).

ATBn : Sets a new serial Baud Rate. Takes effect immediately.
ATB"n,xYz" : Sets baud rate n, bits x, parity (E,O,M, or N) for Y, and stop bits z.

ATW : List all wireless network access points scanned within range.  The response for each entry is the SSID, following by the RSSI, followed by an * character is the connection is encrypted.
ATWn : Where n > 0, this lists up to n wireless network access points scanned within range.  The response for each entry is the SSID, following by the RSSI, followed by an * character is the connection is encrypted.
ATW"[SSI],[PASSWORD]" : Connects to the wireless access point with the given SSI, using the given password.
ATW"[SSI],[PASSWORD],[IP],[DNS],[GATEWAY],[SUBNET]" : as ATW, but with more options
ATWP : Adding a P modifier is the same as all forms of ATW, with both arguments and results presented in PETSCII.

ATD : Start a streaming connection between the current opened connection.  Use "+++" to exit back to Command mode.
ATDn : Where n > 0, this will start a streaming connection between the previously opened connection with an id the same as n.  Use "+++" to exit back to Command mode.
ATD"[HOSTNAME]:[PORT]" : This opens a streaming connection between the terminal and the given host/port. Use "+++" to disconnect and exit back to command mode.
ATDP"[HOSTNAME]:[PORT]" : Adding a P modifier causes connection input to be translated to PETSCII during the streaming session.
ATDT"[HOSTNAME]:[PORT]" : Adding a T modifier allows connection input to be translated per TELNET during the streaming session (see S62).
ATDE"[HOSTNAME]:[PORT]" : Adding a E modifier causes terminal echo to be enabled that streaming session.
ATDX"[HOSTNAME]:[PORT]" : Adding a X modifier causes XON/XOFF flow control to be enabled that streaming session.
ATDS"[NAME]:[PASS]@[HOSTNAME]:[PORT]" : Adding a S modifier, along with username and password, causes an SSH shell connection to be made.
ATDnnnnnnn : Where n=0-9, if the digits exist in the phonebook (see ATP), it will try connect to that host, with those modifiers, from the phonebook.

ATC : Shows information about the current network connection in the following format "[CONNECTION STATE] [CONNECTION ID] [CONNECTED TO HOST]:[CONNECTED TO PORT]"
ATC0 : Lists information about all of the network connections in the following format "[CONNECTION STATE] [CONNECTION ID] [CONNECTED TO HOST]:[CONNECTED TO PORT]", including any Server (ATA) listeners.
ATCn : Where n > 0, this changes the Current connection to the one with the given ID.  If no connection exists with the given id, ERROR is returned.
ATC"[HOSTNAME]:[PORT]" : Creates a new connection to the given host and port, assigning a new id if the connection is successful, and making this connection the new Current connection.  The quotes and colon are required.
ATCP"[HOSTNAME]:[PORT]" : Adding a P modifier causes all connection input to be translated to PETSCII
ATCT"[HOSTNAME]:[PORT]" : Adding a T modifier causes streaming input to be translated per TELNET when the changed to Stream mode
ATCE"[HOSTNAME]:[PORT]" : Adding a E modifier causes terminal echo to be enabled when the changed to Stream mode
ATCX"[HOSTNAME]:[PORT]" : Adding a X modifier causes XON/XOFF flow control to be enabled  when the changed to Stream mode

ATH  : Hangs up (disconnects and deletes) all open connections.  Does not close Server listeners.
ATH0 : Hangs up (disconnects and deletes) the current opened connection.
ATH1 : If no client connection with id 1 is open, this will put server listeners into 'busy' mode.
ATHn : Hangs up (disconnects and deletes) the open client connection with the given id.

ATO : Re-enters a Streaming session (see ATD) under the previous settings, with the current (previous) connection.

ATP : Lists all existing phonebook entries, with the format phone number followed by ATD modifiers, followed by the host and port.  Add ? to also get notes.
ATP"[NUMBER]=[HOSTNAME]:[PORT],[NOTES]" : Adds or Modifies an entry to the phonebook with the given 7 digit number, host, port, and notes. Use ATDnnnnn.. to connect.
ATPP"[NUMBER]=[HOSTNAME]:[PORT],[NOTES]" : Adding a P modifier causes connection input to be translated to PETSCII  when connected to that entry.
ATPT"[NUMBER]=[HOSTNAME]:[PORT],[NOTES]" : Adding a T modifier causes connection input to be translated per TELNET  when connected to that entry.
ATPE"[NUMBER]=[HOSTNAME]:[PORT],[NOTES]" : Adding a E modifier causes terminal echo to be enabled when connected to that entry.
ATPX"[NUMBER]=[HOSTNAME]:[PORT],[NOTES]" : Adding a X modifier causes XON/XOFF flow control to be enabled when connected to that entry.
ATP"[NUMBER]=DELETE" : Removes the phonebook entry with the given number.

ATS0=n : Changes the number of RING messages received before a CONNECT response is sent, on incoming Server listeners.
ATS1=n : Unimplemented, always returns OK
ATS2=n : Change the escape character (n = 0-255), Defaults to ASCII decimal 43 ("+")
ATS3=n : Change the Carriage Return Character   (n = 0-127), Defaults to ASCII decimal 13 (Carriage Return)
ATS4=n : Change the Line Feed Character (0-127), Defaults ASCII decimal 10 (Line Feed)
ATS5=n : Change the Backspace Character (0-32), ASCII decimal 8 (Backspace)
ATS6 ... 39=n : Unimplemented, always returns OK
ATS40=n : Change the size of the connection packets (n > 0), Defaults to 127 bytes
ATS41=n : When n > 0, all incoming Server listener connections are immediately sent to Stream mode.  If n=0, connections remain in normal command mode (default).
ATS42=n : Set the CRC8 for an attached Transmit command.  e.g. ATS42=123T"[MESSAGE]" returns error unless 123 is CRC8 of "[MESSAGE]".
ATS43=n : Sets a standby baud rate n for the next incoming or outgoing connection only.  ATZ clears.
ATS44=n : Sets an automatic delay of n milliseconds after most bytes written to the Serial port.  This is for computers that support a baud rate, but can't really keep up, and you don't want to use flow control.
ATS45=n : Changes how packet and at&g data is delivered.  0 is normal binary with normal headers, 1 is 78 char HEX digit streams followed by EOLN with hex digit headers, 2 is decimal digits followed by EOLN, with decimal digit headers, 3 is normal without SUM header. Add 4 to add packet numbers.
ATS46=n : Changes DCD status. n=0 is default DCD=HIGH=online. n=1 is DCD=LOW=online. n=2 always HIGH. n=3 always LOW.
ATS47=n : Changes DCD pin number, n=2 is default
ATS48=n : Changes CTS status. n=0 is default CTS=HIGH=active. n=1 is CTS=LOW=active. n=2 always HIGH. n=3 always LOW.
ATS49=n : Changes CTS pin number, n=0 is default on ESP01, and default is 5 otherwise
ATS50=n : Changes RTS status. n=0 is default RTS=HIGH=active. n=1 is RTS=LOW=active. n=2 always HIGH. n=3 always LOW. (N/A on ESP01)
ATS51=n : Changes RTS pin number, n=4 is default (N/A on ESP01)
ATS52=n : Changes RI status. n=0 is default RI=HIGH=active. n=1 is RI=LOW=active. n=2 always HIGH. n=3 always LOW. (N/A on ESP01)
ATS53=n : Changes RI pin number, n=14 is default (N/A on ESP01)
ATS54=n : Changes DTR status. n=0 is default DTR=HIGH=active. n=1 is DTR=LOW=active. n=2 always HIGH. n=3 always LOW. (N/A on ESP01)
ATS55=n : Changes DTR pin number, n=12 is default (N/A on ESP01)
ATS56=n : Changes DSR status. n=0 is default DSR=HIGH=active. n=1 is DSR=LOW=active. n=2 always HIGH. n=3 always LOW. (N/A on ESP01)
ATS57=n : Changes DSR pin number, n=13 is default (N/A on ESP01)
ATS60=n : When n > 0, immediately saves existing listeners and automatically restores them later. n=0 to clear.
ATS61=n : When n > 0, sets the number of seconds to timeout a print job stream (AT+PRINT). Default is 5 seconds
ATS62=n : When n > 0, enables/disables telnet support in the ATD (Dial) command. Default is 0 (disabled).
ATS63=n : When n > 0, enables/disables +++ (n=1), DTR (n=2), or OTH/PDP (n=3) hangup while in stream mode
ATSn?   : Where n >=0 will show the current value of status register n 

+++ : With a 1 second pause with no other characters afterwards, this will disconnect the current opened connection.

ATT"[MESSAGE]" : Transmit the given text string, with \r\n at the end, on the current connection.
ATTn : Where n > 0, this starts a transmit of exactly n bytes to the current connection.  The \n from entering this command must be followed by the n bytes to transmit.
ATTP"[MESSAGE]" : Transmit the given text string, translating petscii to ascii, with \r\n at the end, on the current connection.
ATTPn : Where n > 0, this starts a transmit of exactly n bytes to the current connection, translating petscii to ascii.  The \n from entering this command must be followed by the n bytes to transmit.
ATT+"[MESSAGE] : A + argument may be used to force the 'T' command to return the CRC8 of the message instead of OK, when successful.

ATL0  : Re-sends the most recently sent data packet again
ATLn  : Re-sends the most recently sent data packet for connection id n. Prefix n with 0 for earlier packet.

AT&H  : Shows a help file from the web, or brief help otherwise.  Use &H6502 to reiforce web download.
AT&L  : Reloads the saved configuration.
AT&W  : Saves the current configuration: WiFi settings(ATW), baud rate (ATB), end of line (ATR) settings, flow control (ATF), echo mode (ATE), extended responses (ATX), verbose responses (ATV), quiet responses (ATQ), PETSCII mode (AT&P1), pin statuses (ATS46 - S58), Rings (ATS0), Listener Stream-mode (ATS41), and Listener restore (ATS60), printer spec (AT+PRINT), the busy message,  telnet (S62), hangup mode (S63), and operating mode (AT+16xx).
AT&F  : Restores the modem to factory default settings.  Use &F86 to reformat the SPIFFS.
AT&On : n is 1 to turn on internal serial-reception log, n is 0 to turn off or view a previously turned-on log, n is 88 to turn on ESP32 debug port.
AT&U  : Checks the firmware home page to see if a new version is available.
AT&U6502 : Will update the firmware from the home page on the web.
AT&U=x: Will update the firmware from the web to custom version x.
AT&Kn : Flow Control, similar to ATFn, n=0,1,2: disable, n=3,6: rts/cts, n=4,5: Xon/Xoff
AT&Pn : Where n > 0, all command mode input and output will be translated to/from PETSCII before internal processing.  This will not affect received packet data, or the stream mode.
AT&Nx : Shows the status of ESP module I/O pin x
AT&Mn : Adds the byte denoted by n to a list of mask-out bytes.  These are bytes that are not transmitted to the serial port in command mode incoming packets.  If this command is followed by a C, N, or A command on the SAME LINE, then the setting will apply ONLY to that connection or listener.
AT&M  : Resets the mask-out bytes list. No bytes will be masked-out. If this command is followed by a C, N, or A command on the SAME LINE, then the setting will apply ONLY to that connection or listener.
AT&Dn : Adds the byte denoted by n to a list of delimiter bytes.  These are bytes that will compose the last byte in a command-mode incoming packet that is still shorter than the limit set by ATS40. This is useful for CR-LF formatted data.  If this command is followed by a C, N, or A command on the SAME LINE, then the setting will apply ONLY to that connection or listener.
AT&D  : Resets the delimiter bytes list. No bytes will be delimited, and packets will contain as many bytes as are received and allowed by ATS40.  If this command is followed by a C, N, or A command on the SAME LINE, then the setting will apply ONLY to that connection or listener.

AT&S"40=[HOSTNAME]" : Change the modem hostname
AT&S"41=[TERMTYPE]" : Change the telnet 'termtype' response string
AT&S"42=[BUSYMSG]" : Change the stream connection 'busy message'

AT&T"[TIMEZONE],[TIME FORMAT],[NTP URL]" : set up the NTP clock. DISABLE to disable. Format is like Java SimpleDateFormat, but with % escapes. Each argument is optional.
AT&G"[HOSTNAME]:[PORT]/[FILENAME]" : Streams a file from an HTTP/FTP/GOPHER source on the internet.  The header contains channel 0, file length, and an 8-bit sum of all the bytes in the forthcoming file, followed by the bytes of the file, all formatted as a normal packet.  An ASCII 3 (CNTRL-C) received during the transfer will abort. The S44 register can be used to create artificial delays in this output.  XON/XOFF Flow control also remains in effect with, on a byte-by-byte basis for the auto and manual flow control systems. Requires flash space for caching, or S45=3 to eliminate the SUM header.
AT&Y  : Resets the state machine string. No state machine will be executed.
AT&Yn : Change the current state (for command mode AND current connection) to state n, where n is a decimal number.
AT&Y"[CODED STATE MACHINE]" : Adds the coded format string to a state machine.  If this command is followed by a C, N, or A command on the SAME LINE, then the setting will apply ONLY to that connection or listener.   State Machine Format: MMcCCNN ...  States are numbered by their order in the list starting with 00.  Non-matches automatically go to the next state until a match is made.   'MM' is hex byte to match (or 00 to match all).  'c' is one of these commands :e=eat byte, p=push byte to que, d=send byte, q=send all queued, x=flush queue, r=replace with byte represented by hex CC.  'C' is either '-', one of the command letters above, or a hex byte value if the first command was 'r'.  'NN' is the next state to go to, with 00 being the first state.

zimodem's People

Contributors

bozimmerman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zimodem's Issues

WIFI credentials charset problem?

Hi Bo,
I've just assembled my modem (with your firmware) this weekend and had an issue to connect to my Wifi.
Lets say my SSID is "Abc2".

I've used your "CONFIGURE" tool which initilizes the modem and searches for available Wifi SSIDs.
The "CONFIGURE" tool shows my SSID as "aBC2". (the upper lower case syntax of other text is also messed up)
After providing the password, the connection attempt fails.

Afterwards I've switched to CCGMS and entered the configuration mode with "AT+CONFIG". Trying to connect via the command "WIFI" leaded to the same result.

After switching to "PETSCII translation on" the modem connected without problems and also the SSID was listed correctly as "Abc2".
Now I had to deactivate the "PETSCII translation" again cause your tools doesn't seem to initialize the modem with this option activated.

What I've tested so far: 2 different C64 (PAL) machines (with sd2iec), JIFFY, CMB, SPEEDDOS, password in different "upper-lower case" syntax.

thank you for your effort!

Pet2asc

Not really an issue as much as a question- I'm trying to use this w/ Atari and i can't quite follow in the code if it's doing the petacsii conversion by default or not. What triggers the conversion? I'm getting nothing but strange chars on my Mac as well as the atari when connected.

Linux Telnet Upload Problem

esp8266(rx tx gnd vcc) pin connected.(baud-rate 38400)

File Upload Fails or Very Slow Speed(command: rz -e) When Connected to Linux Telnet.

But Download is Good.(Command: sz -e)

How to Fix?

Telnet problem with atari server

Is there any chance do bigger debug to Serial console? I have problem with telnet--IRC bridge provided on ##atari channel irc.atarinet.com:800 When using RAW mode, it only print some telnet control codes and does not continue, if I will use telnet mode ON then it connect and disconnect imidiatelly (NO CARRIER).

I turn on Core debug and there is only this [D][WiFiClient.cpp:509] connected(): Disconnected: RES: 0, ERR: 128

Platform: ESP32
Build: latest master (in time writing issue)
SDK: 1.0.4

Regads Petr

Strange Telnet Issue

I have built the GuruModem versions, as well as adding a small i2c monitor that shows the current baud and Wifi SSID.

However, when I connect to my local Telnet server - the connection is set to Telnet - the [enter] when I enter a command seems to get 'eaten' somehow. For instance if I type 'ls' in my remote session. It overwrites the current line.

ls [enter]

prints:
projects Downloads Documents

The 'ls' line is overwritten. It like it is receiving from the server only a cr and not a lf. I've tried different clients, different CRLF settings in ZiModem, and nothing works. I have a GuruModem and it does not do that. I am using an EPS32-Dev board.

NodeMCU V3 Lua WiFi ESP8266 32M USB CH340G TTL Internet Development Board Module

Hi I hope you can help.

I'm running Windows Arduino IDE 1.8.5 and added the json for esp8266 boards etc.

I have a NodeMCU V3 Lua WiFi ESP8266 32M USB CH340G TTL Internet Development Board Module from ebay and it compiles and flashes no problem.

But then when I run Kermit on my old dos pc I can only use a limited set of AT commands and can't setup wifi or follow your instructions. I just get "ERROR".

I can do AT and it says OK
I can do ATI01 through to ATI04 but not 05,06,07 onwards.

Is there anything I'm doing wrong or can you help at all? I'm hoping to get my old dos pc on wifi through Kermit!

Thanks for any help :)

Carrier Detect line not being activated on manual answer ESP8266. (Again)

Ok, I got around to testing your new version after the pull, but cd is still not activated on connect in the following scenario.

Device is a ESP8266 on a wemos d1-mini clone board.
Serial side is connected to a full (10 wire), ttl to serial adapter board. This is attached to my quad port rs232 card on a windows 10 system.

The only change to the source is commenting out line 78 //# define RS232_INVERTED 1 because it's a non inverted device.

Flashed the unit with the latest pull as of this post time, joined my wifi network, enabled cts/rts flow control, on the main menu and in the bbs host menu.

Saved these settings, and exited back to command mode.

Called the zimodem using putty with a raw port. This results in a connection and the Carrier Detect line becoming active and the led on the wifi module to light, along with the led I've added to my breadboard.

Just closing putty results in a NO CARRIER (what ever number) and the LEDs going out.

Now, type ats0=0, this disables autoanswer on incoming connections, and results in the modem reporting RING.

Starting the putty connection again, results in a RING on the serial terminal side, and when I make the connection with the ATA command, I am connected, but no LEDs, i.e. DCD is not being changed to reflect the current connected state.

Online Update AT&U6502

The command is working bur will update to 2.8.
Is it possible to make 2.9 working or to make a selection available.

Using Zimodem/c64net from cc65?

Hi!

Just dusted off my good old C64 and soldering iron, and built myself a c64net adapter (using this schematic: https://www.c64-wiki.de/wiki/Wifi-Adapter (the schematic at the bottom).

I got the demo programs included in Zimodem working, and took a look at some telnet BBSes... Yay!

Now I try to write some software to use it, using cc65, I want to interact with a service running on my PC.

I use some code found here: https://coronax.wordpress.com/2015/01/06/figuring-out-commodore-64-rs-232/ (the last comment at the bottom of the page).
Apparently the cbm_k_* functions are wrappers around the Kernal routines, essentially doing the same as OPEN 2,.., PRINT#2, GET#2 etc.

But I run in some issues: as soon as the connection to my server (simple TCP service running on my PC) is established, I sometimes receive junk characters, sometimes I see parts of the text sent by the server.
Looks like baud rate/handshake/transmission issues. (I rule out ASCII/PETSCII conversion issues, I only send the string "alive" so far, some times it is even received correctly)

Now I am confused:

  • Are the Kernal routines supposed to work at all? (I found several posts on the internet stating they are buggy). Don't the example programs use them, too?
  • Is Zimodem 3.4 with the schematic I use capable of hardware handshake? the D1/D2 pins are connected to User Port PB1/PB6. Do the Kernal routines support hardware handshake?
  • I tried both hardware and software handshake (second byte of OPEN filename both 0x00 and 0x01, and both ATF0 and ATF1) and see no real difference.
  • If someone knows cc65: How do I do non-blocking I/O? I see no means of clearing/flushing the receive buffer, If no more characters are waiting, reading from the serial port blocks...

Thanks,

Martin

Zimodem, ESP not responding : wifi.disconnect() and more ?

Hello Bo,
Your project seems great !

For the past few weeks, I've been trying to build the firmware part on an ESP02 on a breadboard.

Here are the versions that I tried :

  • build platform : linux
  • arduino : 1.8.5 or 1.6.7
  • ESP8266 core for Arduino : latest git from 3 weeks ago, and from today (that uses SDK v2.1.0-10-g509eae8)
  • Your zimodem code from 3 weeks ago and from today

I've followed your indications and it builds OK and uploads OK to the controller.
As indicated, I put the serial console to 1200 baud.

However :

  • using the unmodified code, all I get is the usual "non-readable boot output" from the ESP but nothing after that. And it does not respond to AT commands.
  • when adding the following line before all of the 3 occurrences of "WiFi.disconnect()" in the code, then I get the init message, and it responds to the ATI command, but it does not lists the access points and does not connect with ATW, and freeze.
if(WiFi.status() == WL_CONNECTED)
  WiFi.disconnect();

I am somewhat troubled that I have to do this modification ?! I read that people have the same freeze with WiFi.disconnect() with other projects...

About the wireless not working, to be sure that it is a power issue, it is powered using a small "lab" power supply with controlled volts and amps. And I have tested that the ESP is OK with NodeMCU/Lua. I fear it is a software problem like the previous one ?

Can you please provide the software versions that you currently use so that I try them ?

Thank you.

Sassa

Uhm.How does it work?

Hi Bo.

Sorry to nag you again. But: I set the baudrate of Zimodem to 1200. Then I loaded pml64.bin. After that I started one of the PRG files. IRC for e. g. But nothing happens. It stays at initializing message.....

You wrote to reset cpu and do all again. It changes nothing.

Must I disconnect 9600 cables to make it work? BTW: in CCGMS I have to change baudrate only and it works....

'LogMode' does not name a type

Pretty sure it's not a bug but me ignoring some essentials, I just don't know about, since I'm still pretty new to the whole arduino world...
...But when trying to compile your source, I always get this Error:

'LogMode' does not name a type

Please find the debug output attached...
zimodem.log

I did follow your instructions downloading and installing/injecting the head version of the esp8266 libs and I followed instructions, I found on the internet stating I could compile using the default version from the board manager - both presenting the same error.

Please help! :)

Additional, potentially important information:
Trying to compile for a Wemos NodeMCU v3 with an ESP-12E chip. (But the same error occurs, no matter which board I choose...)
Using the latest master from your github, cloned an hour ago.
Anything missing?

edit
I first used the wrong settings for creating the debug log. I corrected them now and exchanged the attached logfile.. Yet, as told before, the error remains the same...

Number of lines

Is it possible to change the number of lines to display? My terminal supports up to 48 and I would like to make full use of them

up9600 hack on nodemcu

Hi Bo, I wondered if you could help.

I have a NodeMCU ESP8266 flashed with zimodem hooked up to a userport on my C64.

It works great and I can use it with user port at 2400 but can't seem to get the up9600 hack working. I'm not sure how to set this up but I've tried setting the baud to 9600 first then setting the modem to UP9600.

At that point I can't type any at commands or anything in at all though so I just have to switch back to User Port on the lower baud again. Thanks for any help with this. :)

cts problem...

Hi I built a fresh binary in arduino following your steps for a nodemcu 12E...

I edited the firmware code slightly to use define RS232_INVERTED 0 just so I can plug it in via serial to a PC and type without using the C64 inverted signals.

I've got a strange issue though. The firmware seems to work great other than CTS...

When I type each letter takes 10 seconds to appear. So typing AT+CONFIG is really unresponsive and takes ages!! It does work though but like I say really slow.

As soon as I just unplug the CTS jumper on the board, everything springs in to life and I can type and it is all fast and punchy!

I then of course can't enable rts/cts without it crashing, but even when it is really slow with CTS plugged in I still can't enable rts/cts from at+config menu either.

Any ideas what I've done wrong or why it is running so slow with cts connected?

Thanks for any help at all :)

ATW not showing all networks

The ATW (or AT+CONFIG) command does not show all networks, just a selection of them. Is there specific types of routers or configs that the software will not work with? All routers in range are in b/g or n modes and are 2.4ghz

Will not connect to WPA-Enterprise wifi

Using this software embedded in a Retro Wifi SI, it is not possible to connect to Enterprise-WPA wifi with 802.1x RADIUS authentication using username and password. It would be a useful feature if it could.

Thanks

up9600 cc65 ser driver?

Hi Bo,

Have you by any chance created a ser driver for cc65 that uses up9600? I tried it, the driver loads ok and detects the hardware in INSTALL routine, but then hangs when trying to do RSOUT (cc64 PUT). Debugging it is a major PITA and I lost my hope already. But maybe you've already have such ser driver on hand?

No output on serial console

Hi,
I'm trying to get zimodem to work on a esp32 (i'm trying both a TTGO-TS and a normal ESP32 dev board with a ESP32-WROOM-32 module soldered on it) but on the serial monitor i get only the debug info, if switch to 1200 baud and write "AT" or "AT+CONFIG" i get nothing.

I am using arduino studio 1.8.10 in "portable mode" (so I don't mix up the libraries between projects) with the 1.0.0 libraries that i found linked in the readme (I didn't make the changes described because i noted that they were already applied).
I also tried modifying the 1.0.4 library appending all the changes at the end of the files (have no idea if it's "the right way) but with no luck.

compilation log with 1.0.4 edited library

zimodem:284:40: error: 'void changeBaudRate(int)' was declared 'extern' and later 'static' [-fpermissive]

static void changeBaudRate(int baudRate)

                                    ^

In file included from sketch\pet2asc.h:19:0,

             from C:\Users\Sonno\Documents\arduino-zimodem\portable\sketchbook\zimodem\zimodem.ino:125:

C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\cores\esp32/HardwareSerial.h:107:6: note: previous declaration of 'void changeBaudRate(int)'

void changeBaudRate(int baudRate);

  ^

C:\Users\Sonno\Documents\arduino-zimodem\portable\sketchbook\zimodem\zimodem.ino: In function 'void changeBaudRate(int)':

zimodem:293:12: error: 'class HardwareSerial' has no member named 'changeBaudRate'

HWSerial.changeBaudRate(baudRate);

        ^

C:\Users\Sonno\Documents\arduino-zimodem\portable\sketchbook\zimodem\zimodem.ino: In function 'void changeSerialConfig(uint32_t)':

zimodem:307:12: error: 'class HardwareSerial' has no member named 'changeConfig'

HWSerial.changeConfig(conf);

        ^

Multiple libraries were found for "Update.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\Update
Multiple libraries were found for "SD.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\SD
Not used: C:\Users\Sonno\Documents\arduino-zimodem\libraries\SD
Multiple libraries were found for "SPI.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\SPI
Multiple libraries were found for "WiFiClientSecure.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Users\Sonno\Documents\arduino-zimodem\libraries\WiFi
Multiple libraries were found for "SPIFFS.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\SPIFFS
Multiple libraries were found for "FS.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\FS
exit status 1
'void changeBaudRate(int)' was declared 'extern' and later 'static' [-fpermissive]

also i noted that in the HardwareSerial.cpp there's no
_uart = uartBegin(_uart_nr, baud, config, rxPin, txPin, 256, invert);
but there is something similar
_uart = uartBegin(_uart_nr, baud ? baud : 9600, config, rxPin, txPin, 256, invert);

Hope to be able to navigate on my i386 by 2021, have a happy new year :P

P.S. this is what happens if i don't modify the libraries C:\Users\Sonno\Documents\arduino-zimodem\portable\sketchbook\zimodem\zimodem.ino: In function 'void changeBaudRate(int)':

zimodem:293:12: error: 'class HardwareSerial' has no member named 'changeBaudRate'

HWSerial.changeBaudRate(baudRate);

        ^

C:\Users\Sonno\Documents\arduino-zimodem\portable\sketchbook\zimodem\zimodem.ino: In function 'void changeSerialConfig(uint32_t)':

zimodem:307:12: error: 'class HardwareSerial' has no member named 'changeConfig'

HWSerial.changeConfig(conf);

        ^

Multiple libraries were found for "SPIFFS.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\SPIFFS
Multiple libraries were found for "FS.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\FS
Multiple libraries were found for "Update.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\Update
Multiple libraries were found for "SD.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\SD
Not used: C:\Users\Sonno\Documents\arduino-zimodem\libraries\SD
Multiple libraries were found for "SPI.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\SPI
Multiple libraries were found for "WiFiClientSecure.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Sonno\Documents\arduino-zimodem\portable\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Users\Sonno\Documents\arduino-zimodem\libraries\WiFi
exit status 1
'class HardwareSerial' has no member named 'changeBaudRate'

Trouble with Telnet connection to Linux server

Hello! Very cool project, thank you for this.

I am using a c64net device and the auto updater brought me to firmware 3.2 no problem. I am trying to telnet (atdt) to a Linux server and it looks like there is a problem with Telnet protocol negotiation. I haven't looked at the source code for Zimodem but I was wondering if the Telnet implementation is RFC based or is it more like netcat streaming without a (or with a minimal) Telnet application layer?

I have attached a network trace (Wireshark) that shows where it hangs right after connecting... the server seems to be trying to negotiate some Telnet settings.

Any help is appreciated. Thanks so much!

Suggestion: Enhanced phonebook and ping functionality

I don't know if it is ok to suggest features under the 'issues' tab, but those are some features that would be nice:

  1. An enhanced phonebook with BBS names. Often I don't know which hostname belongs to which bbs.
  2. Ping functionality. To check if a IP or hostname responds. I don't know if that works, but automatic pinging all phonebook entries to check which BBSs are online would be nice, too!

I love Zimodem. Really nice to have it! Thank you.

Manual answer with ata command doesn't raise CD line.

If the bbs host is enabled, and ats0=0 is issued, answering the call with the ata command does connect, but doesn't raise the carrier detect signal.

Enabling auto answer (i.e. ats0=0), results in the connection occurring automatically, and the carrier detect signal being asserted.

Make Zimodem CommodoreServer compatible -- Was: Soft on ESP8266 MCU V2 - freezing

Hi Bo,

Thanx for the very nice software for ESP8266/C64/communitiy. I installed the soft on ESP8266 MCU V2. With Arduino. It works. But if I do BBS or downloads from Commodoreserver.com it's freezing... I know you put the soft on Adafruit module. But: is it able to run flawlessly on native ESP8266 MSU V2? Other wifi soft is running /wout problems on this module.

Any suggestions?

And: can I use V1541-38k with your soft?

BTW: Keep up the good work!
Best regards.

thE rZA

Wemos Nodemcu bugs

Hi I hope you can help. I've flashed a few NodeMCU LUA type wemos dev boards and most work ok but I seem to have a few bugs.

One board works but when I type it repeats characters and double echos the commands back to me. Or inserts strange characters amongst the legit ones. When I hit enter the at commands work the same, just it is hard to see what I've typed correctly or what input I've done.

On this particular board it only seems to have this issue when set to the default 1200 baud. If I ATB57600 or some other board it inputs and types fine...

Do you know of anything that may cause this or how I can fix it? Or is the dev board just messed up (though seems odd it works ok at other bauds).

I tried doing the over the air firmware update too but that hasn't helped either.

ESP8266 Issue - Disconnect only shows "NO" instead of no carrier.

Disconnecting the other side of the connection results only the first 2 bytes of the NO CARRIER string being sent to the host over serial. Changing the string in zcommand (Line 3124) results in only the first 2 bytes of the string printing to the host.

Edit...
It's a hardware bug with the 6551 of not flushing the buffer when the CTS pin is high.

Hardware flow control

Hello Bo,
Excuse me if my question is dumb.

ESP8266 UART provides pins for hardware flow control : RTS is IO15 and CTS is IO13.
It is possible to enable it in arduino : http://www.esp8266.com/viewtopic.php?f=27&t=8560

Why not use it ? (or at least use these pins in order to be able to enable it later ?)

Actually I see that zimodem use pin 4 for CTS (to computer's RTS) and 5 for RTS (to computer's CTS).

Zimodem firmware on nodeMCU?

Hi everyone,
I'm interested in building a serial modem that allows me to transfer files from an old mac classic to midern conputer on my LAN.

I have a couple of questions:

A - can I load zimodem firmware on a nodeMCU device?
B - once configured can I us the modem to perform a PPP connection to a pppd daemon on a pi3? This way I'll enjoy a full tcp/ip session and trasfer files directly on the pi3 (or elsewhere on the LAN) via ftp

Thanks in advance

Marco

P.s. sorry if this sounds as a stupid question but I'm quite a newbie

Stack-error dump with comma/exclamation mark in wifi SSID or keyphrase?

Hi, I hope you can help!

Is there anyway to recover a nodemcu unit from a massive stack error and continuous dump as this screenshot:

image

Everything works great accessing a strangely name wifi access point called "Fritz!Box 6490 Cable (AGL,n)"

Possibly it doesn't like the comma or the Brackets - or even the keyphrase has an exclamation mark in it!

But then when a AT&W or AT+config save takes place it just stack overflow dumps out that like and won't stop. Unplugging doesn't help as on plugging it in again the stack dump just continues...

Thanks for any help. I can get the wifi name and codes changed if I can recover my nodemcu unit somehow... But it would be even better if I could recover it AND keep the credentials as of course in future it would be useful to not have it crash if it does't like a particular access point.

Thanks once again :)

NTP error by one hour.

When using 24 hour display, the time is out by one hour.
When using 12 hour time, the date doesn't roll over until 0100.
I have made two changes to rt_clock.ino

In RealTimeClock::tick()
you have
// Unix time starts on Jan 1 1970. In seconds, that's 2208988800:
const uint32_t seventyYears = 2208988800UL + 3600UL;
// subtract seventy years:

I removed the '+ 3600UL'
const uint32_t seventyYears = 2208988800UL;

That gets 24 hour time correct

To adjust 12 hour time, this is my crude change to RealTimeClock::getCurrentTimeFormatted():


  if(f.indexOf("%hh")>=0)

{
if((c.getHour() % 12)== 0){
f.replace("%hh","12");
}
else
{
sprintf(str,"%02d",(int)(c.getHour() % 12));
f.replace("%hh",str);
}
}
if(f.indexOf("%h")>=0)
{
if((c.getHour() % 12)== 0){
f.replace("%h","12");
}
else
{
sprintf(str,"%d",(int)(c.getHour() % 12));
f.replace("%h",str);
}
}

I am sure that there is a better way to handle zero hours.

Thanks for a great product.
Jim

Basic Programs unable to connect to modem on a C128 PAL

After starting "configure" from the disk image on a C128D PAL in C64 mode I am getting after 2 minutes this error:

Intialization Failed
Is your modem set to 1200b?
break in 220

All the other programs on the disk are not working either. They either hang (Telnet) or through the same error. The modem is set to 1200 baud and works well in CCGMS in C64 mode.

I tried in the C128 mode as well and have the same issue. Besides the Basic programs not working I noticed that the transmission above 1200 baud gets quite unreliable.

Any suggestions or workarounds? Or is this related to C128 PAL timings to be different? I am more than happy to help if this is a general issue.

Compile errors on ESP-32 NodeMCU board

Getting the following error when attempting a compile using ESP32 Dev Module:

C:\Users\can77\Downloads\Zimodem-master\Zimodem-master\zimodem\zimodem.ino: In function 'void changeBaudRate(int)':

zimodem:291:17: error: expected unqualified-id before '.' token

HardwareSerial.changeBaudRate(baudRate);

             ^

C:\Users\can77\Downloads\Zimodem-master\Zimodem-master\zimodem\zimodem.ino: In function 'void changeSerialConfig(uint32_t)':

zimodem:305:12: error: 'class HardwareSerial' has no member named 'changeConfig'

HWSerial.changeConfig(conf);

AT&W not saving baud rate

I did a
ATB115200
I then did a
AT&W
but ZiModem is not saving the baud rate value on the ESP8266.

Unable to build version 3.1

I downloaded the source for version 2.0 back in March and successfully built it with Arduino 1.8.1 with the 2.3 version of the esp8266 board code (appears to be current version from their GitHub). However, attempting to build the 3.1 version results in compile errors. The first was in wificlientnode.ino when the following code was used:
int WiFiClientNode::flushOverflowBuffer()
{
if(overflowBufLen > 0)
{
int bufWrite=client.write(overflowBuf,overflowBufLen);

Use of the unsigned char array in client.write causes the following errors:
Arduino: 1.8.3 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DOUT, 115200, 1M (64K SPIFFS), ck, Disabled, None"

Build options changed, rebuilding all
In file included from C:\Users\Gene Toye\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,

             from sketch\pet2asc.h:16,

             from C:\Users\Gene Toye\Documents\Arduino\Zimodem-master\zimodem\zimodem.ino:41:

C:\Users\Gene Toye\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClient.h: In instantiation of 'size_t WiFiClient::write(T&, size_t) [with T = unsigned char [256]; size_t = unsigned int]':

C:\Users\Gene Toye\Documents\Arduino\Zimodem-master\zimodem\wificlientnode.ino:195:57: required from here

C:\Users\Gene Toye\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClient.h:123:36: error: request for member 'available' in 'source', which is of non-class type 'unsigned char [256]'

 size_t left = source.available();

                                ^

C:\Users\Gene Toye\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src/WiFiClient.h:127:5: error: request for member 'read' in 'source', which is of non-class type 'unsigned char [256]'

 source.read(buffer.get(), will_send);

 ^

exit status 1
Error compiling for board Generic ESP8266 Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Commenting out the code except the return in flushOverflowBuffer function will resolve this error but new ones occur.

What version of the board support is required for successful compilation of the 3.1 version?

Thanks for a wonderful project.
Gene

Commodore server additional testing.

Hey Bo,

Not really an issue per se more so doing some testing on your latest firmware.

I noticed on your firmware for C64 server.com for loading via Device ,2

I was testing the 2400 baud upload finally got the modem to connect. For the CSLOAD38.prg I noticed he was issuing the AT*D0 > that is given an error through ccgms. Just thought you would know that I tested your FW with AT&D0 and that set the bit I assume the D is a register and the binary value of 0 turns this off is this for Flow Control.

The other fellow that was testing this with you couldn't get the 38k driver going. What I notice is if you run a directory command on the server and then try to load any of your programs, you can see the data pull through the RS232 line and on screen but after awhile it stops. So I am wondering if the site has an issue perhaps on the HTTP end of things. I thought it would be fun to play around check out that command and let me know I maybe setting an incorrect value.

Anyways your Firmware is amazing thus far and re flashed my WiModem because you have more options.

Take Care :) Thank you for your contribution to C64 man your teaching me some stuff thank you thank you.

Issues with Zimodem on wemos D1 mini Rev 2

Using Arduino 1.8.5 to build.
I'm able to build and upload the sketch to the board.
The serial monitor correctly displays the init message however most of the time it ignores any commands given. I've noticed if I connect to to using tera term the cursor flashes when I'm able to give it commands.

I've tried two different D1 mini's with the same results.

Shorting the tx and rx pins and uploading a simple sketch shows that it's transmitting and receiving data correctly.

Seems like sometimes after showing the init message it's freezing.

Building with proper ESP8266 libraries.

I need help with how to get ESP8266 libraries that will build non-crashing Zimodem. The one from Boards Manager seems to have issues, and Iโ€™m unclear on how I can use the newer dev code. Or, it could be an issue with the current Arduino IDE. Any insight would be appreciated.

Cannot compile for ESP32

I'm not able to compile this for the ESP32. I've followed directions in the read me to add the lines to the base files and tried Arduino IDE's from the version suggested to current and get compile errors.

`Arduino: 1.8.10 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 40MHz, 4MB (32Mb), 921600, None"

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1541:27: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

   lprintf(zm,LOG_INFO,"Resuming transfer from offset: %"PRIu64, *pos);

                       ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1576:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

 lprintf(zm,LOG_ERR,"ERROR %d seeking to file offset %"PRIu64

                    ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1659:28: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

   lprintf(zm,LOG_DEBUG,"send_from: end of file (or read error) reached at offset: %"PRId64, zm->current_file_pos);

                        ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1832:20: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

sprintf((char*)p,"%"PRId64" %"PRIoMAX" 0 0 %u %"PRId64" 0"

                ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1832:29: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

sprintf((char*)p,"%"PRId64" %"PRIoMAX" 0 0 %u %"PRId64" 0"

                         ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1832:40: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

sprintf((char*)p,"%"PRId64" %"PRIoMAX" 0 0 %u %"PRId64" 0"

                                    ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1911:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

lprintf(zm,LOG_DEBUG,"Sending %s from offset %"PRIu64, fname, pos);

                    ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1927:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

   lprintf(zm,LOG_WARNING,"File skipped by receiver at offset: %"PRIu64, pos + sent_bytes);

                          ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1946:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

 lprintf(zm,LOG_ERR,"Received %s at offset: %"PRId64, chr(type), zm->current_file_pos);

                    ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:1995:25: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

 lprintf(zm,LOG_INFO,"Downloading %s (%"PRId64" KBytes) via Zmodem", zm->current_file_name, kbytes);

                     ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2006:32: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

     lprintf(zm,LOG_WARNING,"%s already exists (%"PRId64" bytes)",fpath,l);

                            ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2008:34: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

       lprintf(zm,LOG_WARNING,"Local file size >= remote file size (%"PRId64")"

                              ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2081:34: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

       lprintf(zm,LOG_WARNING,"Incomplete download (%"PRId64" bytes received, expected %"PRId64")"

                              ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2081:64: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

       lprintf(zm,LOG_WARNING,"Incomplete download (%"PRId64" bytes received, expected %"PRId64")"

                                                            ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2089:31: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

       lprintf(zm,LOG_INFO,"Received %"PRIu64" bytes successfully (%u CPS)",b,cps);

                           ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2183:80: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

i=sscanf((char*)zm->rx_data_subpacket+strlen((char*)zm->rx_data_subpacket)+1,"%"SCNd64" %lo %o %lo %u %"SCNd64

                                                                            ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2183:89: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

i=sscanf((char*)zm->rx_data_subpacket+strlen((char*)zm->rx_data_subpacket)+1,"%"SCNd64" %lo %o %lo %u %"SCNd64

                                                                                     ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2222:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

 lprintf(zm,LOG_ERR,"ERROR %d seeking to file offset %"PRId64

                    ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2243:30: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

   lprintf(zm,LOG_WARNING,"Specified maximum file size (%"PRId64" bytes) reached at offset %"PRId64

                          ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2243:68: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

   lprintf(zm,LOG_WARNING,"Specified maximum file size (%"PRId64" bytes) reached at offset %"PRId64

                                                                ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:2327:28: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

     lprintf(zm,LOG_ERR,"ERROR %d writing %u bytes at file offset %"PRIu64

                        ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\rt_clock.ino:17:0: warning: "htonl" redefined

#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \

^

In file included from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3/tools/sdk/include/lwip/lwip/ip_addr.h:41:0,

             from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:45,

             from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3/tools/sdk/include/esp32/esp_event_legacy.h:23,

             from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3/tools/sdk/include/esp_event/esp_event.h:26,

             from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3/tools/sdk/include/esp32/esp_event_loop.h:22,

             from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\WiFi\src/WiFiGeneric.h:27,

             from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\WiFi\src/WiFiSTA.h:28,

             from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\WiFi\src/WiFi.h:32,

             from sketch\pet2asc.h:17,

             from C:\Users\Pete\Downloads\Zimodem-master\zimodem\zimodem.ino:125:

C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3/tools/sdk/include/lwip/lwip/def.h:110:0: note: this is the location of the previous definition

#define htonl(x) lwip_htonl(x)

^

zimodem:281:40: error: 'void changeBaudRate(int)' was declared 'extern' and later 'static' [-fpermissive]

static void changeBaudRate(int baudRate)

                                    ^

In file included from C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\cores\esp32/Arduino.h:154:0,

             from sketch\zimodem.ino.cpp:1:

C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\cores\esp32/HardwareSerial.h:102:7: note: previous declaration of 'void changeBaudRate(int)'

void changeBaudRate(int baudRate);

   ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\zimodem.ino: In function 'void changeBaudRate(int)':

zimodem:289:12: error: 'class HardwareSerial' has no member named 'ChangeBaudRate'

HWSerial.ChangeBaudRate(baudRate);

        ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\zimodem.ino: In function 'void changeSerialConfig(uint32_t)':

zimodem:303:12: error: 'class HardwareSerial' has no member named 'changeConfig'

HWSerial.changeConfig(conf);

        ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_ftp.ino: In function 'bool doFTPLS(ZSerial*, const char*, int, const char*, const char*, const char*, bool)':

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_ftp.ino:355:31: warning: NULL used in arithmetic [-Wpointer-arith]

if((req != NULL)&& (*req != NULL))

                           ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_http.ino: In function 'WiFiClient* doWebGetStream(const char*, int, const char*, bool, uint32_t*)':

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_http.ino:210:12: warning: converting 'false' to pointer type 'WiFiClient*' [-Wconversion-null]

 return false;

        ^

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino: In function 'int zmodem_send_hex(zmodem_t*, uint8_t)':

C:\Users\Pete\Downloads\Zimodem-master\zimodem\proto_zmodem.ino:363:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

char* xdigit="0123456789abcdef";

            ^

Multiple libraries were found for "WiFiClientSecure.h"
Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\WiFiClientSecure
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\WiFi
Not used: C:\Program
Multiple libraries were found for "SPIFFS.h"
Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\SPIFFS
Multiple libraries were found for "FS.h"
Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\FS
Multiple libraries were found for "Update.h"
Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\Update
Multiple libraries were found for "SD.h"
Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\SD
Not used: C:\Program
Multiple libraries were found for "SPI.h"
Used: C:\Users\Pete\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\libraries\SPI
exit status 1
'void changeBaudRate(int)' was declared 'extern' and later 'static' [-fpermissive]

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`

Question: Hostname

How does one change the hostname of the device? Id like something a bit more descriptive than ESP_#####.
I am using 3.4 on several esp-01's

Escape Sequences for Arrow Keys

I'm using this firmware on an ESP8266 connected to a CoCo3's serial port. Any reason why the arrow keys wouldn't send the proper escape sequence to move the cursor? Instead I see "[A", "[B", "[C", or "[D" appear on the screen whenever I strike those keys, as if ASCII character 27 is being omitted from the start of the sequence. Maybe there's a config setting I'm overlooking?

EDIT: I should add that the arrow keys work fine to move the cursor around the terminal while in command mode. It's when a connection is established they stop working.

Everything else is working great -- love the firmware.

Connecting to wifi fails first time

When I try to connect to my wifi it always fail the first time. Second time it works. I tried some modifications of the code. After changing the connectWifi function a bit it works for me. Not sure why... this is my working code:

static bool connectWifi(const char* ssid, const char* password)
{
int WiFiCounter = 0;
//if(WiFi.status() == WL_CONNECTED)
// WiFi.disconnect();
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
boolean amConnected = false;
//delay(1000);
while ((!amConnected) && (WiFiCounter < 10))
{
WiFiCounter++;
amConnected = (WiFi.status() == WL_CONNECTED) && (strcmp(WiFi.localIP().toString().c_str(), "0.0.0.0")!=0);
if(!amConnected)
{
delay(500);
}
}
wifiConnected = amConnected;
if (!amConnected)
{
WiFi.disconnect();
}
return wifiConnected;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.