-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with ESP32 2.05 bluetooth #2
Comments
Recompiled with fresh repo using ESP32 1.0.6 |
Problem 2: Problem 3: Status: |
That is very good. I currently use SBFSpot on a RPi. |
Problem 1 : always fail to connect and i don't know why |
There is a first draft of my port from SBFspot to ESP32 on the project "ESP32_SMA-Inverter" on github. This works on my SMA SMC6000TL with a plugin SMA bluetooth module. |
Problem 1: Fail to connect
Bluetooth connect seems to need the name or the MAC with additional arguments
esp_spp_sec_t sec_mask=ESP_SPP_SEC_NONE; // or ESP_SPP_SEC_ENCRYPT|ESP_SPP_SEC_AUTHENTICATE to request pincode confirmation
esp_spp_role_t role=ESP_SPP_ROLE_SLAVE; // or ESP_SPP_ROLE_MASTER
connected = SerialBT.connect(address,0,sec_mask,role);
Problem 2: Returned MAC address is reversed
I have to reverse the order of the check
bool ValidateSenderAddress() {
// Compares the SMA inverter address to the "from" address contained in the message.
// Debug prints "P wrng dest" if there is no match.
return (Level1SrcAdd[5]==smaBTInverterAddressArray[0] &&
Level1SrcAdd[4]==smaBTInverterAddressArray[1] &&
Level1SrcAdd[3]==smaBTInverterAddressArray[2] &&
Level1SrcAdd[2]==smaBTInverterAddressArray[3] &&
Level1SrcAdd[1]==smaBTInverterAddressArray[4] &&
Level1SrcAdd[0]==smaBTInverterAddressArray[5]);
}
Nothing happens from there on.
The text was updated successfully, but these errors were encountered: