-
Notifications
You must be signed in to change notification settings - Fork 462
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
USB Native client #589
Comments
If you go the Qt way, multiplatform will be easy to achieve. |
I definitely don't agree on the user-friendliness. I believe it's actually the most user-friendly solution: works pretty much everywhere (Windows, Android, macOS, Linux, ChromeOS, etc…), nothing to install (unless you're on Windows < 10 where a driver is de facto required).
It's actually not even needed, as 99% of the code is WebUSB specific anyway. Everything you need to know is documented in Epsilon. We're using standard DFUse calls to either:
|
For a bit more details regarding what @Ecco just said on user-friendliness etc, see their blog post here: https://www.numworks.com/blog/webusb-firmware-update/ And about DFU for OS transfers, you can look at the makefile target here: epsilon/build/targets.device.mak Lines 34 to 41 in 5b98f49
Extremely straightforward. |
I managed to dump the storage some time ago by hand (with a slightly modified DFU descriptor) with a couple of Unix commands, could be useful for those trying to make a native client : https://tiplanet.org/forum/viewtopic.php?f=97&t=21308&start=30#p229631. |
I'm more about Gtk+, but the software will obviously be splitted into a low-level library and the GUI so the Qt/Gtk choice will not be definitive (we could even have a file explorer binding 🤣).
Okay, agreed, but on Linux you have to add a system file (and on Windows a driver to install), and the fact that you can only use this and not a native client is a bit reluctant for some users.
I didn't know DFU was a standard. That simplifies things a lot I think. Actually for Linux there is the fwupd initiative that tends to unify peripheral firmware updates (keyboards, bios,…) and natively supports DFU. Maybe the best would be to be part of the firmware library.
Yup, saw that and it's kinda well documented ;) |
You'll need them, no matter what userland code you'll want to use. So if you're using libusb for instance, you'll still need the udev rule on Linux and the driver on Windows < 10.
Sure, and we're very happy if some contributors want to offer alternative ways to interact with their NumWorks calculator.
Actually I think that'd be the best solution. Have you considered writing a FUSE plugin? |
Of course ! But installing the native GUI will install them too, and it's less confusing to "install the software" than to "install the software but use the web browser".
I don't think it solves the flashing problem, right ? And i've never written a FUSE plugin but that's a good idea for the file/script transfert. |
It definitely could. Think |
That's interesting. And that would completely remove the GUI thing (at least on Linux, maybe OSx) |
I'm stuck inasmuch as I'll only use free software, so Chrome is out. In addition, I understand that the first thing the numworks website wants me to do is register my device, and the first thing that wants me to do is update the OS. I've been happily building my own epsilon and re-flashing my calculator (via dfu-util and the Makefile) since I bought it, and moreover, I currently have a python program on it that I typed painfully in on the keyboard, and I'd really like not to have to re-enter it - and since flashing before any other form of communication will reset the memory, I'll lose it. A piece of free software that let me interact as I choose with my Numworks, over USB, from Linux, would be really, really appreciated. |
That's incorrect, updating is completely optional. Sure we prompt users to do it because 99% of them don't update their device manually, but it's definitely not mandatory. You can just head to https://workshop.numworks.com/python and exchange Python scripts straight away as long as your device has a firmware that supports exchanging scripts (version 1.4 or greater).
I think Chromium matches your requirements. |
But not the web page itself. |
Neither does this very website… 😛 |
Don't speak too loudly, people may start recommending gitlab :P Technically the part of the website handling usb stuff is """open-source""" since it's just JS, so everything is client-side. But yep, maybe minified/uncommented. Anyway, a FUSE driver would be cool regardless of webusb things :) |
Thanks a ton, Ecco, I hadn't fully appreciated the Chrome/Chromium split. I got the script off, am now updated to 1.6.0, and the script is back on. That said, I'd still like a non-browser-oriented way of doing this, whether it's a free client, or via a FUSE implementation. But it's now just a nice-to-have for me, not a quite-badly-needed. |
You're welcome, it's a subtle difference indeed 😄
I fully agree and understand. That being said I'm going to close this issue, for several reasons:
|
Okay for the issue being closed. I may work either on a PR or a "add this repo to the Numworks github organization" PR when enough work is done. |
Whats news about the native client by the time ? I just started use the numworks calculator and I was very confused that I cannot access memory directly from windows to transfer python files. Be forced to have an account on the numworks website is not - in my point of view - the best user friendly experience. Again, in my point of view, just drag and drop python files directly from windows to the calculator seems to be very more user friendly than use numworks website "send to calculator" system when I develop my scripts directly on my EDI on window ! |
I'm not buying the calculator ONLY because it has to be tied to a cloud service for such a simple thing as file upload. It's like the simplest and the most basic thing to have on a USB-powered device! |
@loclamor @eklipse2009 I didn't have time to work on this a lot (and i don't use the calculator much), but if you want to work together on this that'd be great ! |
@M4x1m3 has started working on a js library using we dfu for firmware updating and file uploading. Its name is numworks.js |
Yeah it's not like the device is "tied" to a cloud or something like that. Anyone can use the protocol to transfer files as they wish, it's just not in Numworks' priority to make a desktop client that would be one more thing to maintain while the already-existing website-based approach works fine for 99.9% of their market anyway. |
@RedGl0w OK, that will be a good reference but i was thinking of Python or C++ as a native language. |
Well, 99.9% of people don't use Chrome, and don't have a constant internet connection. To begin with. |
@Salamandar I'll maybe start working on it |
I said "of their market". Also, it's not only Chrome. It's anything Chromium-based, whatever implements WebUSB. |
@RedGl0w yes, it is definitely possible to wrap a stripped down Chromium into a desktop program with a set of scripts to be run inside of it. It won't be a super-fast and super-lightweight program, but it'll work fine when numworks.com fails miserably with maintaining their cloud service (this is a faith of most niche projects like this one). |
@adriweb Don't worry, I talked with you enough about that when I opened this issue. I understand the choices here, even if I don't agree with them. |
I hadn't even noticed, but I guess at least we are both consistent ;) |
Hehe yes ;) |
@RedGl0w I already have a repo for it https://github.com/Salamandar/epsilon_updater didn't get far… |
Using Chromium + WebUSB to download firmware/private files to the calculator are neither user- nor privacy-friendly.
I'd like to develop a native (well, Linux-native for starters) client to transfer both firmware and files.
This client could also start at session start and open its window when detecting the Numworks, check and alert for new releases,…
I'm confident it's a better solution than the WebUSB as it requires no internet connection, no account and not Chromium.
This client should use the same tools as the Web page, but its source code was not released on github (?).
Could this source code be released ? At least the code used for USB communication ?
The text was updated successfully, but these errors were encountered: