diff --git a/Connectivity/Pico/bluetoothTest.py b/Connectivity/Pico/bluetoothTest.py deleted file mode 100644 index febbc745821b8dc3342c4023556920f1a0c5907d..0000000000000000000000000000000000000000 --- a/Connectivity/Pico/bluetoothTest.py +++ /dev/null @@ -1,47 +0,0 @@ -import ubluetooth -import struct -import time - -class BLEAdvertising: - def __init__(self): - self.ble = ubluetooth.BLE() - self.ble.active(True) - self.ble.irq(self.ble_irq) - self.register_services() - self.advertising_payload = self.generate_advertising_payload("RPi Pico") - self.ble.gap_advertise(100_000, self.advertising_payload) - - def ble_irq(self, event, data): - if event == 1: - print("Device connected") - elif event == 2: - print("Device disconnected") - self.ble.gap_advertise(100_000, self.advertising_payload) - elif event == 3: - conn_handle, attr_handle = data - value = self.ble.gatts_read(self.rx_handle) - print("Received message:", value.decode('utf-8')) - - def generate_advertising_payload(self, name): - name_bytes = bytes(name, 'utf-8') - payload = bytearray() - payload.extend(struct.pack('BB', 0x02, 0x01)) - payload.append(0x06) - payload.extend(struct.pack('BB', len(name_bytes) + 1, 0x09)) - payload.extend(name_bytes) - return payload - - def register_services(self): - UART_SERVICE_UUID = ubluetooth.UUID("6E400001-B5A3-F393-E0A9-E50E24DCCA9E") - UART_TX_UUID = ubluetooth.UUID("6E400003-B5A3-F393-E0A9-E50E24DCCA9E") - UART_RX_UUID = ubluetooth.UUID("6E400002-B5A3-F393-E0A9-E50E24DCCA9E") - self.rx_char = (UART_RX_UUID, ubluetooth.FLAG_WRITE) - self.tx_char = (UART_TX_UUID, ubluetooth.FLAG_NOTIFY) - UART_SERVICE = (UART_SERVICE_UUID, (self.tx_char, self.rx_char)) - self.services = (UART_SERVICE,) - ((self.tx_handle, self.rx_handle),) = self.ble.gatts_register_services(self.services) - -ble_adv = BLEAdvertising() - -while True: - time.sleep(1) diff --git a/Connectivity/RPiBluetooth.py b/Connectivity/RPiBluetooth.py deleted file mode 100644 index bfed730ebbde59b35aca446bb405d0f78c6a79c9..0000000000000000000000000000000000000000 --- a/Connectivity/RPiBluetooth.py +++ /dev/null @@ -1,65 +0,0 @@ -import dbus -import dbus.service -from dbus.mainloop.glib import DBusGMainLoop -from gi.repository import GLib - -# Define UUIDs for your service and characteristic -SERVICE_UUID = '00001801-0000-1000-8000-00805f9b34fb' -PAIRING_UUID = '00002a25-0000-1000-8000-00805f9b34fb' - -class PairingCharacteristic(dbus.service.Object): - def __init__(self, service, index): - self.path = f"{service.path}/char{index}" - self.service = service - self.props = { - 'UUID': dbus.String(PAIRING_UUID), - 'Service': dbus.ObjectPath(service.path), - 'Flags': dbus.Array(['read', 'write'], signature='s') - } - super().__init__(self.service.bus, self.path) # Use self.service.bus here - - @dbus.service.method('org.bluez.GattCharacteristic1', in_signature='', out_signature='a{sv}') - def GetProperties(self): - return self.props - - @dbus.service.method('org.bluez.GattCharacteristic1', in_signature='ay', out_signature='ay') - def ReadValue(self, options): - return dbus.Array([dbus.Byte(0x00)], signature='y') - - @dbus.service.method('org.bluez.GattCharacteristic1', in_signature='aya{sv}', out_signature='') - def WriteValue(self, value, options): - print(f"Pairing request received: {value}") - # Handle pairing logic here - -class BLEService(dbus.service.Object): - def __init__(self, bus, index): - self.bus = bus # Store the bus object as an attribute of the BLEService - self.path = f"/org/bluez/example/service{index}" - self.props = { - 'UUID': dbus.String(SERVICE_UUID), - 'Primary': dbus.Boolean(True), - } - super().__init__(bus, self.path) - self.characteristics = [PairingCharacteristic(self, 0)] - - @dbus.service.method('org.bluez.GattService1', in_signature='', out_signature='a{sv}') - def GetProperties(self): - return self.props - - @dbus.service.method('org.bluez.GattService1', in_signature='', out_signature='') - def Release(self): - print(f"{self.path}: Released") - -def main(): - DBusGMainLoop(set_as_default=True) - bus = dbus.SystemBus() - - # Create the BLE service - service = BLEService(bus, 0) - - print("BLE Service running. Press Ctrl+C to stop.") - mainloop = GLib.MainLoop() - mainloop.run() - -if __name__ == '__main__': - main() diff --git a/MobileView.jpg b/MobileView.jpg deleted file mode 100644 index e4052d5833fd5991e255dd066ccc39ea9c38ff68..0000000000000000000000000000000000000000 Binary files a/MobileView.jpg and /dev/null differ diff --git a/MobileView2.jpg b/MobileView2.jpg deleted file mode 100644 index 9ce275b17f76bb129b421fc7ef3206cbef231ac1..0000000000000000000000000000000000000000 Binary files a/MobileView2.jpg and /dev/null differ diff --git a/BLE/BLE-PC.py b/Wireless_Communication/BLE/BLE-PC.py similarity index 100% rename from BLE/BLE-PC.py rename to Wireless_Communication/BLE/BLE-PC.py diff --git a/BLE/BLE-RPi.py b/Wireless_Communication/BLE/BLE-RPi.py similarity index 100% rename from BLE/BLE-RPi.py rename to Wireless_Communication/BLE/BLE-RPi.py diff --git a/BLE/BLESCannerGUI.py b/Wireless_Communication/BLE/BLESCannerGUI.py similarity index 100% rename from BLE/BLESCannerGUI.py rename to Wireless_Communication/BLE/BLESCannerGUI.py diff --git a/BLE/BLEScanner.py b/Wireless_Communication/BLE/BLEScanner.py similarity index 100% rename from BLE/BLEScanner.py rename to Wireless_Communication/BLE/BLEScanner.py diff --git a/BLE/BLEScript.py b/Wireless_Communication/BLE/BLEScript.py similarity index 100% rename from BLE/BLEScript.py rename to Wireless_Communication/BLE/BLEScript.py diff --git a/BLE/advertisement.py b/Wireless_Communication/BLE/advertisement.py similarity index 100% rename from BLE/advertisement.py rename to Wireless_Communication/BLE/advertisement.py diff --git a/BLE/bletools.py b/Wireless_Communication/BLE/bletools.py similarity index 100% rename from BLE/bletools.py rename to Wireless_Communication/BLE/bletools.py diff --git a/BLE/service.py b/Wireless_Communication/BLE/service.py similarity index 100% rename from BLE/service.py rename to Wireless_Communication/BLE/service.py diff --git a/Connectivity/Pico/Workstations.py b/Wireless_Communication/RPi_Wifi/PicoProofOfConcept.py similarity index 100% rename from Connectivity/Pico/Workstations.py rename to Wireless_Communication/RPi_Wifi/PicoProofOfConcept.py diff --git a/Connectivity/SampleServerPi.py b/Wireless_Communication/RPi_Wifi/WifiControllerRPi.py similarity index 100% rename from Connectivity/SampleServerPi.py rename to Wireless_Communication/RPi_Wifi/WifiControllerRPi.py diff --git a/BeaconPositioningTest.py b/Wireless_Communication/UWB/BeaconPositioningTest.py similarity index 100% rename from BeaconPositioningTest.py rename to Wireless_Communication/UWB/BeaconPositioningTest.py diff --git a/dsekop.png b/dsekop.png deleted file mode 100644 index bf12d543b4f8d97dcf8d03e0211b2161666b7641..0000000000000000000000000000000000000000 Binary files a/dsekop.png and /dev/null differ