maxnet / pico-webserver Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Hello,
I'm trying to build pico-webserver according to your build instrcutions on https://github.com/maxnet/pico-webserver.
The following command gives an error:
git submodule update --init --depth 1
remote: Total 0 (delta 0), reused 0 (delta 0)
error: Der Server lehnt Anfrage nach nicht angebotenem Objekt 0056522cc974d2be2005c324f37187b5b3695765 ab.
"fetch" in Submodul-Pfad 'lwip' ausgeführt, aber 0056522cc974d2be2005c324f37187b5b3695765 nicht
enthalten. Direktes Anfordern dieses Commits ist fehlgeschlagen.
Error is "Direct fetching of that commit failed."
Can you please help me?
Thanks a lot.
Best regards,
Michael
I built and installed this, and it worked perfectly - but only after I'd manually brought the host side interface up.
The host is debian 11 on x86
After plugging in, the usb0: device appeared but it wasn't routed, had no address assigned and wasn't 'up'.
I could fix this with
ifconfig usb0: 192.1.7.10 up
(or, presumably, the equivalent 'ip' command)
However in my previous experience of the gadget interface on beaglebone this was done automatically, presumably by dhcp on the gadget side.
Is this normal for this code or has something failed in my build / host ?
Thanks for providing this example! Fantastic!
I am looking at this project as the stepping stone to serve ADC data from the Pico (assuming it can do anywhere close to the actual limit of the theoretical maximum USB throughput on the Pico).
The problem that I see is the data being hardcoded in fsdata.c
as static const
and served as such to lwipopts.h
. Before I bang my head on the keyboard too much, let me instead ask: do you think it would it be possible to replace those hardcoded files of pre-known length with a function call instead, which would read data from the ADC and serve it as the next chunk of bytes (or probably kbytes, to achieve decent throughput)?
I guess I could hardcode a very large size and get away with that part (even thought I might want to stop it before reaching that size, but I should be able to interrupt the transfer regardless and the host should be able to cope with the incomplete file regardless -- or in any case accept the limitation of fixed size if it strictly comes to that).
But how to serve data that is not known at compile time?
Looking at https://lwip.fandom.com/wiki/Lwipopts.h and https://lwip.fandom.com/wiki/Sample_Web_Server it seems that it is not possible (at least not in this form that I am describing, it may be possible in other ways). In any case I am asking here rather than to lwip
, because I am not interested in the abstract for what lwip
could do on an hypothetical platform. I care specifically for the Pico and I'd expect any reason to use a Pico as a webserver would like to serve dynamic, not pre-made content, hence you may have already explored the issue.
AFAICT from looking in github GUI, the mutex is never initialized:
pico-webserver/tusb_lwip_glue.c
Line 211 in 836b235
You can use auto_init_mutex
to define a static mutex that is pre-initialized on runtime init.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.