-
Notifications
You must be signed in to change notification settings - Fork 78
FujiNet Commodore Programming
THIS PAGE IS PRELIMINARY - Items will be moved into separate pages, over time.
- Payload: "ADAPTERCONFIG"
- Response: 8 text lines containing SSID, Hostname, IP, Netmask, Gateway, DNS, MAC, BSSID, and Version.
10 OPEN 1,15,15,"ADAPTERCONFIG"
20 INPUT#1,S$:INPUT#1,H$:INPUT#1,I$:INPUT#1,N$:INPUT#1,G$:INPUT#1,D$:INPUT#1,M$
21 INPUT#1,B$:INPUT#1,V$
22 CLOSE1
30 PRINT " SSID: ";S$
31 PRINT "HOSTNAME: ";H$
32 PRINT " IP: ";I$
33 PRINT " NETMASK: ";N$
34 PRINT " GATEWAY: ";G$
35 PRINT " DNS: ";D$
36 PRINT " MAC: ";M$
37 PRINT " BSSID: ";B$
38 PRINT " VER: ";V$
40 END
For other languages that can handle structured binary data, an alternate payload can be used:
- Payload: "ADAPTERCONFIG:RAW
- Response: The adapter configuration as a binary structure specified below.
struct
{
char ssid[33];
char hostname[64];
unsigned char localIP[4];
unsigned char gateway[4];
unsigned char netmask[4];
unsigned char dnsIP[4];
unsigned char macAddress[6];
unsigned char bssid[6];
char fn_version[15];
} cfg;#include <cx16.h>
#include <cbm.h>
#include <stdio.h>
/**
* The current network adapter configuration
*/
typedef struct
{
char ssid[33];
char hostname[64];
unsigned char localIP[4];
unsigned char gateway[4];
unsigned char netmask[4];
unsigned char dnsIP[4];
unsigned char macAddress[6];
unsigned char bssid[6];
char fn_version[15];
} AdapterConfig;
AdapterConfig ac;
void main(void)
{
cbm_open(15,15,15,"adapterconfig:raw");
cbm_read(15,&ac,sizeof(AdapterConfig));
cbm_close(15);
printf("%11s %s\n","SSID:",ac.ssid);
printf("%11s %s\n","HOSTNAME:",ac.hostname);
printf("%11s %u.%u.%u.%u\n","IP:",ac.localIP[0],ac.localIP[1],ac.localIP[2],ac.localIP[3]);
printf("%11s %u.%u.%u.%u\n","NETMASK:",ac.netmask[0],ac.netmask[1],ac.netmask[2],ac.netmask[3]);
printf("%11s %u.%u.%u.%u\n","GATEWAY:",ac.gateway[0],ac.gateway[1],ac.gateway[2],ac.gateway[3]);
printf("%11s %u.%u.%u.%u\n","DNS:",ac.dnsIP[0],ac.dnsIP[1],ac.dnsIP[2],ac.dnsIP[3]);
printf("%11s %02X:%02X:%02X:%02X:%02X:%02X\n","MAC:",ac.macAddress[0],ac.macAddress[1],ac.macAddress[2],ac.macAddress[3],ac.macAddress[4],ac.macAddress[5]);
printf("%11s %02X:%02X:%02X:%02X:%02X:%02X\n","BSSID:",ac.bssid[0],ac.bssid[1],ac.bssid[2],ac.bssid[3],ac.bssid[4],ac.bssid[5]);
printf("%11s %s\n\n","FNVER:",ac.fn_version);
}-
Payload: "SETSSID:
<PASSWORD>" (thecharacter is 'pi' on Commodore systems)
(note: SSID is case sensitive, be aware when converting PETSCII to ASCII characters)
OPEN 1,15,15,"SETSSID:MyNetwork`mypassword":CLOSE1
An alternative payload, "SETSSID:RAW:" can be used to send the SSID and password as a fixed block of 97 characters, to allow for handling special characters, as seen in the structure below:
struct
{
char ssid[33];
char password[64];
} cfg;The contents of this structure are immediately appended after SETSSID:RAW: and must be 97 characters exactly. Both ssid and password are expected to be NULL padded.
Payload: "GETSSID" Response: A single line of text containing the currently configured SSID
10 OPEN 1,15,15,"GETSSID"
20 INPUT#1,S$
21 CLOSE1
30 ? "SSID: ";S$
40 END
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