June 19, 2019, 03:14:48 AM

Author Topic: Print name of WLAN device from given IP?  (Read 206 times)

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 235
  • Whoop-de-doo-ba-dooo!
Print name of WLAN device from given IP?
« on: March 14, 2019, 09:29:51 PM »
Hello.

I'm trying to return the SSID/String name of a device connected to my router.     I'd like to input the IP of my device and then have it print out "XPMachine", which is the name of the device.  Also, i'm curious about how to check if an IP exists or not.  I'd like to know when it's available or not.

Any ideas?  Is there a built in module?  i've never done networking on BMXNG before.

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 235
  • Whoop-de-doo-ba-dooo!
Re: Print name of WLAN device from given IP?
« Reply #1 on: March 20, 2019, 03:08:47 AM »
Anyone?

Offline Brucey

  • Jr. Member
  • **
  • Posts: 71
Re: Print name of WLAN device from given IP?
« Reply #2 on: March 20, 2019, 06:18:31 AM »
Hello, there's this stuff on Windows : https://docs.microsoft.com/en-us/windows/desktop/nativewifi/native-wifi-api-sample

On macOS, there's this : https://stackoverflow.com/questions/4740932/getting-osx-connected-wi-fi-network-name

On Linux, there's some info about libnl and the command line : https://stackoverflow.com/questions/5102186/wireless-api-for-linux-in-c-or-java

Probably something in there will get the information you require.


Offline fielder

  • Jr. Member
  • **
  • Posts: 72
Re: Print name of WLAN device from given IP?
« Reply #3 on: March 21, 2019, 09:26:23 AM »
Anyone?
you can look at this project... https://sourceforge.net/projects/ipscan/
if you want to parse results using Blitzmax.. you can modify Windows sources to create a LOG file with IP and devices... and after that process it using BMAX.

3 years ago i started something related to this ... but after a while i switched to an Androdi project (better scan networks using a small portable object... and not a pc)
for android there is an updated source here (not my sources) : https://github.com/aaronjwood/PortAuthority

you can also create an IP (only ips) list using standard Windows executables... like:
Code: [Select]
arp.exe -a
you can call the ARP using a batch file... (you can't run it using SYSTEM_ or "createprocess" redirecting output to a text file)  (maybe copying arp.exe on you project folder...)
Code: [Select]
arp -a > list.txt
and launch the CMD o BAT file from Blitzmax... after that process the file list.txt