diff --git a/audio b/audio new file mode 100644 index 0000000..0f8088d --- /dev/null +++ b/audio @@ -0,0 +1 @@ +sudo jack-stdout system:capture_1 system:capture_2 diff --git a/corel8 b/corel8 deleted file mode 100755 index a91d907..0000000 Binary files a/corel8 and /dev/null differ diff --git a/fifohost.py b/fifohost.py index 945e874..db813c1 100644 --- a/fifohost.py +++ b/fifohost.py @@ -1,26 +1,37 @@ import socket import os -fifo_path = "rds_ctl" -if not os.path.exists(fifo_path): os.mkfifo(fifo_path) +import threading + +fifo_path = "tctl" +if not os.path.exists(fifo_path): + os.mkfifo(fifo_path) + server_ip = "0.0.0.0" # Change this to the appropriate IP address -server_port = 9997 # Change this to the appropriate port +server_port = 9997 # Change this to the appropriate port server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server.bind((server_ip, server_port)) -server.listen(1) -print("R27 NRDSOS 1.1 (THIS IS A INTERNAL APP USED IN R27'S INTERNAL RDS SERVICE)") +server.listen(5) # Allow multiple connections + +print("R27 NRDSOS 1.1 (THIS IS AN INTERNAL APP USED IN R27'S INTERNAL RDS SERVICE)") print("Listening for incoming connections...") -while True: - client, client_address = server.accept() - print(f"Connection from {client_address}") + +def handle_client(client_socket): while True: try: - # Read data from the client - data = client.recv(1024).decode('utf-8') - if data: - print(f"Received: {data}") - with open(fifo_path, "w") as fifo: fifo.write(data) + data = client_socket.recv(1024).decode('utf-8') + if not data: + break + print(f"Received from {client_socket.getpeername()}: {data}") + with open(fifo_path, "w") as fifo: + fifo.write(data) except Exception as e: print(f"Error: {e}") break -server.close() + client_socket.close() + +while True: + client, client_address = server.accept() + print(f"Connection from {client_address}") + client_handler = threading.Thread(target=handle_client, args=(client,)) + client_handler.start() diff --git a/freedv b/freedv deleted file mode 100755 index d84721a..0000000 Binary files a/freedv and /dev/null differ diff --git a/morse b/morse deleted file mode 100755 index 673accf..0000000 Binary files a/morse and /dev/null differ diff --git a/pichirp b/pichirp deleted file mode 100755 index 6eb61b0..0000000 Binary files a/pichirp and /dev/null differ diff --git a/pifmrds b/pifmrds deleted file mode 100755 index e54bc80..0000000 Binary files a/pifmrds and /dev/null differ diff --git a/piopera b/piopera deleted file mode 100755 index 5d3ecac..0000000 Binary files a/piopera and /dev/null differ diff --git a/pirtty b/pirtty deleted file mode 100755 index 7782836..0000000 Binary files a/pirtty and /dev/null differ diff --git a/pisstv b/pisstv deleted file mode 100755 index 3ccea96..0000000 Binary files a/pisstv and /dev/null differ diff --git a/pocsag b/pocsag deleted file mode 100755 index 742511f..0000000 Binary files a/pocsag and /dev/null differ diff --git a/sendiq b/sendiq deleted file mode 100755 index a9fe212..0000000 Binary files a/sendiq and /dev/null differ diff --git a/sendook b/sendook deleted file mode 100755 index b2cc814..0000000 Binary files a/sendook and /dev/null differ diff --git a/tune b/tune deleted file mode 100755 index 7ea6c78..0000000 Binary files a/tune and /dev/null differ