working pre changes big

This commit is contained in:
2025-12-01 20:09:58 -05:00
parent 644291ee54
commit 2970ad4c5a
12 changed files with 2146 additions and 94 deletions
+45 -1
View File
@@ -3,6 +3,7 @@
## 🎯 Overview
This system allows you to seamlessly switch between:
- **Simulated wristbands** - For testing without hardware
- **Real wristbands** - Physical BLE devices
- **Mixed mode** - Use both simultaneously!
@@ -65,6 +66,7 @@ python simulator/main_runner.py
```
That's it! The system will:
1. ✅ Auto-check in 3 demo patients
2. ✅ Assign wristbands from config
3. ✅ Start monitoring and sending data
@@ -117,6 +119,7 @@ python config_system.py --scan
```
This will:
1. Scan for 15 seconds
2. Find wristbands advertising the VitalLink service UUID
3. Offer to add them to your config
@@ -141,8 +144,34 @@ real_bands:
ble_address: "AA:BB:CC:DD:EE:FF" # Your device's MAC
```
connection info:
Ok lets keep trying works perfectly with the nordic rf connect app.
It shows:
VitalLink-5CB3
CF:1C:C7:CB:5C:B3
NOT BONDED
-48dBm 99ms
Device type: LE only
Advertising type: Legacy
Complete Local Name: VitalLink-5CB3
RAW DATA:
0x0F09566974616C4C696E6B2D35434233
---
## Doing this
gatttool -t random -b CF:1C:C7:CB:5C:B3 -I
## 🎮 Usage Modes
### Mode 1: Automatic (Default)
@@ -152,6 +181,7 @@ python simulator/main_runner.py
```
Automatically:
- Loads wristbands from config
- Checks in demo patients
- Assigns bands
@@ -164,6 +194,7 @@ python simulator/main_runner.py --interactive
```
Menu-driven:
- Manually assign bands
- Scan for new devices
- Release bands
@@ -239,20 +270,26 @@ prefer_real_bands: true # Use real band first
1. **Power on the wristbands** (remove from charger)
2. **Scan for them:**
```bash
python config_system.py --scan
```
3. **Add to config** when prompted
4. **Set preference:**
```yaml
prefer_real_bands: true
```
5. **Run system:**
```bash
python simulator/main_runner.py
```
The system will:
- ✅ Automatically connect to real wristbands
- ✅ Subscribe to BLE notifications
- ✅ Decode packets according to your spec
@@ -290,6 +327,7 @@ python config_system.py --inventory
```
Output:
```
================================================================================
CONFIGURED WRISTBAND INVENTORY
@@ -345,6 +383,7 @@ python simulator/main_runner.py
```
Watch for:
- "🔵 Connecting to real wristband..."
- "✓ Connected to VitalLink-REAL1"
- "✓ Subscribed to notifications"
@@ -385,6 +424,7 @@ pip install bleak
1. Ensure wristbands are powered (off charger)
2. Check Bluetooth is enabled
3. Try increasing scan timeout in config:
```yaml
scan_timeout: 30.0
```
@@ -399,6 +439,7 @@ pip install bleak
### "Checksum failed"
The real wristband's packet format doesn't match. Check:
1. Byte order (little-endian)
2. Field sizes match your spec
3. Checksum calculation (sum of bytes 0-13 mod 256)
@@ -408,7 +449,7 @@ The real wristband's packet format doesn't match. Check:
## 📝 Next Steps
1. **Test with simulated bands** ✅ (you've done this)
2. **Get physical wristbands**
2. **Get physical wristbands**
3. **Scan and add to config**
4. **Test with 1 real wristband**
5. **Add more real wristbands**
@@ -421,16 +462,19 @@ The system is designed to work seamlessly at every stage!
## 🎓 For Your Capstone Demo
### Demo Scenario 1: All Simulated (Safe)
- Use 5 simulated wristbands with different profiles
- Show various patient conditions
- Demonstrate deterioration in real-time
### Demo Scenario 2: Mixed (Impressive)
- 1-2 real wristbands you wear
- 3 simulated wristbands
- Show that system handles both seamlessly
### Demo Scenario 3: All Real (Ultimate)
- All physical wristbands
- Live patient simulation
- Production-ready demonstration