working pre changes big
This commit is contained in:
+1534
-91
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
> vite
|
||||
|
||||
|
||||
VITE v7.1.10 ready in 219 ms
|
||||
VITE v7.1.10 ready in 216 ms
|
||||
|
||||
➜ Local: http://localhost:5173/
|
||||
➜ Network: use --host to expose
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Port 5173 is in use, trying another one...
|
||||
|
||||
VITE v7.1.10 ready in 217 ms
|
||||
VITE v7.1.10 ready in 218 ms
|
||||
|
||||
➜ Local: http://localhost:5174/
|
||||
➜ Network: use --host to expose
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
✓ Loaded configuration from wristband_config.yaml
|
||||
|
||||
================================================================================
|
||||
VitalLink System Initialization
|
||||
================================================================================
|
||||
|
||||
✓ Backend is running at http://localhost:8000
|
||||
➕ Added real band VitalLink-5CB3 (BLE: CF:1C:C7:CB:5C:B3)
|
||||
➕ Added real band VitalLink-REAL2 (BLE: CF:1C:C7:CB:5C:B5)
|
||||
➕ Added simulated band MOCK-SIM1 (stable)
|
||||
➕ Added simulated band MOCK-SIM2 (mild_anxiety)
|
||||
➕ Added simulated band MOCK-SIM3 (deteriorating)
|
||||
➕ Added simulated band MOCK-SIM4 (sepsis)
|
||||
|
||||
================================================================================
|
||||
WRISTBAND INVENTORY
|
||||
================================================================================
|
||||
🔵 VitalLink-5CB3 | AVAILABLE
|
||||
🔵 VitalLink-REAL2 | AVAILABLE
|
||||
🟢 MOCK-SIM1 | AVAILABLE
|
||||
🟢 MOCK-SIM2 | AVAILABLE
|
||||
🟢 MOCK-SIM3 | AVAILABLE
|
||||
🟢 MOCK-SIM4 | AVAILABLE
|
||||
================================================================================
|
||||
Total: 6 | Real: 2 | Simulated: 4 | Active: 0
|
||||
================================================================================
|
||||
|
||||
|
||||
================================================================================
|
||||
VitalLink System Running
|
||||
================================================================================
|
||||
|
||||
✓ Monitoring for new patients from kiosk check-ins
|
||||
✓ Auto-assigning wristbands (prefer real: False)
|
||||
|
||||
Press Ctrl+C to stop
|
||||
|
||||
================================================================================
|
||||
|
||||
|
||||
🔍 Monitoring for new patient check-ins...
|
||||
[Status] Active: 0 monitoring | Available: 6 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 0 monitoring | Available: 6 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 0 monitoring | Available: 6 bands | Real: 2 | Sim: 4
|
||||
|
||||
🆕 New patient detected: P100001 (abc abc)
|
||||
✓ VitalLink-5CB3 assigned to patient P100001
|
||||
✓ Assigned VitalLink-5CB3 (real)
|
||||
🔵 Connecting to real wristband VitalLink-5CB3 at CF:1C:C7:CB:5C:B3...
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
❌ Failed to connect to VitalLink-5CB3: Device with address CF:1C:C7:CB:5C:B3 was not found.
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
[Status] Active: 1 monitoring | Available: 5 bands | Real: 2 | Sim: 4
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
@@ -26,7 +26,14 @@ simulated_bands:
|
||||
# Real Wristbands (Hardware)
|
||||
# Add BLE addresses of your physical wristbands
|
||||
# You can find these by running: python -m wristband_manager --scan
|
||||
# VitalLink-5CB3
|
||||
real_bands:
|
||||
- band_id: "VitalLink-5CB3"
|
||||
ble_address: "CF:1C:C7:CB:5C:B3"
|
||||
#
|
||||
# - band_id: "VitalLink-REAL2"
|
||||
# ble_address: "CF:1C:C7:CB:5C:B5"
|
||||
#
|
||||
# Example (uncomment and edit when you have real hardware):
|
||||
#- band_id: "VitalLink-A3B2"
|
||||
# ble_address: "CF:1C:C7:CB:5C:B3""
|
||||
|
||||
Reference in New Issue
Block a user