Skip to content

Latest commit

 

History

History
166 lines (108 loc) · 6.14 KB

README.md

File metadata and controls

166 lines (108 loc) · 6.14 KB

HBDInetd

The daemon managing network interfaces for HybridOS.

Dependencies

For the detailed information about the 3rd-party dependencies of HBDInetd, please refer to:

https://github.com/HybridOS2/Documents/blob/master/guides/hybridos-third-party-software-list-en.md#hbdinetd

Building

HBDInetd provides two ports:

  • Linux: This port uses wpa_supplicant and a real implementation of DHCP client to scan, connect, and configure a wireless device. We use this port in a real production.
  • Fake: This port simulating a virtual wireless device (wlan0). We use this port when we develop an HVML app which provides the UIs for WiFi settings.

When you configure this porject by using CMake, please use one of the following commands according to your need:

$ cmake <root_of_source_tree> -DPORT=Linux

Or,

$ cmake <root_of_source_tree> -DPORT=Fake

Usage

After building HBDInetd, there will be one executable and the following HVML scripts:

  1. hbdinetd, located in the sbin/ directory in the root of your building tree. This is the daemon program of HBDInetd.
  2. scan.hvml, located in the hvml/ directory in the root of your building tree. This is a HVML program for demonstrating how to use the data bus APIs to scan the hotspots and get the scan result from HBDInetd.
  3. connect.hvml, located in the hvml/ directory in the root of your building tree. This is a HVML program for demonstrating how to use the data bus APIs to connect to a hotspot. Note that you can pass the SSID and passphrase on the command line as a query string:
  4. disconnect.hvml, located in the hvml/ directory in the root of your building tree. This is a HVML program for demonstrating how to use the data bus APIs to check the current wireless connection information and disconnect from a hotspot.
  5. config.hvml, located in the hvml/ directory in the root of your building tree. This is a HVML program for demonstrating how to use the data bus APIs to configure a network interface via DHCP.
$ hvml/connect.hvml -a cn.fmsoft.hybridos.settings -r wifi -q 'ssid=YourSSID&key=ThePassphrase'

To start HBDInetd, make sure that you have started HBDBus. For more information about HBDBus, please refer to:

https://github.com/HybridOS2/HBDBus

After starting hbdbusd, you can run hbdinetd in the root of your building tree:

$ sbin/hbdinetd

For the detailed usage, please run hbdinetd with -h option.

If you use Linux port, please note the following things:

  1. Run sbin/hbdinetd as a super user (root).
  2. Run rfkill command to cancel any blocking on the wireless devices.
  3. The Linux port also needs that the executable of wpa_supplicant is located in the system directory /sbin/.
  4. Some Linux distribution may configured wpa_supplicant under the option ONFIG_NO_CONFIG_WRITE=y. This will prevent the daemon from saving configuration to the default config file. However, HBDInetd needs this options having value n, that is, we hope wap_supplicant to manage the configuration.

For the description of APIs providing by HBDInetd, please refer to:

Design of HybridOS Data Bus (Chinese) Design of HybridOS Network Device Management Daemon (Chinese)

Copying

Copyright (C) 2020 ~ 2023 FMSoft Technologies

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Tradmarks

  1. 飛漫

飛漫

  1. FMSoft

FMSoft

  1. 合璧

合璧 合璧 合壁

  1. HybridOS

HybridOS

  1. HybridRun

HybridRun

  1. MiniGUI

MiniGUI

  1. xGUI

xGUI

  1. miniStudio

miniStudio

  1. HVML

HVML

  1. 呼噜猫

呼噜猫

  1. Purring Cat

Purring Cat

  1. PurC

PurC