Firmware version 1.2.1 is now available for the Flyer. It includes the following additions/fixes:
- Ability to listen for connections. Set your Commodore up as a server!
- TCP data source fix – no EOI was sent when reading from a channel that currently had zero bytes available.
Simply type the following command on your Commodore to instruct the Flyer to download and install the latest firmware:
Listening for Connections
To open a channel to listen for incoming connections, simply use the “listen:” channel protocol along with the port you want to listen on. A maximum of 2 channels can be listening for connections at any one time.
The existing command “n-s:” (net stat) may be issued via the command channel to determine if a connection has been accepted, as it returns the connection status as part of its response.
Assuming the command channel has already been opened and bound to file id 7,
the connection status may be checked as follows:
print#7,"n-s:2" input#7,a,b$,c,d print "connected: ";d
‘d’ will be either 1 or 0, indicating whether or not a connection has been established on channel 2.
Once a connection has been established, normal communication can proceed via print#, get# and input# commands.
New “Connection Info” Command
A new command has been added in firmware version 1.2.1, “c-i:” (connection info), which will return the remote host’s IP address and port, as well as current connection status for a particular channel. For example:
print#7,"c-i:2" input#7,a,b$,c,d print "error: ";a print "remote ip: ";b$ print "remote port: ";c print "connected: ";d
More examples will be posted shortly. Please watch this space! 🙂
Hot stuff! I whipped up a crude web server:
Awesome, what a great example!