-
Notifications
You must be signed in to change notification settings - Fork 70
SIO Command $FB Set SSID and Connect
This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).
Given a network SSID string (32 characters + NULL), and a password (64 characters), connect to the requested network.
Both string values are NUL terminated.
DCB | Value |
---|---|
DDEVIC | $70 |
DUNIT | $01 |
DCOMND | $FB |
DSTATS | $80 |
DBUF | Pointer to data buffer, see notes below |
DTIMLO | $0F |
DBYT | ENCODED DATA LENGTH |
DAUX1 | 1 = Ask FujiNet to store SSID and password in its configuration immediately; 0 = Information is used, but not saved until a save operation occurs |
DAUX2 | Encoding Indicator, 0 = NONE, 1 = URL ENCODED DATA |
As of 2024/04/21, DAUX2 may contain an encoding indicator for the buffer data.
If there is no encoding, DBYT = 97, otherwise it must contain the length of the 2 encoded strings plus their NUL terminated bytes.
The buffer must contain first the SSID (nul terminated string) and then the password (only adding nul byte if it is encoded).
If there is NO encoding, the password must start at byte 34 (i.e. index 33) for backwards compatibility to exactly fit in the NetConfig structure.
If there IS encoding, the buffer is not expected to directly fit in a NetConfig structure as the encoding may make it too large, and so instead consists of 2 NUL terminated encoded strings. Currently the only supported encoding is URL encoding of strings.
/**
Network Configuration
*/
union
{
struct
{
char ssid[33];
char password[64];
};
unsigned char rawData[97];
} netConfig;
/**
* Write desired SSID and password to SIO
*/
unsigned char config_set_ssid(void)
{
OS.dcb.ddevic=0x70;
OS.dcb.dunit=1;
OS.dcb.dcomnd=0xFB; // Set SSID
OS.dcb.dstats=0x80; // Computer->Peripheral
OS.dcb.dbuf=&netConfig.rawData;
OS.dcb.dtimlo=0x0f; // 15 second timeout
OS.dcb.dbyt=sizeof(netConfig.rawData);
OS.dcb.daux=0;
siov();
return OS.dcb.dstats;
}
- Get SSID
- Scan Networks
- Scan Result
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