Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support flashing .xuv firmware, which accompanies the .dfu firmware for most devices #6

Open
tchebb opened this issue Sep 6, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@tchebb
Copy link
Owner

tchebb commented Sep 6, 2023

As @gaborrell pointed out in #4, the index.xml for QuietComfort 35 II (BayWolf) from downloads.bose.com contains not just a stack_plus_app.dfu but also two .xuv files, ext_signed.xuv, and acorn_coeffs_signed.xuv. Upon further investigation of the archives in bosefirmware/ced, it seems like my device, Foreman, is coincidentally the only one that doesn't have updates with at least one .xuv file.

These .xuv files contain binary data in a rudimentary address+data ASCII hex encoding. The "ext" files are particularly interesting: once decoded back to binary, they begin with fsr_dfu1 magic, which also occurs at various points inside the .dfu files. However, the data following that magic in a given ext_signed.xuv file does not also occur in the corresponding stack_plus_app.dfu file, and in at least one case the former file is larger than the latter, indicating it's an independent piece of the firmware that also needs to be flashed.

Reports indicate that flashing the .dfu file alone seems to work and change the indicated firmware version even for devices that also have .xuv files, but if the two are truly multiple pieces of one firmware image, there could easily be functional issues that occur when they don't match.

To investigate these files further (and hopefully support them properly in bose-dfu), I'll need USB captures of the official updater updating any device that uses them (i.e. any device except the SoundLink Color II). You can gather this with Wireshark (make sure to install USBPcap during installation). If anyone could gather these and share them privately, I'd be grateful! If you filter your capture before sharing it, ensure you don't inadvertently filter out any packets going to your Bose device. The capture should have packets going both to and from the device in both DFU and non-DFU mode.

@tchebb tchebb added the enhancement New feature or request label Sep 6, 2023
@gaborrell
Copy link

I'll get the capture for you.

tchebb added a commit that referenced this issue Sep 8, 2023
Thanks @gaborrell (#4) and James Gregory (email) for testing this
device. Committing this now to record it, but I'm hesitant to include
this entry and the SoundLink Mini II one I added recently in a release
just yet. Two new pieces of information have come to light:

 1. All devices except the SoundLink Color II have additional .xuv
    firmware files that likely need to be flashed somehow to ensure
    correct operation. Without support for those, I don't think it's
    truthful to call ourselves "compatible". See #6.

 2. All three of the tested devices have the same normal mode PID,
    0x40fe. Assuming some untested devices do too, we should stop using
    that alone to mark a device as compatible.
@gaborrell
Copy link

I'll get the capture for you.

@tchebb I just sent the file.

@tchebb
Copy link
Owner Author

tchebb commented Oct 25, 2023

Just an update here: I got the capture, @gaborrell, and it looks like it has all the information I wanted. The ext firmware seems to be updated through a separate protocol that runs in normal (non-DFU) mode. It shouldn't be too hard to implement, but it will take time that I haven't had yet—especially since I don't own a device with ext firmware, so I'll have to rely on others to test during development.

If anyone wants to take a stab at implementing it themselves, I'm happy to provide support and give pointers in the code. Otherwise, I'll get around to it when I can find the time.

@tchebb tchebb changed the title Investigate .xuv files that come with the .dfu file for most devices Support flashing .xuv firmware, which accompanies the .dfu firmware for most devices Oct 26, 2023
@gaborrell
Copy link

gaborrell commented Nov 2, 2023 via email

@tchebb
Copy link
Owner Author

tchebb commented Nov 3, 2023

I really appreciate the offer, but sadly time is a bigger issue than hardware: I couldn't commit to finishing the feature quickly even if I had your device, and I don't want to end up keeping it from you indefinitely.

I'll see if I can find a cheap used device with XUV updates for my own testing. Since most devices seem to use XUV files, I imagine that won't be too hard.

@mberndt123
Copy link

@tchebb,

As you might remember, I have a Bose Mini II SoundLink that I flashed with bose-dfu, and I have noticed an issue with it: I cannot use it for phone calls with my Android phone, it just keeps beeping when I try. I don't remember if that was working before I upgraded it, so it may or may not be a result of an incomplete flashing process. Just adding this as a data point here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants