Commit graph

233 commits

Author SHA1 Message Date
bunnie
761d71d974 clean up some over-allocation in shellchat 2022-01-15 16:40:52 +08:00
bunnie
c7081ea944 Merge branch 'bunnie-dev' into main 2022-01-14 15:28:47 +08:00
bunnie
4f9374e860 add enhanced debugging to the COM for wf200 2022-01-14 15:27:24 +08:00
bunnie
a4bb889a5d update wlan status to a binary version with more detailed output 2022-01-14 02:23:57 +08:00
bunnie
0ba8650731 refactor SSID reporting
later on we'll have to add some UX around this but for now
the command line stuff is a bit nicer.
2022-01-13 21:12:14 +08:00
bunnie
837b2d5e9b Merge branch 'bunnie-dev' into main 2022-01-12 02:05:07 +08:00
bunnie
a8d7c7e9e2 cleann up the oqc test 2022-01-12 02:01:33 +08:00
bunnie
c43e31c500 fixing some bugs on oqc test.
there's an issue with the modals that has to be fixed next...
2022-01-11 22:34:45 +08:00
bunnie
5c32c9db25 Merge branch 'bunnie-dev' into main 2022-01-11 18:29:35 +08:00
bunnie
f464e34eef debug the test oqc integration 2022-01-11 18:29:12 +08:00
bunnie
f626374b36 reduce resource usage of the oqc_test
- code is merged into shellchat so there's less alignment overhead
and some library reuse
- server is not spawned until it's needed, so the RAM load is less
2022-01-11 17:19:13 +08:00
bunnie
4f638bb49a massive refactor to eliminate the RTC crate
Saves a bit on resources and the RTC crate doesn't need
to be stand-alone now that the modals crate is a thing;
we are able to split the UX routine to manage the RTC out
of the code that actually manages the hardware.

The hardware code ended up in LLIO, and the UX ended up in the status
routine.
2022-01-11 15:45:20 +08:00
bunnie
994e3d7cfb refactor llio crate (phase 1): organize files into sub-systems 2022-01-11 12:02:27 +08:00
bunnie
7f8d4ba63e Merge branch 'bunnie-dev' into main 2022-01-10 16:50:36 +08:00
bunnie
b3788a54af clarify the dependency policy 2022-01-10 16:50:10 +08:00
bunnie
9c2adb2c57 Merge branch 'bunnie-dev' into main 2022-01-10 16:35:56 +08:00
bunnie
995915ed4e nail down a couple more dependencies, and add a policy note to Cargo.toml
Each Cargo.toml now includes a comment which remnids maintainers
of the dependency policy for Xous (that is, nail down every dependency
to the minor number).
2022-01-10 15:54:27 +08:00
bunnie
dd943c5416 pin down versions and harmonize versions across servers
Versions are pinned down to the minor number. Yes, this means that
we don't automatically pull in features and bug updates from crates.io,
but it also means we don't pull in new attack surfaces and code that
hasn't been tested or reviewed. I'd like this process to be very deliberate
and not automatic for Xous.

The `rand` crate is almost pinned down to a single version, except
for an odd dependency that's pulled in by hosted mode that depends
on rand 0.8.4 via a subordinate dependency via the `tempfile` crate.
Pondering if it's worth it to try and eliminate that, because the
0.8.4 version doesn't get compiled into any version that touches
real hardware. It just makes it harder to analyze the Cargo.lock
file, mostly. I think I'll leave it as-is.
2022-01-10 15:39:55 +08:00
bunnie
1950492375 Merge branch 'bunnie-dev' into main 2022-01-09 14:07:47 +08:00
bunnie
dd18d94a03 e2e demo of pddb working now, we can store an ssid/password pair...finally. 2022-01-09 13:12:36 +08:00
bunnie
7aa2c7b054 a very basic e2e pddb application that tries to restore a network connection
lots of problems to solve still, but let's pick that up on the refactor
stage -- for now we want to get some evidence that the pddb API is
workable.
2022-01-09 01:29:28 +08:00
bunnie
b836a5afec Merge branch 'bunnie-dev' into main - pddb merge
All the PDDB infrastructure is now in place. The core filesystem is
fairly well tested, but the server APIs are entirely untested. However,
this merge at least gets the clean build into the mainline and will
cause a Precursor to create and format a PDDB. Note: this takes about
15 minutes -- about 7 minutes to erase the memory, 9 minutes to fill it
with random data. This is primarily limited by the raw speed of the
FLASH memory itself.
2022-01-08 00:13:14 +08:00
bunnie
9fcd7e17ae warning-clean. need to clean up the hosted mode flow a bit. 2022-01-07 23:22:12 +08:00
bunnie
7d660a3592 add key attribute query, clean up some warning 2022-01-07 16:18:44 +08:00
bunnie
fa7a9db348 add more key manipulation APIs 2022-01-07 15:43:50 +08:00
bunnie
6e5506a23d add pddb shell debug commands 2022-01-06 14:50:44 +08:00
bunnie
bc98064a59 add a function to recycle the PDDB for faster PDDB testing cycles 2022-01-05 11:22:29 +08:00
bunnie
5129b42dd9 remove shellchat services that conflict with the pddb 2022-01-04 21:56:50 +08:00
bunnie
0844b3e961 add formatting check and UX flow for formatting; redo salt (again)
probably should have split this into two commits. oh well.

first part introduces a check to see if root keys are initialized,
and if so, tries to mount the PDDB. If it can't mount, it asks
the user if they want to format it. It also updates the progress
of the fromatting.

the second part redoes the salt once again. After some discussion
SHA512/256 is also resistant to length extension attacsk so we
don't need to use the HMAC technique suggested. Would prefer to
reduce the number of algos to analyze, so we're going to a simple
SHA512/256 hash of the salt/basis name/plaintext password to generate
the salt that goes into the bcrypt routine that ultimately generates
the final key used by the system.
2022-01-03 16:51:51 +08:00
bunnie
48392ecd13
add margin on the ec reset time
4s seemed like a long time but i found one board that can't quite finish reset in that time, about 70% of the time it needs just a half second longer.
open up the window to 6s, just to ensure we don't get any false negatives.
2021-12-02 10:53:39 +08:00
bunnie
7208a86fdb rename aes-xous to aes, and change version number
this allows us to patch AES for external crates, too,
such as aes_gcm_siv
2021-11-07 05:17:34 +08:00
bunnie
65bad96f52 fix killbounce & formatting
sleep killbounce wouldn't work because we started limiting the
number of connections to the LLIO.

This change makes connections to the LLIO unlimited, but perhaps later
on we should split out the I2C bus into a separate security domain,
so that the LLIO's unlimited connection policy doesn't introduce a
risk into a rogue process being able to overwrite the RTC contents.
2021-10-30 02:14:31 +08:00
bunnie
2962d4ffc3 add a wifi retry to the oqc test 2021-10-29 05:25:40 +08:00
bunnie
81edf6a9c0 fix net ping description and help info 2021-10-28 18:37:48 +08:00
bunnie
72ffee7f13 cleanup of debug chatter, clarify some comments 2021-10-28 05:12:03 +08:00
bunnie
765519ff32 major refactor of ping implementation
- moved most ping state into the Net crate proper, since the smoltcp
implementation assumes a tightly bound set of objects and lifetimes
in its icmp abstraction

- created various convenience abstractions for handling single and
multiple pings, blocking and non-blocking.

- refactored the "net" command to use the new form

Initial testing indicates there are still some bugs (seems to be
with the way we are handling timestamping and doing pong retirement)
but at least we're not getting tons of async callback errors like
we were before, and we're not shuttling obscene amounts of state
using Arc-Mutex between the input and output of the ping operations.
2021-10-27 04:38:09 +08:00
bunnie
f53c57ba3f fix up a number of issues in ping
Now that I understand how smoltcp does ping better I have regrets.
The demo example in smoltcp uses a funky macro that was a bit
misleading. I have gotten rid of that but I probably would have made
different decisions in implementing this had I understood the API better.

Anyways. It works, but has some trouble handling the cases of timeouts
sometimes.
2021-10-22 04:08:43 +08:00
bunnie
f1fe850820 ping was surprisingly hard.
not fully working yet, but the architecture is there and it builds.
smoltcp's ping implementation (or at least its demo code) was not
very amenable to splitting into modules, had to recode most of it.

the ipv6 is still a hack.
2021-10-21 06:28:11 +08:00
bunnie
643e9a7d62 dns. needs more work, but it is at least minimally functional. 2021-10-20 05:18:54 +08:00
bunnie
ab3e05764e add some status and help message embellishments 2021-10-19 04:43:55 +08:00
bunnie
40771fbba7 flesh out UDP API...as much as we can
Multicast/Broadcast is not supported by smoltcp it seems, so those
calls are just unimplemented. But we are able to clone UdpSocket,
for the sick puppies who like to do that sort of thing.
2021-10-19 04:42:06 +08:00
bunnie
0cbca7fbe1 add UDP send and test routines 2021-10-19 01:41:22 +08:00
bunnie
98bbe848fc cleanup Udp Bind API
version for Xous internal use, and a version for integration into libstd.
2021-10-18 17:04:16 +08:00
bunnie
a8c6e8047f simple end-to-end demo of receiving UDP packets asynchronously 2021-10-18 05:55:42 +08:00
bunnie
23edeb9b5a add wlan dhcp to oqc test 2021-10-07 00:57:22 +08:00
bunnie
81653ec94b wot. how are these changes not being saved. 2021-10-04 17:37:17 +08:00
bunnie
f0c33bc99c tighten up operator flow for factory tests 2021-10-04 17:25:49 +08:00
bunnie
4a57adac3d add battery check, version print to oqc test 2021-09-20 00:05:21 +08:00
bunnie
87228ad747 basically working OQC test 2021-09-19 01:06:21 +08:00
bunnie
c2c919ba81 add oqc test service
this works around the problem with stdlib allocator not
working quite correctly in spawned threads.
2021-09-18 02:22:35 +08:00