-
Notifications
You must be signed in to change notification settings - Fork 0
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
Wifi integration branch #309
Conversation
- increase serial baudrate - add separate management channel - query ip and port over management channel - wifi connect in separate task - estimate file upload timeouts in frontend - remove (arbitrary) file upload limits in frontend - heartbeat initiated from metamodule every second - stream file upload requests from web client to metamodule - potential fix for micropython reformatting filesystem partition - update to micropython v1.23.0
29b718e
to
3bd90f6
Compare
Could not reproduce that here. It sends the request normally for twice the same file in a row. However the second message is dropped due to the other effects already listed above. I made some smaller improvements for the timeout (removed the client side one and set a large one the time between request sent and response received at the serial port). This hopefully will make things clearer. It also fixes the problem where multiple requests queue up on the client side (subsequent messages are still dropped at the uart receiver but that's another problem). Progress indication is in the making. |
25e9ee5
to
821873c
Compare
Ok, this is strange. I tried macos Chrome and Safari and have the same results.
If the abs path doesn't change, then maybe browsers interpret differently whether to send the
Ok, I haven't seen any issues but will keep testing.
Cool. Yeah we can just show it in the browser for now. The A7 side responds to an upload if you have the patch selector page open, because it refreshes. That's good enough for v1.0. |
- after uploading a patch, first broadcast a new patch list before closing the request - only send updated patchlist if currently not receiving a frame
- fix uploading identical files after each other ignored on some browsers - only allow a single in-flight synchronous request at the webserver - add progress bar for patch file uploads
Yes, exactly, that was it. I was just testing with firefox so I didn't notice that one. I made changes to requests are sequenced on the webserver. Now I can upload the same 200kB file twice, both requests are in-flight from the browser side and they both land on the metamodule one after another without overruns. There is also progress indication now. It's a bit of hack still but should show the principle. I need to refactor this later. In the meantime, let me know if you hit any corner cases. Regarding progress indication on the A7: Until a message has been fully received, the M4 can't tell what's inside so it can't even tell if it's a patch upload. But just a notification on complete upload is pretty easy to do (for post v1.0) |
OK, looking good! I tested a few cases, and so far no issues.
Right. I got some "soft overrun" errors when sending multiple files. We might be able to address this easily by putting the wifi parser in a higher priority ISR. |
Yeah, there is only limited information available in browser. For one it only gives process for the upload part, not the processing of the received message and writing to disk in the metamodule. Then the upload is only from the browser into the TCP stack of the receiver. If I run the webserver on my laptop, the upload is immediate because the TCP receive window is 1MB. So the progress bar goes to 100% and stays there for a long time. Interestingly, one can somewhat simulate the hardware behaviour by enabling throttling in the browser's developers tools. |
OK, trying to merge this, but CI is failing for std::expected: I thought we checked for this already. But clang++ 18 fails to build even a simple test program that has std::expected on my local linux machine (clang 18.1.3). Not sure what's going on. I also tried install the extra libc++ packages as described here, but that doesn't work: Adding the flag |
OK, interesting. Seems to be the combinating clang with libstdcxx and somewhat host specific. Since its just the simulator I would go with whatever fix seems least dirty and deal with it later. |
Ok, I think I figured it out. The |
OK, nice! That probably also needs to go to the docs, right? |
Well... fixed on issue and another popped up:
And a lot of other errors about missing symbols: |
Is it easier just to roll our own std::expected replacement? We're not doing anything complicated with it. |
Weird. Probably from replacing the stdlib.. We could use one of those polyfills mentioned in the llvm issue tracker (and switch back later when that issue hopefully just goes away with a version upgrade). The polyfill could also be just for clang 18 or in case the symbol was not defined after including the correct header. I don't want to overengineer, just not persisting a workaround for whay is actually just a quirk of one platform |
Yeah, the polyfill is probably best. If we set it up right, we can change it easily when the time comes |
I tried to use the polyfill but the impact on the cmake code was rather large. We should probably clean up the history before merging (consolidate wifi image updates and simulator fixes with reverts) |
OK, sorry for the delay. I'm sqaushing and merging this now. |
This combines #288, #283 and #300