{"id":14978078,"url":"https://github.com/300bps/hellopi","last_synced_at":"2025-10-28T08:31:41.892Z","repository":{"id":57437155,"uuid":"356911043","full_name":"300bps/hellopi","owner":"300bps","description":"A program to identify the ip address of Raspberry Pis (or other devices) added to the local area network.","archived":false,"fork":false,"pushed_at":"2024-03-10T18:00:59.000Z","size":48,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-29T00:44:48.486Z","etag":null,"topics":["device-discovery","dhcp","discovery","headless","headless-raspberry","headless-raspberry-pi","ip-address","ipaddress","linux","raspberry-pi","raspberrypi","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/300bps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-11T15:52:41.000Z","updated_at":"2024-08-03T14:06:05.000Z","dependencies_parsed_at":"2024-09-18T23:03:27.482Z","dependency_job_id":null,"html_url":"https://github.com/300bps/hellopi","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"fa12da6699bb2563a44c58a24852764f5e49f093"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/300bps%2Fhellopi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/300bps%2Fhellopi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/300bps%2Fhellopi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/300bps%2Fhellopi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/300bps","download_url":"https://codeload.github.com/300bps/hellopi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859904,"owners_count":16556031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["device-discovery","dhcp","discovery","headless","headless-raspberry","headless-raspberry-pi","ip-address","ipaddress","linux","raspberry-pi","raspberrypi","windows"],"created_at":"2024-09-24T13:56:50.024Z","updated_at":"2025-10-28T08:31:41.568Z","avatar_url":"https://github.com/300bps.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Hello Pi ##\n_Hello Pi_ is a program that identifies the ip address of Raspberry Pis added to the local area network.\n\n### What It Does: ###\n_Hello Pi_ makes it easy to identify the ip address of a Raspberry Pi (RPi) computer added to the same DHCP-configured \nlocal area network (LAN). Additionally, it can report the ip address of other devices added to the same LAN. It \neliminates the need to attach a display and keyboard to the RPi solely to discover its ip address.\n  \n### The Problem It Solves: ###\nA frequent, common problem when commissioning a new RPi is that the ip address that it will be assigned is not \ninitially known. Traditionally, this has meant that the user must connect a display and keyboard to the new RPi in \norder to check what ip address it has been assigned. This is inconvenient and can be a problem if the RPi is intended \nto be used in a \"headless\" (no connected display) configuration. A headless setup would typically be configured using \nSSH to login remotely from another computer, but this requires knowledge of the ip address of the target RPi. _Hello Pi_ \nmakes it easy to learn the ip address of a device when it is powered-up while connected to the same LAN.\n\n### How To Use It: ###\n_Hello Pi_ is run from a computer (the 'Host') connected to the same DHCP-configured LAN as the RPi (the 'Target') or \nother device to be discovered. \n\n1. Using the command-prompt, start _Hello Pi_ on the Host.\n   * Note that the -h option can be used to see a list of available command options.\n2. The initial state of the Target (RPi or device) is powered-down/unpowered.\n3. Connect Target to the LAN.\n   * If using Ethernet, physically connect the cable.\n   * If using WiFi, configure the _wpa_supplicant.conf_ file in the boot folder of the OS image.\n4. Power-up the Target and wait while it boots.\n5. Observe the output of _Hello Pi_ on the Host to learn the ip address assigned to the Target.\n6. To repeat the process, power-down the Target and return to step 2. \n\n### System Requirements: ###\n* Operating System: Linux/BSD or Windows\n* Python: Version 3.5 or newer\n\n### Theory of Operation: ###\nThis section is presented for those curious about how the program works, but is not required reading \nto use the program.  \n\n_Hello Pi_ listens to the exchange between the Target device and the DHCP server. When the Target is \npowered-up while connected to the LAN, it sends a broadcast DHCP Discovery message. The DHCP server receives\nthis message and sends a DHCP Offer response. The Target then replies with a broadcast DHCP Request response \nacknowledging acceptance of the ip address that was offered.\n\nSince the Target's DHCP Request message is broadcast to all devices on the LAN, _Hello Pi_ on the Host listens\nfor this message and reports the accepted ip address.\n\n_Hello Pi_ has the option to report the ip address of only RPis, or can be instructed to report the ip \naddress of any device that connects and is configured via DHCP. In order to discriminate between RPis and\nother devices, the OUI (Organizationally Unique Identifier) of the MAC address is compared to the\nOUIs registered to the Raspberry Pi Foundation.  \n\n### Platform-specific Details: ###\n##### Linux/BSD: #####\n_Hello Pi_ on Linux must be run with elevated privileges (via sudo or as root). This is required to allow it to create a\n\"raw socket\", which it uses to see DHCP Request broadcast messages sent by devices connecting to the LAN. From these\nmessages, it can display the ip address of the connecting RPi or device. \n\n##### Windows: #####\n_Hello Pi_ on Windows must be run with administrator privileges. This is required to allow it to create a\n\"raw socket\", which it uses to see DHCP Request broadcast messages sent by devices connecting to the LAN. From these\nmessages, it can display the ip address of the connecting RPi or device.\n\nFor _Hello Pi_ to read broadcast DHCP Request messages on Windows, they must be allowed through the firewall. \nTo allow broadcast DHCP Requests on Windows, you may need to add the following firewall ALLOW rule:\n\n```\nWINDOWS FIREWALL ALLOW RULE:\n    Name: DHCP Server Port\n    Protocol: UDP\n    Local port: 67\n    Remote port: 68\n    Local IP Address: 255.255.255.255\n    Remote IP Address: 0.0.0.0\n```\n\n### Command-line Options: ###\n```\nUSAGE: \n    hellopi \u003cOPTIONS\u003e\n            OR\n    python3 hellopi.py \u003cOPTIONS\u003e\n\nOPTIONS:\n  -a    Display ALL devices (not just RPis) making a DHCP Request for an ip address.\n  -h    Display this help message.\n  -q    Quiet the program startup information.\n  -v    Display verbose messages.\n```\n\n### Installation Options: ###\nChoose any one of the following methods to install / run _Hello Pi_.\n#### Install and Run System-wide Using Pip: ####\nIf _pip_ is installed on your computer and the computer has access to the internet, the easiest way to install _Hello Pi_ \nis by using _pip_.\n1) Open a terminal window.\n    * Windows: Right-click the _Command Prompt_ app and select \"Run as administrator\".\n    * Linux: Open a terminal window.\n2) Install using pip:\n    * Windows: __pip install hellopi__\n    * Linux: __sudo pip3 install hellopi__\n3) To run _Hello Pi_ any time after installation, open a terminal window and use the __hellopi__ command. \nUse __hellopi -h__ to see a list of the command's options.\n\n#### Install and Run System-wide Using setup.py: ###\n1) To install _Hello Pi_ so that it can be run like a command, download the project source files into a working folder.\n2) Open a terminal window in the source directory.\n    * Windows: Right-click the _Command Prompt_ app and select \"Run as administrator\". Next change to the source directory.\n    * Linux: Open a terminal window and change to the source directory.\n3) Run the __setup.py install__ program with administrator access rights.\n    * Windows: __python setup.py install__\n    * Linux: __sudo python3 setup.py install__\n4) To run _Hello Pi_ any time after installation, open a terminal window and use the __hellopi__ command. \nUse __hellopi -h__ to see a list of the command's options.\n\n#### Run From Source: ####\n1) To run _Hello Pi_ from source, download the project source files into the desired folder.\n2) Open a terminal window in the source directory.\n    * Windows: Right-click the _Command Prompt_ app and select \"Run as administrator\". Next change to the source directory.\n    * Linux: Open a terminal window and change to the source directory.\n3) Run the program with administrator access rights.\n    * Windows: The _Command Prompt_ app was already opened with admin rights in step 2, so simply run the command with: \n    __python3 hellopi.py -h__\n    * Linux: Run the command with: __sudo python3 hellopi.py -h__\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F300bps%2Fhellopi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F300bps%2Fhellopi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F300bps%2Fhellopi/lists"}