Closed parkerlreed closed 4 years ago
sorry for the very late reply, are you able to wireshark sniff you python code and see what python is sending differently from the working command?
Oh jeeze. I don't even know if I have that portal anymore. I guess I'll just close it. If I find it again I may come back to it.
Thanks
So I've had a portal laying around doing nothing for forever now and decided to mess with it. No Skylanders to scan but hey there's an RGB LED!
After digging around I noticed this project and https://github.com/capull0/SkyDumper both use the portalio.cpp code for setting color. I noticed it was sending the C command and the three subsequent RGB values to the device via the hidapi. Not being very (or at all) skilled in C++, I set out to implement the color code externally.
I'm still working on getting something going with Python + PyUSB but still a ways off.
I did however do a little usbmon sniffing in wireshark to see what exactly Sky{Reader,Dumper} was doing to set the color. I noticed it sends the R (reset) and A (activate) commands before sending the C + 3 byte RGB. Where I'm at now is that AFTER I have used the portalio code once to set the color, I can then do it manually via usbtool.
The control variables were ascertained out of the wireshark dump I ran. I have been unlucky in trying to send the R and A beforehand, so my current method of starting control is running the dumper tool once just so it initializes it.
I guess my question after all of this is: Any tips on trying to send the R and A myself? Ultimately my goal is to implement all this in the aforementioned Pyhton + PyUSB. (I've tried the R and A both in PyUSB and usbtool but have come up short for solutions)