Live data from Hacker News

Reverse Engineering the DualShock 4

blog.the.al

41–50 of 74 posts

Re: Reverse Engineering the DualShock 4

#42
post #18

Earlier quoted context omitted.

so... gross because sony should have better firmware or gross because linux should have a better usb stack, that is, it should never panic the kernel.

Both, surely? The hardware shouldn't give bad input, and the kernel should tolerate it if it does. Edit: Sorry, I take it back: That data is weird , but not malformed; the hardware isn't out of line and I think the driver is fully at fault.

Yeah, it would be the hardware's fault if it delivered 1000 volts. Delivering any sequence of 1s and 0s should maybe cause the driver to give up, but not to panic the kernel.

Re: Reverse Engineering the DualShock 4

#43
post #39

Earlier quoted context omitted.

Does it have USB drivers?

While I've never tried it in that way, I understand it should function as a standard USB game controller when wired, but its real gem would be fully leveraging its wireless support.

The problem is that Stadia controllers use wireless in the sense of WIFI, not bluetooth. This means that in order to make them work not only is the RE work even harder, but you'd probably have to create a completely new driver since I'm unaware of any other device that can input commands from the internet; whereas with bluetooth we already have extensive tools to deal with it

Re: Reverse Engineering the DualShock 4

#45
That's what i don't get with linux...having all drivers inside the kernel is madness, no wait...it's pure stupidity. No other Universal OS makes that...crash my system with a USB-Controller...that's some Windows 98 reliability(-issues) right there.

Re: Reverse Engineering the DualShock 4

#46
post #39

Earlier quoted context omitted.

While I've never tried it in that way, I understand it should function as a standard USB game controller when wired, but its real gem would be fully leveraging its wireless support.

The problem is that Stadia controllers use wireless in the sense of WIFI , not bluetooth . This means that in order to make them work not only is the RE work even harder, but you'd probably have to create a completely new driver since I'm unaware of any other device that can input commands from the internet; whereas with bluetooth we already have extensive tools to deal with it

Technically writing such a driver using ViGem should not be all that hard once you reverse the WiFi protocol this controller uses.

Re: Reverse Engineering the DualShock 4

#47
post #37
post #31

Earlier quoted context omitted.

Thanks for that, I missed it in TFA. But ouch, that feels like an extreme design choice. What's the logic here to erasing the flash on a failed checksum, or requiring a checksum in the first place? Is there a non-obvious security threat?

The issue is probably a missing A/B firmware update for the config section. If a firmware update needs to alter the calibration data or other rather static config, and that update process is interrupted by an empty battery then it can't recover. It should of course be more conservative in killing all of the config section... Or could reset to some sane default. Or have a copy of the old known good data around and res…

A properly made device would at least keep a spare copy just in case, there's more than enough space in flash for that, but no, Sony wants to sell more controllers.

Re: Reverse Engineering the DualShock 4

#49
post #37

Earlier quoted context omitted.

The issue is probably a missing A/B firmware update for the config section. If a firmware update needs to alter the calibration data or other rather static config, and that update process is interrupted by an empty battery then it can't recover. It should of course be more conservative in killing all of the config section... Or could reset to some sane default. Or have a copy of the old known good data around and res…

A properly made device would at least keep a spare copy just in case, there's more than enough space in flash for that, but no, Sony wants to sell more controllers.

[deleted]

Re: Reverse Engineering the DualShock 4

#50
post #41

the controller seems refusing to boot that's when I realized that my idea of what is a controller is completely obsolete

How come? Ever since controllers used Bluetooth they would need to use some sort of programmable microcontroller or cpu. Both of these things need to 'boot' at some point. And yes even microcontrollers have bootloaders.
Post reply on HN