Skip to content

Commit

Permalink
Wifi: create NetworkManager wifi handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Dec 20, 2024
1 parent a4afc26 commit 1b774c4
Show file tree
Hide file tree
Showing 4 changed files with 612 additions and 2 deletions.
16 changes: 16 additions & 0 deletions core/services/wifi/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
#!/usr/bin/env python3

import os
import urllib.request

import setuptools


def download_script(url: str, dest: str) -> None:
urllib.request.urlretrieve(url, dest)
os.chmod(dest, 0o755)


CREATE_AP_COMMIT = "2cedd27e324ac7b9cffd1537ef0b6c9e8564e9a3"

download_script(
f"https://raw.githubusercontent.com/lakinduakash/linux-wifi-hotspot/{CREATE_AP_COMMIT}/src/scripts/create_ap",
"/usr/bin/create_ap",
)

setuptools.setup(
name="wifi_service",
version="0.1.0",
Expand Down
3 changes: 2 additions & 1 deletion core/services/wifi/typedefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ class ScannedWifiNetwork(BaseModel):
class SavedWifiNetwork(BaseModel):
networkid: int
ssid: str
bssid: str
bssid: Optional[str]
flags: Optional[str]
nm_id: Optional[str]


class WifiCredentials(BaseModel):
Expand Down
Loading

0 comments on commit 1b774c4

Please sign in to comment.