samsung-mdc icon indicating copy to clipboard operation
samsung-mdc copied to clipboard

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

Open ab17182 opened this issue 1 year ago • 3 comments

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

ab17182 avatar Aug 13 '23 16:08 ab17182

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.

vgavro avatar Aug 31 '23 17:08 vgavro

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

ab17182 avatar Sep 01 '23 13:09 ab17182

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

anpin avatar Sep 16 '23 10:09 anpin