[HN Gopher] Show HN: DualShock calibration in the browser using ...
___________________________________________________________________
Show HN: DualShock calibration in the browser using WebHID
This website uses undocumented HID commands of both DS4 and
DualSense to re-center and recalibrate DualShock analog sticks.
Author : al_al
Score : 102 points
Date : 2024-04-09 09:59 UTC (13 hours ago)
(HTM) web link (blog.the.al)
(TXT) w3m dump (blog.the.al)
| the__alchemist wrote:
| Hey - total tangent, but... I'm playing through Horizon Forbidden
| West. It's the first game on PC I've played that supports the
| DualSense (PS5 controller)'s haptic motors and adaptive triggers.
| They are something else when integrated properly with game events
| and sounds. It would be cool if this were integrated into more
| games!
| TylerE wrote:
| Funny, I wish most games gave more options to turn them down.
| Some newer games are REALLY excessive with it. I encountered
| one game recently that felt it was _necessary_ (no way to
| disable) to make the controller vibrate every single time you
| used the d-pad in the UI.
| mdrzn wrote:
| Helvetica with font-weight 300 makes the text really thin and
| hard to read at 100% zoom.
| rokkamokka wrote:
| Looks great on mobile, fwiw
| CodeWriter23 wrote:
| I think you misspelled "younger eyes"
| NelsonMinar wrote:
| Really nicely done!
|
| Can recalibration help when the controller is connected to a
| Playstation? Does it store the calibration somehow in the
| controller? Or is this only useful on a PC?
|
| I'd love to somehow restore my PS5 DualSense that's fallen victim
| to stick drift. I looked once in Steam's debug info and instead
| of the stick reading 0 at center it was reading about 20,000.
| Given the max is 32,767 I've lost 2/3 of the useful range, so
| maybe there's no fixing it with software.
| bilekas wrote:
| DS4Windows is a decent tool for the dual sense, I think they
| have an offset you can configure while using it on PC but it
| wont store to the controller itself..
| evilhackerdude wrote:
| i fixed a busted analog stick by opening it up and cleaning the
| sensor thanks to some youtube video.
| jwrallie wrote:
| That works quite well, but I had to repeat it a few months
| later. I recommend cleaning also the other stick as the
| plastic in the DS4 casing can break from opening it too
| often.
| aidenn0 wrote:
| I have revived my CH Mach III twice now with DeoxIT on the
| potentiometers. I've owned that stick for over 30 years at
| this point.
|
| P.S. I wish someone made a modern joystick with a similar
| feel, but more than two buttons.
| al_al wrote:
| Yes, that's the point! I suggest to try calibration in
| temporary mode (center calibration has a checkbox in the
| wizard). See with https://hardwaretester.com/gamepad if the
| controller is calibrated correctly, in that case redo
| calibration in permanent mode. That flashes the calibration in
| the controller.
| Dylan16807 wrote:
| The important part is how smooth the remaining values are.
|
| Even a hundred discrete values should be enough for an axis.
| sumo89 wrote:
| "I noticed that many repair technicians were using my scripts to
| recalibrate controllers, which significantly reduced repair times
| and costs. However, many of them were also having a tough time
| setting up the environment to run the scripts: Python, libusb,
| Windows drivers, and all that complicated stuff: the user
| experience was completely off.
|
| This led me to the idea of creating a multiplatform web UI that
| could simplify everything. I developed a prototype and shared the
| link on a Facebook group for repair technicians, where it was
| warmly (..really warmly!) received."
|
| That's so wholesome. Other people would have seen their software
| being used and decided they should be turning a profit from it.
| pvg wrote:
| I am guessing the author is an alien tapped into the Strategic
| Galactic Good Cheer & Chill Reserve. That explains being able
| to provide a free utility/online service to the audience of
| 'gamers, when their controller is effed up'.
| TehCorwiz wrote:
| It's detecting my Sony original DS4 controller as a clone.
| al_al wrote:
| Is it a DS V1 or V2? What is the build date of the firmware?
| herpdyderp wrote:
| Calibration immediately errors out for my DualSense. Luckily mine
| doesn't actually need any calibration, I was just trying it out
| :)
| al_al wrote:
| What is the build date of your firmware? Sometimes updating the
| firmware to the latest version solves any issue
| alickz wrote:
| cool
| sotix wrote:
| > It is available only for Google Chrome, Chromium or compatiable
| browsers (e.g. Edge) because it uses WebHID, a javascript
| extension that can be used to send commands to a HID device.
|
| I didn't know about WebHID, but it's interesting Firefox doesn't
| support it. According to Mozilla's position[0]:
|
| > This API, like WebUSB, provides access to generic devices.
| Though this API is limited to human interface devices (HID), the
| same concerns apply as WebUSB, namely that devices are generally
| not designed with access from arbitrary websites in their threat
| model.
|
| [0]: https://mozilla.github.io/standards-positions/#webhid
| colordrops wrote:
| What is the chrome team's threat model for this? Why are they
| ok with it?
| TylerE wrote:
| Probably because it's listening to two general purpose input
| devices all the time at the very least? If you're _that_
| paranoid you probably shouldn 't be using a non air-gapped
| machine in the first place.
| 0cf8612b2e1e wrote:
| Chrome enables Chrome OS. These security holes are allowed
| into the spec to ensure the Chrome machines are not totally
| hobbled.
| michaelmrose wrote:
| So a malicious website can brick controllers. Good for author but
| I'm surprised its even possible.
| hbn wrote:
| You have to give it permissions to interface with the device,
| but also it sounds like a site wouldn't be able to so much
| "brick" it but rather miscalibrate it since it's not permanent.
| I assume it's just setting some offset values specific to the
| controller based on the stick's center point and whatnot. If a
| malicious site were to do that, you could just come back to
| this site and fix it.
| michaelmrose wrote:
| Reading it more clearly the developer actually expresses
| concern about allowing the code to run on clones resulting in
| potentially bricking them due to not supporting the same
| operations. Perhaps its more accurately a possible deficiency
| in clone controllers that the developer supposes may be in
| danger.
| aidenn0 wrote:
| Does this mean that a malicious website could intentionally
| miscalibrate any HID devices connected, or does it ask for
| permissions?
| ultimatt42 wrote:
| The site has to request permission to access a device, then the
| user has to select the device from a permission dialog to grant
| access.
| al_al wrote:
| it does ask for permission, but a malicious website could ask
| it for a valid reason and then brick it, yup. On the other
| side, a controller should not be brickable via HID commands...
| terandle wrote:
| Helped out with the drift on my DualSense, now I don't have to
| trash it, thanks man!
| opan wrote:
| Are there any plans to support Switch Pro Controllers?
| heystefan wrote:
| Can I detect analog stick drift with this?
| steelbrain wrote:
| Chrome is doing amazing work with these WebAPIs. Here's a quick
| list of things enabled by Chrome being open-minded and allowing
| WebHID and WebUSB APIs to exist:
|
| - Turn your Stadia controllers into bluetooth controllers:
| https://stadia.google.com/controller/index_en_GB.html
|
| - Android Flash Tool: https://flash.android.com/welcome
|
| - fastboot.js - FastBoot API but entirely though the web:
| https://kdrag0n.github.io/fastboot.js/demo/
|
| - WebADB - Android debugging interface through the web:
| https://app.webadb.com/
|
| and here's my favorite (because I used it in my RX-8)
|
| - Node-Carplay - Carplay interface through a USB dongle in your
| browser with no external dependencies!!1!
| (https://github.com/rhysmorgan134/node-CarPlay)
| dejawu wrote:
| Add to that list QMK VIA, which allows reprogramming a keyboard
| running the QMK firmware from the browser!
|
| https://www.caniusevia.com/
___________________________________________________________________
(page generated 2024-04-09 23:01 UTC)