fvdw-sl-assistant find your nas automatic

fvdw-sl-assistant find your nas automatic

Postby fvdw » Sun Sep 08, 2013 7:27 pm

Another feature is in preparation, a program running under windows to find the NAS in the LAN the "fvdw-sl-assistant" without the need to know the ip address or netbios name. The assistant will find it for you. Handy for less experienced users not familiar with ip addresses.
It will have some additional features like a button to open an explorer window to explore the shared folders on the nas, or opening the web interface wake it up from WOL. Below is screen shot. It can detect up to 10 nas devices running fvdw-sl firmware

fvdw-sl-assistant-v-1.0.JPG
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl-assistant find your nas automatic

Postby Mijzelf » Mon Sep 09, 2013 11:01 am

Nice. How does it work, or in other words, what defines a 'fvdw-sl device' over the network?
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: fvdw-sl-assistant find your nas automatic

Postby fvdw » Mon Sep 09, 2013 6:51 pm

Mijzelf wrote:Nice. How does it work, or in other words, what defines a 'fvdw-sl device' over the network?

a small daemon running on the nas listening to a specific message send to udp port 5879. If it detcts the messge It responds with sending a string with information.
The assistants performs a scan of all ip's in the network, when starting it determines the ip of the pc, sets a scan range with first three numbers same as form the PC running the assistant and sends the message to all those ip's and checks if there is a response. You can also set the scan range manually.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl-assistant find your nas automatic

Postby Mijzelf » Tue Sep 10, 2013 7:54 am

fvdw wrote:...scan range...
How about a broadcast?
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: fvdw-sl-assistant find your nas automatic

Postby fvdw » Tue Sep 10, 2013 5:02 pm

The broadcast option I use for the wake up (WOL) to broadcast the magic packet. This because it is the way I found it on the internet and lazy as I am I copied it. :whistle .
But indeed it could also be used for sending the message around. I don't what will happen then if you have more then 1 nas in the network if you will catch them all ??
The scan is now working by setting up a thread for each ip, so 254 threads, that all (simultaneously) wait max two seconds for a response from the individual ip's. If you don't use the "thread setup" and scan them sequential the scan of 255 ip's will take 10 minutes when waiting 2 sec for each non responding ip :disapprove , now only 2 seconds. But the broadcast is an option. The scanner I made now can also be used for other purposes. Also you can perform a manual scan by entering a dedicated ip range or other port range if you want
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl-assistant find your nas automatic

Postby Mijzelf » Tue Sep 10, 2013 6:42 pm

fvdw wrote:I don't what will happen then if you have more then 1 nas in the network if you will catch them all ??
Normally yes. Unless you have very much devices, and a miserable switch.
by setting up a thread for each ip, so 254 threads
Unless you've got a bigger subnet. I'm not very proficient with Windows, but I guess it becomes unpleasant when you try to launch 64k threads.
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: fvdw-sl-assistant find your nas automatic

Postby fvdw » Tue Sep 10, 2013 7:31 pm

think most of the users will have net mask of 255.255.255.0

But I will look at the broadcast option, it is a good suggestion thanks :thumbup
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl-assistant find your nas automatic

Postby fvdw » Tue Sep 10, 2013 9:20 pm

ps one thing for the broadcast you will need to know the ip address of the broadcast service. Normally this is the ip ending with 255. But if you have a subnet mas of 255.255.0.0 you still have 255 possible ip's for broadcasting, or am I wrong ? maybe there is a way to detect the broadcast ip in a LAN :scratch time for a google search
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl-assistant find your nas automatic

Postby Mijzelf » Wed Sep 11, 2013 7:56 am

In most cases the broadcast address on an interface is (IP & netmask) | ~netmask.
(IP BINARY_AND netmask) BINARY_OR (BINARY_NOT netmask).

And I write 'most cases' because it's always mentioned in broadcast address stuff, but I've never seen a different one. Should not know how you could know that then, as AFAIK the only things you can know of an interface are IP and netmask.
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: fvdw-sl-assistant find your nas automatic

Postby fvdw » Wed Sep 11, 2013 10:33 am

google gave me this on page http://en.wikipedia.org/wiki/Broadcast_address


The broadcast address for an IPv4 host can be obtained by performing a bitwise OR operation between the bit complement of the subnet mask and the host's IP address.

Example: For broadcasting a packet to an entire IPv4 subnet using the private IP address space 172.16.0.0/12, which has the subnet mask 255.240.0.0, the broadcast address is 172.16.0.0 | 0.15.255.255 = 172.31.255.255

So the only thing you need is the ip and subnet mask of the adapter. The Nas must then operate as well with same subnet maks otherwise it could be that it cannot receive message form the broadcast adress
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 16 guests