-
Notifications
You must be signed in to change notification settings - Fork 69
SIO Command $FD Scan Networks
Bill Kendrick edited this page May 27, 2022
·
3 revisions
This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).
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.
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 |
/**
* 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;
}
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
- Scan Result
Put other related command links here.
Copyright 2024 Contributors to the FujiNetWIFI project.
Join us on Discord: https://discord.gg/7MfFTvD
- 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 - SIO Command $DC Open App Key
- CP-M Support
- BBS
- Official Hardware Versions
- Prototype Board Revisions
- FujiNet Development Guidelines
- Atari Programming
- Apple Programming
- C64 Programming
- ADAM Programming
- Testing Plan
- Hacker List
- FujiNet VirtualMachine