Disable Bluetooth
()
| 12566 | session = WardrivingSession(engine.data_dir, session_id=session_id) |
| 12567 | elif engine.session: |
| 12568 | session = engine.session |
| 12569 | else: |
| 12570 | return jsonify({'devices': [], 'total': 0}) |
| 12571 | devices = session.get_zigbee_devices() |
| 12572 | return jsonify({'devices': devices, 'total': len(devices)}) |
| 12573 | except Exception as e: |
| 12574 | return jsonify({'error': str(e)}), 500 |
| 12575 | |
| 12576 | |
| 12577 | @app.route('/api/wardriving/backfill_gps', methods=['POST']) |
| 12578 | def wardriving_backfill_gps(): |
| 12579 | """Backfill missing GPS positions on networks / BT / cell rows from the |
| 12580 | session's gps_track table by interpolating each row's first_seen |
| 12581 | timestamp. Covers brief GPS dropouts and the warm-up window before TTFF. |
| 12582 |