« Close

Datasheets and User Guides

Software & Driver

 

3.5 - LJM Deep Search

Subsections

LJM Deep Search

LJM Deep Search is a LJM feature that searches IP address ranges for LabJack devices. It is meant to be used to find DHCP-enabled devices on networks where UDP broadcasts do not propagate to the device, such as when the device is on a separate subnet. Most users should not need to use LJM Deep Search, since the normal UDP broadcast discovery usually works.

Deep Search adds time to device searching. Though Deep Search can find devices with static IPs, Specific IPs is more suitable for that purpose because Specific IPs is quicker.

Deep Search is enabled by writing IP address range(s) to the LJM_DEEP_SEARCH_FILE.

When LJM_DEEP_SEARCH_FILE contains IP addresses ranges(s), Deep Search is triggered after the normal UDP broadcast discovery during for either of the following situations:

  1. ListAll or ListAllExtended is called
  2. Open or OpenS is called with all of the following conditions:
    1. The open call is passed a network-based ConnectionType—essentially any ConnectionType except USB
    2. The open call is passed a Identifier that is a device name or serial number
    3. A device with the specified name or serial number cannot be found after UDP broadcast discovery, Auto IPs, and Specific IPs searching

Deep Search stores results as Auto IPs, to speed up future open calls.

Example ljm_deep_search.config

Regardless of you computer's IP address, the following ljm_deep_search.config file would trigger search of 155 IP addresses, including 192.168.2.100 and 192.168.2.254:

192.168.2.100-254

Syntax

File syntax:

  • Whitespace is ignored.
  • Empty lines and lines starting with // are ignored.
  • All other lines are expected to contain one IP address range, which should not include a broadcast address. The IP address range must be an IPv4 address with the last octet being two numbers separated by a dash. For example: 192.168.2.100-254

Default Location

Windows Vista and later:
C:\ProgramData\LabJack\LJM\ljm_deep_search.config
Windows XP:
C:\Documents and Settings\All Users\Application Data\LabJack\LJM\ljm_deep_search.config
Mac OS X and Linux:
/usr/local/share/LabJack/LJM/ljm_deep_search.config

ljm_deep_search.config is not overwritten by the installer.

Remarks

For programmatically setting the file path, see LJM_DEEP_SEARCH_FILE.

For checking if LJM has successfully read the Deep Search file, use LJM_GetDeepSearchInfo.

macOS Issue

macOS has a file limit, per Terminal shell. The default is low: 256. Deep Search opens many sockets in parallel, so opening any files (sockets) after 256 will fail. This can cause Deep Search to become rather useless unless the file limit is increased.

To increase the file limit to 2048 (which is typically sufficient for Deep Search), execute the following command in your shell:

ulimit -S -n 2048

This change only lasts for the current shell session. To make it permanent, you can add it to your shell's startup configurations. (E.g. .bashrc, .bash_profile, etc.)