Want to update firmware via USB... via Web. Options? - Page 1
Forum section: electronics / projects

author: jnz
author_rank: Frequent Contributor
timestamp: September 04, 2015, 04:34:33 pm
content: I have a project that uses an ARM chip. It has USB OTG, so host or device, and all options for USB classes.I want the user to be able to plug into USB. Go to our website and <via some method> update their firmware / set options via the web as an interface.I'm not entirely naive. I'm pretty sure this can be done via Java, maybe Python, but I'm hoping their is some system already in place maybe I can buy or license.I do not want to develop our own C program and run on the user's PC. I need to be able to use the web as a means of constantly being updated and able to adjust the interface. Effectively we are designing a windows application that would act as the physical interface, but aside from the updates I have reasons to not install a "program".Windows mainly, but if something already exists that works in Mac that would be greatMy thought to get rolling at first was to put the device into USB Host mode with a mass storage class system, have the user get a settings file from the website, put it on their USB stick and place that stick into my device where I read/copy data. This only allows for one-direction of communication as is, although I guess I could upload a file to the website as well, but now I'm kind of asking a lot for customers to do. I have older customers that might barely be able to click ALLOW THIS PROGRAM TO... on a website.Does anyone know of mechanisms to update via USB via Web?

author: jd
author_rank: Contributor
timestamp: September 04, 2015, 05:06:45 pm
content: The easiest for the user I have managed is to have a bootloader that puts the device in USB device mode, mass storage emulation. It then pops up as a small removable drive and you can freely copy a zipfile or whatever onto it. It is easiest if you have plenty of spare RAM (SDRAM system perhaps). The bootloader subsequently reads that file and programs flash etc.The advantages are that it is "driverless", you don't need to send .exe's by email, and the user does not have to be able to install anything.But there are any number of different ways to do it really.John

author: nctnico
author_rank: Super Contributor
timestamp: September 04, 2015, 07:59:11 pm
content: How about using an SD card? USB host is also doable but takes a lot more firmware than reading a file from an SD card.

author: jnz
author_rank: Frequent Contributor
timestamp: September 05, 2015, 05:18:13 am
content: Yea, mass storage is definitely the fall back. But if I want the user to be able send us data, I need to have a browse button, they select the file, then upload it, then I process on the backend.... Then I change the file and they need to put it back on the "drive" then go use.I'm just not crazy about that because it's a little extra work on their part... And I have customers that struggle with much simpler things.I'd like to find some way to get as-native-as-possible bidirectional communication. Applets are dying fast. HTML5 has sockets but that requires an app. Etc etcI'm starting to wonder if it's possible to make the device a web connected accessory, that is, plug into the PC and share the Internet to the device. This would require a TCP stack implemented over USB Device CDC both of which I have middleware for already (unknown if I can use them together!?). In that case I'd still need a way of having my remote site the user navigated to accessing some local IP the device has seated itself on. Gets complex.I wish there was a direct way to access uart over web! But given the complexity, I wonder if mass storage is as bad as I thought. At least it would be cross platform.