Skip to content

Commit

Permalink
Wifi: eate NetworkManager wifi handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani committed Dec 5, 2024
1 parent c05a704 commit 0f6c7b3
Show file tree
Hide file tree
Showing 4 changed files with 610 additions and 2 deletions.
14 changes: 14 additions & 0 deletions core/services/wifi/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
#!/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)


download_script(
"https://raw.githubusercontent.com/lakinduakash/linux-wifi-hotspot/refs/heads/master/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 0f6c7b3

Please sign in to comment.