15 Commits
Author SHA1 Message Date
Dejwut 462c7db401 Removed trash. 2023-05-17 09:12:05 +02:00
Dejwut 2cdf08fe6b Fixed merge conflict and removed sensitive stuff. 2023-05-17 09:11:10 +02:00
Dejwut c20b530c51 Removed trash. 2023-05-16 19:42:00 +02:00
Dejwut e9e5b3a191 Added .gitignore 2023-05-16 19:41:17 +02:00
OndreasCZ abbe02d216 Another README update, like 3rd time. 2023-05-16 19:28:48 +02:00
OndreasCZ 070510d751 Another README update 2023-05-16 19:26:02 +02:00
OndreasCZ 94476c873d Rep info update 2023-05-16 19:22:17 +02:00
Dejwut 519fb5e5d6 My na projektu děláme! 2023-05-16 14:22:54 +02:00
OndreasCZ 0dc94ea92c Test Ondra 2023-05-16 14:17:18 +02:00
Genibro 7e54aa8821 Merge branch 'main' of https://git.s.gbl.cz/Dejwut/att-hackathon-2023 2023-05-16 14:01:45 +02:00
Genibro 43a2eb103a push test 2023-05-16 14:01:40 +02:00
Dejwut dac0c85823 SHH test 2023-05-16 10:59:43 +02:00
Dejwut 799a72d2ea Updated readme. 2023-05-16 10:22:00 +02:00
Dejwut 353eaa7b4a Initial commit 2023-05-16 10:20:36 +02:00
Dejwut 43491a2358 Initial commit 2023-05-16 10:18:47 +02:00
13 changed files with 28 additions and 177 deletions
Vendored
BIN
View File
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
*.swp
*.swo
-20
View File
@@ -1,20 +0,0 @@
{\rtf1\ansi\ansicpg1252\cocoartf2709
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 # Random YAML File\
name: John Doe\
age: 25\
email: johndoe@example.com\
address:\
street: 123 Random Street\
city: Randomville\
country: Randomland\
interests:\
- Sports\
- Music\
- Travel\
}
-47
View File
@@ -1,47 +0,0 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
function close() {
dispatch('close');
}
</script>
<div class="background-backdrop">
<div class="p-10">
<div on:click={() => close()} class="cursor-pointer text-white">Back</div>
<div class="mx-auto flex flex-col w-max mt-20">
<div class="text-white text-xl">Add access point</div>
<div class="flex flex-row items-center mt-8">
<div class="text-white pr-12">Name:</div>
<input type="text" class="border border-white rounded-lg h-6 p-2 mt-2" />
</div>
<div class="flex flex-row items-center mt-8">
<div class="text-white pr-14">Type:</div>
<input type="text" class="border border-white rounded-lg h-6 p-2 mt-2" />
</div>
<div class="flex flex-row items-center mt-8">
<div class="text-white pr-20">IP:</div>
<input type="text" class="border border-white rounded-lg h-6 p-2 mt-2" />
</div>
<div class="flex flex-row items-center mt-8">
<div class="text-white pr-8">Location:</div>
<input type="text" class="border border-white rounded-lg h-6 p-2 mt-2" />
</div>
<div class="flex flex-row items-center mt-8">
<div class="text-white pr-8">Yaml:</div>
<input type="file" class="text-white justify-center items-center border-white h-6" />
</div>
<button
on:click={() => dispatch('create')}
class="px-6 py-2 text-white bg-[#1D3920] mt-12 rounded-xl">Save access point</button
>
</div>
</div>
</div>
<style>
.background-backdrop {
@apply w-screen h-screen z-50 bg-[#05171E] absolute top-0;
}
</style>
+5 -5
View File
@@ -1,16 +1,16 @@
<script lang="ts"> <script lang="ts">
let numberOfAccessPoints = 4; let numberOfAccessPoints = 0;
let numberOfAccessPointsUp = 4; let numberOfAccessPointsUp = 0;
</script> </script>
<div class="height"> <div class="height">
<div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20"> <div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20">
<div class="text-white text-center text-5xl">Dashboard</div> <div class="text-white text-center text-3xl">Dashboard</div>
<div class="flex flex-row text-white mt-20 text-3xl"> <div class="flex flex-row text-white mt-20 text-xl">
<div class="pr-2">Access point amount :</div> <div class="pr-2">Access point amount :</div>
<div>{numberOfAccessPoints}</div> <div>{numberOfAccessPoints}</div>
</div> </div>
<div class="flex flex-row text-white mt-20 text-3xl"> <div class="flex flex-row text-white mt-20 text-xl">
<div class="pr-2">Access points up :</div> <div class="pr-2">Access points up :</div>
<div>{numberOfAccessPointsUp}</div> <div>{numberOfAccessPointsUp}</div>
</div> </div>
+3 -3
View File
@@ -1,10 +1,10 @@
<div class="height"> <div class="height">
<div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20"> <div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20">
<div class="text-white text-center text-5xl">About</div> <div class="text-white text-center text-3xl">About</div>
<div class="flex flex-row text-white mt-20 text-3xl"> <div class="flex flex-row text-white mt-20 text-xl">
This project was made by the Pátek team during the 2023 Junior AT&T Hackathon. This project was made by the Pátek team during the 2023 Junior AT&T Hackathon.
</div> </div>
<div class="flex flex-row text-white mt-20 text-3xl"> <div class="flex flex-row text-white mt-20 text-xl">
Its an open-source management tool for access points with Its an open-source management tool for access points with
</div> </div>
</div> </div>
+2 -6
View File
@@ -1,11 +1,7 @@
<div class="height"> <div class="height">
<div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20"> <div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20">
<div class="text-white text-center text-5xl">Contact</div> <div class="text-white text-center text-3xl">Contact</div>
<div class="flex flex-row text-white mt-20 text-3xl">Email: patek@gbl.cz</div> <div class="flex flex-row text-white mt-20 text-xl">patek@gbl.cz</div>
<div class="flex flex-row text-white mt-20 text-3xl">Phone: +420 774 824 424</div>
<div class="flex flex-row text-white mt-20 text-3xl">
Address: Královická 668/23, 250 01 Brandýs nad Labem-Stará Boleslav
</div>
</div> </div>
</div> </div>
+7 -13
View File
@@ -1,19 +1,13 @@
<div class="height"> <div class="height">
<div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20"> <div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20">
<div class="text-white text-center text-3xl">Docs</div> <div class="text-white text-center text-3xl">Docs</div>
<div class="flex flex-row text-white mt-20 text-2xl"> <div class="flex flex-row text-white mt-20 text-xl">
Project PWC2 is a comprehensive solution designed for the multivendor management of Access dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy
Point (AP) devices. It aims to provide a centralized platform for efficiently managing APs text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text
from various vendors, streamlining operations, and enhancing network performance. This dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy
documentation serves as a guide for understanding and implementing the features and text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text
functionalities of the PWC2 project. dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy text dummy
</div> text dummy text
<div class="flex flex-row text-white mt-20 text-2xl">
System Overview The PWC2 system consists of the following key components: Management Console:
The central user interface where administrators can configure, monitor, and manage AP devices.
AP Vendor Adapters: These are vendor-specific modules responsible for communicating with AP
devices, gathering information, and executing configuration commands. Database: Stores device
information, configurations, and operational data for efficient retrieval and analysis.
</div> </div>
</div> </div>
</div> </div>
+5 -79
View File
@@ -1,60 +1,7 @@
<script lang="ts">
import AddAp from '$lib/components/AddAp.svelte';
import { onMount } from 'svelte';
function createAP() {
showAddApp = false;
//add to table new AP
table = [
...table,
{ Name: 'Cisák', Type: 'Cisco', Location: 'Serverovna', ID: 0, IP: '172.27.69.70' }
];
}
var table = [
{
Name: 'Mikrouš',
Type: 'Mikrotik',
Location: 'Recepce',
ID: 0,
IP: '172.27.69.66'
},
{
Name: 'Turrísek',
Type: 'Turris',
Location: 'Kancelář',
ID: 0,
IP: '172.27.69.67'
},
{
Name: 'T-Pod',
Type: 'TP-Link',
Location: 'Jídelna',
ID: 0,
IP: '172.27.69.68'
},
{
Name: 'Asusáč',
Type: 'Asus',
Location: 'Zasedačka',
ID: 0,
IP: '172.27.69.69'
}
];
let showAddApp = false;
</script>
{#if showAddApp}
<AddAp on:close={() => (showAddApp = false)} on:create={() => createAP()} />
{/if}
<div class="height"> <div class="height">
<div <div class="bg-[#05171E] rounded-lg w-3/4 h-full mx-auto mt-20 py-4 px-20">
class="bg-[#05171E] rounded-lg w-3/4 h-full overflow-y-auto mx-auto mt-20 py-4 px-20 relative" <div class="text-white text-center text-3xl">Settings</div>
> <table class="text-white border mx-auto mt-10">
<div class="text-white text-center text-5xl">Settings</div>
<table class="text-white border mx-auto mt-10 text-xl">
<tr> <tr>
<th class="title">ID</th> <th class="title">ID</th>
<th class="title">Name</th> <th class="title">Name</th>
@@ -62,27 +9,9 @@
<th class="title">Location</th> <th class="title">Location</th>
<th class="title">IP address</th> <th class="title">IP address</th>
</tr> </tr>
{#if table.length != 0}
{#each table as item, index}
<tr class="item">
<td class="py-2 text-center border-r">{index}</td>
<td class="py-2 text-center border-r">{item.Name}</td>
<td class="py-2 text-center border-r">{item.Type}</td>
<td class="py-2 text-center border-r">{item.Location}</td>
<td class="py-2 text-center">{item.IP}</td>
</tr>
{/each}
{:else}
<tr class="item">
<td colspan="5" class="text-center py-2">No access points</td>
</tr>
{/if}
</table> </table>
<div class="flex justify-center my-10"> <div class="flex justify-center mt-10">
<button <button class="text-white py-2 px-10 bg-[#1D3920] rounded-xl"> Add access point </button>
on:click={() => (showAddApp = !showAddApp)}
class="text-white py-2 px-10 bg-[#1D3920] rounded-xl text-xl">Add access point</button
>
</div> </div>
</div> </div>
</div> </div>
@@ -94,7 +23,4 @@
.title { .title {
@apply py-2 px-10 bg-[#5B5B5B] border; @apply py-2 px-10 bg-[#5B5B5B] border;
} }
.item {
@apply py-10 bg-[#363636] max-h-10 overflow-y-scroll;
}
</style> </style>
BIN
View File
Binary file not shown.
+1
View File
@@ -16,3 +16,4 @@ monitor_speed = 115200
lib_deps = lib_deps =
WiFi WiFi
ArduinoJson ArduinoJson
WebSocketsClient
+3 -4
View File
@@ -3,14 +3,13 @@
#include <ArduinoJson.h> #include <ArduinoJson.h>
const int scanIterations = 5; const int scanIterations = 5;
const int maxChannel = 14; const int maxChannel = 14; // Maximum number of Wi-Fi channels in the 2.4 GHz band
int channelUsage[maxChannel] = {0}; int channelUsage[maxChannel] = {0};
void setup() { void setup() {
Serial.begin(115200); Serial.begin(115200);
WiFi.mode(WIFI_STA); WiFi.mode(WIFI_STA);
WiFi.disconnect(); WiFi.disconnect();
pinMode(13, OUTPUT);
delay(100); delay(100);
Serial.println("Setup complete. Starting Wi-Fi channel analysis."); Serial.println("Setup complete. Starting Wi-Fi channel analysis.");
} }
@@ -31,14 +30,14 @@ void loop() {
delay(1000); delay(1000);
} }
// Create a JSON object to store channel usage data
StaticJsonDocument<256> jsonDocument; StaticJsonDocument<256> jsonDocument;
JsonObject channelUsageJson = jsonDocument.to<JsonObject>(); JsonObject channelUsageJson = jsonDocument.to<JsonObject>();
for (int channelIndex = 0; channelIndex < maxChannel; channelIndex++) { for (int channelIndex = 0; channelIndex < maxChannel; channelIndex++) {
String channel = String(channelIndex + 1); String channel = String(channelIndex + 1);
channelUsageJson[channel] = channelUsage[channelIndex]; channelUsageJson[channel] = channelUsage[channelIndex];
channelUsage[channelIndex] = 0; channelUsage[channelIndex] = 0; // Reset channel usage counter for the next analysis
} }
// Serialize and print the JSON object // Serialize and print the JSON object