Home

December 31, 2023

Probing FujiNet TNFS Connection Issues

To diagnose connection problems between your FujiNet device and the TNFS server, ensure you’ve downloaded and executed the required software:

Port Forwarding

  1. Make sure your router has UDP port 16384 forwarded to the static IP address of the computer running the TNFS Software.

Downloading and Running TNFS Software

  1. Download the TNFS software for macOS:
  2. Make the downloaded file executable:
    • Run the command chmod +x /path/to/tnfsd.macos.amd64 to make the software executable.
  3. Run the TNFS server software:
    • Execute the software by running /path/to/tnfsd.macos.amd64 with the root directory containing .atr and .exe files and the username if required. For example: /path/to/tnfsd.macos.amd64 /path/to/AtariFiles -c YourUsername

After setting up the software, proceed with isolating and troubleshooting the connection issue:

Investigating Possible Causes

  1. Checking for Obstacles to Connection:
    • Use the lsof -iUDP:16384 command on your Mac running the TNFS server to check for anything that might be blocking the connection.
  2. Understanding Anything in the Way:
    • If you see a Unable to bind” message after executing the command, using lsof -iUDP:16384 can help you learn which process is using it. Stop it using kill <PID> to clear the way.
  3. Reviewing Firewall Settings:
    • Ensure the firewall on your Mac where the TNFS server is located is switched off before moving on to the next step.

Testing Connection from Another Mac

To determine if the issue lies with the TNFS server or network setup, perform this test from another computer:

nc -u -zv Server_IP 16384

or from Linux (Ubuntu in my case)

ncat -vzu Server_IP 16384

If your output resembles the following (as displayed in Ubuntu), then the connection from your client to the server is established and functional:

Ncat: Version 7.80 ( https://nmap.org/ncat )
Ncat: Connected to 10.0.1.101:16384.
Ncat: UDP packet sent successfully
Ncat: 1 bytes sent, 0 bytes received in 2.07 seconds.

On the Mac terminal hosting TNFS, the observed response upon executing the Ubuntu command is consistently:

10.0.1.40 | Invalid datagram received

This description highlights the expected output from the Ubuntu command and the corresponding recurrent response observed on the Mac terminal running TNFS.

The message Invalid datagram received” typically indicates that the TNFS server on your Mac terminal received a UDP packet that it couldn’t process or interpret correctly.

UDP (User Datagram Protocol) is a connectionless protocol where packets, known as datagrams, are sent without establishing a connection between the sender and receiver. In this case, when using the ncat command from Ubuntu to send a UDP packet to the TNFS server, the server receives this packet.

The specific message Invalid datagram received” suggests that the received packet does not conform to the expected format or structure that the TNFS server is designed to handle.