SPE-MIB Version History
1.04.23b - 26 February 2009
Changed the writing of log records to wait for the completion of any analog conversion that might be in progress. This is how it used to work before the changes that were made with the introduction of the WIND option to the ^HASI command. The old code looked at whether the ADC was turned on, however, with the new sampling control code the ADC was being turned on after the sampling delay instead of before it. This new code now also looks at whether a sampling delay is in progress.
It was noticed that the presence of the RST option in the ^HLOP setting was not causing a log record to be written until on the minute following a reset. This was rectified by the addition of a call to the InstantTrigger function at startup.
The ^HTALK command was introduced to allow a server to redirect a client SPE to a second server.
The input filter time query command was only returning values for the first two inputs on an SPE-MIB. This was due to a conditional compliation error that has been corrected in this version.
1.04.23a - 19 February 2009
Changed the analog sampling to force a sample to be taken at power on.
Changed the default DAC setting to zero. During the installation of a software update the DAC is first set to the default setting before the configured setting is retrieved from the external flash memory. This caused serious problems for some sensors.
1.04.23 - 11 September 2008
Made it possible to use up to eight wireless temperature sensors by:
- Removing the assignment of error codes to temperature reading positions one and two when wired sensors are not connected.
- Making the assignment of humidity readings to temperature reading positions five and six conditional on humidity sensors being detected.
Previously only four wireless sensors could be used.
1.04.22 - 6 August 2008
Changed the analog sampling so that the wind direction input (analog input 2) can be sampled independantly of the other analog inputs. This allows the analog inputs to be configured for sampling less often and with a sampling delay and still have the wind direction sampled every second. The sampling interval command, ^HASI, now takes a second optional parameter, WIND, that enables wind sampling every second regardless of the selected sampling interval.
The digital groups have been extened to now include the four radio temperature sensor digital inputs (13-16).
Fixed a bug with the ^HWHY command and announcement option returning incorrect causes.
Note that ITU and MIB variants of this version reduce the number of buffer pages from 18 to 17.
1.04.21 - 15 May 2008
Modified bootloader to set DAC output to zero imediately after reset, before the RAM is initialized and the flash is checked. This limits the duration of the DAC power on glitch. It was discovered that at power up the DAC output went to full supply voltage until after it was configured. It wasn't possible to completely eliminate this problem but by changing the bootloader code it was possible to reduce the duration to less than a millisecond.
Reduced the cell phone power lockout time from 30 seconds down to 10 seconds. It had been set to 30 seconds to cope with some of the g18 engines that took an extended period without power before the reset circuit would operate correctly.
An interesting problem occurred with restarts after code downloads not working. This was found to be caused by the cellphone keeping the GPRS session alive despite the loss of DTR during the restart. This is a consequence of the change in the DTR behaviour setting (&D1) that was introduced with version 1.04.04. Following the restart the GPRS session was suspended so attempts to initiate a new session are rejected. A further twist is that because the session still exists the carrier detect is still active so the SPE keeps the cellphone on to allow pass through operation of circuit switched data. If the DTR timeout was set long enough then after five minutes the SPE would power cycle the phone and all would come right.
To address this problem the SPE now checks carrier detect at power on and terminates any suspended GPRS session. Also the connect timeout was reduced from five minutes to three minutes.
1.04.20 - 29 January 2008
An error in the code was noticed that could result in some variables being corrupted when expired temperature readings are cleared. The variables that would be corrupted all relate to the reading of temperature. No effect of this bug has been noticed. Possibily because an effect of the bug is to suppress its own action.
1.04.19 - 8 January 2008
Fixed problem, introduced with the ^HCPD command in version 1.04.04, that caused the Cabco 'E' command to not work when not in low power mode. The RS232 transceiver was being shut down when the 'E' command was being sent.
1.04.18 - 19 December 2007
Ever since the logs have been stored in dataflash there have been occasional problems with units stopping logging. One mechanism that can cause this problem was discovered and this version addresses it.
1.04.17 - 15 October 2007
Added the Cabco 'E' command to the MIB variant. Previously this was only supported by the SPE variant.
Fixed a parser bug with the ^HDTO command that prevented setting the extension time to zero.
1.04.16 - 11 September 2007
Made changes to speed up the processing of an outgoing UDP packet. For a full packet this was found to be taking around 36ms which is enough to result in data loss when fed a 9600bps stream without flow control. The major changes were a new GetBufBytes() function that speeds up the CompleteUDPHeader() function and also the debug was reduced for the case of a full packet. The changes reduced the full packet processing time to around 24ms.
1.04.15 - 31 July 2007
New variables, HOT and COLD, have been added to support temperature based logging and calling (^HLOP and ^HSCO) for sensors other than just sensors one and two. The new ^HTHC command has been added to configure these variables.
Added ^HRFG command to read the group setting of the radio temperature sensors. The group is not directly readable but this returns the group value from the most recent temperature reading that was received.
Added tracking of the temperature sensors RF signal strength separate from the temperature reading. This makes the code easier for the min/max checking and also means that the reported signal strength of an absent sensor is now zero instead of 15.
The following changes were made to free up additional code space. These should have not noticable effect.
Moved the table of command names from commands.c to parser.c so that the strings that duplicate those in the parser's command table would be merged. Duplicate string merging only works within the same source file.
Changed the command table entries to use a Boolean to indicate whether it's a set command or an execute command. This made each entry one byte smaller but because this took the entry from an odd to an even number of bytes the effective size of each entry was reduced by two bytes.
Rewrote the CopySetting() function in globals.c to be separate CopyAllSettings() and CopyExclude() functions. This allowed the CopyExclude() function to use a series of calls to CopyFlashWord() and CopyFlashDWord() functions that had the source and destination parameter block addresses coded into them. This reduced the parameters to just an offset of the element to copy and reduced the size of the calling code.
1.04.14 - 26 July 2007
Changed reset value of temperatures from zero to -884. This is because with the radio temperature sensors an SPE can reset and write a log record before it has received reading from all of its sensors. With wired sensors the SPE took the reading when it needed them so this wasn't a problem. Using an error value avoids the generation of false frost alarms.
Changed the debug port output of the radio temperature sensor signal strength to include a decimal fraction. This is to assist with range testing.
In order to gain a little more code space two new functions were added to the globals.c file, CopyExclude() and CopyAll(). This are essentially wrapper functions for the CopySetting() function but with reduced parameters. By reducing the number of parameters, around 400 bytes was saved from the Commands.c SetParameter() function where the CopySetting() function was used repeatedly.
1.04.13 - 26 June 2007
Added support for radio temperature sensors.
Changed method of expiring temperature readings so that they are only discarded once they are between 90 and 120 seconds old. This is a futher development on the change of version 1.04.07 which sometimes recorded error readings when the interval between logs was sufficiently short. The asynchronous nature of the radio temperature reports caused this to show up more.
1.04.12 - 5 April 2007
Version 1.04.06 included a change to the InstantTrigger functions that was to help with interrupt execution time. A bug was found with this, and corrected in this present version, that was preventing the instant triggering of log writes. Instant triggering of calls was not affected.
Also made a minor change to the phone power on check to try and help with the problems we've had with the MIB modules. Due to being unable to repeat the fault this possible fix is unconfirmed.
1.04.11 - 8 March 2007
Fixed a problem with the counting of the digital inputs. The input port interrupt edge select was being toggled before the interrupt flag was being cleared. This meant that if a second edge occurred in the time between the first edge (and interrupt) and the clearing of the flag then the edge sensitivity would get out of phase with the input signal. This could lead to lost counts before they got back in sync again. This problem only shows up when signals with fast switching noise, such as you can get from some relays, are used. By clearing the interrupt flag before the edge select if the input has already changed state then the interrupt flag will be immediately set and a second interupt will be processed.
1.04.10 - 21 February 2007
Fixed a problem with the most significant bit (last sent) of debug port characters being stretched. This was happening because the SendCharDebug function was only waiting until the transmit buffer word was zero and this happened just after the start of the last data bit, once the compare was configured to send the stop bit next. The wait was changed to look at the interrupt enable flag since this is only cleared at the end of the last data bit.
Added a new announcement option, HNC (NC for New Context), that indicated if the SPE has established a new PDP context. The flag is set when a new context is started and cleared when the SPE receives a valid UDP packet. The purpose of this announcement option is to make it easier to calculate chargable data usage when there is a volume rounding applied to each session.
Changed the reporting format of the ^HWHY command and announcement option to be more consistent with other commands.
1.04.09 - 12 February 2007
Fixed problem with selection of announcement fields HRI1 through HRI4 using the ^HAFS command. The code was matching the HRI option first and then returning and error when it looked at the next character (the digit). The new code now looks in reverse order so the longer sequences are checked first.
1.04.08 - 16 January 2007
It was found that the T10 event didn't work. This was tracked down to a precedence error in the code that set it and was fixed by adding an extra set of parentheses.
In Globals.h there the LOP_TIMEEVENTS defines were missing the SCT and ICT2 events. Also the LOP_DELTAEVENTS were missing the C3 and C4 events. There are no adverse consequences of these omissions but they are now corrected.
1.04.07 - 15 January 2007
An issue was found with the DTR timeout extension (the new, second, parameter of the ^HDTO command). If the ^HDTR=0 command was used to terminate a session the DTR extension was then applied afterwards and delayed the session termination. The order of these was changed so that the DTR timeout is now extended before commands are processed.
Until now, when additional, numbered, temperature sensors are used the readings are held if the sensor can't be found. This differs from the primary temperature sensors that report errors. This code version changes this behaviour so that errors will now be reported for sensors that can't be found.
1.04.06 - 18 December 2006
Made the ^HRI command (read digital input) work again for analog inputs. This used to work before source code unification at version 1.04.00.
Improved turn on and off code for the MIB module.
Added the ^HAIF command to allow the analog input filters to be enabled or disabled. For certain low power applications the analog inputs are sampled at a very low rate. For these applications the delay caused by the analog input filtering is too long so the filtering is undesirable.
The DTR timeout command, ^HDTO, has had a second, optional, parameter added. This second parameter is used to specify a timeout value that is used after data is received. If the second parameter is used then the DTR timeout is set to this value each time a valid packet is received by the SPE. This allows extended sessions and quicker hangups on failures.
The connect timeout is now reduced to one minute once PPP negotiating starts. This timeout starts off at five minutes and is used to decide to power cycle the modem should a session not be established in a reasonable time. By making this shorter once we get to the negotiation phase there is less delay if power cycling is needed. This was changed to go with the change in the DTR timeout to facilitate a shorter DTR timeout period than the default of ten minutes.
It was found that if an SPE command was entered directly after termination of a call then it would always fail. This version adds resetting of the LastChar variable in the PPP.c file so that the start of a command is correctly identified.
It was noted that during a code download some characters were being lost. This problem was previously addressed in ITU version 1.03.01 but showed up again. This was, once again, caused by the RTC interrupt handler taking too long. This time it was addressed by use of an improved modulo function, some speed enhancements to the InstantTrigger function, and less frequent use of this function from within the interrupt handler.
In the Commands.c file the ShowHelp function was changed to use the command name from the CmdNames array rather than having the command name embedded in the help string. This saved constant space by reducing the string sizes and allowing duplicate strings to be merged. When they had the command names in the help strings there could be no duplicate strings. Also changed the string output functions to insert a carriage return before any newline characters. This saves storing all the carriage return characters. A newline character can still be sent without a carriage return by using the character output functions.
1.04.05 - 17 November 2006
Added Hayes type, "+++", escape sequence support.
Added filtering of analog inputs. The latest six reading for each analog input are held in memory and a filtered value calculated by discarding the highest and lowest reading and averaging the remaining four.
Fixed a bug that was causing the phone to be power cycled unnecessarily. An extra timeout had been added, to improving performance with the g24, but this was not being initialized correctly every time.
1.04.04 - 13 September 2006
Initial SPE-MIB version. Prototype SPE-MIB boards used standard SPE code with a few minor changes but the initial production versions incorporate a number of new features making the SPE-MIB a kind a hybrid between the standard SPE and an ITU. For this reason a new code variant was created for it.
Fixed bug that was causing the analog reference to be left on if the analog sampling interval was set to greater than 25 seconds. Bug was introduced at version 1.04.00.
Made sending of the second two pings to the second IP address (as well as the first) dependant on the address having been set.
Added ^HCPD command to allow setting of a delay before the cellphone module is powered down. This command can be issused by the host end software to allow a circuit switched call to be made to an SPE within a time window (up to one hour) after the call. Also changed the behaviour of the DTR absent loop to allow passing of data between the RS232 port and the cellphone. The RS232 converter is power up based an activity. SPE commands are still not processed in this DTR absent mode.
Made of output operate timers (^HOOT) operative for all code variants and not just the ITU.
Added ^HCMD command.
Added further announement options. Digital input counts three and four (HCNT4 & HCNT4), anlog inputs four and nine (HRA4 & HRA9), and the call reason (HWHY) are now available as announcement options.
Fixed bug with ^HRSV result presentation. When the first decimal digit was a zero it was showing as a space.
Fixed bug with MPS430 Port5 outputs being cleared when the 'HC595 was updated.
Added ^HPUC command to allow software selection of input pull ups. If counting is enabled and pull up is selected then pull up is always on but if counting is disabled then pull up is only turned off for 1ms before the input is sampled. Input edge, level and count logging and call variables (I1, I1L, I1H, C1 etc.) are only available when counting is enabled for the corresponding input. The digital input group terms are always active however.
Added power control for the real time clock. Power is now turned on only when being accessed. This is because the DS1302Z has very low current draw (around 500nA) from the battery but when powered from the main supply this jumps to around 80ľA. When the main supply is also a promary battery this is can be a major fraction of the total power draw.
Added turning off of the external reference when it's not needed for the ADC or DAC. A DAC output of zero will result in the reference being turned off.
Removed ^HCAL command from SPE-MIB version since only one Dallas port is available.
|