MichaG Posted October 12, 2022 Share Posted October 12, 2022 I want to get and print the internal ip address with installed N:-handler and XIO 13. I use 100 XIO 13,#1,1,0,"N:":REM GET EXT ADDRESS 110 PRINT "EXT IP: ";PEEK(746);".";PEEK(747);".";PEEK(748);".";PEEK(749) 120 XIO 13,#1,2,0,"N:":REM GET INT ADDRESS 130 PRINT "INT IP: ";PEEK(746);".";PEEK(747);".";PEEK(748);".";PEEK(749) as described here. I've tried several FujiNets with actual firmware and Ataris with DOS bootet from apps.irata.online TNFS with the latest N: handler. I've used "TINCANS CHAT PROGRAM", too. I always get "0.255.0.0" Has something changed? Or is something wrong with my system? As I want to use ACTION! with NIO.ACT, so I don't have to install the N: handler. How can I get the addresses here? Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 12, 2022 Share Posted October 12, 2022 (edited) oh crap. I forgot about this. This was very early on. The way this was done didn't work well, so it was removed. with NIO, you can add a command to get the network configuration, by sending a Get Adapter Config command to the Fuji sub-device. So you'd need to add a command patterned after one of the others in nio, and change ddevic to $70. https://github.com/FujiNetWIFI/fujinet-platformio/wiki/SIO-Command-%24E8-Get-Adapter-Config You'll get back a structure of information, one thing of which is the local IP. -Thom Edited October 12, 2022 by tschak909 3 Quote Link to comment Share on other sites More sharing options...
MichaG Posted October 14, 2022 Author Share Posted October 14, 2022 (edited) So I added fstatus sto NIO.ACT: ; Get FujiNet Status ; ; Author: Michael Goroll ; <atari@goroll.net> ; PROC fstatus(BYTE ARRAY buf) DDEVIC = $70 DUNIT = $01 DCOMND = $E8 DSTATS = $40 ; Payload to Atari DBUF = buf ; status buffer DTIMLO = $0F ; 8 second timeout DBYT = $88 ; 139 byte payload DAUX1 = 0 ; R/W DAUX2 = 0 ; translation siov() RETURN So this is MYIP.ACT: BYTE RTS=[$60] INCLUDE "D:SYS.ACT" INCLUDE "D:NIO.ACT" BYTE ARRAY stbuf(139) ; status buf PROC status() fstatus(stbuf) Print("My IP:") PrintB(stbuf(97)) Print(".") PrintB(stbuf(98)) Print(".") PrintB(stbuf(99)) Print(".") PrintB(stbuf(100)) printE("") RETURN PROC main() status() RETURN And it works MYIP.COM Edited October 14, 2022 by MichaG 2 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 14, 2022 Share Posted October 14, 2022 excellent! may I fold that into NIO.ACT? -Thom Quote Link to comment Share on other sites More sharing options...
MichaG Posted October 14, 2022 Author Share Posted October 14, 2022 2 minutes ago, tschak909 said: excellent! may I fold that into NIO.ACT? -Thom It would be an honor for me Quote Link to comment Share on other sites More sharing options...
tschak909 Posted October 14, 2022 Share Posted October 14, 2022 Added to both the Netcat Wiki example: https://github.com/FujiNetWIFI/fujinet-platformio/wiki/A-Simple-NetCat-Program and to NIO.ACT in fujinet-apps/netcat: https://github.com/FujiNetWIFI/fujinet-apps/blob/master/netcat-action/NIO.ACT Thank you, very much -Thom 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.