{"id":20779141,"url":"https://github.com/mattdibi/nmtest","last_synced_at":"2026-05-27T12:32:35.550Z","repository":{"id":62317380,"uuid":"551480909","full_name":"mattdibi/NMTest","owner":"mattdibi","description":"NetworkManager dbus-java integration","archived":false,"fork":false,"pushed_at":"2023-07-20T09:22:45.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-31T15:46:18.934Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/mattdibi.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":"2022-10-14T13:34:06.000Z","updated_at":"2022-10-18T08:06:10.000Z","dependencies_parsed_at":"2024-11-17T13:30:05.400Z","dependency_job_id":"296245fc-bd40-4916-8627-3cc2c111af00","html_url":"https://github.com/mattdibi/NMTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattdibi/NMTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2FNMTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2FNMTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2FNMTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2FNMTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattdibi","download_url":"https://codeload.github.com/mattdibi/NMTest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattdibi%2FNMTest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33566872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-17T13:26:15.306Z","updated_at":"2026-05-27T12:32:35.535Z","avatar_url":"https://github.com/mattdibi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test app for NetworkManager dbus-java integration\n\n## Requirements\n\n### Prerequisites\n\nBefore installing Kura, you need to have the following programs installed in your system\n* JDK 1.8\n* Maven 3.5.x\n\n#### Installing Prerequisites in Mac OS \n\nTo install Java 8, download the JDK tar archive from the [Adoptium Project Repository](https://adoptium.net/releases.html?variant=openjdk8\u0026jvmVariant=hotspot).\n\nOnce downloaded, copy the tar archive in `/Library/Java/JavaVirtualMachines/` and cd into it. Unpack the archive with the following command:\n\n```bash\nsudo tar -xzf \u003carchive-name\u003e.tar.gz\n```\nThe tar archive can be deleted afterwards.\n\nDepending on which terminal you are using, edit the profiles (.zshrc, .profile, .bash_profile) to contain:\n\n```bash\n# Adoptium JDK 8\nexport JAVA_8_HOME=/Library/Java/JavaVirtualMachines/\u003carchive-name\u003e/Contents/Home\nalias java8='export JAVA_HOME=$JAVA_8_HOME'\njava8 \n```\n\nReload the terminal and run `java -version` to make sure it is installed correctly.\n\nUsing [Brew](https://brew.sh/) you can easily install Maven from the command line:\n\n```bash\nbrew install maven@3.5\n```\n\nRun `mvn -version` to ensure that Maven has been added to the PATH. If Maven cannot be found, try running `brew link maven@3.5 --force` or manually add it to your path with:\n\n```bash\nexport PATH=\"/usr/local/opt/maven@3.5/bin:$PATH\"\n```\n\n#### Installing Prerequisites in Linux\n\nFor Java\n\n```bash\nsudo apt install openjdk-8-jdk\n```\n\nFor Maven you can follow the tutorial from the official [Maven](http://maven.apache.org/install.html) site. Remember that you need to install the 3.5.x version.\n\n## Building\n\n```bash\nmvn clean package\n```\n\n## Running\n\n\u003e **Note**: Administration privileges might be required to apply changes on the network configuration. If so, run the following code from the `root` user.\n\n```bash\nmvn exec:java -Dexec.mainClass=\"org.eclipse.kura.NMTest.App\"\n```\n\nFor testing I’m currently running this code on a Raspberry Pi 4 with Raspberry Pi OS 32 bit using NetworkManager.\n\n_Note_: The [latest release of Raspberry Pi OS](https://www.raspberrypi.com/news/the-latest-update-to-raspberry-pi-os/) now offers Network Manager as an option.\n\nTo switch to NetworkManager, just open a terminal window and type:\n\n```bash\nsudo raspi-config\n```\n\nThis launches the configuration tool. Go into option 6, Advanced Options, and then into option AA, Network Config – choose option 2, NetworkManager, and then reboot when prompted.\n\n---\n\n### Code generation\n\n\u003e **Note**: For this generation `dbus-java` version 4.2.1 was used.\n\nFollow: [https://hypfvieh.github.io/dbus-java/code-generation.html](https://hypfvieh.github.io/dbus-java/code-generation.html)\n\nIntrospection XML for NetworkManager can be found [here](https://github.com/NetworkManager/NetworkManager/tree/main/introspection)\n\nCommand used for `NetworkManager` class:\n\n```bash\nmvn exec:java \\\n    -Dexec.mainClass=\"org.freedesktop.dbus.utils.generator.InterfaceCodeGenerator\" \\\n    -Dexec.executable=\"java\" \\\n    -Dexec.args=\"org.freedesktop.NetworkManager --inputFile /path/to/introspection/org.freedesktop.NetworkManager.xml --outputDir /tmp/classes ' '\"\n```\n\nFor generating the code of the entire directory all at once, the following script was used.\n\n```bash\nfor file in /path/to/introspection/*.xml\ndo\n        basefilename=$(basename ${file})\n        filename=\"${basefilename%.*}\"\n        mvn exec:java \\\n                -Dexec.mainClass=\"org.freedesktop.dbus.utils.generator.InterfaceCodeGenerator\" \\\n                -Dexec.executable=\"java\" \\\n                -Dexec.args=\"${filename} --inputFile ${file} --outputDir /tmp/classes ' '\"\ndone\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdibi%2Fnmtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattdibi%2Fnmtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattdibi%2Fnmtest/lists"}