chGoodchild / nutband

trying to run it, will then try to build for android
MIT License
0 stars 0 forks source link

Communicate via reticulum #4

Open chGoodchild opened 6 months ago

chGoodchild commented 6 months ago

RNode LoRa Interface works with the following configuration file

# This is the default Reticulum config file.
# You should probably edit it to include any additional,
# interfaces and settings you might need.

# Only the most basic options are included in this default
# configuration. To see a more verbose, and much longer,
# configuration example, you can run the command:
# rnsd --exampleconfig

[reticulum]

  # If you enable Transport, your system will route traffic
  # for other peers, pass announces and serve path requests.
  # This should only be done for systems that are suited to
  # act as transport nodes, ie. if they are stationary and
  # always-on. This directive is optional and can be removed
  # for brevity.

  enable_transport = False

  # By default, the first program to launch the Reticulum
  # Network Stack will create a shared instance, that other
  # programs can communicate with. Only the shared instance
  # opens all the configured interfaces directly, and other
  # local programs communicate with the shared instance over
  # a local socket. This is completely transparent to the
  # user, and should generally be turned on. This directive
  # is optional and can be removed for brevity.

  share_instance = Yes

  # If you want to run multiple *different* shared instances
  # on the same system, you will need to specify different
  # shared instance ports for each. The defaults are given
  # below, and again, these options can be left out if you
  # don't need them.

  shared_instance_port = 37428
  instance_control_port = 37429

  # You can configure Reticulum to panic and forcibly close
  # if an unrecoverable interface error occurs, such as the
  # hardware device for an interface disappearing. This is
  # an optional directive, and can be left out for brevity.
  # This behaviour is disabled by default.

  panic_on_interface_error = No

[logging]
  # Valid log levels are 0 through 7:
  #   0: Log only critical information
  #   1: Log errors and lower log levels
  #   2: Log warnings and lower log levels
  #   3: Log notices and lower log levels
  #   4: Log info and lower (this is the default)
  #   5: Verbose logging
  #   6: Debug logging
  #   7: Extreme logging

  loglevel = 4

# The interfaces section defines the physical and virtual
# interfaces Reticulum will use to communicate on. This
# section will contain examples for a variety of interface
# types. You can modify these or use them as a basis for
# your own config, or simply remove the unused ones.

[interfaces]

  # This interface enables communication with other
  # link-local Reticulum nodes over UDP. It does not
  # need any functional IP infrastructure like routers
  # or DHCP servers, but will require that at least link-
  # local IPv6 is enabled in your operating system, which
  # should be enabled by default in almost any OS. See
  # the Reticulum Manual for more configuration options.

  # TCP/IP interface to the RNS Amsterdam Hub
  [[RNS Testnet Amsterdam]]
    type = TCPClientInterface
    enabled = yes
    target_host = amsterdam.connect.reticulum.network
    target_port = 4965

  # TCP/IP interface to the BetweenTheBorders Hub (community-provided)
  [[RNS Testnet BetweenTheBorders]]
    type = TCPClientInterface
    enabled = yes
    target_host = betweentheborders.com
    target_port = 4242

  [[Default Interface]]
    type = AutoInterface
    enabled = Yes

  [[TCP Interface]]
    type = TCPInterface
    enabled = Yes
    port = 8080

  [[RNode LoRa Interface 1]]
    type = RNodeInterface

    # Enable interface if you want use it!
    interface_enabled = True

    # Serial port for the device
    port = /dev/ttyACM0

    # Set frequency to 867.2 MHz
    frequency = 867200000

    # Set LoRa bandwidth to 125 KHz
    bandwidth = 125000

    # Set TX power to 7 dBm (5 mW)
    txpower = 7

    # Select spreading factor 8. Valid
    # range is 7 through 12, with 7
    # being the fastest and 12 having
    # the longest range.
    spreadingfactor = 8

    # Select coding rate 5. Valid range
    # is 5 throough 8, with 5 being the
    # fastest, and 8 the longest range.
    codingrate = 5

    # You can configure the RNode to send
    # out identification on the channel with
    # a set interval by configuring the
    # following two parameters.

    # id_callsign = MYCALL-0
    # id_interval = 600

    # For certain homebrew RNode interfaces
    # with low amounts of RAM, using packet
    # flow control can be useful. By default
    # it is disabled.

    # flow_control = False

    # It is possible to limit the airtime
    # utilisation of an RNode by using the
    # following two configuration options.
    # The short-term limit is applied in a
    # window of approximately 15 seconds,
    # and the long-term limit is enforced
    # over a rolling 60 minute window. Both
    # options are specified in percent.

    # airtime_limit_long = 1.5
    # airtime_limit_short = 33

  [[RNode LoRa Interface 2]]
    type = RNodeInterface

    # Enable interface if you want use it!
    interface_enabled = True

    # Serial port for the device
    port = /dev/ttyACM1

    # Set frequency to 867.2 MHz
    frequency = 867200000

    # Set LoRa bandwidth to 125 KHz
    bandwidth = 125000

    # Set TX power to 7 dBm (5 mW)
    txpower = 7

    # Select spreading factor 8. Valid
    # range is 7 through 12, with 7
    # being the fastest and 12 having
    # the longest range.
    spreadingfactor = 8

    # Select coding rate 5. Valid range
    # is 5 throough 8, with 5 being the
    # fastest, and 8 the longest range.
    codingrate = 5

    # You can configure the RNode to send
    # out identification on the channel with
    # a set interval by configuring the
    # following two parameters.

    # id_callsign = MYCALL-0
    # id_interval = 600

    # For certain homebrew RNode interfaces
    # with low amounts of RAM, using packet
    # flow control can be useful. By default
    # it is disabled.

    # flow_control = False

    # It is possible to limit the airtime
    # utilisation of an RNode by using the
    # following two configuration options.
    # The short-term limit is applied in a
    # window of approximately 15 seconds,
    # and the long-term limit is enforced
    # over a rolling 60 minute window. Both
    # options are specified in percent.

    # airtime_limit_long = 1.5
    # airtime_limit_short = 33
chGoodchild commented 6 months ago

$ rnstatus

Shared Instance[37428] Status : Up Serving : 0 programs Rate : 1.00 Gbps Traffic : 0 B↑ 0 B↓

TCPInterface[RNS Testnet Amsterdam/amsterdam.connect.reticulum.network:4965] Status : Up Mode : Full Rate : 10.00 Mbps Traffic : 752 B↑ 1.10 KB↓

TCPInterface[RNS Testnet BetweenTheBorders/betweentheborders.com:4242] Status : Up Mode : Full Rate : 10.00 Mbps Traffic : 753 B↑ 1.10 KB↓

AutoInterface[Default Interface] Status : Up Mode : Full Rate : 10.00 Mbps Peers : 1 reachable Traffic : 543 B↑ 0 B↓

RNodeInterface[RNode LoRa Interface 1] Status : Up Mode : Full Rate : 3.12 kbps Airtime : 0.0% (15s), 0.13% (1h) Ch.Load : 0.0% (15s), 0.19% (1h) Traffic : 543 B↑ 0 B↓

RNodeInterface[RNode LoRa Interface 2] Status : Up Mode : Full Rate : 3.12 kbps Airtime : 0.0% (15s), 0.13% (1h) Ch.Load : 0.0% (15s), 0.22% (1h) Traffic : 543 B↑ 0 B↓