Table of Contents
This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).
Scan Networks ($FD)
Description
Causes the ESP to scan for Wi-Fi Networks. There is always a pause, while this command executes.
Note that the ESP will temporarily disconnect from any currently connected network in order to perform the scan, so any open sessions may be lost.
This command returns four bytes, with the first byte being the number of networks detected, and the other three bytes reserved for future use.
Parameters
| DCB | Value |
|---|---|
| DDEVIC | $70 |
| DUNIT | $01 |
| DCOMND | $FD |
| DSTATS | 0x40 |
| DBUF | Point to a 4 character buffer |
| DTIMLO | $0F |
| DBYT | 4 |
| DAUX1 | 0 |
| DAUX2 | 0 |
Examples
CC65
/**
* Return number of networks
*/
unsigned char config_do_scan(unsigned char* num_networks)
{
OS.dcb.ddevic=0x70;
OS.dcb.dunit=1;
OS.dcb.dcomnd=0xFD; // do scan
OS.dcb.dstats=0x40; // Peripheral->Computer
OS.dcb.dbuf=num_networks;
OS.dcb.dtimlo=0x0F; // 15 second timeout
OS.dcb.dbyt=4; // 4 byte response
OS.dcb.daux=0;
siov();
return OS.dcb.dstats;
}
MADS
LDA #$FD ; Scan network
STA DCOMND
LDA #DREAD
STA DSTATS
LDA #$00 ; no filespec needed
STA DBUFLO
STA DBUFHI
LDA #<FUJI_TIMEOUT ; Approximate the number of seconds to wait
STA DTIMLO
STA DBYTLO
STA DBYTHI
STA DAUX1
STA DAUX2
JSR SIOV
See Also
- Scan Result
Put other related command links here.
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