Skip to content

Commit

Permalink
Add interface variable setting for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobeva committed Sep 20, 2024
1 parent eda8538 commit a3e5649
Show file tree
Hide file tree
Showing 4 changed files with 1,171 additions and 4 deletions.
10 changes: 8 additions & 2 deletions RNS/Interfaces/Android/RNodeMultiInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ def __init__(self, owner, name, port, subint_config, id_interval = None, id_call
if (not self.validcfg):
raise ValueError("The configuration for "+str(self)+" contains errors, interface is offline")

def start(self):
try:
self.open_port()

Expand Down Expand Up @@ -738,8 +739,8 @@ def configure_device(self):
self.online = False
raise IOError(str(interface) + " failed to initialise.")

interface.OUT = True
interface.IN = self.IN
interface.OUT = subint[10]
interface.IN = True

interface.announce_rate_target = self.announce_rate_target
interface.mode = self.mode
Expand Down Expand Up @@ -1453,6 +1454,11 @@ def __init__(self, owner, name, parent_interface, index, interface_type, frequen
self.parent_interface = parent_interface
self.announce_rate_target = None

self.mode = None
self.announce_cap = None
self.bitrate = None
self.ifac_size = None

# add this interface to the subinterfaces array
self.parent_interface.subinterfaces[index] = self

Expand Down
4 changes: 4 additions & 0 deletions RNS/Interfaces/RNodeMultiInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,12 @@ def configure_device(self):

interface.OUT = subint[10]
interface.IN = True

interface.announce_rate_target = self.announce_rate_target
interface.mode = self.mode
interface.HW_MTU = self.HW_MTU
interface.detected = True

RNS.Transport.interfaces.append(interface)
RNS.log("Spawned new RNode subinterface: "+str(interface), RNS.LOG_VERBOSE)

Expand Down
Loading

0 comments on commit a3e5649

Please sign in to comment.