Skip to main content

Find and configure Prologix GPIB-ETHERNET controllers an a network; modified from original code by Prologix

Project description

Overview

Find and configure Prologix GPIB-ETHERNET controllers on Linux, BSD, and MacOSX via command line. (Windows support shouldn't be too difficult to add, but it is not implemented yet.)

This is NOT OFFICIAL Prologix SOFTWARE. Code is not written by, maintained by, or warranted by Prologix, the company that manufactures the Prologix controller.

Installing this package adds command-line script prologix-netfinder for doing so.

Additionally, the commad-line script prologix-getifaddrs is insalled as a utility for retrieving network interface information on the host from which it is run (similar to ifconfig).

Usage

Find all Prologix GPIB-ETHERNET controllers on the local network (make sure any intervening routers are not blocking port 3040, the port used by the Prologix NetFinder protocol).

$ prologix-netfinder list
INFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp3s0 (IP addr=192.168.0.14)
INFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp4s0 (IP addr=10.9.205.181)
INFO:nfcli:Found 1 Prologix GPIB-ETHERNET controller.

MAC address: 00:21:69:02:ab:43
IP address assignment: STATIC
IP address: 192.168.0.161   Netmask: 255.255.255.0   Gateway: 0.0.0.0
Hardware version: 1.3.0.0   Bootloader version: 1.3.0.0   Application version: 1.6.6.0
Uptime: 40 days 21:55:24
Bootloader or application mode: APPLICATION
Alert pending? OK

Change the IP address of the controller (identified by its MAC address, 00:21:69:02:ab:43) to 192.168.0.162; set netmask to 255.255.255.0 and gateway to 0.0.0.0.

$ prologix-netfinder set-static -m 00:21:69:02:ab:43 -a 192.168.0.162 -n 255.255.255.0 -g 0.0.0.0 
INFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp3s0 (IP addr=192.168.0.14)
INFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp4s0 (IP addr=10.9.205.181)
INFO:nfcli:Updating network settings of Prologix GPIB-ETHERNET controller 00:21:69:01:4c:b9
INFO:nfcli:Network settings updated successfully.

Set the IP address of the same controller to be dynamically allocated by a router (DHCP).

$ prologix-netfinder set-dynamic -m 00:21:69:02:ab:43
INFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp3s0 (IP addr=192.168.0.14)
INFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp4s0 (IP addr=10.9.205.181)
INFO:nfcli:Updating network settings of Prologix GPIB-ETHERNET controller 00:21:69:01:4c:b9
INFO:nfcli:Network settings updated successfully.

Installation

Install purely as a user of prologix-netfinder

pip install prologix-netfinder

Install as a developer & user of prologix-netfinder

Change to a directory into which the prologix_netfinder sub-directory will be created. Then run the following to clone the repository & install an editable version of the code (Python will symbolically link its installed files to the source code folder, such that changes to the source will be reflected in the installed package transparently):

git clone git@github.com:jllanfranchi/prologix_netfinder.git
pip install --editable prologix_netfinder

Credits

The code in prologix_netfinder/nfutil.py and prologix_netfinder/nfcli.py is modified from the original Python 2 code by Prologix, which can be downloaded at https://prologix.biz/downloads/nfcli.tar.gz. Again, Prologix has no association with the code contained in this repository. Though similar, this is a re-interpretation of their code.

Code in prologix_netfinder/getifaddrs.py is modified from the original code at https://github.com/Gautier/minifail/blob/master/minifail/getifaddrs.py written by Gautier Hayoun.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prologix_netfinder-0.3.2.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

prologix_netfinder-0.3.2-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file prologix_netfinder-0.3.2.tar.gz.

File metadata

  • Download URL: prologix_netfinder-0.3.2.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for prologix_netfinder-0.3.2.tar.gz
Algorithm Hash digest
SHA256 6de37f5b1ec31c8f4b62ec2d2d38a66d9e1b29b832b52844b9c81f6815c3bc6a
MD5 b187db651e4ff32494f469ae5f220bb2
BLAKE2b-256 5fdc2b5500d1de93a7915f95c31d4c8568b24ca7685bf06cc8e5e8372092fbc3

See more details on using hashes here.

File details

Details for the file prologix_netfinder-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for prologix_netfinder-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b615521a3da5c59f8e92344b587601779de74e92d1ed8037566e589ce8d4dfce
MD5 d046f54a80a149a8db06e103c2ee0248
BLAKE2b-256 2814f83576297059f0c6af43fe480b7f88d1a7d2ba1d869a5b377d7f5932b838

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page