psieg / Lightpack

Lightpack and Prismatik open repository
GNU General Public License v3.0
1.57k stars 188 forks source link

Latest build not working on Mac OS with baud rate of 1000000 (adalight) #432

Open Kaitoukid93 opened 3 years ago

Kaitoukid93 commented 3 years ago

Hi! I've tested adalight firmware for light pack(Arduino nano, CH340) with 1000000 baud rate: -on windows version( windows computer)----> everything worked. -on Hackintosh and run latest build, change baud rate to 921600 (keep the Serial.Begin(1000000) in the Arduino sketch)---->everything worked. -on a Real Mac (x86 Macbook pro, Mac Os Bigsur and High Sierra), change software baud rate to 921600 (keep the Serial.Begin(1000000) in the Arduino sketch)----> debug LED (#define Debug LED) worked, no Light on the LED strip -on a Real Mac, change both baud rate (in sketch and software) to 115200 ----> everything worked.

-I don't know what is the different between MacBook and Hackintosh that make the LED stop working, I've test the serial transfer with example sketch and MacBook worked with 1000000 baud rate (Arduino serial monitor) -I can't find the Log file in .Prismatik Folder

Please Help! Thanks

Kaitoukid93 commented 3 years ago

Last Release didn't fix this issue, Log file show everything normal (level3 log), the baud rate did set to 921600 or 1000000 in the log file,

zomfg commented 3 years ago

I don't think it's something in Prismatik I'd bet on some combinations of usb/serial/drivers/os/cables/board at a pretty high baudrate for ch340 (in my experience they aren't made equal) Prismatik just sends a "frame" over serial, your board reads data and tries to recognize that frame if the header or the checksum parsing fails it thinks it's corrupted and skips til it detects another header I'd just lower the baudrate little by little until it works (and keep the same value on both sides just in case...) You could also make your firmware flash 1 LED in red every time a frame gets rejected to verify that

Kaitoukid93 commented 3 years ago

I don't think it's something in Prismatik I'd bet on some combinations of usb/serial/drivers/os/cables/board at a pretty high baudrate for ch340 (in my experience they aren't made equal) Prismatik just sends a "frame" over serial, your board reads data and tries to recognize that frame if the header or the checksum parsing fails it thinks it's corrupted and skips til it detects another header I'd just lower the baudrate little by little until it works (and keep the same value on both sides just in case...) You could also make your firmware flash 1 LED in red every time a frame gets rejected to verify that

Thanks! I also think that the OS is the problem here, weird thing is arduino monitor communicate with the same ch340 hardware without problem (both 1M baud and 115200, with just Ascii table test sketch) . With the same Mac os version (high sierra), this setup(ch340 1M ) worked just fine on Hackintosh (intel core i5+gtx960), but not on a Macbook pro Last thing I wanna do is using a Logic Analyzer to see what actually happen I've use ch340s in all my USB project and they never failed me, on windows prismatik build, it worked perfect and even correct the baudrate (921600 in prismatik setup, 1M in arduino code)