Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not really an issue but a feature request/enhancement (scan/discovery of screens)... #10

Open
ab17182 opened this issue Aug 13, 2023 · 3 comments

Comments

@ab17182
Copy link

ab17182 commented Aug 13, 2023

Hi there -

Is there any way to add an additional command that run a discovery/scan via this tool? The only reason I ask is because currently, I'd need to use something like nmap to scan for all devices exposing port 1515 but ideally I'd like to encapsulate all functionality into one app. The MDC Unified Control program for Windows has "detect" feature as per the below which would be handy to execute via cmd line:
image

Warmest regards,
--Adam

@vgavro
Copy link
Owner

vgavro commented Aug 31, 2023

I really believe nmap here is much better use and i'm sure we don't need to implement such kind of things here, but I agree with you that some README updates or instructions to use nmap to generate list of detected devices that is compatible to use with this project is a nice thing to have! That's a great idea, PR is welcome.

@ab17182
Copy link
Author

ab17182 commented Sep 1, 2023

Thanks for replying! And yeah, I had already taken the steps to do that. If anyone is interested, here's some sample code anyone can use to auto-configure all screens on an asset's network to point to a specific MagicINFO server:

`#!/bin/bash

server="PUT_YOUR_MAGICINFO_URL_HERE"

echo "Scanning for all Samsung Screens and registering against $server..."
for a in $(arp-scan --localnet --numeric --quiet --ignoredups | grep -E '([a-f0-9]{2}:){5}[a-f0-9]{2}' | awk '{print $1}' | tail -n +2) ; do for i in $(nmap -Pn -p1515 $a -oG - -T5 -n | egrep '1515/open' | awk '{print $2}') ; do samsung-mdc 0@$i:1515 magicinfo_server https://$server:7002 ; done ; done

Alternative method using netcat if nmap not allowed or unavailable:

for a in $(arp-scan --localnet --numeric --quiet --ignoredups | grep -E '([a-f0-9]{2}:){5}[a-f0-9]{2}' | awk '{print $1}' | tail -n +2) ; do for i in $(nc -zvn $a 1515 2>&1 | grep Connected | awk '{print $4}' | sed 's/:1515.//g') ; do samsung-mdc 0@$i:1515 magicinfo_server https://$server:7002 ; done ; done

Hope this is helpful...

Thanks again for the great tool!

Warmest regards,
--Adam

@anpin
Copy link

anpin commented Sep 16, 2023

AFAIK the MDC tool is simply sending the status command to every ID defined in the SET ID Range field. Those who respond with ACK are considered to be found. You can open up tracing window in the MDC tool to check commands sent.

EDIT: I've reread the original issue and realized you wanted to identify the IP addresses, not display ID's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants