Presets.ini not being created + WebUSB not working

Having an issue with a new install. Serial+WebUSB is checked, SAVE_STATE is in the config. curstate.ini and global.ini (plus their temp files) are being created. But Presets.ini and its temp file not being created. In addition, WebUSB is not loading past the click USB part. Copying and pasting a random presets.ini from a similar saber (which also works with WebUSB on the other saber), the board will use that presets.ini file. However, WebUSB will still not go beyond the USB button click. WebUSB will work for the other saber. Swapping the SD card from that saber to this one will have presets loaded but will still not work for WebUSB.

Config (OS6.7)

Edit: Everything else works fine (fonts load (albeit with the SD Card not Found message unless I reset the battery)

presets.ini arenā€™t generated until you make a change of some sort.
The webusb problem is werd though, could be a hardware issue.
Can you check the web console and see if there are any error messages?
(in chrome, triple-dot-menu ā†’ more tools ā†’ developer tools, then go to the console tab)

One error message:

VM57 app.html:1294 Uncaught (in promise) DOMException: Failed to execute ā€˜openā€™ on ā€˜USBDeviceā€™: An operation that changes interface state is in progress.
at RunUSB (https://profezzorn.github.io/lightsaber-web-bluetooth/app.html:1294:20)
RunUSB @ VM57 app.html:1294
await in RunUSB (async)
onclick @ VM64 app.html:1563

Edit: I also tried to change a preset color using edit menu. It did not create a presets.ini and upon battery removal and return, the preset stayed with the original, not changed, color.

Ok, thatā€™s weird.
If you open up the serial monitor and run set_font test, what does it say? (and does presets.ini get created?)
Do you use savefile directories in your config file?

Only message after running set_font test was

17:05:43.974 ā†’ Failed to open: presets.ini
17:05:43.974 ā†’ Failed to open: presets.tmp
17:05:44.950 ā†’ Unmounting SD Card.

presets.ini is created however, but the board continues to give SD Card not found message, even with a different SD Card. Only when presets.ini and .tmp are deleted will that message be stopped.

No savefile directories in my config file nor the test config to enable diagnostic commands I believe.

SD card not found can be caused by a corrupt sd card.
(Itā€™s not ā€œfont directory not foundā€, right?)

Anyways, I think you should probably test the proffieOS from github to see if it works better for you.

No errors in the SD card upon checking. SD card also works on another saber. Also tried another known working SD card of different brand and it gave the same issues.

Unable to get the one just downloaded off github to work. ā€œAtomic must be 32 bits or less.ā€ error message

Ops, my fault. Should be fixed now.

1 Like

Same issue with the new.

app.html:1294 Uncaught (in promise) DOMException: Failed to execute ā€˜openā€™ on ā€˜USBDeviceā€™: An operation that changes interface state is in progress.
at RunUSB (https://profezzorn.github.io/lightsaber-web-bluetooth/app.html:1294:20)

It will create the presets.ini file though

14:45:26.177 ā†’ Creating file presets.ini iteration = 1
14:45:28.271 ā†’ Unmounting SD Card.

And also had to remove about 4 bladestyles to get within the memory limit. Hopefully 7.x final will have better efficiency there. (Over by 3455 compared to 6.7)

I wonder if maybe there is something wrong in USB memory for this board.
(The CPU has 1kb of memory for USB in/out buffering, and itā€™s split up into different regions for different endpoints. Generally, the WebUSB endpoint would always be in the same location in this memory, so if there is a broken bit, it would always affect the same endpoint.)

1 Like

Ouch. Guess Iā€™ll have to keep modifying presets.ini manually. Wish the WebUSB GUI could be used to just modify presets.ini rather than just through WebUSB, makes it easier with graphics interface seeing where the changes should be made.

Tried a different (but new) board.

New error message in console

Uncaught (in promise) DOMException: Failed to execute ā€˜claimInterfaceā€™ on ā€˜USBDeviceā€™: Unable to claim interface.

Try a different computer?

So, this message could mean a few different things.
On possibility is that a driver has been assigned to the webusb device somehow. This should normally not happen, but it can happen if someone runs zadig on the wrong device.

Another possible reason is that some other program on the system is messing with it. In particular, this could mean another browser tab somewhereā€¦

Iā€™ve also seen problems that look like this, but with apparently no explanation. I think these were caused by the browser being weird in some way.

Finally, itā€™s also possible that there is something wrong with the board itself. Although the problem would have to be oddly specific, but that could still be the case.

In chrome, there is one more place to look for more information, which might give us a better clue as to what is going on (and why it canā€™t claim the interface). That place is chrome://url-internals

Didnā€™t work on my other work PC.

Looked into chrome://usb-internals. Error message given was

Failed to read the device BOS descriptor to determine the total descriptor length. (Reason: Transfer Error)

Oddly enough, just to try, I had an offline setup for an older Chrome around 2021. I installed that and both boards worked!

Excellent, this should be enough information to give me a place to do some digging.

1 Like

Ah, unfortunately this error message might not be as helpful as I first imaginedā€¦
It seems that this error message isnā€™t related to the original problem. Instead, it is what happens when the usb-internals page fails to communicate with the device. Whatever is causing it to not communicate properly, happened earlier.

This is known as a follow-on error, and is similar to the thousands of lines of gobblygook you sometimes get when you mess up a few characters in your ProffieOS config file. As most of you well know, itā€™s only the first couple of errors that has any real meaningā€¦

1 Like

Odd. Iā€™ll probably do a fresh re-install of the latest Chrome to see if thereā€™s any difference on my end.