John-Mark Gurney
b3ec53c4cb
drop debug print
2 years ago
John-Mark Gurney
2a35f5648e
use funopen/stdio to buffer output, "fix" for FreeBSD...
convert to using stdio to line buffer usb output... This reduces
usb traffic like when doing hexdump...
The delay works, but could be a problem on slower systems... It's
been reported, so hopefully a fix will happen..
3 years ago
John-Mark Gurney
95c19fa600
use python3, note how to run w/ FreeBSD, and code quality...
python2 is incompatible w/ python3 code, and assuming that python
is 3 is bad, so use python3 which ensures that the correct version
will be run...
3 years ago
John-Mark Gurney
aed17ebf69
use python3 to run python 3 programs... Using python is a mistake
and should only be used w/ Python 2 scripts.
3 years ago
John-Mark Gurney
5baba3ad59
add memory debug buffer.. Fix FreeBSD by adding a delay..
3 years ago
John-Mark Gurney
e77c0edcdc
if pkt too large, ignore, restart rx on err/timeout, loop processing schedule..
The first one is just more defensive programming, not sure if I'd seen
this failure..
The middle one did fix some hangs...
Last one is to ensure that the schedule processes more quickly and
not enforce each command to take one ms...
3 years ago
John-Mark Gurney
9bbf03c6db
use sbrk(0) instead of end to get the uninitalized memory...
This is better, as if anyone allocated memory before, we will not use
that memory, and still use uninitalized memory..
3 years ago
John-Mark Gurney
5642c46c66
make sure a short packet doesn't cause an assert failure...
3 years ago
John-Mark Gurney
4a4ef7b580
make sure OBJDIR doesn't match CURDIR..
3 years ago
John-Mark Gurney
de3acae8ab
the files need to be marked PHONEY so they are ALWAYS rebuilt..
3 years ago
John-Mark Gurney
91a6fb590b
convert link to https..
3 years ago
John-Mark Gurney
831fe68862
various spelling fixes..
3 years ago
John-Mark Gurney
fe44e796bf
language fixes, improvments, and document commands..
Better describe how to hook things up..
Also, document all the commands, and the difference between the
immediate commands and the queue commands..
3 years ago
John-Mark Gurney
dfac9f97b0
the deps make duplicate files, uniqify them so entr can handle the list...
3 years ago
John-Mark Gurney
e8b1fc65d3
make sure the irrigation key file is ignored...
3 years ago
John-Mark Gurney
9fc72aa4f5
add some usage to README, also doc and improve shared key use/gen...
3 years ago
John-Mark Gurney
a8a6c4f66a
use ```, as gitea's markdown doesn't render them well...
Provide a comment on how to address it..
3 years ago
John-Mark Gurney
6d50c7f976
add an architecture section and a couple diagrams...
Mark this as a Markdeep document.. If you hard link or copy README.md
this to an html file, it will reader it as a nice html document..
3 years ago
John-Mark Gurney
38510f74da
add some diagrams, and the infrastructure to make them...
These will be integrated into the code shortly..
3 years ago
John-Mark Gurney
519ad4711a
expand on how to use this project...
3 years ago
John-Mark Gurney
83892f4506
link to bmake which should be buildable on other platforms..
3 years ago
John-Mark Gurney
a9aa658b55
reenable seeding prng w/ rssi.. up preamble from 4 to 8 for reliability...
Before this, I was VERY frequently having to retry.. changing just
the gw improved things significantly, but changing it on both results
is no observable retries.. This is also the default that the example
apps in loramac uses..
3 years ago
John-Mark Gurney
a5e5676405
support cmds from file, add advance and clear commands, change init
Don't start up w/ the first four channels on... We only want that
for the LED to let us know it's running...
3 years ago
John-Mark Gurney
e1e58ef029
add invert for channels, implement scheduling...
3 years ago
John-Mark Gurney
62ddf5d243
start implementing the core part of the irrigation controller...
This gets basic comms working and setunset working as well... It
makes the LED blink!
3 years ago
John-Mark Gurney
bf5934f693
add setunset command to set the state of a channel.. useful for testing..
3 years ago
John-Mark Gurney
d55589790a
this error should be asyncio.TimeoutError, make retries faster...
Turns out that the base TimeoutError is different than the asyncio
version, and so we weren't actually retrying packets, just terminating
early...
3 years ago
John-Mark Gurney
0875be381d
make sure we filp back to rx after we're done tx'ing...
eliminate the strobe code as it isn't used, this just pushes
packets back and forth..
3 years ago
John-Mark Gurney
f2325ec176
make sure we don't buffer the serial port, we need the packets to
be transmitted now.
3 years ago
John-Mark Gurney
8bb1db837c
fix up the dep generation to include the new files..
3 years ago
John-Mark Gurney
4f71fa354b
add infrastructure to support the gateway and irrigation firmwares..
This can now easily be expanded to support other projects as well..
3 years ago
John-Mark Gurney
0c2feac137
change the default to be func..
3 years ago
John-Mark Gurney
eef68ad27b
add a CLI, for both initiator and respondent...
both take a shared key as an argument...
the respondent arg (-r) takes an argument specifying the function to
call w/ the messages... The form is: module_path[:name.of.func]. If
the name is not specified, func will be used.
3 years ago
John-Mark Gurney
ea28de7420
forgot to add the copyright for this file..
3 years ago
John-Mark Gurney
08e6f93992
break out some util functions, implement multicast adapter for LORANode...
3 years ago
John-Mark Gurney
56897ac5b9
add a server/gateway between multicast and the lora TX/RX...
3 years ago
John-Mark Gurney
f2ccc802fd
make sure that thing get closed down properly..
3 years ago
John-Mark Gurney
3a6deb531e
support importing this w/o the lib...
this is more of a problem w/ the utility function being in lora
which loraserv imports... if/when that happens this could be reverted..
3 years ago
John-Mark Gurney
6c383ce883
add a module for doing multicast work..
3 years ago
John-Mark Gurney
4d89f8a0e2
explain a bit why Lorawan wasn't used, and clarify compiler issue..
3 years ago
John-Mark Gurney
827cb9a62c
fix up coverage omit to drop venv installed packages...
3 years ago
John-Mark Gurney
0771f6c87b
add notes about unix dgrams..
3 years ago
John-Mark Gurney
de313e6ea6
use a lambda, shorter and "fools" coverage..
3 years ago
John-Mark Gurney
1b41dc63fb
simplify the test code by using the new comms_process_wrap function...
3 years ago
John-Mark Gurney
7c5828e700
spell this a bit better, use the function I created for this..
3 years ago
John-Mark Gurney
7b4f7cf38c
make sure that comms.c enforces handshake messages..
This just makes sure things are a little tighter wrt protocol
compliance, ensuring that a corrupted initiator doesn't do bad
things..
3 years ago
John-Mark Gurney
4024d1d5e4
add support for starting a new session...
This also adds a check to make sure that the allocated structure matches
the C code so that things won't break.
This breaks out the session state into it's own object... allowing a
common function to handle the state machine...
This also adds a new powerful testing tool. It's a Synchronization
primitive that will ensure blocks of code run in the expected order,
and only run when the previous block has fully run... This helps
ensure ordering between many tasks, to cause race conditions that
would otherwise be hard to cause..
3 years ago
John-Mark Gurney
ba052dd160
missed setting up routing for the analog pin..
3 years ago
John-Mark Gurney
550f7392fe
make sure that the initiator code can deal w/ bogus replies and they
are ignored, and it triggers a resent of the previous packet...
3 years ago
John-Mark Gurney
d6c8ef06ab
add pin description, and use the analog pin to provide randomness..
3 years ago