Table of Contents
Description
The STATUS command returns one of six possible chunks of status information, on a given IOCB, across the four status bytes provided by the OS (DVSTAT):
If AUX1=0:
- DVSTAT[0] - Bytes Available for read
- DVSTAT[1] - If a server socket was specified in OPEN by AUX2=1, then 0 = No Client Waiting for connection accept., 1 = Client waiting for connection accept.
- DVSTAT[2] - 1=connected, 0=disconnected
If AUX1 is 1 to 5, then four bytes are returned in DVSTAT, which correspond to:
- AUX1=1 - External IP address
- AUX1=2 - Internal IP Address
- AUX1=3 - Gateway IP Address
- AUX1=4 - Netmask (e.g. 255.255.255.0)
- AUX1=5 - DNS IP Address
These are useful, for example, to display in your program.
Parameters
| Parameter | Description |
|---|---|
| AUX1 | 0=Socket Status, 1=External IP, 2=Internal IP, 3=Gateway IP, 4=Netmask, 5=DNS IP |
| AUX2 | Not used |
| FILENAME | Nx: where x is the device # (1-8), or empty for 1. |
Returns
The error code is returned in the STATUS return. Typically 1, for success. Other values are returned in DVSTAT, which must be read, e.g. by a PEEK(746) to PEEK(749) command in BASIC.
Examples
BASIC
Given a socket opened by:
OPEN #1,12,0,"N:TCP:192.168.1.8:2000"
You can check the status for available bytes, by issuing
STATUS #1,A
and retrieving the number of bytes available:
BAVAIL=PEEK(746)
You should also check to see if the connection is available:
BCONNECTED=PEEK(748)
or checking if a user is waiting
WAITING=PEEK(747)
IF WAITING THEN GOTO 1000:REM GO ACCEPT CONNECTION
For Any other status information, the XIO command must be used, such as retrieving the external IP address
XIO 13,#1,1,0,"N:":REM AUX1=1 = RETRIEVE EXTERNAL IP
PRINT "MY IP IS: ";PEEK(746);".";PEEK(747);".";PEEK(748);".";PEEK(749)
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- Home
- What is FujiNet?
- The Definition of Done
- Board bring up for FujiNet Platform.IO code
- The Complete Linux CLI Guide
- The Complete macOS CLI Guide
- Development Env for Apps
- FujiNet-Development-Guidelines
- System Quickstarts
- FujiNet Flasher
- Setting up a TNFS Server
- FujiNet Configuration File: fnconfig.ini
- AppKey Registry - AppKey-Registry-Page
- CP-M Support
- BBS
- Official Hardware Versions
- Prototype Board Revisions
- FujiNet Development Guidelines
- The Network Protocol Handbook
- Atari Programming
- Apple Programming
- C64 Programming
- ADAM Programming
- Intellivision Programming
- Testing Plan
- Hacker List
- FujiNet VirtualMachine
Copyright 2026 Contributors to the FujiNetWIFI project.
Join us on Discord: https://discord.gg/7MfFTvD