Great! My new code has been running in a loop nearly 24 hours and seems to be still working, so I think all is well. :3

Sent from my iPhone

> On Mar 16, 2014, at 5:06 PM, Zachary Crockett <notifications@github.com> wrote:
> 
> In src/spark_wiring_network.cpp:
> 
> > @@ -55,4 +55,29 @@ char* NetworkClass::SSID()
> >  	return (char *)ip_config.uaSSID;
> >  }
> >  
> > +/* Network.RSSI() - @TimothyBrown - 20140315 */
> > +/* This function returns the WiFi signal strength in -dB. (Returns a negative number on success or zero on error as a single byte signed integer.) */
> > +/* It reads through all entires in the table, continuing even after finding the correct SSID. This prevents stale entries on the next call. */
> > +/* Note: The RSSI is only refreshed every few minutes, so this function doesn't need to be called constantly in the main loop. */
> > +int8_t NetworkClass::RSSI()
> > +{
> > +    uint8_t _loopCount = 0; /* Meet Vari the Varible! */
> > +    int8_t _returnValue = 0; /* Set to 0 to indicate failure if RSSI isn't detected by end of loop. */
> > +    while (_loopCount++ < 16) /* The wlan_ioctl_get_scan_results table can only hold 16 entires so we don't need to loop any more. */
> > +    {
> > +        unsigned char wlan_scan_results_table[50]; /* Stores current entry from results table. */
> > +        char wlan_scan_results_ssid[32]; /* Holds an SSID from the current entry. */
> Thanks for double checking, but the Core should handle this just fine. Stack allocation is entirely the job of the GCC ARM compiler, and it does a bang-up job. If you use malloc, you have to pair each call with a matching free very carefully. Our implementation of _sbrk in the newlib_stubs does not handle heap fragmentation, which is the one memory allocation gotcha.
> 
> —
> Reply to this email directly or view it on GitHub.