{"id":22347242,"url":"https://github.com/gordonyfg/raspberrypi-texting-app","last_synced_at":"2026-04-13T23:32:53.122Z","repository":{"id":266408553,"uuid":"898265543","full_name":"gordonyfg/RaspberryPi-Texting-App","owner":"gordonyfg","description":"A Kivy-based texting application between two Raspberry Pi devices using SPI/I2C communication.","archived":false,"fork":false,"pushed_at":"2025-01-08T10:04:45.000Z","size":19403,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T11:50:24.956Z","etag":null,"topics":["i2c","iot","kivy","linux","python","raspberry-pi","spi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gordonyfg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-04T04:52:33.000Z","updated_at":"2025-01-08T10:04:49.000Z","dependencies_parsed_at":"2025-01-08T11:29:27.707Z","dependency_job_id":null,"html_url":"https://github.com/gordonyfg/RaspberryPi-Texting-App","commit_stats":null,"previous_names":["gordonyfg/raspberrypi-texting-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonyfg%2FRaspberryPi-Texting-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonyfg%2FRaspberryPi-Texting-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonyfg%2FRaspberryPi-Texting-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonyfg%2FRaspberryPi-Texting-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gordonyfg","download_url":"https://codeload.github.com/gordonyfg/RaspberryPi-Texting-App/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245641317,"owners_count":20648637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["i2c","iot","kivy","linux","python","raspberry-pi","spi"],"created_at":"2024-12-04T10:08:34.601Z","updated_at":"2026-04-13T23:32:53.056Z","avatar_url":"https://github.com/gordonyfg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Texting App for Raspberry Pi\n\n## Introduction\n\nThis project is a messaging application developed using the Kivy framework. It supports multiple communication protocols and implements a client-server architecture, allowing for local network communication simulation.\n\n## Features\n\n- **Multi-Protocol Support**: \n  - TCP/IP Network Communication\n    - Server mode (Master)\n    - Client mode\n  - UART/Serial Communication\n  - Future protocol support:\n    - SPI (Serial Peripheral Interface)\n    - I2C (Inter-Integrated Circuit)\n    - CAN (Controller Area Network)\n    - EtherCAT (Ethernet for Control Automation Technology)\n\n- **Modern UI Features**:\n  - Dark theme interface\n  - WhatsApp-style message bubbles\n  - Real-time message updates\n  - Protocol selection sidebar\n  - Automatic scrolling to latest messages\n\n- **Networking Features**:\n  - TCP/IP socket communication\n  - Client-Server architecture\n  - Connection state management\n  - Error handling and recovery\n\n- **Data Persistence**:\n  - SQLite database for message history\n  - Protocol-specific message filtering\n  - REST API for database operations\n\n## Demo GIFs\n\n### 1. Laptop Ubuntu Environment\n![alt text](asset/2025_01_03_pcUbuntu_output.gif)\n\n### 2. Raspberry Pi 400 (Master Server)\n![alt text](asset/2025_01_03_pi400output.gif)\n\n### 3. Raspberry Pi 3B+ (Client)\n![alt text](asset/2025_01_03_pi3bplus_output.gif)\n\n## Technical Stack\n\n- **Frontend**: Kivy Framework\n- **Backend**: \n  - Python 3.x\n  - Flask REST API\n  - SQLite Database\n- **Protocols**:\n  - TCP/IP (Ethernet)\n  - UART (Serial)\n\n## Requirements\n\n- Python 3.x\n- Kivy\n- Flask\n- SQLite3\n- Required Python packages:\n  ```\n  kivy\n  flask\n  requests\n  sqlite3\n  ```\n\n## Setup\n\n1. Clone the repository\n2. Install dependencies\n3. Run tests and save results:\n   ```bash\n   pytest -v --cov=. --cov-report=term-missing | tee test_results.txt\n   ```\n\n## Two-Pi Communication Setup\n\n### On Server Pi (Pi400):\n1. Get the IP address:\n   ```bash\n   ifconfig\n   # Note down the IP address (e.g., 192.168.1.100)\n   ```\n2. Run the application:\n   ```bash\n   python chatapp.py\n   ```\n3. Select \"TCP/IP(Server)\" in the UI\n\n### On Client Pi (Pi3B+):\n1. Modify the chatapp.py file:\n   ```python\n   # Replace \u003cMASTER_PI_IP\u003e with the actual Master Pi IP\n   self.protocol_handlers = {\n       \"Ethernet(Master)\": EthernetMasterHandler(host=\"0.0.0.0\", port=self.protocol_port),\n       \"Ethernet(Client)\": EthernetClientHandler(host=\"192.168.1.100\", port=self.protocol_port),\n       \"UART\": UARTHandler(port=\"/dev/ttyUSB0\", baudrate=9600),\n   }\n   ```\n2. Run the application:\n   ```bash\n   python chatapp.py\n   ```\n3. Select \"Ethernet(Client)\" in the UI\n\n### Troubleshooting\n- Ensure both Pis are on the same network\n- Check firewall settings:\n  ```bash\n  # On both Pis, allow incoming connections for both REST API and protocol ports\n  sudo ufw allow 5000:5001/tcp\n  ```\n- Test network connectivity:\n  ```bash\n  # From Client Pi\n  ping \u003cMASTER_PI_IP\u003e\n  ```\n- If connection fails, verify:\n  - IP addresses are correct\n  - Port 5001 is open for protocol communication\n  - Port 5000 (or next available) is open for REST API\n  - Both devices can see each other on network\n\n## Configuration\n\nThe application uses the following ports:\n- REST API server: starts from port 5000, finds next available if busy\n- Protocol communication: fixed at port 5001 for easier configuration\n\n## Usage and Roadmap\n\n1. Start the application\n2. Select a protocol:\n   - TCP/IP(Server): Acts as network server\n   - TCP/IP(Client): Connects to server\n   - UART/Serial: For serial port communication\n   - (Future) SPI: For high-speed, short-distance communication\n   - (Future) I2C: For inter-chip communication\n   - (Future) CAN: For robust industrial communication\n   - (Future) EtherCAT: For real-time industrial Ethernet\n   - (Future) MQTT: Lightweight messaging for IoT applications.\n   - (Future) Modbus: Industrial communication protocol (RTU and TCP).\n   - (Future) WebSocket: Real-time, bidirectional communication.\n   - (Future) Bluetooth Low Energy (BLE): Wireless communication.\n   - (Future) Zigbee/Z-Wave: Smart home and IoT protocols.\n3. Messages will appear in real-time.\n4. Connection status is shown in system messages.\n5. Planned features:\n   - User-defined Master Server IP.\n   - Optimize performance for Raspberry Pi 3B+ using RPI OS Lite.\n   - Advanced error handling and retry mechanisms for protocol failures.\n   - Enhanced UI performance and responsiveness.\n\n## Architecture\n\n- **Modular Protocol System**: Extensible protocol handlers\n- **MVC-like Structure**: Separation of UI, logic, and data\n- **Event-Driven**: Real-time message handling\n- **REST API**: Database operations via HTTP endpoints\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgordonyfg%2Fraspberrypi-texting-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgordonyfg%2Fraspberrypi-texting-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgordonyfg%2Fraspberrypi-texting-app/lists"}