camcamfresh / Xiaomi-M365-BLE-Controller-Replacement

Replacing the BLE Controller with a Cellular Controller
142 stars 34 forks source link

Particle Electron/Photon Serial1 Error #11

Closed camcamfresh closed 5 years ago

camcamfresh commented 5 years ago

So I have ran into a big problem attempting to communicate with the scooter using Serial1 on the Photon and Electron. The problem is that Serial1 will not transmit data on half duplex mode. I am currently waiting for some replacement devices to finish debugging the problem. I am also talking with some contributors at Particle as it seems to be a problem with the device itself, perhaps a system firmware update.

For now, I have been able to bypass Serial1 altogether and use Serial2 (however this requires interfering with Particle's onboard RGB LED). The following link should provide instruction for enabling Serial2: https://docs.particle.io/support/particle-devices-faq/photon-serial2-faq/ When enabling Serial2, I did not remove the onboard RGB LED nor the current limiting resistor. I merely connected a wire to Serial2's Tx (green led) and added "#include "Serial2/Serial2.h"". If you have a Particle Electron, switching to Serial4 or Serial5 would be preferable.

camcamfresh commented 5 years ago

Received a new Electron this past weekend. Half duplex is working again. I'm not entirely sure, but I think it may have been an issue with the device itself. I'm afraid to upgrade the system firmware (of the Particle devices) as I have a problem downgrading it back to the system firmware that I know works (0.7.0).