ConfigurableFirmata
ConfigurableFirmata copied to clipboard
On the esp32 board, the device does not respond to the queryAnalogMapping command
Test with Firmata.js. I add some debug info.
reportVersion
queryfirmware
settings.skipCapabilities undefined
queryCapabilities
CAPABILITY_RESPONSE: [
0, 1, 2, 3, 4, 5,
6, 7, 8, 10, 11, 127,
117, 16
]
queryAnalogMapping
// hang...
Hmmm... I can't really confirm this, but I can confirm that the reply is partially wrong (it reports an analog mapping for pins which do not even have analog support). Can you try what happens if your comment out everything but firmataExt.reset() from systemResetCallback()? I have found that the general pin resetting causes issues on ESP32, because some pins are internally reserved and shouldn't be touched.
Hmmm... I can't really confirm this, but I can confirm that the reply is partially wrong (it reports an analog mapping for pins which do not even have analog support). Can you try what happens if your comment out everything but
firmataExt.reset()fromsystemResetCallback()? I have found that the general pin resetting causes issues on ESP32, because some pins are internally reserved and shouldn't be touched.
Comment like this. It's still hang up.
void systemResetCallback()
{
// for (byte i = 0; i < TOTAL_PINS; i++) {
// if (IS_PIN_ANALOG(i)) {
// Firmata.setPinMode(i, PIN_MODE_ANALOG);
// } else if (IS_PIN_DIGITAL(i)) {
// Firmata.setPinMode(i, PIN_MODE_OUTPUT);
// }
// }
firmataExt.reset();
}
I guess you need to debug that and check the raw bytes transferred. Looking at your log above, something is wrong anyway, since the CAPABILITY_RESPONSE is much longer than what's printed above. I have no javascript-experience, so I'm unable to trace down the behavior there. Since it works with other client software, I believe it's not a firmware issue, though.
OK, I will check inside more.