Implement network registration detection (untested)
Working network detection, implemented using AT+CREG? and pattern matching on the GSM module.  This was more straightforward and reliable than an arbitrary timeout on the controller.  The disadvantage is that the GSM module locks the bus while it is handling an 'open stream' RPC and waiting for network (in practice I have seen this take up to 9 seconds, the maximum timeout in the matching code is about 30 seconds).  RPC callbacks would circumvent this.
Add some more error case checking.  Don't allow multiple streams to be started (TODO: turn off the module if a stream is opened but never closed).  Remotely log errors if a message fails to send.
Merge branch 'bug-reporting-hang' into feature-gsm-network-detection
Wait longer for network detection and message reception, actually exit with an error if we fail to register, wait longer after starting the SMS stream (for some reason Vodacom SIMs were taking longer than 50ms to send the > prompt)
Update critical section to not include chip warmup wait time

This avoids the ~30 ms delays when waiting for the flash chip
to stabilize for writing.  The read stabilization calls are
still inclued in the critical section since they are at most 1ms.
Add interrupt protection to flash memory routines

Flash routines should not be interrupted during the time
that they are writing to the flash RAM.  This could cause
timing issues if a command is only partially sent and then
interrupted.
Update critical section to not include chip warmup wait time

This avoids the ~30 ms delays when waiting for the flash chip
to stabilize for writing.  The read stabilization calls are
still inclued in the critical section since they are at most 1ms.
Fix code path that would disable interrupts for 16000 cycles

No indication that this was actively causing a bug but it could cause
issues.
Fix issue with readding scheduled tasks to the task_loop

If a scheduled task has not run since the last time it was
added to the taskloop, do not re-add it again.  Instead,
log an error.  This should prevent the taskloop filling up with
the same task over and over again in case the taskloop locks waiting
on an RPC call and the scheduler keeps happily adding the same
periodically scheduled tasks in over and over again until the
task loop fills and dies.
Make the taskloop reset the PIC when it runs out of space for tasks.

This is really the only sensible option.  Nothing is guaranteed to
work withour being able to runs tasks.  This should also make the
PIC more robust against issues of the taskloop filling up.
Merge pull request #99 from timburke/pr-fix-memory

PIC24 Robustness Updates
Merge pull request #93 from amcgee/feature-gsm-network-detection

Gsm network detection
Merge branch 'dev' into pr-executive-upgrade