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.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prologix_netfinder-0.3.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prologix_netfinder-0.3.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for prologix_netfinder-0.3.3.tar.gz
Algorithm Hash digest
SHA256 fedf493c98bc0b00e2b6f44632e06801bf2b0bc7c5a0250c11a78dc6b5154dec
MD5 993d653a92db8dd9ab09c3cd1dcb7e5e
BLAKE2b-256 8e338b26fc132258f22c4e7e70c8501d066652ed7f79605121bf725d73bf37d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prologix_netfinder-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b5e539080648a351c605789cb34d8f0c2cded9f4207c6610afa31e81e4540768
MD5 42ade6acfcbccf1ed4752f8e1381c638
BLAKE2b-256 efc7e7dd6bf233d064b201badcb4452126f3cc45458b334d2d1e2fc7fb0e1fc0

See more details on using hashes here.

Supported by

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