fixes blescan.cpp & update readme.md

This commit is contained in:
Klaus K Wilting 2018-04-14 21:42:30 +02:00
parent f903a930c4
commit 666d2e0e32
2 changed files with 8 additions and 10 deletions

View File

@ -36,15 +36,15 @@ Hardware dependent settings (pinout etc.) are stored in board files in /hal dire
<b>Power consumption</b>: <b>Power consumption</b>:
- Heltec ~650mW - Heltec ~720mW
- TTGOv1 ~650mW - TTGOv1 TBD
- TTGOv2 ~670mW - TTGOv2 ~990mW
- LoPy with expansion board: ~530mW - LoPy with expansion board: ~690mW
- LoPy pure, without expansion board: ~460mW - LoPy pure, without expansion board: TBD
- LoLin32 with [LoraNode32 shield](https://github.com/hallard/LoLin32-Lora): TBD - LoLin32 with [LoraNode32 shield](https://github.com/hallard/LoLin32-Lora): TBD
- LoLin32 Lite with [LoraNode32-Lite shield](https://github.com/hallard/LoLin32-Lite-Lora): TBD - LoLin32 Lite with [LoraNode32-Lite shield](https://github.com/hallard/LoLin32-Lite-Lora): TBD
These results where metered with software version 1.2.0 during active wifi scan, no LoRa TXing, OLED display off, 5V USB powered. These results where metered with software version 1.2.97 while continuously scanning wifi and ble, no LoRa TXing, OLED display (if present) on, 5V USB powered.
# Building # Building

View File

@ -14,18 +14,16 @@ https://github.com/nkolban/esp32-snippets/tree/master/BLE/scanner
#include <esp_blufi_api.h> #include <esp_blufi_api.h>
#include <bt_types.h> #include <bt_types.h>
#define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
// defined in macsniff.cpp // defined in macsniff.cpp
bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type); bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type);
#define BT_BD_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x"
#define BT_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
// Prototypes // Prototypes
static const char *bt_event_type_to_string(uint32_t eventType); static const char *bt_event_type_to_string(uint32_t eventType);
static const char *bt_gap_search_event_type_to_string(uint32_t searchEvt); static const char *bt_gap_search_event_type_to_string(uint32_t searchEvt);
static const char *bt_addr_t_to_string(esp_ble_addr_type_t type); static const char *bt_addr_t_to_string(esp_ble_addr_type_t type);
static const char *bt_dev_type_to_string(esp_bt_dev_type_t type); static const char *bt_dev_type_to_string(esp_bt_dev_type_t type);
static const char *btsig_gap_type(uint32_t gap_type);
static void gap_callback_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param); static void gap_callback_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param);
// local Tag for logging // local Tag for logging