Jump to content
IGNORED

Internal/External IP


MichaG

Recommended Posts

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"

20221009_134828.thumb.jpg.bcaefd8b90ab196554a7f9a922ca3b38.jpg

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?

Link to comment
Share on other sites

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 by tschak909
  • Like 3
Link to comment
Share on other sites

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 ;-)

1513478891_Screenshot2022-10-14212255.thumb.jpg.205ca28270c873b654108a04c37fcaf7.jpg

 

MYIP.COM

Edited by MichaG
  • Like 2
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...