debug
This commit is contained in:
parent
b1be320655
commit
de7f4f0baf
@ -2,7 +2,7 @@
|
||||
#include <ETH.h>
|
||||
#include "WebSocketManager.h"
|
||||
|
||||
WebSocketManager wsManager("wss://hq.ecomotus.co.uk", 443, "/");
|
||||
WebSocketManager wsManager("wss://api.ecomotus.co.uk", 443, "/socket");
|
||||
|
||||
static BLEUUID serviceUUID("0000ff00-0000-1000-8000-00805f9b34fb"); //xiaoxiang bms service
|
||||
static BLEUUID charUUID_rx("0000ff01-0000-1000-8000-00805f9b34fb"); //xiaoxiang bms rx id
|
||||
@ -31,8 +31,8 @@ static bool eth_ready = false;
|
||||
void setup() {
|
||||
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
|
||||
Serial.begin(115200);
|
||||
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);
|
||||
WiFi.onEvent(WiFiEvent);
|
||||
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);
|
||||
BLEDevice::init("");
|
||||
wsManager.begin();
|
||||
wsManager.sendText("hello");
|
||||
@ -50,6 +50,11 @@ void loop() {
|
||||
|
||||
Serial.println("Devices found: " + String(foundDevices.getCount()));
|
||||
|
||||
while(!eth_ready){
|
||||
Serial.println("Wait for eth...");
|
||||
delay(250);
|
||||
}
|
||||
|
||||
for (int i = 0; i < foundDevices.getCount(); i++) {
|
||||
delay(1000);
|
||||
Serial.printf("\r\n\r\n===============================\r\n\r\n");
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
char buffer[512]; // Define a buffer to hold the constructed message
|
||||
snprintf(buffer, sizeof(buffer), format, args...); // Use snprintf to format the string
|
||||
webSocket.sendTXT(buffer);
|
||||
Serial.print("[WebSocket] Sent: ");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user