Compare commits

...

4 Commits

Author SHA1 Message Date
744a50aa67 Update defaults.toml
Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2024-02-28 19:09:14 +00:00
eb6e229d36 Update defaults.toml
added some bluetooth information 

Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2024-02-28 17:57:04 +00:00
3ada0628e1 Merge pull request #74 from Sniffleupagus/patch-1
Automatically remove invalid ai parameters leftover from tensorflow
2024-02-28 18:25:47 +01:00
9fa772c36a Automatically remove invalid ai parameters leftover from tensorflow
Ease transition from old Pwnagotchi running tensor flow to new running torch, but automatically dumping the invalid parameters.

Signed-off-by: Sniffleupagus <129890632+Sniffleupagus@users.noreply.github.com>
2024-02-28 09:58:41 -05:00
2 changed files with 28 additions and 19 deletions

View File

@ -23,6 +23,12 @@ def load(config, agent, epoch, from_disk=True):
from stable_baselines3 import A2C from stable_baselines3 import A2C
logging.debug("[AI] A2C imported in %.2fs" % (time.time() - start)) logging.debug("[AI] A2C imported in %.2fs" % (time.time() - start))
# remove invalid ai.parameters leftover from tensor_flow, if present
for key in [ 'alpha', 'epsilon', 'lr_schedule' ]:
if key in config['params']:
logging.info("Removing legacy ai parameter %s" % key);
del config['params'][key]
start = time.time() start = time.time()
from stable_baselines3.a2c import MlpPolicy from stable_baselines3.a2c import MlpPolicy
logging.debug("[AI] MlpPolicy imported in %.2fs" % (time.time() - start)) logging.debug("[AI] MlpPolicy imported in %.2fs" % (time.time() - start))

View File

@ -24,27 +24,30 @@ main.plugins.auto-update.interval = 1
main.plugins.bt-tether.enabled = false main.plugins.bt-tether.enabled = false
# Configuration for Android Phone
main.plugins.bt-tether.devices.android-phone.enabled = false main.plugins.bt-tether.devices.android-phone.enabled = false
main.plugins.bt-tether.devices.android-phone.search_order = 1 main.plugins.bt-tether.devices.android-phone.search_order = 1
main.plugins.bt-tether.devices.android-phone.mac = "" main.plugins.bt-tether.devices.android-phone.mac = "" # Bluetooth MAC address of the Android phone
main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44" main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44" # Static IP of the Pwnagotchi
main.plugins.bt-tether.devices.android-phone.netmask = 24 main.plugins.bt-tether.devices.android-phone.netmask = 24 # Netmask of the PAN
main.plugins.bt-tether.devices.android-phone.interval = 1 main.plugins.bt-tether.devices.android-phone.interval = 1 # Search interval in minutes
main.plugins.bt-tether.devices.android-phone.scantime = 10 main.plugins.bt-tether.devices.android-phone.scantime = 10 # Duration of each search in seconds
main.plugins.bt-tether.devices.android-phone.max_tries = 10 main.plugins.bt-tether.devices.android-phone.max_tries = 10 # Maximum attempts to find the phone
main.plugins.bt-tether.devices.android-phone.share_internet = false main.plugins.bt-tether.devices.android-phone.share_internet = false # Enable internet sharing via Bluetooth
main.plugins.bt-tether.devices.android-phone.priority = 1 main.plugins.bt-tether.devices.android-phone.priority = 1 # Priority level for tethering
# Configuration for iOS Phone
main.plugins.bt-tether.devices.ios-phone.enabled = false main.plugins.bt-tether.devices.ios-phone.enabled = false
main.plugins.bt-tether.devices.ios-phone.search_order = 2 main.plugins.bt-tether.devices.ios-phone.search_order = 1
main.plugins.bt-tether.devices.ios-phone.mac = "" main.plugins.bt-tether.devices.ios-phone.mac = "" # Bluetooth MAC address of the iOS phone
main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6" main.plugins.bt-tether.devices.ios-phone.ip = "" # Static IP of the Pwnagotchi when tethered to iOS
main.plugins.bt-tether.devices.ios-phone.netmask = 24 main.plugins.bt-tether.devices.ios-phone.netmask = 24 # Netmask of the PAN
main.plugins.bt-tether.devices.ios-phone.interval = 5 main.plugins.bt-tether.devices.ios-phone.interval = 1 # Search interval in minutes
main.plugins.bt-tether.devices.ios-phone.scantime = 20 main.plugins.bt-tether.devices.ios-phone.scantime = 10 # Duration of each search in seconds
main.plugins.bt-tether.devices.ios-phone.max_tries = 0 main.plugins.bt-tether.devices.ios-phone.max_tries = 10 # Maximum attempts to find the phone
main.plugins.bt-tether.devices.ios-phone.share_internet = false main.plugins.bt-tether.devices.ios-phone.share_internet = false # Enable internet sharing via Bluetooth
main.plugins.bt-tether.devices.ios-phone.priority = 999 main.plugins.bt-tether.devices.ios-phone.priority = 1 # Priority level for tethering (edited)
main.plugins.fix_services.enabled = true main.plugins.fix_services.enabled = true