Extras icon indicating copy to clipboard operation
Extras copied to clipboard

[Request]: 8BitDo Upgrade tool

Open nagromc opened this issue 1 year ago • 3 comments
trafficstars

Prerequisites

  • [X] I have searched all issues/PRs to ensure it has not already been reported or fixed.

Criteria

  • [X] Reasonably well-known and widely used (e.g. if it's a GitHub project, it should have at least 100 stars and/or 50 forks)
  • [X] English interface (or at least English documentation)
  • [X] Latest stable version
  • [X] Full version (i.e. not a trial version)
  • [X] Fairly standard install (e.g. uses a version-specific download URL, no elaborate pre/post install scripts)

Name

8BitDo Upgrade tool

Description

Official tool to upgrade the firmware of an 8BitDo controller or adapter

Homepage

https://support.8bitdo.com/firmware-updater.html

Download Link(s)

https://download.8bitdo.com/Tools/FirmwareUpdater/8BitDo_Firmware_Updater_Win.zip

Some Indication of Popularity/Repute

8BitDo has become a well-known company that provides quality game console controllers. Their products are sold by Amazon.com itself, i.e. not a third-party seller. They even have products officially licensed by Xbox.

Related to #12566

nagromc avatar Jan 04 '24 17:01 nagromc

Is there anywhere a hint on the version of the firmware updater on the website? Without I'm not sure how to implement the autoupdate of the manifest.

When starting the application it seems it is 2.47.

danielpauldd avatar Jan 14 '24 23:01 danielpauldd

With the help of Wireshark, I could determine the firmware updater sends requests via HTTP. I'm using xh (scoop install xh) to show the HTTP exchange.

With the latest version (v2.47):

$ xh --verbose POST http://dl.8bitdo.com:8080/firmware/loadNewToolUpdateVersion version:247 type:1
POST /firmware/loadNewToolUpdateVersion HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Host: dl.8bitdo.com:8080
Type: 1
User-Agent: xh/0.20.1
Version: 247

HTTP/1.1 200 OK
Content-Length: 35
Content-Type: application/json;charset=utf-8
Date: Thu, 18 Jan 2024 21:43:44 GMT

{
    "msgState": 1,
    "error": "",
    "list": []
}

Changing manually the version to 2.46:

$ xh --verbose POST http://dl.8bitdo.com:8080/firmware/loadNewToolUpdateVersion version:246 type:1
POST /firmware/loadNewToolUpdateVersion HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Host: dl.8bitdo.com:8080
Type: 1
User-Agent: xh/0.20.1
Version: 246

HTTP/1.1 200 OK
Content-Length: 427
Content-Type: application/json;charset=utf-8
Date: Thu, 18 Jan 2024 21:43:52 GMT

{
    "msgState": 1,
    "error": "",
    "list": [
        {
            "date": "2023-12-22",
            "fileName": "8BitDoFirmwareUpdater_V2.47",
            "fileSize": 18574160,
            "exists": false,
            "fileURL": "/var/lib/tomcat9/webapps//firmwareFile/upload//eb1568c2-eb9c-46b6-94a9-8e8e52a87dbe.zip",
            "readme_en": "1. Added support for M30 Wired Controller for Xbox.",
            "id": 156,
            "readme": "1. 新增支持 M30 有线手柄 for Xbox。",
            "type": 1,
            "version": 247,
            "md5": "8FFE1AA8D6D27817B2689B7FCBFE4641"
        }
    ]
}

I have no idea if Scoop can handle this kind of autoupdate. I will investigate later.

nagromc avatar Jan 18 '24 21:01 nagromc

The main problem is to know if there is a new version and which version number it has. Downloading the current version is probably not a problem as there is a link on the website, but implementing the HTTP post request, as you showed, is probably also not possible with the standard autoupdate mechanisms.

danielpauldd avatar Jan 21 '24 08:01 danielpauldd