prologix-netfinder


Nameprologix-netfinder JSON
Version 0.3.2 PyPI version JSON
download
home_pageNone
SummaryFind and configure Prologix GPIB-ETHERNET controllers an a network; modified from original code by Prologix
upload_time2024-07-15 00:34:58
maintainerJustin L. Lanfranchi
docs_urlNone
authorNone
requires_python>=3.10
licenseCode in `nfutil.py` and `nfcli.py` is modified from the original code downloaded at https://prologix.biz/downloads/nfcli.tar.gz The original software does not state a license. Code in `getifaddrs.py` is modified from the original code at https://github.com/Gautier/minifail/blob/master/minifail/getifaddrs.py written by Gautier Hayoun, which is covered by the MIT License, but also stated in that specific module's sourcecode, Gautier states: "Mostly copied http://carnivore.it/2010/07/22/python_-_getifaddrs". Unfortunately, this link does not work as of writing (July, 2024). ================================================================================ Copyright (c) 2012 Gautier Hayoun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================================================ Modifying the code by Prologix and further modifications of Gautier Hayoun's adaptations of code originally from http://carnivore.it as well as combining these codes is done by Justin L. Lanfranchi. Any parts of the software not covered by Prologix or Gautier's copyrights, and therefore under copyright to Justin L. Lanfranchi, are declared to be under the MIT No Attribution license: ================================================================================ Copyright 2024 Justin L. Lanfranchi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================================================
keywords prologix gpib-ethernet prologix gpib-ethernet gpib instrument control
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Overview

Find and configure [Prologix GPIB-ETHERNET controllers](https://prologix.biz/product/gpib-ethernet-controller/) 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).

```bash
$ 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.

```bash
$ 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). 

```bash
$ 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

```bash
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):

```bash
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](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](https://github.com/Gautier/minifail/blob/master/minifail/getifaddrs.py) written by Gautier Hayoun.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "prologix-netfinder",
    "maintainer": "Justin L. Lanfranchi",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "Prologix, GPIB-ETHERNET, Prologix GPIB-ETHERNET, GPIB, Instrument Control",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5f/dc/2b5500d1de93a7915f95c31d4c8568b24ca7685bf06cc8e5e8372092fbc3/prologix_netfinder-0.3.2.tar.gz",
    "platform": null,
    "description": "# Overview\n\nFind and configure [Prologix GPIB-ETHERNET controllers](https://prologix.biz/product/gpib-ethernet-controller/) on Linux, BSD, and MacOSX via command line. (Windows support shouldn't be too difficult to add, but it is not implemented yet.)\n\n_**This is NOT OFFICIAL Prologix SOFTWARE. Code is not written by, maintained by, or warranted by Prologix, the company that manufactures the Prologix controller.**_\n\nInstalling this package adds command-line script `prologix-netfinder` for doing so.\n\nAdditionally, 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`).\n\n# Usage\n\nFind 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).\n\n```bash\n$ prologix-netfinder list\n```\n\n```\nINFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp3s0 (IP addr=192.168.0.14)\nINFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp4s0 (IP addr=10.9.205.181)\nINFO:nfcli:Found 1 Prologix GPIB-ETHERNET controller.\n\nMAC address: 00:21:69:02:ab:43\nIP address assignment: STATIC\nIP address: 192.168.0.161   Netmask: 255.255.255.0   Gateway: 0.0.0.0\nHardware version: 1.3.0.0   Bootloader version: 1.3.0.0   Application version: 1.6.6.0\nUptime: 40 days 21:55:24\nBootloader or application mode: APPLICATION\nAlert pending? OK\n```\n\nChange 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.\n\n```bash\n$ 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 \n```\n\n```\nINFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp3s0 (IP addr=192.168.0.14)\nINFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp4s0 (IP addr=10.9.205.181)\nINFO:nfcli:Updating network settings of Prologix GPIB-ETHERNET controller 00:21:69:01:4c:b9\nINFO:nfcli:Network settings updated successfully.\n```\n\nSet the IP address of the same controller to be dynamically allocated by a router (DHCP). \n\n```bash\n$ prologix-netfinder set-dynamic -m 00:21:69:02:ab:43\n```\n\n```\nINFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp3s0 (IP addr=192.168.0.14)\nINFO:prologix_netfinder.nfutil:Searching for Prologix ETHERNET-GPIB controllers via host interface enp4s0 (IP addr=10.9.205.181)\nINFO:nfcli:Updating network settings of Prologix GPIB-ETHERNET controller 00:21:69:01:4c:b9\nINFO:nfcli:Network settings updated successfully.\n```\n\n# Installation\n\n## Install purely as a user of prologix-netfinder\n\n```bash\npip install prologix-netfinder\n```\n\n## Install as a developer & user of prologix-netfinder\n\nChange 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):\n\n```bash\ngit clone git@github.com:jllanfranchi/prologix_netfinder.git\npip install --editable prologix_netfinder\n```\n\n# Credits\n\nThe 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](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.\n\nCode in `prologix_netfinder/getifaddrs.py` is modified from the original code at [https://github.com/Gautier/minifail/blob/master/minifail/getifaddrs.py](https://github.com/Gautier/minifail/blob/master/minifail/getifaddrs.py) written by Gautier Hayoun.\n",
    "bugtrack_url": null,
    "license": "Code in `nfutil.py` and `nfcli.py` is modified from the original code downloaded at https://prologix.biz/downloads/nfcli.tar.gz  The original software does not state a license.  Code in `getifaddrs.py` is modified from the original code at https://github.com/Gautier/minifail/blob/master/minifail/getifaddrs.py written by Gautier Hayoun, which is covered by the MIT License, but also stated in that specific module's sourcecode, Gautier states: \"Mostly copied http://carnivore.it/2010/07/22/python_-_getifaddrs\". Unfortunately, this link does not work as of writing (July, 2024).  ================================================================================ Copyright (c) 2012 Gautier Hayoun  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================================================  Modifying the code by Prologix and further modifications of Gautier Hayoun's adaptations of code originally from http://carnivore.it as well as combining these codes is done by Justin L. Lanfranchi.  Any parts of the software not covered by Prologix or Gautier's copyrights, and therefore under copyright to Justin L. Lanfranchi, are declared to be under the MIT No Attribution license:  ================================================================================ Copyright 2024 Justin L. Lanfranchi  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================================================ ",
    "summary": "Find and configure Prologix GPIB-ETHERNET controllers an a network; modified from original code by Prologix",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/jllanfranchi/prologix_netfinder",
        "Issues": "https://github.com/jllanfranchi/prologix_netfinder/issues",
        "Repository": "https://github.com/jllanfranchi/prologix_netfinder.git"
    },
    "split_keywords": [
        "prologix",
        " gpib-ethernet",
        " prologix gpib-ethernet",
        " gpib",
        " instrument control"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2814f83576297059f0c6af43fe480b7f88d1a7d2ba1d869a5b377d7f5932b838",
                "md5": "d046f54a80a149a8db06e103c2ee0248",
                "sha256": "b615521a3da5c59f8e92344b587601779de74e92d1ed8037566e589ce8d4dfce"
            },
            "downloads": -1,
            "filename": "prologix_netfinder-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d046f54a80a149a8db06e103c2ee0248",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 16679,
            "upload_time": "2024-07-15T00:34:56",
            "upload_time_iso_8601": "2024-07-15T00:34:56.327715Z",
            "url": "https://files.pythonhosted.org/packages/28/14/f83576297059f0c6af43fe480b7f88d1a7d2ba1d869a5b377d7f5932b838/prologix_netfinder-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5fdc2b5500d1de93a7915f95c31d4c8568b24ca7685bf06cc8e5e8372092fbc3",
                "md5": "b187db651e4ff32494f469ae5f220bb2",
                "sha256": "6de37f5b1ec31c8f4b62ec2d2d38a66d9e1b29b832b52844b9c81f6815c3bc6a"
            },
            "downloads": -1,
            "filename": "prologix_netfinder-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b187db651e4ff32494f469ae5f220bb2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 16567,
            "upload_time": "2024-07-15T00:34:58",
            "upload_time_iso_8601": "2024-07-15T00:34:58.160384Z",
            "url": "https://files.pythonhosted.org/packages/5f/dc/2b5500d1de93a7915f95c31d4c8568b24ca7685bf06cc8e5e8372092fbc3/prologix_netfinder-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-15 00:34:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jllanfranchi",
    "github_project": "prologix_netfinder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "prologix-netfinder"
}
        
Elapsed time: 0.47483s