Commit graph

110 commits

Author SHA1 Message Date
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
e6643e725d implement UDP rx 2021-10-18 04:02:55 +08:00
bunnie
3cf1cbaeb6 add visible warnings around COM timeouts 2021-10-17 21:43:39 +08:00
bunnie
f1296d0dfd convert route table to use heap not static memory, since we have heap 2021-10-15 15:44:16 +08:00
bunnie
ef70daf7bb fix hosted mode build config 2021-10-13 02:07:55 +08:00
bunnie
ec34b01bd9 pings working with smoltcp (can originate and respond) 2021-10-13 01:57:00 +08:00
bunnie
b93109cad2 cleaning up net event loop, still figuring out APIs and integration
currently there is some issue with ARPs not sure where it's breaking,
suspect issue on EC side...
2021-10-11 05:21:01 +08:00
bunnie
26069c023a intermediate commit trying to trace down how this receive process works. 2021-10-10 21:12:09 +08:00
bunnie
74a3c6df44 disastrous first draft of figuring out how to integrate smoltcp using a ping example. 2021-10-10 01:57:31 +08:00
bunnie
560c6e4197 something packet-oid is coming out of the serial port now? 2021-10-09 02:12:12 +08:00
bunnie
b43eb56346 add some skeleton for a net crate; testing COM interrupts 2021-10-08 20:01:13 +08:00
bunnie
dfc6444d78 add killkey test to the self test suite 2021-09-14 20:15:03 +08:00
bunnie
3f1ba5e279 add com trng seed, uptime on EC; EC reset test commands 2021-09-13 23:28:54 +08:00
bunnie
1a55973346 adjustments to self test routines 2021-09-06 14:39:44 +08:00
bunnie
858a1ed019 beginnings of a factory self-test routine; expand COM functionality 2021-09-05 23:26:07 +08:00
Sam Blenny
af25697a6f Merge remote-tracking branch 'upstream/main' into com-wlan 2021-08-13 23:01:12 +00:00
Sam Blenny
53a0bf2827 Use com_rs::serdes::StringDes for wlan status
Switch to using the new com_rs::serdes::StringDes struct for
deserializing the COM protocol response to WLAN_STATUS.

With this change, `wlan status` will receive a string of up to 64
bytes and print it to the shellchat log. Status string formatting
is handled by the betrusted-ec EC firmware code.

Signed-off-by: samblenny
2021-08-06 08:30:16 +00:00
bunnie
8b83fb7c65 remove heapless, go to libstd for all collections!!!!
*fistpump*
2021-08-04 01:25:32 +08:00
bunnie
34d44ee9e7 start to remove heapless and commit to libstd flow 2021-08-04 00:07:47 +08:00
Sam Blenny
ba4ca72703 Use com_rs::serdes::StringSer for wlan ssid & pass
Switch to using the new com_rs::serdes::StringSer struct for
serializing the COM protocol arguments to WLAN_SET_SSID and
WLAN_SET_PASS. The point is to reduce the amount of ad hoc,
untested packing and unpacking.

Signed-off-by: samblenny
2021-08-03 14:04:20 +00:00
Sean Cross
b86e0a65cd services: recognize xous as a hardware OS
Support `xous` as a valid OS. This allows us to build the entire kernel
under this target.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-08-02 18:11:48 +08:00
Sam Blenny
a614ccffb7 Fix wlan_leave() to send correct verb
wlan_leave() was mistakenly sending the verb for WLAN_JOIN.

Signed-off-by: samblenny
2021-07-24 02:51:32 +00:00
Sam Blenny
5c93365acd implement COM bus txrx for wlan commands
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
803f6d496f fix passphrase length limit to match WF200 API
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
Sam Blenny
03ad8bd2e4 add support for wlan commands to com server
Signed-off-by: samblenny
2021-07-21 09:06:12 +00:00
bunnie
69a22adee9 menus basically working 2021-06-19 00:25:18 +08:00
bunnie
eee9f4e765 refactor xous-names to permit only a fixed number of connections
this prevents less trusted processes from connecting to servers
after the kernel initializations are done.

this works so long as we don't have disconnects from the kernel
servers. In order to support disconnects we will also need a
way to re-enumerate the SID to guarantee that we don't have a re-use
problem. But for now, the kernel is not designed with any practical
disconnect mechanism; there is no code that calls the Quit mechanism
on any server.
2021-06-15 17:41:14 +08:00
bunnie
fadc9c29ab Merge remote-tracking branch 'origin/master' into bunnie-dev 2021-06-02 03:59:25 +08:00
bunnie
25a77ddb19 EC updating seems to work. 2021-05-25 05:13:20 +08:00
bunnie
7529628053 partial progress on EC updater 2021-05-24 04:34:50 +08:00
bunnie
30aa794f30 add reference counting on connections between servers
the connection number is re-used for all objects created
within a process space, so you can't `Drop` the connection
immediately when an object goes out of scope. You have to
make sure all instance of the object go out of scope. This
patch adds reference counting to all the objects so that
the `Drop` function works as intended.
2021-05-21 16:24:30 +08:00
Sean Cross
eb7895d601 xous: add a return code to TerminateProcess
As part of this refactor, make `terminate_process()` a divergent call.

Signed-off-by: Sean Cross <sean@xobs.io>
2021-05-20 11:01:00 +08:00
bunnie
7d9e84c456 initial frameworks around sha512 acceleration integration 2021-05-19 00:39:03 +08:00
bunnie
3f12b0a69b add a gyro test command to shellchat 2021-05-16 16:52:27 +08:00
bunnie
5d4e716e1b add status thread mechanism to check charger state 2021-05-16 16:30:58 +08:00
bunnie
87b6d9b6d7 add backlight commands 2021-05-16 04:29:12 +08:00
bunnie
08a86749fe fix hosted mode bugs 2021-05-09 01:13:16 +08:00
bunnie
391122823d refactor heapless version in attempt to debug issue that cropped up in xous-names
somehow, updating the toolchain has broken the FnvIndexMap implementation
2021-05-08 18:44:23 +08:00
bunnie
2d3a643d20 retrofit COM for suspend/resume 2021-04-29 23:53:35 +08:00
bunnie
061284ec5f debugging BOOST mode glitch issue
Here's an arcane bug for you:

When powering down, the Spartan 7 3.3V I/O drivers will
output a roughly 800us wide glitch as 3.3V falls below around
1.7V, if the 0.95V core voltage comes down first (which it does
because we have an active discharge on 0.95V, but not on 3.3V).

In this case, it's just wide and high enough to cause the
BOOST mode line to engage, which takes the BOOST output
and ties it to VBUS, which is just enough for the system to
think you're powering it back on again. Which is not what
you want when powering down.

The ultimate fix was to put a heftier pull-down on the BOOST
line so that it can't trip the BOOST output into the VBUS.
Another option could be more active discharge FETs, but that
would require a full board spin and we are already at certification,
so we'll stick with the stronger pull-down on BOOST. It seems to
be a robust fix in the worst corner cases we can find.

The downside is that when powering an external USB device,
you are burning an extra 30mW of power overcoming the pull-down,
but typically, any external USB devices plugged into Precursor
will burn far in excess of that, so the delta should be negligible.
2021-04-23 15:33:14 +08:00
bunnie
f97b61a788 add the killbounce command 2021-04-23 01:49:03 +08:00
bunnie
ca63091f98 add ship mode command 2021-04-22 18:07:27 +08:00
bunnie
53f3ca20f0 add SSID scanning 2021-04-16 23:58:30 +08:00
bunnie
b2c0608b0b initial cut at SSID scanning 2021-04-16 23:07:31 +08:00
bunnie
22d676cc59 add reporting of sleep current 2021-04-16 19:58:05 +08:00
bunnie
93400df67c an initial cut at fcc test commands 2021-04-15 04:10:47 +08:00
bunnie
9f4dc8a7b1 add wifi reset opcodes 2021-04-14 22:43:23 +08:00
bunnie
84853c696a drop message should be non-blocking 2021-04-09 18:53:41 +08:00
bunnie
2916eb3775 relocate the destroy callback call to after the server exits 2021-04-09 18:51:43 +08:00
bunnie
35353f38dd bring benchmarks to v0.8 and record benchmark results 2021-04-07 00:45:11 +08:00