?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{BLAME START}

library

?curdirlinks? -

Blame information for rev 32

Line No. Rev Author Line
1 32 kaklik ********
2 Microchip TCP/IP Stack Version Log:
3 ********
4  
5 Note: Please file bug-reports/bug-fixes at http://support.microchip.com/ or post
6 to the Microchip TCP/IP -> Ethernet Forum at http://forum.microchip.com/
7 Look for stack updates at http://www.microchip.com/tcpip/
8  
9 ********
10 v5.25 07 May 2010
11 ********
12 Changes:
13 1. Added support for the Microchip MRF24WB0 802.11 WiFi controller (module
14 part number MRF24WB0MA). This product is intended as a backwards
15 compatible, drop in replacement to the ZG2100. The MRF24WB0MA should work
16 with previous TCP/IP Stack versions as if it were a ZG2100M, but when the
17 MRF24WB0MA is used with this (5.25) and future TCP/IP Stack versions,
18 feature improvements inside the MRF24WB0 allow the TCP/IP Stack code/RAM
19 size to be smaller and run faster.
20 2. Dropped support for the ZeroG ZG2100 802.11 WiFi controller. Applications
21 that must stay with this device should continue to use TCP/IP Stack
22 version 5.20b or earlier. All new projects or preexisting projects
23 undergoing updates should be developed with the MRF24WB0 instead. Contact
24 Microchip if you have a ZeroG ZG2100 802.11 WiFi PICtail Plus daughter card
25 and are interested in the MRF24WB0MA 802.11 WiFi PICtail Plus daughter
26 card.
27 3. The WiFi connection management state machines now run on the MRF24WB0
28 instead of the PIC host, freeing up code and data space. Connection profiles
29 can be created and the connection algorithm fine-tuned by the PIC
30 application. In the WiFi demos see the WF_Connect function in MainDemo.c for
31 an example of how to configure and then establish a WiFi connection. The
32 programming model has changed to an API model which is documented in
33 'TCPIP Stack Help.chm'.
34 4. Changed "VERSION" macro definition in TCPIP.h to "TCPIP_STACK_VERSION".
35 "VERSION" is overly generic and will likely conflict with other identical
36 tokens one may use in their application code or source libraries.
37 5. Added support for the PIC24FJ256GA110, PIC24FJ256GB110 and PIC24FJ256GB210
38 PIMs for the Explorer 16. Note that when using the PIC24FJ256GA110
39 general purpose PIM, the Ethernet PICtail Plus, Fast 100Mbps Ethernet
40 PICtail Plus, MRF24WB0MA Wi-Fi PICtail Plus, or other SPI PICtail daughter
41 board should be installed in the middle SPI2 slot of the Explorer 16, not
42 the ordinary topmost SPI1 slot used by other PIMs, including the
43 PIC24FJ256GB110 and PIC24FJ256GB210 ones. The software is set up to use
44 SPI2 for the PIC24FJ256GA110 PIM to avoid incompatibilities with silicon
45 revision A3, which does not allow the SCK1 pin to be configured as a PPS
46 output.
47 6. Added support for the PIC24FJ256DA210 Development Board.
48 7. Added TFTPUploadRAMFileToHost(), TFTPUploadFragmentedRAMFileToHost() and
49 TFTPGetUploadStatus() APIs to the TFTPc.c file. These APIs provide a very
50 simple means of uploading a whole file to a remote TFTP server without
51 requiring a great deal of application state machine logic. These APIs
52 require the DNS client module to be enabled (STACK_USE_DNS must be defined,
53 in addition to STACK_USE_TFTP_CLIENT).
54 8. Added a dummy DNS Server module. This server always sends the local IP
55 address in response to all queries received. When using the PIC DHCP
56 server, its purpose is to allow a user to type anything into a web browser
57 (ex: http://asdf/) and still receive the web page provided by the PIC, much
58 as a hotel or airport WiFi router will serve to you before you've paid or
59 agreed to the network's terms of service. This DNS server module is
60 implemented in DNSs.c, requires one UDP socket, and is enabled via the
61 STACK_USE_DNS_SERVER option in TCPIPConfig.h.
62 9. Changed SPIFlash.h file defaults to target an SST SPI Flash with 4096 byte
63 sectors instead of a Spansion Flash with 65536 byte sectors. These new
64 defaults are, among other reasons, in support of the PIC24FJ256DA210
65 Development Board, which has an SST SST25VF016B on it.
66 10. Made TCP Keep-Alive packets consistently get sent TCP_KEEP_ALIVE_TIMEOUT
67 (default 10 seconds) after the last socket TX or RX activity. In earlier
68 stack versions, if the local node transmitted some data and then let the
69 socket go idle, the first Keep-Alive packet sent would use the
70 TCP_START_TIMEOUT_VAL (default 1 second) timer value before getting sent.
71 While benign in terms of application behavior, these faster than normal
72 keep-alive transmissions were distracting when viewed in Wireshark or other
73 packet capture tools.
74 11. Disabled STACK_USE_DYNAMICDNS_CLIENT option in TCPIPConfig.h by default for
75 the TCPIP Demo App and TCPIP ENCX24J600 Demo App projects. This option was
76 enabled by default in earlier stack releases. This was done to save code
77 size and allow out-of-box compilation on devices with 128KB of Flash when
78 not using compiler optimizations. The TCPIP PIC32 ETH Demo App project
79 continutes to have this option enabled by default.
80 12. Added SNMP v2 TRAP PDU format. Macro SNMP_STACK_USE_V2_TRAP is used to
81 enable the SNMP v2 trap format. New API function SNMPV2TrapDemo() is
82 included to support more than one variable binding to the SNMPv2 TRAP. This
83 API can be used for a single SNMPv2 TRAP variable varbind and is part of
84 CustomSNMPApp.c. A multiple variable binding demo can be enabled
85 MainDemo.c. One should not enable both SNMPTrapDemo and SNMPV2TrapDemo
86 simultaneously. Global flag "gSetTrapSendFlag" is used to indicate the
87 start and end of SNMPv2 trap varbinds. If gSetTrapSendFlag is FALSE, then
88 very next variable varbind for the SNMPv2 TRAP, is the last or only one
89 variable varbind. If gSetTrapSendFlag is TRUE, then there is another
90 variable varbind available to be part of the SNMPv2 TRAP PDU.
91 13. Added support for PIC32MX6XX/7XX external PHY's: SMSC 8700LAN and National
92 DP83640.
93 14. Added schematics and BOM for the PIC32 Ethernet Starter Kit.
94 15. Added the Google PowerMeter demo project. Consult the "Reference
95 Implementation for Google PowerMeter.chm" help file for more information.
96 16. Modified the SSL and TCP modules to create the TCPStartSSLClientEx function.
97 This function will enable the SSL module to store supplementary data
98 (currently only SSL Certificate Public Keys) in a structure.
99 17. Moved the HTTP_PORT, HTTPS_PORT, HTTP_MAX_DATA_LEN, and HTTP_MIN_CALLBACK_FREE
100 macros from HTTP2.c to TCPIPConfig.h.
101  
102  
103 Fixes:
104 1. The SPIFlashEraseSector() function in the SPIFlash.c file incorrectly erased
105 the sector specified by the current write pointer (set by calling
106 SPIFlashBeginWrite()) instead of the specified dwAddr parameter address.
107 This error had no impact on any TCP/IP Stack code as these parameters always
108 matched. However, application code using the API would have been affected.
109 Thanks go to Marc Boon for reporting this issue on the Microchip Ethernet
110 forum.
111 2. Fixed ENC424J600/624J600 driver for PSP modes 2, 4, 6, and 10. The PIC's
112 PMP PMMODE<9:8> bits were not set correctly.
113 3. Removed from lingering references to TickGetDiff() in FTP.c, TFTPc.c and
114 UARTConfig.c.
115 4. Fixed DNS client module from returning the DNS server IP address if the DNS
116 query failed due to a server error (i.e. DNS did respond, but did not
117 return any records, such as when attempting to resolve a name that isn't in
118 the DNS). DNSIsResolved() will now return 0.0.0.0 on any non-recoverable
119 DNS error or timeout.
120 5. Fixed HTTP2 MPFS upload page being accessible from URLs that weren't an
121 exact match. For example, in 5.20 and earlier, accessing
122 http://mchpboard/mpfsuploadASDF would still have opened the mpfsupload page.
123 Thanks go to Andrea Rivolta on the Microchip Ethernet Forum for identifying
124 this error.
125 6. Improved UDP TX checksum code for the special case when the computed
126 checksum was 0x0000. According to the UDP RFC, for this corner case, the
127 checksum should be converted to 0xFFFF before transmission to differentiate
128 from the checksum disabled case, improving error detection by a minuscule
129 amount.
130 7. Fixed GetCLKOUT() function in ENCX24J600.c driver file. Previously, 0x00
131 would always be returned, regardless of the value in the COCON bits of
132 ECON2. The function documentation for SetCLKOUT() and GetCLKOUT() was also
133 corrected (had obsolete information ported over from ENC28J60 driver file).
134 8. Fixed DHCP client rebinding bug in which the DHCP client would request the
135 wrong IP address if an unrelated DHCP OFFER or ACK message were received
136 after we transmitted a DHCP REQUEST but before we received our DHCP ACK.
137 Under rare conditions, this would have resulted in the TCP/IP stack
138 reverting to the static or AutoIP assigned address for a few seconds
139 between DHCP lease renewals.
140 9. Fixed TFTP Internet Bootloader bug in which uncommon .hex files containing
141 a certain data pattern could not be uploaded correctly to the PIC18F97J60
142 family device. For these problem .hex files, a block of 32 program words
143 (64 bytes) would remain unprogrammed (left as 0xFFFF) due to a parsing error
144 in the bootloader's DecodeHex() function. The TFTP upload operation would
145 succeed without reporting a programming error. The problem can be detected
146 by using an ICD3 or similar ICSP programmer and reading the program Flash
147 out of a device that is programmed with the bootloader and application .hex
148 files. Compare the resulting memory dump to a device programmed only with
149 the application .hex file. If you have devices deployed in the field with
150 the previous bootloader and happen to generate a problem application .hex
151 file, you can potentially work around the bootloader bug by opening the
152 application .hex file with Notepad and appending dummy address records to
153 the beginning to move the data around in the file. For example, at the very
154 top of the .hex file, add lines containing ":020000040000FA" until the
155 bootload process works correctly. You may alternatively try adding spaces
156 at the end of any line, although this may make the .hex file incompatible
157 with some programming utilities. Thanks go to Jonathan Seidmann for
158 identifying and reporting this bug.
159 10. Fixed SNMPv2 TRAP format issue where SNMP browser was displaying all the
160 SNMPv2 traps as SNMP version 1. SNMP v2 TRAP pdu format is rectified.
161 Macro SNMP_STACK_USE_V2_TRAP is used to form and send a SNMPv2 TRAP PDU.
162 SNMPTrapDemo API is used for both SNMPv1 and SNMPv2 single variable
163 varbind trap.
164 11. Fixed an HTTP2.c server module initialization bug when using the
165 PIC32MX7XX/6XX series internal Ethernet module. During initialization the
166 HTTPLoadConn() function would overwrite over 100 bytes of PIC RAM past the
167 end of the reserved memory allocated for the HTTP2 module. This problem
168 would manifest itself by locking up the TCPIP PIC32 ETH Demo App-C32 demo
169 shortly after power up if you compiled TCP/IP Stack version 5.20 with the
170 MPLAB C Compiler for PIC32 MCUs (C32) version 1.11.
171 12. Fixed SSL client from incorrectly parsing for the server's public key in
172 rare cases where the RSA Public Key Algorithm identifier was received, but
173 the key hadn't been received by TCP yet. Thanks go to Kevin Maimdnet for
174 identifing this error in SSL.c and reporting it via
175 http://support.microchip.com/.
176 13. Fixed Tick.c TickGet(), TickGetDiv256() and TickGetDiv64K() APIs sometimes
177 returning the wrong value on PIC32 platforms. On the PIC32MX3XX/4XX family
178 devices a wrong return result would sometimes occur if using -O3 compiler
179 optimizations (maximum speed) with the Microchip MPLAB C Compiler for PIC32
180 MCUs (C32). On the PIC32MX5XX/6XX/7XX family devices, such as the
181 PIC32MX795F512L device used on the PIC32 Ethernet Starter Kit, wrong values
182 could be returned, regardless of the compiler optimization level.
183  
184  
185 Known Problems:
186 1. Telnet server module does not implement a lot of Telnet functions. As a
187 result, it will likely not display correctly or work at all with some Telnet
188 clients. The server was tested with the Microsoft telnet.exe utility which
189 is provided with Microsoft Windows.
190 2. If the DHCP client and DHCP server are used at the same time and you connect
191 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
192 a crossover cable), a race condition can occur where both nodes will disable
193 their DHCP server and neither board will get a successful DHCP lease. If
194 this unlikely scenario occurs, as a work around, simply reset one of the
195 boards to reenable it's DHCP server.
196 3. HI-TECH PICC-18 compilers are not supported in this release. The supplied
197 HI-TECH PICC-18 MPLAB projects usually will not compile and/or link.
198 4. LCDBlocking.c timing for the LCD_E_IO enable signal is too fast to meet
199 published data sheet limits for various LCD controllers when compiling for
200 a PIC32 running at > 43MHz. Despite this potential timing violation, the
201 LCD does normally work correctly on the precompiled PIC32 demos for the
202 Explorer 16 at 80MHz.
203  
204  
205  
206 ********
207 v5.20 18 November 2009
208 ********
209 Changes:
210 1. Added PIC32MX7XX/6XX Family integrated Ethernet controller support. The
211 "TCPIP PIC32 ETH Demo App" folder was added to compile for the PIC32
212 Ethernet Starter Kit. Ethernet driver files "ETHPIC32ExtPhy.c" and
213 "ETHPIC32IntMac.c" were added, in addition to the "ETHPIC32ExtPhyDP83848.c"
214 file, which is a specific driver file for the National DP83848 10/100 PHY.
215 2. Added RFC 3927 Auto IP module. This module will automatically assign a
216 local IP address to the node in the 169.254.xxx.xxx private address range
217 (subnet mask 255.255.0.0) if a DHCP server is not present on the network or
218 the DHCP client is disable. The exact IP address chosen will be
219 pseudo-random, but as required by the protocol, it will perform gratuatous
220 ARPs to avoid clobbering anyone else's IP address. Also, unless there is an
221 address collision with a preexisting node on the network, the IP address
222 generated by the Auto IP module will not change between power cycle events
223 (random number generator is seeded by local MAC address). To enable this
224 module, STACK_USE_AUTO_IP must be defined in TCPIPConfig.h. When compiled
225 in, the module defaults to enabled, but will automatically yield to the
226 DHCP client module, which has higher priority.
227 3. Added "TCPIP MDD Demo App" beta application projects. Projects in this
228 folder store the HTTP2 web pages in external FAT16/FAT32 formatted SD card
229 or USB Mass Storage media instead of an MPFS2 formatted EEPROM or SPI Flash.
230 For more information on these projects, see the "Running the TCPIP MDD Demo
231 App (Beta Release).pdf" file in the Microchip\Help folder.
232 4. Expanded XEEReadArray() API's third length parameter from a BYTE to a WORD.
233 5. Converted all variable declarations and type casts of TICK data type to
234 DWORD. The TICK typedef is now deprecated and will be removed in a future
235 stack release. This data type conflicts with the TICK structure used in
236 certain other Microchip software libraries.
237 6. Added TCP_WINDOW_UPDATE_TIMEOUT_VAL option to the TCP.c file (default
238 200ms). This timeout controls the time after calling TCPGet() or
239 TCPGetArray() before the stack will transmit a RX window update to the
240 remote node. Historically, the TCP_AUTO_TRANSMIT_TIMEOUT_VAL value was
241 used for this purpose (default 40ms). This change decreases the net window
242 update transmission overhead. If this adversely affects your application
243 RX performance (unlikely, but possible for certain communications patterns),
244 set TCP_WINDOW_UPDATE_TIMEOUT_VAL equal to or shorter than
245 TCP_AUTO_TRANSMIT_TIMEOUT_VAL to get the same or better behavior relative
246 to previous stack versions.
247 7. Split TCP_MAX_SEG_SIZE configuration constant in TCP.c into separate
248 TCP_MAX_SEG_SIZE_TX and TCP_MAX_SEG_SIZE_RX configuration constants.
249 Previously, TCP_MAX_SEG_SIZE was used to limit both the maximum size of
250 transmit and receive packets. In cases where large TX FIFOs are allocated,
251 and the remote node advirtises a large Maximum Segment Size TCP option, this
252 change improves TCP transmit performance by roughly 10%.
253 8. Renamed "Internet Radio App", "Internet Bootloader App" and "WiFi Iperf
254 App" folders to "TCPIP Internet Radio App", "TCPIP Internet Bootloader App"
255 and "TCPIP WiFi Iperf App" respectively. These new names ensure consistent
256 folder placement when viewing the Microchip Solutions folder with other
257 Microchip Application Libraries installed.
258  
259 Fixes:
260 1. Fixed SSL functionality (ex: HTTPS server) from failing when using the
261 ENC424J600 and ENC624J600 Ethernet controllers. In stack versions 5.00 and
262 5.10, the BFSReg() and BFCReg() functions were being incorrectly used to set
263 and clear CRYPTEN (EIR<15>). ENC424J600/624J600 silicon errata #6 on
264 production silicon revision A2 prevents BFSReg() and BFCReg() from being
265 able to modify CRYPTEN. This resulted in the SSL RSA encrypt/decrypt
266 operations from ever finishing. The ENC424J600/624J600 errata #6 workaround
267 is now implemented in the ToggleCRYPTEN() function in ENCX24J600.c.
268 2. Fixed an RSA padding error in the ENCX24J600.c's version of RSASetData() and
269 RSASetE() functions. This fixes the Bad Record MAC problem when using SSL
270 client APIs with the ENC424J600 and ENC624J600, as mentioned in the 5.10
271 stack release notes' Known Problems section. Although unknown at the time
272 of release this problem also occurred in stack version 5.00.
273 3. Fixed DNS client from mishandling DNS responses that did not use name
274 compression. Thanks go to Will Stone on the Microchip Ethernet forum for
275 identifying this bug.
276 4. Fixed an ExtractURLFields() API bug which would incorrectly parse the URLs
277 containing other URLs. Ex:
278 "http://www.google.com/search?q=http://www.microchip.com/"
279 5. Fixed TickGet(), TickGetDiv256(), and TickGetDiv64K() APIs from potentially
280 returning an incorrect time value (0x10000 ticks less than it should have)
281 on rare occasions when using a PIC32 and with compiler optimizations turned
282 on. The Tick.c module was also revised so that the IEC0 register does not
283 get written to via a load-modify-store operation on PIC32s so that it is
284 now possible for other application ISR functions to write to IEC0 without
285 risking state corruption.
286 6. Fixed PIC32 Starter Kit Debugger losing access to the PIC32 target when the
287 project was run. JTAG was being disabled at run time, but the PIC32
288 Starter Kit Debugger requires JTAG to communicate with the debug
289 executive. JTAG is now conditionally disabled on PIC32s when the
290 __MPLAB_DEBUGGER_PIC32MXSK macro is undefined.
291 7. Fixed a Berkeley sockets API bug in which calling closesocket() on a
292 SOCK_STREAM type socket (TCP) did not actually close the socket if the
293 remote node did not first send a FIN to the local node. This would leak a
294 TCP socket each time the affected API calling sequence occurred and result
295 in no FIN getting transmitted to the remote node.
296 8. Fixed an HTTP2 filename parsing bug that would occur when a web browser
297 submitted a request for a file with hex encoded characters in it. For
298 example, with stack version 5.10 and Firefox 3.5.3, typing
299 "http://mchpboard/%70rotect" into the URL field would have resulted in an
300 HTTP 404 not found error when "http://mchpboard/protect/index.htm" should
301 have been returned instead. Thanks go to Steve Tuttle for reporting this
302 issue and suggesting a solution.
303 9. Fixed a Berkeley sockets API bug in which calling recvfrom() on a datagram
304 type socket (UDP) would return an incorrect remote IP address and port
305 number when the from pointer was non-NULL.
306 10. Fixed HTTP2 server bug in which the HTTPReadPostName() function was failing
307 to convert the field name from URL encoding to plain-text. If the browser
308 posted, for example, a field named "Stock Remaining", it would have been
309 incorrectly returned from HTTPReadPostName() as "Stock+Remaining".
310 11. In Stack 5.10, any new values you saved into AppConfig via the Network
311 Configuration demo web page would have been mishandled for WiFi projects.
312 HTTPPostConfig() in CustomHTTPApp.c of the TCPIP WiFi Demo App and TCPIP
313 Iperf Demo App projects were corrected so that they now write a magic 0x61
314 marker into EEPROM/SPI Flash address 0x0000 to inidicate that the AppConfig
315 structure is valid in EEPROM/SPI Flash. This prevents the InitAppConfig()
316 function in MainDemo.c from restoring the default settings when changing
317 the values through the Network Configuration page.
318 12. For WiFi projects, a Gratuitous ARP Work-around was implemented to work
319 around cases where access points send broadcast messages at data rates that
320 the ZG2100 cannot listen to. The define USE_GRATUITOUS_ARP (in
321 TCPIPConfig.h) turns this feature on or off.
322  
323 Known Problems:
324 1. Telnet server module does not implement a lot of Telnet functions. As a
325 result, it will likely not display correctly or work at all with some Telnet
326 clients. The server was tested with the Microsoft telnet.exe utility which
327 is provided with Microsoft Windows.
328 2. If the DHCP client and DHCP server are used at the same time and you connect
329 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
330 a crossover cable), a race condition can occur where both nodes will disable
331 their DHCP server and neither board will get a successful DHCP lease. If
332 this unlikely scenario occurs, as a work around, simply reset one of the
333 boards to reenable it's DHCP server.
334 3. HI-TECH PICC-18 compilers are not supported in this release. The supplied
335 HI-TECH PICC-18 MPLAB projects usually will not compile and/or link.
336 4. ENC624J600 PSP modes 2, 4, 6, and 10 do not work at this time. Some
337 Parallel Bit Bang modes may not work either. Some minor firmware changes
338 are needed.
339 5. TCPIP ENCX24J600 Demo App-C18.mcp project does not compile by default using
340 MPLAB C Compiler for PIC18 MCUs (C18) version 3.34. There is not quite
341 enough program memory available on the PIC18F97J60 for the large number of
342 selected stack features to allow linking. To get this project to compile,
343 turn on compiler optimizations or disable one of the modules in
344 TCPIPConfig.h (ex: comment out STACK_USE_DYNAMICDNS_CLIENT).
345  
346  
347  
348  
349 ********
350 v5.10 29 July 2009
351 ********
352 Changes:
353 1. Added SSL capability to the Telnet server. If STACK_USE_SSL_SERVER is
354 defined, the Telnet server will now listen on port 992 for SSL secured
355 connections. If you do not have a telnets client, you can use an SSL proxy,
356 such as stunnel (http://www.stunnel.org/) to add SSL/TLS support to any
357 telnet client.
358 2. Moved a number of string pointer tables in the HTTP.c, HTTP2.c, FTP.c, and
359 DynDNS.c files to allocate in ROM instead of RAM. This reduces around 120
360 bytes of RAM usage in the HTTP2 server when compiled for the PIC18 or
361 PIC24/dsPIC platforms. The gains are even greater on PIC32 platforms.
362 3. Added redefinition of SPIRAM*(), SPIFlash*(), and XEEPROM*() functions so
363 that when compiled and used without proper HardwareProfile.h definitions,
364 a more descript linker error will be generated instead of a mysterious
365 symbol not found error.
366 4. Added several new APIs:
367 - ExtractURLFields() in Helpers.c. This function provides an easy
368 means of parsing an URL string and extracting the protocol, hostname,
369 port, file path, etc. Currently, this function is commented out to save
370 code space as no stack modules require it. However, it should work
371 correctly if you simply uncomment it (remove the #if 0...#endif around
372 it).
373 - strnchr() in Helpers.c. Finds the first occurrence of a character within
374 a string but limited to a maximum length before giving up.
375 - TCPPeek() and TCPPeekArray() in TCP.c. Reads from a TCP socket's RX
376 FIFO buffer without removing the data from the stream.
377 - TCPClose() in TCP.c. Disconnects a socket from the remote node (if
378 connected) and closes the socket handle, including for server type
379 sockets. This function is identical to the TCPDisconnect() API except
380 for the handling of server sockets. TCPDisconnect() returns server
381 sockets to the listning state and maintains the socket handle. TCPClose()
382 closes the socket and frees all associated resources, invalidating the
383 socket handle.
384 5. Updated the DHCP client module:
385 - Modified so that it wouldn't attempt to transmit DHCP Discover packets
386 when the MAC layer reports no link (MACIsLinked() == FALSE). This avoids
387 main() while(1) loop performance degredation when you unplug the Ethernet
388 cable or lose association to your access point.
389 - Added capability of performing DHCP discovers and requests without
390 setting the BOOTP broadcast flag. Now, the DHCP client module will start
391 up and attempt to obtain an IP address with the broadcast flag set, but
392 if it fails the next DHCP retry will attempt to obtain the IP address
393 with the broadcast flag cleared. The flag will toggle back and fourth
394 between unicast mode and broadcast mode if no DHCP server responds. This
395 feature improves compatibility with certain DHCP servers and WiFi access
396 points.
397 - Added several new APIs including DHCPInit(), DHCPIsEnabled(),
398 DHCPStateChanged(), DHCPIsBound(), and DHCPIsServerDetected().
399 - Removed the DHCPFlags DHCP_CLIENT_FLAGS global variable. Use the above
400 named APIs now to get equivalent functionality.
401 - Removed the DHCPBindCount global variable. To detect if the DHCP state
402 has changed, poll the new DHCPStateChanged() function.
403 - Removed the DHCPReset() API. To perform this operation, now call the
404 DHCPInit() API. Use 0x00 for the vInterface parameter.
405 6. Removed deprecated TickGetDiff() macro. To get a tick difference, just
406 subtract the two values in-line. This macro was removed because it promoted
407 confusing code. Ex: a-b is different from b-a. However, it was not
408 contextually obvious which of the two was returned when TickGetDiff(a, b)
409 was called.
410 7. Added PIC32MX460F512L USB and dsPIC33FJ256GP710 PIM support to the Explorer
411 16 hardware profile for the TCPIP WiFi Demo App and WiFi IPerf App projects.
412 8. Added all files needed for SSL (assuming the crypto libraries are present)
413 to the TCPIP WiFi Demo App-C30 and TCPIP WiFi Demo App-C32 projects.
414 9. Converted TCPIP Demo App, TCPIP WebVend App, Internet Radio App, and
415 Internet Bootloader App MPLAB Build Directory Policy to compile in the
416 project folder instead of the source folder. This reduces the depedancies
417 on the MPLAB project include path and allows new projects to be created by
418 copying one of the pre-existing folders (ex: copy "TCPIP Demo App" to
419 "My App") without having problems including the wrong HardwareProfile.h and
420 TCPIPConfig.h files.
421 10. Changed EEPROM/SPI Flash AppConfig record valid flag from 0x60 to 0x61 in
422 the TCPIP WiFi Demo App and WiFi Iperf App projects. This will force the
423 various EEPROM settings to get erased when switching between Ethernet and
424 WiFi projects. This is done since the AppConfig structure changes when
425 using WiFi (SSID string is added).
426 11. The Wifi Iperf App and TCPIP WiFi Demo App projects have been optimized for
427 better performance.
428  
429  
430 Fixes:
431 1. Fixed a TCPDisconnect() API bug in which the last few bytes of data (up to
432 the TCP socket's TX FIFO size less 532 bytes) was not transmitted and no
433 FIN was sent out if the TX FIFO was full of data when TCPDisconnect()
434 was called. This problem could have only occurred for TCP sockets with a
435 large TX FIFO (>=532 bytes). This problem could have been observed in
436 stack version 5.00's "TCPIP Demo App-C32 EXPLORER_16 32MX360F512L ENC624J600
437 PSP 9.hex" precompiled application, among others, if you connected to the
438 TCPPerformanceTest.c module and then attempted to simultaneously access the
439 web server. The web server was returning data very slowly and failing to
440 send the last parts of each file requested by the browser.
441 2. Eliminted a potential buffer overflow vulnerability from the
442 HTTPHeaderParseContentLength() function in HTTP2.c. If an oversized or
443 malformed Content-Length header is sent from the web client, the function
444 will now gracefully fail by returning an HTTP 400 Bad Request error page.
445 Thanks go to Mark Philipp for identifying this error and suggesting a
446 solution.
447 3. Fixed a TCPOpen() problem in which the stack would continuously flood the
448 network with nearly back-to-back ARP query packets if a client socket was
449 created that specified a non-reachable remote IP address (ex: local gateway
450 was offline, or for destinations on the same subnet, the actual remote node
451 was offline). This problem would occur only after a few minutes (<10) had
452 passed since the PIC was last reset. Thanks go to Sergey of DPS TELECOM for
453 reporting this problem.
454 4. Fixed linking problem with BigInt_helpers.S (PIC24/dsPIC only) when
455 targeting a PIC with more than 8KB of RAM. The interface registers (_iA,
456 _xA, _iB, _xB, _iR, and _wC) are now forced into near RAM.
457 5. Cleaned up some uninitialized variable warnings in SNMP.c.
458 6. Fixed a sequence variable traversal bug in SNMP.c.
459 7. Cleaned up a large number of unsigned integer to signed integer comparison
460 warnings produced by the MPLAB C Compiler for PIC18 MCUs (C18) version
461 3.32. With earlier versions of this compiler, these warnings would only be
462 generated as messages, so they did not get displayed by default.
463 8. Some ENCX24J600 parallel bit bang modes work now. PSP Mode 5 indirect has
464 been tested.
465 9. SSL client and server capabilities now work when using the ZeroG ZG2100M
466 WiFi interface. In the 5.00 stack release, attempting to enable the
467 STACK_USE_SSL_CLIENT or STACK_USE_SSL_SERVER TCPIPConfig.h options with
468 this network controller would have resulted in an error trap. If an LCD
469 was present, the LCD would display “encRdPtrRAWId = encWrPtrRAWId” when the
470 error occurred.
471 10. The WiFi Iperf App demo locked up when an invalid command was entered at
472 the serial port console. This is now fixed.
473 11. The WiFi Iperf App demo locked up when running with a PIC32 if iwconfig was
474 typed at the serial port console. This is now fixed.
475 12. The Wifi Iperf App demo, when running on the PIC24 and PIC32, and compiled
476 with the –Os option (min code size optimization), did not work. This is
477 now fixed.
478 13. Change a lot of BerkeleyAPI.c internals. This may fix a number of BSD
479 API problems.
480 14. Fix a problem with SNMP variables being inaccessible with certain unique
481 PEN numbers.
482  
483  
484 Known Problems:
485 1. Telnet server module does not implement a lot of Telnet functions. As a
486 result, it will likely not display correctly or work at all with some Telnet
487 clients. The server was tested with the Microsoft telnet.exe utility which
488 is provided with Microsoft Windows.
489 2. If the DHCP client and DHCP server are used at the same time and you connect
490 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
491 a crossover cable), a race condition can occur where both nodes will disable
492 their DHCP server and neither board will get a successful DHCP lease. If
493 this unlikely scenario occurs, as a work around, simply reset one of the
494 boards to reenable it's DHCP server.
495 3. HI-TECH PICC-18 compilers are not supported in this release. The supplied
496 HI-TECH PICC-18 MPLAB projects usually will not compile and/or link.
497 4. ENC624J600 PSP modes 2, 4, 6, and 10 do not work at this time. Some
498 Parallel Bit Bang modes may not work either. Some minor firmware changes
499 are needed.
500 5. SSL client code doesn't work with ENC424J600/624J600 devices. The remote
501 server terminates the connection reporting a bad record MAC (Message
502 Authentication Code). The SSL client does work with other controllers.
503  
504  
505  
506 ********
507 v5.00 27 April 2009
508 ********
509 Changes:
510 1. Added ZeroG ZG2100 802.11 WiFi controller support. The new TCPIP WiFi Demo
511 App and WiFi Iperf App projects have been added, which default to using this
512 controller.
513 2. Added Microchip ENC424J600/624J600 10/100 Ethernet controller support.
514 Support for this controller is provided by the new ENCX24J600.c/.h files
515 which perform the same role as the ENC28J60.c/.h or ETH97J60.c/.h files.
516 Precompiled .hex files for the ENC624J600 controller require the use of the
517 new Fast 100Mbps Ethernet PICtail Plus daughter card (AC164132). This
518 product is not available at the time of the 5.00 TCP/IP stack release.
519 However, it is anticipated to be available for purchase on
520 www.microchipdirect.com in CQ3 2009.
521 3. Significantly updated the Internet Radio App project. Previously, radio
522 stations were hard coded into program memory at compile time. Now, a
523 dynamic Shoutcast directory client has been implemented which allows
524 retrieval of radio stations at run time, offering endless stations you can
525 tune into. The web pages for the radio have also been updated to allow
526 control and status reporting of the board from a web browser.
527 4. Update SNMP Server (Agent) module to support SNMPv2C. The default Demo App
528 web pages now include an SNMP reconfiguration capability to set the read
529 and write community strings.
530 5. Added ICMPSendPingToHost() and ICMPSendPingToHostROM() APIs to ICMP (ping)
531 client module. These two APIs are available only when STACK_USE_ICMP_CLIENT
532 and STACK_USE_DNS is defined in TCPIPConfig.h. These functions allow
533 pinging of DNS hostnames directly without the need for the application to
534 convert the hostname to an IP address first by manually calling the DNS
535 client APIs. With this addition, the PingDemo.c file was updated to ping
536 the hostname "ww1.microchip.com" instead of a static IP address. Previously,
537 the PingDemo would stop working a couple of months after the stack was
538 released, due to the IP address of the www.microchip.com server dynamically
539 changing. If the DNS module is not enabled, the ping demo will instead ping
540 the local gateway IP address instead of ww1.microchip.com.
541 6. Updated TCPPerformanceTest.c code. The previous version would generate
542 incorrect speed calculations at high data rates (ex: >1Mbyte/sec).
543 7. Added multiple connection support to Telnet server example module. To
544 allow multiple connections, define MAX_SIMULTANEOUS_CONNECTIONS in Telnet.c
545 greater than 1 and create an equal number of TCP_PURPOSE_TELNET type TCP
546 sockets in the TCPSocketInitializer[] definition in TCPIPConfig.h.
547 8. Added more randomness to the local port selection when opening a client-mode
548 TCP socket. This reduces the risk of reusing a previously used port number
549 if the user power cycles the device.
550 9. Updated XEE* SPI EEPROM API functions. Writes are no longer required to
551 start on an EEPROM page boundary, and writes can now be arbitrarily long
552 without having to call XEEEndWrite() at each page boundary. Additionally,
553 the XEEWriteArray() API has been added, which performs a similar operation
554 to the SPIFlashWriteArray() API (but with no special erase cases to worry
555 about).
556 10. Decoupled AppConfig storage in external SPI EEPROM or SPI Flash option from
557 MPFS_USE_EEPROM and MPFS_USE_SPI_FLASH options. MainDemo.c will now save
558 the AppConfig structure in external non-volatile memory, even if MPFS is
559 unused (no HTTP or SNMP server modules enabled) or MPFS is using internal
560 Flash program memory to store web pages/bib information. This change also
561 allows the XEE*() and SPIFlash*() non-volatile read/write functions to be
562 available at all times (even if MPFS is unused), as long as the appropriate
563 hardware pinout definitions are present in HardwareProfile.h. SPI Flash and
564 SPI EEPROM are no longer mutually exclusive with each other. However, if
565 both are enabled simultaneously, AppConfig will be stored in the EEPROM, not
566 the SPI Flash.
567 11. Added required SSL files to TCPIP Demo App MPLAB projects. SSL capabilities
568 can now be turned on directly via the STACK_USE_SSL_SERVER and
569 STACK_USE_SSL_CLIENT options in TCPIPConfig.h for these projects, assuming
570 appropriate crypto libraries are installed (SW300052 available from
571 https://www.microchipdirect.com/). With this change, the historical "SSL
572 Demo App" folder has been removed.
573 13. Updated HardwareProfile.h files. This includes the addition of PIC18
574 Explorer board support, removal of the PICDEM Z profile, changes to the
575 HI-TECH PICC-18 profiles for newer compilers, among other changes.
576 14. Added a TCP and UDP performance test measurements table to TCPIP Stack
577 Help (TCPIP Stack Help.chm). Access this from the "Microchip TCP/IP Stack"
578 book, "Stack Performance" page.
579 15. Updated MPFSlib project (Microchip.MPFS.dll file) so that C18 and C32 output
580 from the MPFS2.exe utility is now identical for MPFS2 images. The generated
581 .c file is now compatible with both C18 and C32 compilers simultaneously.
582 Previously, the images generated for C18 would compile successfully for C32
583 projects, but would potentially operate incorrectly when compiler
584 optimizations were turned on. Images generated for C32 would compile
585 successfully and work on C18 projects, but the C18 compiler would take a very
586 long time to process the file each time you rebuilt your MPLAB project. Now,
587 the image generated for C18 matches the image generated for C32 and it will
588 compile fast and work correctly on both platforms, even with compiler
589 optimizations turned on.
590 16. Added schematics and BOMs for the Ethernet PICtail, Ethernet PICtail Plus,
591 Fast 100Mbps Ethernet PICtail Plus, Internet Radio, PICDEM.net 2, and ZeroG
592 ZG2100M PICtail development boards to the "Microchip\TCPIP Stack\Demo Board
593 Files" folder.
594  
595  
596 Fixes:
597 1. Fixed a denial of service vulnerability in the NBNSGetName() function of the
598 NBNS.c file. Previously, if a deliberately malformed packet was received,
599 the PIC RAM could have become corrupted. Thanks go to David Talmage for
600 finding this vulnerability.
601 2. Fixed Timer1 interrupt flag clearing code on PIC32 products. Previously,
602 the Tick.c module was clearing the interrupt flag in an unsafe manner which
603 could have corrupted other interrupt flags in the IFS0 register. Thanks go
604 to Leon van Snippenberg working on the AVIX-RT RTOS for pointing this error
605 out on the Microchip forums.
606 3. Fixed SNMP up-time variable. Previously the CustomSNMPApp.c module would
607 respond with the number of Tick API ticks that elapsed, not the number of
608 10ms time slices that elapsed. The SNMP standard uses 10ms as its time base.
609 4. Fixed BigInt_helper.asm's _masBI() and _masBIROM() functions when the Br
610 parameter's length modulo 4 was equal to 1 or 2. This bug previously caused
611 the BigIntMod() function to sometimes go into an endless calculation loop on
612 PIC18 products when using the SSL libraries and certain combinations of
613 modulus data and length were used. Thanks go to Vasil Stoianov on the
614 Microchip Ethernet forum for running into this defect and reporting it.
615 5. Fixed SSLSessionNew() so that it wouldn't "lose" SSL sessions after waiting a
616 few hours. This would previously make it impossible to make new SSL
617 connections after a while, but then after a few more hours, the sessions
618 would become free again. Thanks go to Jim Stephens for identifying this
619 issue and finding the solution.
620 6. Fixed an SSL 2.0 antique client hello record length calculation bug occurring
621 when a received record was > 255 bytes.
622 7. Added retransmission capability to SendNotification() function in
623 CustomSNMPApp.c. Previously, if an SNMP trap were sent, but the initial ARP
624 query or response was lost on the network, the SendNotification() code would
625 have deadlocked, and suppressed all future transmission of SNMP traps.
626 8. Fixed DNS client timeout if the DNS server is unable to be ARPed.
627 Previously, the DNS client would retry ARPing the DNS server indefinitely if
628 it was offline. Now, the DNS client will correctly abort if too many
629 attempts to ARP the DNS server fail. Thanks go to Phil "andersop" on the
630 Microchip Ethernet forum for identifying this error.
631 9. Suppressed transmission of a TCP RST packet to an unknown IP or MAC address
632 if the TCPDisconnect() function was called on a client mode socket that was
633 not finished with ARP or DNS resolution yet. Thanks go to Phil "andersop" on
634 the Microchip Ethernet forum for pointing this behavior out.
635 10. Fixed TCP socket from disconnecting if the remote receive window was zero and
636 TCPFlush() was still called. Thanks go to Bob Topper for identifying this
637 issue and suggesting a solution.
638 11. Fixed Tick.c module returning incorrect values when TickGet() or other API
639 was used with compiler optimizations turned on. Wrong values were observed
640 when using MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs version 3.12.
641 12. Fixed a number of SPI communications problems that could occur when compiler
642 optimizations were turned on. The ENC28J60 was observed to not work
643 correctly on the dsPIC33FJ256GP710 processor when compiled with MPLAB C
644 Compiler for PIC24 MCUs and dsPIC DSCs version 3.12.
645 13. Fixed possible MPFS2 error when using an ASM30 .s image where MPFS_Start
646 would be read using the wrong PSVPAG setting. You must rebuild your MPFS2
647 image file (ex: MPFSImg2.s) with this stack version's MPFS2.exe utility to
648 get this correction applied.
649  
650  
651 Known Problems:
652 1. Telnet server module does not implement a lot of Telnet functions. As a
653 result, it will likely not display correctly or work at all with some Telnet
654 clients. The server was tested with the Microsoft telnet.exe utility which
655 is provided with Microsoft Windows.
656 2. If the DHCP client and DHCP server are used at the same time and you connect
657 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
658 a crossover cable), a race condition can occur where both nodes will disable
659 their DHCP server and neither board will get a successful DHCP lease. If
660 this unlikely scenario occurs, as a work around, simply reset one of the
661 boards to reenable it's DHCP server.
662 3. HI-TECH PICC-18 compilers are not supported in this release. The supplied
663 HI-TECH PICC-18 MPLAB projects usually will not compile and/or link.
664 4. ENC624J600 PSP modes 2, 4, 6, and 10 do not work at this time. Parallel Bit
665 Bang mode does not work either. Some minor firmware changes are needed.
666  
667  
668  
669 ********
670 v4.55 10 November 2008
671 ********
672 SSL Note:
673 RSA.c and ARCFOUR.c have not changed between the 4.50 and 4.55 releases.
674 Although the precompiled SSL Demo App .hex files will differ, you can
675 continue to use the previous TCP/IP Stack v4.50 Encryption Add-on with this
676 4.55 stack version.
677  
678 Changes:
679 1. Added DNS client support for a secondary DNS server address. Previously, the
680 AppConfig.SecondaryDNSServer setting was unused. Now, the DNS client module
681 will automatically swap the AppConfig.PrimaryDNSServer and
682 AppConfig.SecondaryDNSServer values after any DNS query timeout (or ARP
683 timeout for the DNS server) and attempt the query with the alternative
684 server. If AppConfig.SecondaryDNSServer is disabled by setting it to the IP
685 address 0.0.0.0, the DNS client will only use the AppConfig.PrimaryDNSServer
686 value and never swap the values. With this change, the DHCP client was also
687 updated. If the DHCP server does not specify a secondary DNS server, then
688 the DHCP client will now set the AppConfig.SecondaryDNSServer value to
689 0.0.0.0. Previously, it would change the AppConfig.SecondaryDNSServer
690 setting only if the remote DHCP server offered a secondary DNS server.
691  
692  
693 Fixes:
694 1. Updated Internet Bootloader App project to correctly detect if the
695 configuration bits are being changed or not. Previously, the bootloader
696 always thought the configuration bits were being changed and thus had to
697 always erase the last Flash page (largest memory address) twice for each
698 firmware update. This did not cause any functional problems or
699 specification violations, but it would decrease the effective Flash
700 endurance of the last page.
701 2. Fixed a TCP socket memory corruption bug that would occur if
702 TCPGetRemoteInfo() API was called twice with different socket handles
703 without an intermediate call to any other TCP API that takes a
704 TCP_SOCKET input. Thanks go to Bob Topper for identifying this problem and
705 suggesting a solution.
706 3. Fixed the UDPIsGetReady() function so that it returns the number of bytes
707 remaining in the packet based on the current read location. This is the
708 same behavior as stack versions 4.18 and earlier. In stack versions 4.50
709 and 4.51, the UDPIsGetReady() function would always return the total number
710 of bytes in the current packet, regardless of how many bytes the read
711 pointer had been advanced through the UDPGet() and UDPGetArray() functions.
712 Thanks go to Bob Topper for identifying this problem and suggesting a
713 solution.
714 4. Fixed demo admin web page in TCPIP Demo App project so that the last byte of
715 the MAC address can be changed, independent of the format it was entered by
716 the user.
717 5. Fixed a buffer overflow bug that would occur when using the SSL server during
718 hashing of the server certificate for the initial handshake. This error
719 previously caused several bytes of random variables elsewhere in the project
720 to get overwritten for each SSL connection.
721 6. BSD sockets API was updated to fix some issues.
722 7. LCDBlocking.c was updated to relax start up timing. This timing fix is
723 specifically needed to support Explorer 16 boards with a Truly TSB1G7000
724 display (Novatek NT7603H controller).
725 8. Removed four uses of Arial Black font in MPFS2.exe utility. On some rare PC
726 configurations, the use of this font caused the executable to not run.
727  
728  
729 Known Problems:
730 1. Telnet server module does not implement a lot of Telnet functions. As a
731 result, it will likely not display correctly or work at all with some Telnet
732 clients. The server was tested with the Microsoft telnet.exe utility which
733 is provided with Microsoft Windows.
734 2. If the DHCP client and DHCP server are used at the same time and you connect
735 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
736 a crossover cable), a race condition can occur where both nodes will disable
737 their DHCP server and neither board will get a successful DHCP lease. If
738 this unlikely scenario occurs, as a work around, simply reset one of the
739 boards to reenable it's DHCP server.
740 3. HI-TECH PICC-18 projects may not compile when targeting the external
741 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
742 internal Ethernet controller). This problem only applies when a
743 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
744 HPC_EXPLORER + Ethernet PICtail.
745 4. MAC.h RXSIZE precompiler test for proper range doesn't work. This is not a
746 functional problem, just a compile-time configuration test. Ensure that you don't
747 over allocate TCP_ETH_RAM_SIZE or MAX_HTTP_CONNECTIONS.
748 5. HI-TECH PICC-18 STD 9.51PL1 cannot compile DynDNS.c. It raises an
749 "inconsistent type" error while trying to perform a ROM pointer to integer
750 cast. The older 9.50PL3 compiler release is required to compile this file.
751 6. HI-TECH PICC-18 STD 9.50PL3 does not initialize several static variables
752 correctly on reset. This behavior breaks many stack modules in the
753 TCPIP Demo App and TCPIP WebVend App projects. Additionally, string
754 printing functions do not work correctly, so the supplied
755 "TCPIP Demo App-HITECHPICC18 PICDEMNET2 18F97J60.hex" and "TCPIP WebVend
756 App-HITECHPICC18 PICDEMNET2 18F97J60.hex" files may not correctly print the
757 board's DHCP assigned IP address on the board's LCD (if present) and UART. To
758 avoid these severe problems, use the Microchip MPLAB C Compiler for PIC18 MCUs.
759 A free student edition can be downloaded from http://www.microchip.com/c18.
760  
761  
762  
763 ********
764 v4.51 24 July 2008
765 ********
766 IMPORTANT NOTE: You must use MPLAB 8.10 or higher to successfully open the
767 MPLAB projects.
768  
769 SSL Note:
770 RSA.c and ARCFOUR.c have not changed between the 4.50 and 4.51 releases.
771 Although the precompiled SSL Demo App .hex files will differ, you can
772 continue to use the previous TCP/IP Stack v4.50 Encryption Add-on with this
773 4.51 stack version.
774  
775 Changes:
776 None. This release includes bug fixes only. It is very important that
777 applications using the ENC28J60 get fix item 7, below.
778  
779  
780 Fixes:
781 1. TCPOpen() was previously failing if you used it to start a connection with a
782 remote hostname, but the DNS module failed to resolve the remote address on
783 the first try. This, for example, would occur if you powered up your board
784 and tried to connect to a remote server before the Ethernet cable was
785 attached. Once the Ethernet cable was attached, the socket would attempt to
786 resolve and connect to a garbage address. The Internet Radio application
787 would sometimes not begin playing the default station upon power up because
788 of this problem.
789 2. Set SEQ.ACK = 0 for outbound TCP SYN packets. This fixes a connection
790 compatibility problem with certain paranoid TCP/IP stacks that would validate
791 this field even though the ACK flag was clear. This problem would previously
792 cause the Microchip TCP/IP stack to be unable to connect client-mode TCP
793 sockets to certain rare servers/services. Thanks go to Jean LE TUTOUR for
794 finding one of these problem servers.
795 3. MPFSOpen() and MPFSOpenROM() for MPFS2 could leak a file handle if a name
796 hash matched but no complete file name did. This has been corrected to
797 prevent potential DOS attacks on the HTTP2 web server. Thanks to David Tan
798 on the Microchip Ethernet formus for identifying this issue.
799 4. Fixed a bug in MPFS2.1 that caused compile errors when MPFS Classic images
800 were generated for ASM30 containing files whose length was either zero or
801 a multiple of 12.
802 5. Fixed an issue in HTTPPostConfig() that caused it to ignore the flag that
803 was set when invalid IP address input was detected. This issue only affects
804 the example configuration page and only exists in v4.50 (prior versions
805 functioned correctly). Also corrected an issue where user input could
806 potentially overflow into part of the shadow AppConfig in the same function.
807 Thanks to prinz3nroll3 on the Microchip Ethernet forums for identifying
808 both of these issues.
809 6. Implemented Explorer 16 development board 5V LCD errata workaround to
810 LCDBlocking.c. This corrects the A/D converter from returning erratic
811 readings on certain Explorer 16 boards. LCD I/O pins are now continuously
812 driven by the microcontroller instead of going high impedance when idle.
813 7. Fixed a critical ENC28J60 revision B7 errata workaround problem in the
814 ENC28J60.c, MACFlush() function. Previously, the code was checking for an
815 EREVID register value of 0x07 for silicon revision B7. This was incorrect.
816 Silicon revision B7 actually has an EREVID value of 0x06. Note that this
817 problem was caused by an incorrect EREVID value published in DS80349A, the B7
818 silicon errata documentation. Make sure to use DS80349B or later.
819  
820  
821 Known Problems:
822 1. Telnet server module does not implement a lot of Telnet functions. As a
823 result, it will likely not display correctly or work at all with some Telnet
824 clients. The server was tested with the Microsoft telnet.exe utility which
825 is provided with Microsoft Windows.
826 2. If the DHCP client and DHCP server are used at the same time and you connect
827 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
828 a crossover cable), a race condition can occur where both nodes will disable
829 their DHCP server and neither board will get a successful DHCP lease. If
830 this unlikely scenario occurs, as a work around, simply reset one of the
831 boards to reenable it's DHCP server.
832 3. HI-TECH PICC-18 projects may not compile when targeting the external
833 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
834 internal Ethernet controller). This problem only applies when a
835 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
836 HPC_EXPLORER + Ethernet PICtail.
837 4. MAC.h RXSIZE precompiler test for proper range doesn't work. This is not a
838 functional problem, just a compile-time configuration test. Ensure that you don't
839 over allocate TCP_ETH_RAM_SIZE or MAX_HTTP_CONNECTIONS.
840 5. HI-TECH PICC-18 STD 9.51PL1 cannot compile DynDNS.c. It raises an
841 "inconsistent type" error while trying to perform a ROM pointer to integer
842 cast. The older 9.50PL3 compiler release is required to compile this file.
843 6. HI-TECH PICC-18 STD 9.50PL3 does not initialize several static variables
844 correctly on reset. This behavior breaks many stack modules in the
845 TCPIP Demo App and TCPIP WebVend App projects. Additionally, string
846 printing functions do not work correctly, so the supplied
847 "TCPIP Demo App-HITECHPICC18 PICDEMNET2 18F97J60.hex" and "TCPIP WebVend
848 App-HITECHPICC18 PICDEMNET2 18F97J60.hex" files may not correctly print the
849 board's DHCP assigned IP address on the board's LCD (if present) and UART. To
850 avoid these severe problems, use the Microchip MPLAB C Compiler for PIC18 MCUs.
851 A free student edition can be downloaded from http://www.microchip.com/c18.
852  
853  
854  
855 ********
856 v4.50 02 June 2008
857 ********
858 IMPORTANT NOTE: You must use MPLAB 8.10 or higher to successfully open the
859 MPLAB projects. Also, ensure that the latest C compiler is used. This
860 release was tested against MPLAB C Compiler for PIC18 MCUs version 3.20,
861 MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs version 3.10, MPLAB C
862 Compiler for PIC32 MCUs version 1.01, and HI-TECH PICC-18 version
863 9.50PL3 (STD). Earlier compilers may not be able to compile this TCP/IP
864 stack release.
865  
866  
867 Changes:
868 1. Added SSL 3.0 client capabilities, including SMTP over SSL. The SSL
869 modules supports up to 1024-bit RSA handshakes and 128-bit ARCFOUR
870 bulk encryption. This can be demonstrated using the SMTP client. SSL
871 server support is functional, but a key generation utility is not yet
872 provided and support over HTTPS is not yet reliable with all browsers.
873 IMPORTANT: Encryption software is covered by US Export Control law, so
874 it is not directly downloadable from the Microchip website. To use the
875 encryption modules, you must order SW300052 from microchipDIRECT
876 [ https://www.microchipdirect.com/ ] and install the required libraries.
877 2. Added Berkeley Sockets Distribution (BSD) API translation layer. You can
878 now call the well know Berkeley APIs instead of or in addition to the
879 Microchip specific APIs. To use this new functionality, define
880 STACK_USE_BERKELEY_API and configure BSD_SOCKET_COUNT in TCPIPConfig.h.
881 Three new source code demos are provided to demonstrate this API:
882 BerkeleyTCPClientDemo.c, BerkeleyTCPServerDemo.c, and
883 BerkeleyUDPClientDemo.c. The TCP client demo is identical to the
884 GenericTCPClient.c demo, but implemented using Berkeley Sockets. The UDP
885 client demo is similarly identical to the SNTP.c client. The TCP server
886 demo listens on TCP port 9764 and will echo any traffic received back to the
887 sender. It allows up to 3 simultaneous connections when there are an
888 adequate number of sockets defined in the TCPSocketInitializer[] array in
889 TCPIPConfig.h.
890 3. Added support for Dynamic DNS services. See the Dynamic DNS Client module in
891 the TCP/IP Stack Help for details. Presently, dyndns.org, dyndns.com,
892 no-ip.com, and dns-o-matic.com are supported.
893 4. Added the Microchip TCP/IP Configuration Wizard to the Utilities folder,
894 facilitating easier configuration of the TCP/IP Stack through a
895 graphical application.
896 5. Restructured TCPIPConfig.h to remove rule-enforcement logic, placing the
897 removed sections in TCPIP.h. Many other project structure changes were also
898 made to clean up the general distribution appearance.
899 6. Increased DHCP Server default lease duration to 60 seconds instead of 15
900 seconds. Some computers were losing their IP lease before performing a renew
901 operation with only a 15 second lease.
902 7. Removed CLOCK_FREQ, INSTR_FREQ, and PERIPHERAL_FREQ macro definitions.
903 GetSystemClock(), GetInstructionClock(), and GetPeripheralClock() now return
904 these respective values. This change was made for compatibility with other
905 Microchip software libraries.
906 8. Added TCP Fast Retransmission capability. Whenever three duplicate ACK
907 packets arrive, the stack will now immediately perform a retransmit
908 operation. This greatly improves recovery latency whenever the network
909 loses a packet for applications that stream TX data using TCP.
910 9. Improved TCP Keep Alive mechanism to automatically close TCP sockets which
911 do not receive any keep-alive responses for TCP_MAX_UNACKED_KEEP_ALIVES
912 (default 6) times. This means that, by default, any connection that
913 catastrophically breaks without notifying us (ex: user unplugs cable,
914 Internet connection goes down, etc.) will time out and automatically close
915 after 60 seconds (TCP_MAX_UNACKED_KEEP_ALIVES * TCP_KEEP_ALIVE_TIMEOUT).
916 Server oriented sockets will return to the listening state. Client oriented
917 sockets will close, but the TCP_SOCKET handle will continue to remain valid
918 until the application calls TCPDisconnect(). Applications can check if the
919 socket became disconnected and reset by calling TCPWasReset() or
920 TCPIsConnected(). Note that this keep alive implementation will only close
921 sockets that are broken (remote node is not responding to TCP requests). It
922 will not close or otherwise interfere with idle connections in which the
923 application is not transmitting or receiving data and wishes to keep the
924 connection open.
925 10.Added a TCP RX SYN queue of depth TCP_SYN_QUEUE_MAX_ENTRIES (default 3).
926 This queue automatically saves incoming SYN packets destined for a local
927 server port which is already connected to a different client. When the
928 client disconnects, the SYN data is pulled out of the queue and the socket
929 immediately attempts to connect to the next client. This improves connect
930 time performance since the remote client no longer has to retransmit the
931 SYN request if it was unserviceable the first time around. This is most
932 apparent with the HTTP/HTTP2 servers which previously performed poorly
933 with certain modern web browsers which attempt to open many simultaneous
934 connections to the web server, such as Mozilla Firefox 3 beta 5 and Apple
935 Safari 3.1. Entries in the queue automatically time out after
936 TCP_SYN_QUEUE_TIMEOUT (default 3 seconds) so as to prevent the queue from
937 filling up permanently if several connection requests arrive for a service
938 that is in use and will not be available for an extended period.
939 11.Modified the structure of the MPFS2 FAT (now known as MPFS2.1) to include
940 name hashes first. This speeds up opening files by 25%, and makes opening
941 index files nearly instant.
942 12.Updated the MPFS2 Utility. MPFS2.1 now supports the new FAT structure and
943 provides a cleaner interface. It also writes images to disk as they are
944 created, which eliminates the IndexOutOfBounds exceptions some users had
945 reported. Finally, uploads are now truly multi-threaded.
946 13.Source code to the MPFS2.exe PC utility is now released. Find it in the
947 Microchip Solutions\Microchip\TCPIP Stack\Utilities\Source\MPFS21 folder. This
948 project is designed to compile with Microsoft Visual C# 2008 Express Edition.
949 14.Added support for SST25VFxxxB serial flash parts in 2, 4, 8, 16, and 32Mbit
950 densities. These parts can be used to replace EEPROMs for storing MPFS
951 images (both versions) and custom data.
952 15.Added HTTPReadPostName, HTTPReadPostValue, and HTTPReadPostPair functions to
953 facilitate easier processing of data arriving via POST.
954 16.Split HTTPAuthenticate API into separate functions: HTTPNeedsAuth and
955 HTTPCheckAuth. This function was already split internally, and didn't
956 make sense as a single API.
957 17.Updated DHCP client to close its UDP socket when idle (bound state) to save
958 a small amount of resources.
959 18.Removed LED_IO macro from all hardware profiles because it is not suitable
960 for use on certain hardware platforms that have non-contiguous LEDs or
961 reversed bit ordering. Use the new LED_GET() and LED_PUT(val) macros to read
962 and write to all of the LEDs at once.
963 19.Added Ethernet Hash Table Calculator.exe to the Utilities folder and start menu.
964 This tool will calculate the correct bit that you must set in the EHT0-EHT7
965 registers on the ENC28J60 and PIC18F97J60 family devices for using the Hash
966 Table RX filter. This is useful only for fixed MAC addresses known at design
967 time. For addresses that are known at run time, use the SetRXHashTableEntry()
968 function in the ENC28J60.c or ETH97J60.c files to set the correct EHT0-EHT7 bit.
969  
970  
971 Fixes:
972 1. Fixed a buffer overflow data corruption issue in the FTP module that arises
973 when too many parameters were passed on the command line.
974 2. Moved TCPWasReset checking in HTTP2 to execute for every socket on every
975 loop. Previously, it would only execute when a socket reconnected, which
976 caused the RX buffer to not resize until after data was received. Some
977 platforms (notably FF2 on Ubuntu) would stall if the initial advertised RX
978 window was too small, and this change corrects that issue.
979 3. Updated SendSystemReset() and MACInit() initialization routine in ENC28J60.c.
980 Previously, if the ENC28J60 was placed into sleep mode by calling
981 MACPowerDown(), the SendSystemReset() command would not work anymore. This
982 would leave the ENC28J60 in power down if the host PIC was ever reset.
983 SendSystemReset() should work for all conditions with this update.
984 Thanks go to Rob Haverkort on the Microchip Ethernet forum for identifying
985 this problem.
986 4. Fixed an alignment bug in HTTP2 that caused redirects to fail when the MPFS2
987 image was stored in Flash program memory. Thanks to Todd Boaz on the
988 Microchip Ethernet forum for identifying this bug, and Chen Qu for posting
989 a solution.
990 5. Fixed SNTP client from losing accuracy if you called SNTPGetUTCSeconds()
991 10s of thousands of times since the last server synchronization. Thanks go to
992 "pic123" on the Microchip Ethernet forum for noticing this error.
993 6. Fixed a TickGet*() API problem where the returned tick value could be off by 64K
994 ticks occasionally on PIC24, dsPIC30/33, and PIC32 processors. This bug was
995 previously fixed in stack versions 4.13 and 4.16, but it was unintentionally
996 recreated in 4.18 due to PIC32 changes.
997 7. Fixed UART2TCPBridge module from failing to connect to a remote server when
998 USE_REMOTE_TCP_SERVER was defined.
999 8. Fixed an issue that prevented SNMP SETs on 16 and 32 bit parts when using
1000 MPFS2. Thanks go to Milena K on the Microchip Ethernet forum for identifying
1001 this problem.
1002 9. Fixed a rare buffer corruption issue that could occur with UDP if TCP was also
1003 enabled.
1004 10.Fixed a Tick rollover error in HTTP2. Thanks go to Paul Bixel on the Microchip
1005 Ethernet forum for identifying this problem.
1006 11.Fixed an MPFS2 bug in which an excessive value to MPFS_SEEK_REWIND may have
1007 failed to return an error. Thanks go to Paul Bixel on the Microchip Ethernet
1008 forum for identifying this problem as well.
1009 12.SMTP Client now sends EHLO when using authentication. Previously, the HELO
1010 command was used, even with authentication enabled. Using HELO with
1011 authentication creates incompatibilities with certain SMTP servers.
1012 13.Improved Internet Bootloader robustness by retransmitting ACKs in response to
1013 data retransmissions by the remote sending node. Previously, if an ACK packet
1014 was lost before reaching the sending node, the TFTP upload would fail and need
1015 to be restarted. Thanks go to "coolvibe" Dave Collier on the Microchip Ethernet
1016 forum for identifying this behavior.
1017 14.Fixed TFTP Internet Bootloader from not being accessible from Linux TFTP clients
1018 which were setting the IP header "Don't Fragment" flag bit.
1019 15.Changed TCP so that unsent data that is automatically flushed by the
1020 TCP_AUTO_TRANSMIT_TIMEOUT_VAL timer includes the PSH flag. This improves GUI
1021 responsiveness for certain applications which rely on this automatic flush
1022 feature, such as the UART2TCPBridge module.
1023 16.Fixed TCP socket loss issue which could occur if the TCP TX FIFO size was
1024 greater than 536 bytes (TCP_MAX_SEG_SIZE). Before the fix, the socket
1025 would have gotten tied up indefinitely performing retransmissions every 1.0
1026 seconds without detecting that the remote node was disconnected.
1027 17.Fixed TCP socket hang issue that would occur if the PIC sent out a FIN and the
1028 remote node never responded with a corresponding FIN. The socket would have
1029 gotten stuck indefinitely in the TCP_FIN_WAIT_2 state. Thanks go to Mr. Kyle
1030 Strickland with AW North Carolina for identifying this bug.
1031 18.Fixed UDPSetRxBuffer() function from not working if it was called before having
1032 called UDPGet() or UDPGetArray() at least once.
1033 19.Fixed an offset error of +2 milliseconds being returned from
1034 TickConvertToMilliseconds(). Thanks go to Andrés ("saturn") on the Microchip
1035 Ethernet forum for finding this error. Note that due to integer truncation
1036 during division, this function can be off by 0.2% or so, depending on the value
1037 returned by GetPeripheralClock().
1038 20.Updated DelayMs() macro for MPLAB C Compiler for PIC18s to work correctly
1039 when a large parameter was given. You should now be able to delay between
1040  
1041 with an unexpectedly short delay.
1042  
1043  
1044 Known Problems:
1045 1. Telnet server module does not implement a lot of Telnet functions. As a
1046 result, it will likely not display correctly or work at all with some Telnet
1047 clients. The server was tested with the Microsoft telnet.exe utility which
1048 is provided with Microsoft Windows.
1049 2. If the DHCP client and DHCP server are used at the same time and you connect
1050 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
1051 a crossover cable), a race condition can occur where both nodes will disable
1052 their DHCP server and neither board will get a successful DHCP lease. If
1053 this unlikely scenario occurs, as a work around, simply reset one of the
1054 boards to reenable it's DHCP server.
1055 3. HI-TECH PICC-18 projects may not compile when targeting the external
1056 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
1057 internal Ethernet controller). This problem only applies when a
1058 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
1059 HPC_EXPLORER + Ethernet PICtail.
1060 4. MAC.h RXSIZE precompiler test for proper range doesn't work. This is not a
1061 functional problem, just a compile-time configuration test. Ensure that you don't
1062 over allocate TCP_ETH_RAM_SIZE or MAX_HTTP_CONNECTIONS.
1063 5. HI-TECH PICC-18 STD 9.51PL1 cannot compile DynDNS.c. It raises an
1064 "inconsistent type" error while trying to perform a ROM pointer to integer
1065 cast. The older 9.50PL3 compiler release is required to compile this file.
1066 6. HI-TECH PICC-18 STD 9.50PL3 does not initialize several static variables
1067 correctly on reset. This behavior breaks many stack modules in the
1068 TCPIP Demo App and TCPIP WebVend App projects. Additionally, string
1069 printing functions do not work correctly, so the supplied
1070 "TCPIP Demo App-HITECHPICC18 PICDEMNET2 18F97J60.hex" and "TCPIP WebVend
1071 App-HITECHPICC18 PICDEMNET2 18F97J60.hex" files may not correctly print the
1072 board's DHCP assigned IP address on the board's LCD (if present) and UART. To
1073 avoid these severe problems, use the Microchip MPLAB C Compiler for PIC18 MCUs.
1074 A free student edition can be downloaded from http://www.microchip.com/c18.
1075  
1076  
1077  
1078 ********
1079 v4.18 28 November 2007
1080 ********
1081 Changes:
1082 1. Added C32 and PIC32MX support. Some things were cleaned up in the process.
1083 2. Removed linker scripts from C30 MPLAB projects. MPLAB IDE 8.00
1084 can automatically select the correct linker script for 16-bit and 32-bit
1085 products.
1086 3. Updated TCPPerformanceTest.c module. Now it automatically calculates the TX
1087 throughput and displays it for you. Also, there is now an RX throughput
1088 testing mode, which listens on a separate TCP socket (port 9763) when a TCP
1089 socket of type TCP_PURPOSE_TCP_PERFORMANCE_RX is allocated in TCPIPConfig.h.
1090 The RX socket is by default not enabled to save memory, so you must create a
1091 TCP_PURPOSE_TCP_PERFORMANCE_RX socket in TCPIPConfig.h and ensure that enough
1092 memory is allocated to accommodate it to test the RX performance test. When
1093 connected to port 9763, send a large amount of data and the PIC
1094 microcontroller will send back a count of how many bytes were received per
1095 second.
1096 4. UDPPerformanceTest.c module now transmits 1024 packets on start up and then
1097 stops to prevent continually broadcast flooding your network. To transmit
1098 more packets after 1024 is reached, hold down BUTTON3 (left-most button on
1099 most boards).
1100 5. Significantly improved the speed of the MD5 and SHA-1 functions. Gains for
1101 the 8-bit compilers were 50-75%, while 16-bit parts saw more modest
1102 improvements (~10%).
1103 6. Reimplemented TCP_CLOSE_WAIT TCP state ("CLOSE WAIT" in RFC793). Now, TCP
1104 sockets that receive a FIN from the remote node will hold off transmitting
1105 a FIN back to the remote node until the TCP_CLOSE_WAIT_TIMEOUT (defined at
1106 the top of TCP.c) elapses or immediately when the application calls the
1107 TCPDisconnect() function. This makes it possible for the application to
1108 transmit a response back to the remote node before the socket becomes closed
1109 on our end. Similarly, it simplifies application usage of the last RX bytes
1110 received as these bytes are now assured to still be in the RX FIFO for at
1111 least TCP_CLOSE_WAIT_TIMEOUT seconds. TCP_CLOSE_WAIT_TIMEOUT defaults to
1112 200ms in this stack version.
1113 7. Pushed the SNTP requery on failure timeout up some. It was ~14 seconds and
1114 is now ~20 seconds.
1115 8. Added TFTPOpenROMFile() API to complement TFTPOpenFile() when using PIC18
1116 products.
1117 9. Added a fourth parameter to newAJAXCommand() in mchp.js, allowing data to be
1118 POSTed along with the AJAX request.
1119 10.Deprecated the TCP Loopback functions, which includes TCPOpenLoopback,
1120 TCPCloseLoopback, TCPIsLoopback, TCPInject, and TCPSteal. These functions
1121 were added in 4.10 for future SSL support, but have since become
1122 unnecessary. They are of limited usefulness, and so are being removed to save
1123 code space. The functions are still available in this version, but will
1124 be removed in the next release.
1125 11.Added SMTPClient.ServerPort field to the SMTP API. This allows the remote
1126 server port number to be specified dynamically at run time instead of being
1127 hard coded to the SMTP_PORT value defined at the top of SMTP.c. SMTP_PORT is
1128 now only a default.
1129 12.Added web interface to the SMTP module in the TCPIP Demo App applications.
1130 You can now configure the SMTP module and send emails directly from within
1131 your web browser. The HTTPPostEmail() function in CustomHTTPApp.c also
1132 demonstrates how to send MIME encoded attachments in emails. The default demo
1133 will send button states, LED states, and the current potentiometer reading as
1134 a CSV file attached to the email.
1135 13.Changed SMTPDemo() in MainDemo.c to trigger on BUTTON2 and BUTTON3
1136 simultaneously held down instead of BUTTON0 only.
1137  
1138 Fixes:
1139 1. Fixed an ENC28J60.c MACGetArray() bug which would overwrite one byte of memory
1140 at address 0xFFFFFFFF if you provided NULL for the destination address pointer.
1141 2. Fixed an MPFS2.c MPFSGet() bug which would overwrite memory address 0x00000000
1142 if a NULL pointer was provided as the destination.
1143 3. Fixed a bug in the HTTP2 server accessing incorrect sockets if an inadequate
1144 number of sockets were available on POR.
1145 4. Fixed Internet Bootloader project from failing with a timeout if an ARP packet
1146 arrived during the Erase/Write operation.
1147 5. Fixed DHCP client RFC non-compliance where it would send the ciaddr field in
1148 the initial SELECTING state. Also, in the RENEWING state, the Requested IP
1149 Address option was being sent, which is illegal. These changes may fix
1150 compatibility problems with certain DHCP servers.
1151 6. Fixed TFTP Client's TFTPCloseFile() function from sending data using a wrong
1152 UDP socket if StackTsk() was called after TFTPIsFileOpened() was last called.
1153 7. Added two zero bytes to the ICMP echo request payload to improve compatibility
1154 with some buggy NAT routers.
1155  
1156 Known Problems:
1157 1. Telnet server module does not implement a lot of Telnet functions. As a
1158 result, it will likely not display correctly or work at all with some Telnet
1159 clients. The server was tested with the Microsoft telnet.exe utility which
1160 is provided with Microsoft Windows.
1161 2. If the DHCP client and DHCP server are used at the same time and you connect
1162 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
1163 a crossover cable), a race condition can occur where both nodes will disable
1164 their DHCP server and neither board will get a successful DHCP lease. If
1165 this unlikely scenario occurs, as a work around, simply reset one of the
1166 boards to reenable it's DHCP server.
1167 3. HI-TECH PICC-18 projects may not compile when targeting the external
1168 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
1169 internal Ethernet controller). This problem only applies when a
1170 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
1171 HPC_EXPLORER + Ethernet PICtail.
1172 4. MAC.h RXSIZE precompiler test for proper range doesn't work. This is not a
1173 functional problem, just a compile-time configuration test. Ensure that you don't
1174 over allocate TCP_ETH_RAM_SIZE or MAX_HTTP_CONNECTIONS.
1175  
1176  
1177  
1178 ********
1179 v4.16 06 November 2007
1180 ********
1181 Changes:
1182 1. Added Internet Radio application. This is a TCP client application which
1183 downloads streaming MP3 audio from a Shoutcast server and then plays it back to
1184 stereo earphones via a VLSI VS1011 audio decoder.
1185 2. Added SPIRAM.c module. This module is intended for interfacing to an AMI
1186 Semiconductor N256S0830HDA SPI RAM chip. The TCP module can now interface
1187 directly to this SPIRAM module to store TCP socket FIFO buffers and other TCB
1188 data in the external RAM.
1189 3. Added TCP_OPTIMIZE_FOR_SIZE compile time configuration macro to TCP.c file. When
1190 optimizing for small code size, the TCP module ROM footprint shrinks up to 6KB,
1191 but performance may slow down on some processors (namely PIC18s, where the
1192 penalty is approximately 15%).
1193 4. Added USE_EEPROM_25LC1024 compile time configuration macro to TCPIPConfig.h.
1194 Enable this definition if you are storing your MPFS[2] on a 1Mbit 25LC1024 or
1195 similar EEPROM device that uses 24-bit addressing and a 256 byte write page size.
1196 5. Changed LCDBlocking.c module initialization code. It should now be possible to
1197 use 4-bit mode on certain "unusual" LCD controllers, like the Samsung S6A0032.
1198 Most PICDEM.net 2 and Explorer 16 boards use an LCD with this controller.
1199 6. SNTP client now attempts to requery the SNTP server about every 14 seconds if the
1200 last query attempt fails. This allows the internal time value to become valid
1201 quickly should the board be powered up before an Ethernet cable is attached or if
1202 the DHCP client doesn't obtain an IP address quickly enough. Previously, it would
1203 take up to 10 minutes after plugging the Ethernet cable in to get a correct time
1204 value from the SNTP server.
1205 7. Added UDP_USE_TX_CHECKSUM compile time configuration macro to TCPIPConfig.h.
1206 When enabled, all UDP packets will have a correct UDP checksum computed and
1207 inserted into the UDP header of outbound packets. If you do not define this
1208 macro, the UDP checksum will be disabled (left as 0x0000), which is how previous
1209 stack versions operated. Note that enabling checksum generation cuts your
1210 maximum UDP TX throughput by nearly half due to the required computations.
1211 8. Substantially changed TCP socket RX and TX FIFO allocation. Now, sockets can be
1212 stored either in Ethernet RAM, PIC RAM, or external (SPI) RAM. Previously,
1213 sockets could only be allocated in Ethernet RAM, which was not scalable.
1214 9. Added TCPOpen() API function. This replaces TCPListen() and TCPConnect().
1215 TCPOpen() supports a large number of options that will make the creation of
1216 client mode sockets much easier. You can specify the remote node as a hostname
1217 that needs DNS and ARP resolution, an IP address that only needs ARP resolution,
1218 or legacy NODE_INFO pointer for direct compatibility with the previous
1219 TCPListen() and TCPConnect() APIs. TCPOpen() also supports a socket type
1220 parameter which will allow you to use the new TCP socket RAM allocation system.
1221 10.Added TCP Keep Alive mechanism defined by RFC 1122 section 4.2.3.6 to the TCP
1222 module. This helps automatically detect lost connections. If the remote node
1223 sends back an RST, this immediately closes the lost connection on our end.
1224 Currently, no action is taken if the keep alive gets no response. Note that this
1225 feature deviates from the standard by defaulting to only 10 seconds instead of
1226 over 2 hours. Also deviating from the standard, this feature is enabled by
1227 default. To disable it, undefine TCP_KEEP_ALIVE_TIMEOUT at the top of TCP.c.
1228 11.Moved TCPPerformanceTest.c module from default port 12345 to 9762.
1229 12.Moved UDPPerformanceTest.c module from default port 12345 to 9, the "discard"
1230 protocol port.
1231  
1232 Fixes:
1233 1. The DHCP client now specifically requests the previous IP address when a DHCP
1234 renewal occurs.
1235 2. The SNTP client now correctly maintains time when repetitively calling
1236 SNTPGetUTCSeconds() between an NTP requery event. Thanks go to Rob Haverkort on
1237 the Microchip Ethernet forum for noticing the time value incrementing far faster
1238 than it should have.
1239 3. TCP module will not transmit a bunch of unnecessary duplicate ACK packets when
1240 data is ready to be transmitted but the remote RX window is zero. This previously
1241 didn't cause anything to break, but would waste CPU time and bandwidth sometimes.
1242 4. TCP sockets will no longer automatically close if the remote RX window stays zero
1243 for several seconds.
1244 5. Fixed TFTP Internet Bootloader project from corrupting the configuration fuses.
1245 Previously, this would result in the Watchdog timer being enabled and causing an
1246 unintentional reboot every few minutes with the demo TCP/IP stack.
1247  
1248 Known Problems:
1249 1. Telnet server module does not implement a lot of Telnet functions. As a
1250 result, it will likely not display correctly or work at all with some Telnet
1251 clients. The server was tested with the Microsoft telnet.exe utility which
1252 is provided with Microsoft Windows.
1253 2. TFTPc module has not been tested with this version.
1254 3. If the DHCP client and DHCP server are used at the same time and you connect
1255 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
1256 a crossover cable), a race condition can occur where both nodes will disable
1257 their DHCP server and neither board will get a successful DHCP lease. If
1258 this unlikely scenario occurs, as a work around, simply reset one of the
1259 boards to reenable it's DHCP server.
1260 4. HI-TECH PICC-18 projects may not compile when targeting the external
1261 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
1262 internal Ethernet controller). This problem only applies when a
1263 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
1264 HPC_EXPLORER + Ethernet PICtail.
1265 5. MAC.h RXSIZE precompiler test for proper range doesn't work. This is not a
1266 functional problem, just a compile-time configuration test. Ensure that you don't
1267 over allocate MAX_TCP_SOCKETS, TCP_TX_FIFO_SIZE, TCP_RX_FIFO_SIZE, or
1268 MAX_HTTP_CONNECTIONS.
1269  
1270  
1271  
1272 ********
1273 v4.13 02 October 2007
1274 ********
1275 Changes:
1276 1. Added command line support to the MPFS2.exe tool. You can now generate MPFS
1277 output files using batch scripts or other console applications.
1278 2. Added dynamic variable parameter capabilities to the MPFS2 utility. To use, add
1279 the parameters you wish to pass to the end of the dynamic variable. All
1280 parameters are passed as WORD values. (ex: ~myArray(2,5)~ )
1281 3. Added TCPWasReset() API to allow the application layer to be notified if an
1282 underlying socket reset has occurred (ex: remote node disconnects, cable is
1283 disconnected and times out, user calls TCPDisconnect(), etc.). The reset state is
1284 latching, which allows the application layer to detect if a remote node disconnects
1285 and a new connection occurs on the same socket before the application can detect
1286 the original disconnection through the TCPIsConnected() API.
1287 4. Added a counter to the UDPPerformanceTest module and made it supress transmission
1288 if an Ethernet link is not present.
1289 5. Added TCPIP WebVend App example application to the main stack distribution. This
1290 corresponds to three new Microchip Webinars being published on the HTTP2 server
1291 usage topic.
1292  
1293 Fixes:
1294 1. Fixed MPFS2.exe PC utility from crashing if you attempt to generate an MPFS
1295 classic .bin/.c/.s output file.
1296 2. Fixed RCONbits definition for HPC_EXPLORER hardware profile when using the HI TECH
1297 PICC-18 compiler.
1298 3. Fixed a MPFSGetFilename() bug when using C30 and MPFS2 images stored in program
1299 memory. Thanks to Billy Walton on the Microchip Ethernet forum for identifying
1300 this issue.
1301 4. Fixed a TCP RX FIFO corruption problem which would occur if the remote node sent
1302 more data than could fit in our RX FIFO in a single packet. The GeneticTCPClient.c
1303 module was subject to experiencing this problem when connected to www.google.com's
1304 servers.
1305 5. Fixed a DHCP client UDP socket leak if you called DHCPDisable() after the DHCP
1306 client had already obtained a UDP socket. Thanks go to Matthew Kendall on the
1307 Microchip Ethernet forum for identifying this problem.
1308 6. Fixed a SNMP Server module bug testing a string length (with respect to
1309 SNMP_COMMUNITY_MAX_LEN) being off by one, resulting in possible memory corruption.
1310 Thanks go to Matthew Kendall on the Microchip Ethernet forum for identifying this
1311 problem.
1312 7. Cleaned up some C30 compiler warnings related to macro definitions with inadequate
1313 parenthesis in them.
1314 8. Fixed HTTP2 module sometimes returning a 501 error instead of a correct web page
1315 when being bombarded with new connection requests.
1316 9. Fixed a TickGet*() API problem where the returned tick value could be off by 64K
1317 ticks occasionally on PIC24 and dsPIC processors.
1318 10.Fixed SMTP client module failing to send email when attempting to send an email
1319 with a `CC' or `BCC' field that was in ROM while the `To' field was in RAM or visa
1320 versa.
1321 11.Fixed TCP module sending an incorrect sequence number in RST packets sent when in
1322 the TCP_SYN_SENT state and an invalid segment arrives. In prior stack versions,
1323 some TCP client applications might take a very long time to recover in the event
1324 of a power failure, reset, and subsequent reconnect to a remote server that still
1325 thinks the old connection is still active. With this fix, reconnections should be
1326 possible almost immediately after a power failure because the correct RST packet
1327 will cause the old connection to get closed right away.
1328 12.Fixed a TCP socket leak problem that would occur over if the local PIC called
1329 TCPDisconnect() and the remote node didn't send us a correct FIN response.
1330 Sockets could previously get lost in the TCP_FIN_WAIT_2 state and wouldn't
1331 recover unless the application called TCPDisconnect() a second time with the same
1332 socket handle.
1333  
1334 Known Problems:
1335 1. Telnet server module does not implement a lot of Telnet functions. As a
1336 result, it will likely not display correctly or work at all with some Telnet
1337 clients. The server was tested with the Microsoft telnet.exe utility which
1338 is provided with Microsoft Windows.
1339 2. TFTPc module has not been tested with this version.
1340 3. If the DHCP client and DHCP server are used at the same time and you connect
1341 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
1342 a crossover cable), a race condition can occur where both nodes will disable
1343 their DHCP server and neither board will get a successful DHCP lease. If
1344 this unlikely scenario occurs, as a work around, simply reset one of the
1345 boards to reenable it's DHCP server.
1346 4. HI-TECH PICC-18 projects may not compile when targeting the external
1347 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
1348 internal Ethernet controller). This problem only applies when a
1349 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
1350 HPC_EXPLORER + Ethernet PICtail.
1351 5. HI-TECH PICC-18 projects will not correctly set the processor configuration fuses
1352 through code using the __CONFIG() macro. Ensure that the configuration fuses are
1353 manually set correctly via the MPLAB IDE Configuration Bits dialog. This problem
1354 has been observed with compiler version 9.50PL3.
1355 6. MAC.h RXSIZE precompiler test for proper range doesn't work. This is not a
1356 functional problem, just a compile-time configuration test. Ensure that you don't
1357 over allocate MAX_TCP_SOCKETS, TCP_TX_FIFO_SIZE, TCP_RX_FIFO_SIZE, or
1358 MAX_HTTP_CONNECTIONS.
1359 7. GenericTCPClient example of downloading a web page from www.google.com is extremely
1360 slow. The default TCP socket has too little RX space to accept a full packet sent
1361 from Google's servers, so the remote server must retransmit a lot of data, slowing
1362 the transfer down a lot. Making TCP_RX_FIFO_SIZE 536 bytes or bigger and
1363 correspondingly shrinking MAX_TCP_SOCKETS will correct this problem.
1364  
1365  
1366  
1367 ********
1368 v4.11 27 August 2007
1369 ********
1370 IMPORTANT NOTE: You must use MPLAB 7.62 or higher to successfully open the
1371 MPLAB projects.
1372  
1373 Changes:
1374 1. Added a Microchip TCP/IP Stack Users' Guide to document the stack
1375 features/modules/and APIs and address the stale AN833 documentation. Note that this
1376 is a work in progress. Many modules have yet to be documented in the Users' Guide.
1377 2. Added HTTP2 module. This HTTP module includes a whole new API and supreme new
1378 features, such as POST support, cookies support, browser authentication support, and
1379 more.
1380 3. Added MPFS2 module. This module is required for the new HTTP2 module and performs
1381 better while having fewer limitations. Long filenames and folders are now
1382 supported.
1383 4. Added a new GUI based MPFS2.exe PC utility. The older MPFSv2.exe GUI application
1384 and MPFS.exe command line tool has been retired. The new utility has advanced
1385 features, such as MPFS2 file format support, GZIP compress, etc.
1386 5. Added a TFTP bootloader. This is a stand alone project and currently only supports
1387 the PIC18F97J60 family of PIC processors with internal Ethernet.
1388 6. Added UART2TCPBridge.c file and STACK_USE_UART2TCP_BRIDGE option to TCPIPConfig.h.
1389 This new module acts as a TCP and UART bridge, with a high priority UART interrupt
1390 and dedicated UART TX and RX FIFOs for minimum UART latency and maximum performance.
1391 By default, the bridge acts as a TCP server and listens on port 9761. The UART baud
1392 rate defaults to 19200. The bridge can be reconfigured to act as a TCP client.
1393 7. Added Simple Network Time Protocol (SNTP) client. This module automatically
1394 obtains the current time (date) from the Internet. Enable this module by defining
1395 STACK_USE_SNTP_CLIENT in TCPIPConfig.h. Obtain the current time (in seconds since
1396 00:00:00 1970) by calling the SNTPGetUTCSeconds() API.
1397 8. Added support functions Base64Encode() and Base64Decode() in Helpers.c. Base 64 is
1398 required for the new HTTP2 module, but of general use to many applications.
1399 9. Added SMTP Authentication support to the SMTP Client. To use this, set the
1400 SMTPClient.Username and SMTPClient.Password string pointers to a non-NULL value
1401 before calling SMTPSendMail(). Applications implementing email transmission
1402 capabilities should expose these options to the end-user for configuration. To use
1403 SMTP servers that do not support the AUTH LOGIN authentication command, simply
1404 leave the SMTPClient.Username and SMTPClient.Password pointers as their default
1405 NULL value.
1406 10.Converted DHCPDisable() from a macro to a real function and added the complementary
1407 DHCPEnable() function. These two functions can be used at run time to dynamically
1408 switch between using a static IP address and configuration and DHCP assigned IP
1409 address and configuration.
1410 11.Updated StringToIPAddress() to work more robustly, including the ability to decode
1411 host name strings and determine if they contain a valid IP address or not. Also,
1412 the complementary ROMStringToIPAddress() function was added.
1413 12.Updated the DNS module. Now, if you give it an IP address string to resolve, it
1414 will convert the string to an IP address and immediately return without querying
1415 the DNS.
1416 13.Shrunk the advertised TCP Maximum Segment Size from 576 bytes to 528 bytes. This
1417 might improve compatibility if your TCP data has to propagate over nodes with small
1418 MTUs and you have a correspondingly large TCP RX FIFO defined.
1419 14.Performed some maintenance on the FTP.c file. No significant functionality has
1420 been changed, but some potential problems were corrected.
1421 15.Altered Tick.c file and API. Now, the Tick module can operate maximum precision,
1422 returning the value of the actual Timer as it is counting, without disturbing the
1423 timer count by writing to it or disabling it. Three new APIs were added,
1424 TickGetDiv256(), TickGetDiv64K(), and TickConvertToMilliseconds(). Internally the
1425 tick counter is now 48-bits wide and as accurate as your Timer clock source,
1426 allowing you to use it as a Real Time Clock.
1427 16.Added PIC24FJ64GA004_PIM hardware profile. This hardware profile is intended for
1428 use with the PIC24FJ64GA004 PIM on the Explorer 16 development board. In this mode,
1429 BUTTON2 and BUTTON3 and several of the LEDs do not work correctly due to lack of
1430 I/O pins on this device. Also, you cannot have the POT and TEMP jumpers on the PIM
1431 bridged because these signals are multiplexed with the SDO1/SDI1 pins needed for
1432 the Ethernet PICtail Plus.
1433 17.Removed most ROM APIs when using a 16-bit compiler (C30). PIC24s and dsPICs usually
1434 don't need separate ROM functions since the Program Space Visibility feature maps
1435 ROM into RAM space. All ROM APIs are still supported, but they are now macros to
1436 base RAM APIs. This change saves a couple of kilobytes of code space on PIC24 and
1437 dsPICs.
1438 18.Improved MyTCB structure caching. This should reduce TCP packet processing
1439 overhead with the ENC28J60 where TCBs are stored in the Ethernet RAM.
1440 19.MAX_RETRY_COUNTS TCP configuration option has been renamed to TCP_MAX_RETRIES.
1441 20.FTP server is no longer enabled by default. HTTP2 now supports POST, so you can
1442 upload new webpages through the /mpfsupload page now. FTP required two precious TCP
1443 sockets.
1444 21.Began adding hooks for an SSL/TLS transport for secure HTTPS and other future stack
1445 modules. Note that these cryptographic modules are not available at this time.
1446 Configuration options such as MAX_SSL_CONNECTIONS do nothing and should not be
1447 modified.
1448 22.Username has changed for all of the modules. Now all modules have a default
1449 username of "admin" and password of "microchip". Previously, the FTP and Telnet
1450 modules used "ftp" and "telnet" respectively for the usernames.
1451  
1452 Fixes:
1453 1. Fixed a SendFile() bug in HTTP.c where parsing dynamic cgi files could send garbage
1454 back to the web browser sometimes. Thanks go to Matt Watkins on the Microchip
1455 Ethernet forum for identifying this issue.
1456 2. Fixed an off by one error in the calculation of RESERVED_TCP_MEMORY. Previously,
1457 the last TCP socket's RX FIFO would incorrectly overlap with the Ethernet RX buffer,
1458 causing incoming packets to occasionally be corrupted or the incoming data on the
1459 last socket to get corrupted.
1460 3. Fixed the QWORD_VAL's dword struct element types. dword.LD and dword.HD were
1461 incorrectly defined as WORDs instead of DWORDs. Thanks go to Iñaki Esparza on the
1462 Microchip Ethernet forum for identifying this issue.
1463 4. Fixed the incorrect processing of received IP fragments with a non-zero offset.
1464 This stack does not support IP packet reconstruction due to the limited amount of
1465 available RAM. Thanks go to Iñaki Esparza on the Microchip Ethernet forum for
1466 noticing this behavior.
1467 5. Board now only responds to ping requests to our IP address, the directed subnet
1468 broadcast address, or the broadcast address of 255.255.255.255. Previously, it
1469 would respond to any ping request to any IP address, assuming the MAC address was
1470 correct.
1471 6. Fixed a memory corruption/UDP packet loss problem when handling incoming UDP
1472 packets. Previously, StackTask() would incorrectly continue processing more
1473 packets if it came upon a UDP packet. Thanks go to Iñaki Esparza on the Microchip
1474 Ethernet forum for identifying this issue.
1475 7. Fixed the SMTPClient.ROMPointers.Server flag having an inverted meaning.
1476 Previously, the SMTP client module would treat the SMTPClient.Server pointer as a
1477 ROM pointer if this bit was cleared. In most cases, this would cause the SMTP
1478 client to return an error code of 0x8000 when the SMTPClient.SMTPServer address
1479 pointer was set.
1480 8. Fixed the DHCP Server module from incorrectly parsing received packets which had a
1481 DHCP_PARAM_REQUEST_IP_ADDRESS option followed by more options. Previously due to
1482 the length miscalculation, the parser would enter a random state, depending on the
1483 packet's contents. Thanks go to Iñaki Esparza on the Microchip Ethernet forum for
1484 identifying this issue.
1485 9. Fixed potential incorrect results when UDPIsGetReady() was called and a previous
1486 application did not call UDPDiscard() on an RX packet. Now, StackTsk() calls
1487 UDPDiscard() as appropriate to let it know when it's old RX data is being thrown
1488 away. This fixes a potential bug in the DHCP Server module and makes the UDP API
1489 more robust. Thanks go to Iñaki Esparza on the Microchip Ethernet forum for
1490 identifying the potential DHCP server issue.
1491 10.Fixed a potential ARP bug where the Gateway's MAC address would be returned for an
1492 IP address on the local subnet. This unusual case would occur when two application
1493 tasks were using the ARP module at the same time and the second application was
1494 trying to resolve an IP address off of our subnet. Thanks go to Iñaki Esparza on
1495 the Microchip Ethernet forum for pointing this issue out.
1496 11.Fixed an PIC18F97J60 family MAC layer bug where MACGetArray() might not correctly
1497 increment the Ethernet read pointer if a NULL pointer was given for the
1498 destination. The C compiler might have optimized the function so that it would
1499 increment the read pointer one less than it was supposed to.
1500 12.The TCP module now acknowledges TCP Keep-Alive packets which will help prevent
1501 connection loss if the remote node fills up our RX FIFO and then our window-update
1502 packet gets lost on the network/Internet. In stack version 4.02, a zero-window
1503 probe would have been required to restore the communications.
1504 13.Fixed a TCP RX FIFO corruption issue that would occur in (uncommon) circumstances
1505 when too many out-of-order segments arrived such that a second "hole" would have
1506 been required to accommodate the data. Thanks go to Iñaki Esparza and his eagle
1507 eyes on the Microchip Ethernet forum for finding this corner case bug.
1508 14.Inline assembly in the ETH97J60.c file has been modified to accommodate the C18
1509 Extended mode and C18 Auto default storage class. Previously, the Ethernet module
1510 would transmit garbage packets when using the C18 parameter stack.
1511 15.Fixed potential buffer overflow in NBNS.c's NBNSGetName() function where an
1512 unexpected string length retrieved from the packet could cause random memory
1513 corruption.
1514 16.Fixed some potential PIC18F97J60 family Ethernet module transmit lockup conditions
1515 that occur on some networks. Previously blocking while() loops would wait
1516 indefinitely for the ECON1<TXRTS> bit to become clear by hardware, which the
1517 hardware might never have done.
1518 17.In MainDemo.c, a call to DelayMs() was being made using a value of 100ms. This was
1519 too long for the underlying Delay1KTCYx() C18 function and would result in a
1520 shorter than expected delay when compiled with C18. This has been fixed with a
1521 loop. Thanks go to Andy123 on the Microchip Ethernet forum for pointing this
1522 problem out.
1523 18.Fixed a potential C18 memory overlaying problem in the TickUpdate() function.
1524 Previously, the local variable used in this function might have been overlayed on
1525 other memory, resulting in random memory corruption as the ISR occurred.
1526 19.The demo AJAX web pages in the TCPIP Demo App\WebPages folder now correctly display
1527 and self-refresh in Firefox 2. Previously, it would work in Firefox 1.5 and
1528 Microsoft Internet Explorer, but not Firefox 2. Thanks go to "gohsthb" on the
1529 Microchip Ethernet forum for identifying this correction.
1530 20.Rewrote the GenericTCPServer.c example to not use an application RAM FIFO for
1531 buffering. Since the TCP module implements its own FIFOing, the application has
1532 limited need for its own FIFO too. This fixes a previous bug where the
1533 GenericTCPServer was not checking the number of incoming bytes with the remaining
1534 size available of the App FIFO. This would have previously resulted in a buffer
1535 overflow, corrupting the RX data if too much arrived all at once.
1536 21.Fixed a potential MPFS classic inline ASM30 assembly code problem where web pages
1537 stored in internal Flash and C30 with optimizations enabled could result in data
1538 corruption.
1539 22.Fixed a UDPPut() tracking problem that would result in extra bytes being appended
1540 to the end of a packet if the UDPSetTxBuffer() function was used. This previously
1541 caused the SNMP module to send some junk data at the end of its packets.
1542 23.Fixed a potential TCP problem where transmitted FIN packets might not get
1543 retransmitted properly if the remote node never acknowledged the data that was
1544 transmitted just before the FIN was sent.
1545 24.Fixed a NetBIOS Name Service bug where the response packet would sometimes get sent
1546 to an incorrect address. It now consistently responds to the unicast MAC/IP
1547 address of the NBNS query packet.
1548 25.Added padding to all transmitted DHCP messages to make the minimum UDP payload at
1549 least 300 bytes. This fixes compatibility with some older BOOTP relay devices
1550 which discard smaller packets. Thanks go to Dave Collier on the Microchip Ethernet
1551 forum for pointing this problem out.
1552 26.Substantially shrunk the number of retransmission attempts made in the
1553 TCP_SYN_RECEIVED state. This improves recovery time when attacked by a SYN flood
1554 Denial of Service event. The recovery time is now 7 seconds (3 total packets)
1555 instead of 31 seconds (6 total packets)
1556 27.Fixed the possibility of the NetBIOS Name Service module giving out the board's
1557 static IP address before a DHCP lease could be obtained. NBNS requests are now
1558 only serviced when originating from nodes on the same subnet.
1559 28.Fixed storage of MPFS classic in internal program memory when using the HI-TECH
1560 PICC-18 compiler.
1561 29.Substantially revised TCP.c, fixing many TCP bugs and possibly adding new ones.
1562 Thanks go to Michael Rubinstein for finding several of these TCP problems.
1563 30.The DNS client module will now time out and return failure if the DNS server cannot
1564 be ARPed or does not respond to the DNS query. Each timeout is set to 1 second and
1565 3 total ARP and 3 total DNS query attempts are possible. Previously, it would
1566 retry indefinitely, causing the calling application to deadlock.
1567  
1568 Known Problems:
1569 1. Telnet server module does not implement a lot of Telnet functions. As a
1570 result, it will likely not display correctly or work at all with some Telnet
1571 clients. The server was tested with the Microsoft telnet.exe utility which
1572 is provided with Microsoft Windows.
1573 2. TFTPc module has not been tested with this version.
1574 3. If the DHCP client and DHCP server are used at the same time and you connect
1575 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
1576 a crossover cable), a race condition can occur where both nodes will disable
1577 their DHCP server and neither board will get a successful DHCP lease. If
1578 this unlikely scenario occurs, as a work around, simply reset one of the
1579 boards to reenable it's DHCP server.
1580 4. HI-TECH PICC-18 projects may not compile when targeting the external
1581 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
1582 internal Ethernet controller). This problem only applies when a
1583 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
1584 HPC_EXPLORER + Ethernet PICtail.
1585 5. HI-TECH PICC-18 projects will not correctly set the processor configuration fuses
1586 through code using the __CONFIG() macro. Ensure that the configuration fuses are
1587 manually set correctly via the MPLAB IDE Configuration Bits dialog. This problem
1588 has been observed with compiler version 9.50PL3.
1589  
1590  
1591 Testing and Performance Notes:
1592 1. Make sure to use MPLAB IDE 7.62 or higher with this version. Versions below 7.61
1593 will not work. Version 7.62 has cool new features like C auto-word complete and
1594 function parameter tooltips that can be enabled (disabled by default).
1595 2. Testing was done using MPLAB C18 version 3.12, MPLAB C30 version 3.01, and HI-TECH
1596 PICC-18 version 9.50PL3. Make sure to upgrade your tools to at least these
1597 versions.
1598  
1599  
1600 ********
1601 v4.02 10 April 2007
1602 ********
1603 IMPORTANT NOTE: You must use MPLAB 7.41 or higher to successfully open the
1604 MPLAB projects.
1605 IMPORTANT NOTE2:If an external serial EEPROM memory is used to store AppConfig,
1606 it's contents will be invalidated the first time you run this
1607 version, restoring the AppConfig defaults. The AppConfig
1608 structure has been optimized.
1609 IMPORTANT NOTE3:If an external serial EEPROM memory for MPFS, you will need to
1610 recreate the MPFS image and program your EEPROM. A 32 bit
1611 addressing format is now used.
1612  
1613 Changes:
1614 1. Implemented TCP RX packet order correction logic. The stack can now accept
1615 TCP frames that arrive out-of-order without requiring the remote node to go
1616 through a retransmit cycle. This dramatically improves RX performance when
1617 communicating over the Internet.
1618 2. UDPOpen() now can handle a NULL pointer for remoteNode. In this case, the
1619 broadcast IP/MAC addresses will be used for the remoteNode (destination
1620 address of outbound packets).
1621 3. Recreated MPLAB projects for the HI-TECH PICC-18 compiler. These were
1622 temporarily absent from 4.00RC. This project works with the PIC18F97J60
1623 with internal Ethernet module, assuming the correct compiler version is
1624 present.
1625 4. Moved all the headers around. Most of them are in
1626 "Microchip Solutions\Microchip\Include\TCPIP Stack" now. This change was
1627 made to again be more compatible with other (future) Microchip software
1628 libraries.
1629 5. New UDPPut() behavior. Now, if space in the Ethernet TX buffer runs out,
1630 the packet will not automatically be transmitted. You must call UDPFlush()
1631 to cause the packet to be transmitted.
1632 6. Added UDPGetArray(), UDPPutArray(), UDPPutROMArray(), UDPPutString() and
1633 UDPPutROMString() user API functions. These functions perform substantially
1634 better than calling UDPPut() successively and allow greater application
1635 programming flexibility.
1636 7. Changed TCPPutString() and TCPPutROMString() APIs to now return an updated
1637 string pointer instead of a count of bytes successfully placed in the TX
1638 buffer.
1639 8. Added UDPPerformanceTest.c. By default this module causes UDP packets
1640 containing 1024 bytes of application data to be broadcasted on UDP port
1641 12345. Use a packet sniffer, such as Wireshark (http://www.wireshark.com/)
1642 to capture and derive stack overhead/UDP TX performance characteristics with
1643 this module. Note that this test uses the UDPPutROMArray() function.
1644 Applications which use successive calls to UDPPut() will be slower. To
1645 enable this module, #define STACK_USE_UDP_PERFORMANCE_TEST in TCPIPConfig.h.
1646 9. Added TCPPerformanceTest.c. By default this module listens on TCP port
1647 12345. When a remote client connects, this server module will being
1648 transmitting the maximum possible amount of application data that it can,
1649 given your TCP TX FIFO size. Use a packet sniffer, such as Wireshark
1650 (http://www.wireshark.com/) to capture and derive stack overhead/TCP TX
1651 performance characteristics with this module. Any TCP client can be used,
1652 including readily available utilities such as the telnet.exe utility
1653 available on Microsoft Windows XP. To use it to connect to the test module,
1654 run: "telnet.exe xxx.xxx.xxx.xxx 12345" where xxx.xxx.xxx.xxx is the board's
1655 IP address. Note that this test uses the TCPPutROMArray() function.
1656 Applications which use successive calls to TCPPut() will be slower. To
1657 enable this module, #define STACK_USE_TCP_PERFORMANCE_TEST in TCPIPConfig.h.
1658 10.Added Reboot.c module. By default, this module listens on UDP port 30304.
1659 If the application byte 0x00 arrives on this port, the PIC will reset. This
1660 is primarily useful for remote Bootloader entry.
1661 #define STACK_USE_REBOOT_SERVER in TCPIPConfig.h to enable this module.
1662 Note that since no encrypted challenge/response algorithm is currently
1663 implemented, this module is a Denial of Service vulnerability, so it should
1664 not be enabled unless there is a specific need for it.
1665 11.Made the TickUpdate() ISR routine execute in the low priority ISR instead of
1666 the default high priority ISR. The Microchip TCP/IP stack does not need any
1667 interrupts except this low priority timer.
1668 12.Renamed STACK_USE_DHCP macro to STACK_USE_DHCP_CLIENT
1669 13.Added STACK_USE_MPFS macro.
1670 14.Changed UDPIsPutReady() to return a WORD instead of a BOOL. The WORD is the
1671 number of bytes that can be put into the buffer.
1672 15.Changed MACGetArray() to accept a NULL pointer. If NULL, the retrieved data
1673 will simply be discarded. This also changes the behavior of UDPGetArray()
1674 and TCPGetArray() to match, throwing bytes away if a NULL pointer is given.
1675 16.Added a very simple DHCP Server module. This module has limitations and is
1676 useful for a single client only. Its purpose is to allow you to directly
1677 connect the board to a standard PC through a crossover cable (no other
1678 network nodes attached). The server is coded to automatically disable
1679 itself if the DHCP client is also enabled and another DHCP server is
1680 detected on the network. This allows both the DHCP server and DHCP client
1681 to coexist without any manual reconfiguration.
1682 17.Added DNSResolveROM() function for resolving host names that are stored in
1683 program memory, ex: literal strings.
1684 18.Added a TCP automatic transmit/window update timer. It defaults to
1685 TCP_AUTO_TRANSMIT_TIMEOUT_VAL (40ms) after the first get or put operation
1686 following the last automatic transmit/window update. This timer enhances
1687 performance, especially when streaming data over the Internet where round
1688 trip times can be several tens to low hundreds of milliseconds. This also
1689 improves application coding flexibility as TCPFlush() need not be called
1690 anymore.
1691 19.Added TCP delayed ACKnowledgement timer. This conserves bandwidth by
1692 transmitting fewer ACKs and prevents inadvertently influencing remote slow
1693 start/collision avoidance and fast retransmit algorithms.
1694 20.Completely rewrote ICMP (ping) server module. It is now much smaller (ROM
1695 and RAM), faster, and can handle packets of 576 bytes or larger, if no IP
1696 fragmentation occurs.
1697 21.Rewrote StackTsk() stack manager. It is much simpler now.
1698 22.Added TCPFind(), TCPFindArray(), and TCPFindROMArray() user API functions.
1699 These functions peek inside a given TCP socket's RX FIFO (without removing
1700 anything) and looks for a particular byte or array of bytes. This should
1701 greatly simplify the creation of application code whenever variable length
1702 fields are used (ex: text strings terminated by \r\n). It supports case
1703 insensitive text searching or binary searching, as well as an offset to
1704 start searching at.
1705 23.Added TCPGetRxFIFOFree() user API. It returns the number of bytes of free
1706 space in the TCP's RX FIFO.
1707 24.Changed default TICK resolution to 1ms (from 10ms) and improved accuracy.
1708 25.Added outbound ping capabilities (i.e. board can now ping another board or a
1709 PC). To enable these features, define STACK_USE_ICMP_CLIENT. This will
1710 enable several new APIs, including ICMPBeginUsage(), ICMPSendPing(),
1711 ICMPGetReply(), and ICMPEndUsage(). The functions should be called in this
1712 order. See the PingDemo() function in MainDemo.c for an example of how to
1713 use them. By default, pushing BUTTON3 (left-most one) will cause a ping to
1714 be sent to 4.78.194.159 (ww1.microchip.com). The response time will be
1715 displayed on the LCD (assuming your development board has an LCD).
1716 26.Cleaned up C30 3.00 signed/unsigned warnings.
1717 27.Removed PIC18F97J60_TEST_BOARD hardware profile support. This stack no
1718 longer supports it due to the old beta silicon (with errata) mounted on
1719 these boards.
1720 28.Added support for ROM pointers for all of the SMTP strings (To, From, CC,
1721 Subject, etc.). If you use a ROM string, you must also set the
1722 corresponding SMTPClient.ROMPointers.xxx bit to let the SMTP module know
1723 which type of pointer was provided. See the SMTPDemo() code in MainDemo.c
1724 for and example calling sequence using both ROM and RAM strings for the
1725 various fields.
1726  
1727 Fixes:
1728 1. Fixed a critical TCP buffer corruption issue where the start of a TCB header
1729 overlapped with the last byte of the RX FIFO from the previous socket. This
1730 bug affected version 4.00RC only.
1731 2. ETH97J60.c, TCPIP.h, and TCPIP Stack Version.txt were correctly readded to
1732 the TCPIP Demo App-C18 project using relative paths instead of absolute
1733 paths.
1734 3. UDPOpen() now dynamically assigns a local port number if you call it and
1735 give it a 0x0000 port number. This should fix some UDP applications from
1736 not working (ex: DNS Client module) with some computers/routers/networks
1737 which throw away traffic originating from the invalid port 0x0000 value.
1738 4. Fixed a ENC28J60 bank selection error that would occur if an application
1739 called GetCLKOUT() in ENC28J60. By default, this function is not called.
1740 5. UnencodeURL() function in Helpers.c is now tested and working.
1741 6. Fixed a TCP Window Update problem when TCPGetArray() was used. Before the
1742 problem was fixed, performance could have been terrible on reception.
1743 7. Fixed a unintended TCP connection close if the socket was idle for about a
1744 minute. Now, TCP sockets will remain open indefinitely if there is no
1745 traffic going on.
1746 8. Serial numbers >32K are now displayed correctly on the serial port as a
1747 positive value when C18 is used and the board is placed in configuration
1748 mode (BUTTON0 is depressed on power up).
1749 9. HI-TECH PICC-18 compiler would previously incorrectly initialize the
1750 AppConfig structure.
1751 10.Previously a processor reset was possible when accessing items in the
1752 AppConfig strucutre on 16 bit MCUs (PIC24, dsPIC) due to unaligned word
1753 accesses. This was fixed by reordering the Flags byte in the APP_CONFIG
1754 structure.
1755 11.Rewrote DHCP client state machine, fixing the previously known problem
1756 where it would not perform a new discovery if it was trying to renew a lease
1757 with an offline DHCP server.
1758 12.Fixed a critical deadlock problem in the ETH97J60.c MAC layer driver for
1759 the PIC18F97J60 family Ethernet controller. Previously, it was possible
1760 (although rare) that the DMAST or TXRTS bits would get stuck set if too
1761 much Ethernet traffic was received within a short interval. Previously, the
1762 MACFlush() function was unnecessarily setting TXRST, which it should not do
1763 while the Ethernet interface or DMA is being used.
1764 13.Fixed an HTTP server state machine problem where a new connection occurring
1765 too soon on a previously used socket could cause the HTTP server to no
1766 longer respond.
1767 14.Fixed a potential memory corruption error in the HTTPGetVar() callback
1768 which would exceed the bounds of the VarString array when returning the
1769 VAR_STACK_DATE variable.
1770 15.Fixed a TCP transmission sequence tracking problem whenever data is
1771 retransmitted and new unflushed data is also in the TX FIFO. Thanks go to
1772 Matt Watkins on the Microchip Ethernet forum for identifying this issue.
1773  
1774 Known Problems:
1775 1. RTL8019AS MAC layer driver has not been updated for new TCP module. Users
1776 requiring RTL8019AS support should continue to use stack version 3.75.
1777 2. I2CEEPROM.c has not been tested or completed. Continue to use I2CEEPROM.c
1778 from stack version 3.75 if this file is needed.
1779 3. Telnet server module does not implement a lot of Telnet functions. As a
1780 result, it will likely not display correctly or work at all with some Telnet
1781 clients. The server was tested with the Microsoft telnet.exe utility which
1782 is provided with Microsoft Windows.
1783 4. TFTPc module has not been tested with this version.
1784 5. The default demo web pages which use AJAX do not automatically refresh
1785 themselves when viewed in Firefox 2.0.0.1. Earlier Firefox versions
1786 (1.5ish) probably work without any problem.
1787 6. Files may be inaccessible in your MPFS if compiled with C18 for internal
1788 flash program memory and your total MPFS content is large (around 64KB or
1789 larger). The code attempts to access the ROM memory using a near rom
1790 pointer when a far rom pointer is needed.
1791 7. If using MPLAB 7.52 all .s files that are compiled with C30 will not have
1792 the corresponding object file get stored in the correct directory. As a
1793 result, if you are compiling with C30 and with MPFS_USE_EEPROM not defined
1794 (i.e. storing web pages in internal program memory), the project won't link
1795 (throws a undefined reference to `MPFS_Start'). As a workaround, remove the
1796 Intermediates Directory in the MPLAB project. Alternatively upgrade MPLAB
1797 to a newer version. MPLAB IDE 7.60+ may have this fixed.
1798 8. If the DHCP client and DHCP server are used at the same time and you connect
1799 two similar boards to each other (ex: two PICDEM.net 2 boards connected via
1800 a crossover cable), a race condition can occur where both nodes will disable
1801 their DHCP server and neither board will get a successful DHCP lease. If
1802 this unlikely scenario occurs, as a work around, simply reset one of the
1803 boards to renable it's DHCP server.
1804 9. HI-TECH PICC-18 projects may not compile when MPFS_USE_EEPROM is not
1805 defined and you are trying to store web page data in internal
1806 FLASH program memory.
1807 10.HI-TECH PICC-18 projects may not compile when targeting the external
1808 ENC28J60 chip on the PICDEM.net 2 development board (instead of the
1809 internal Ethernet controller). This problem only applies when a
1810 PIC18F97J60 family part is the target. I.e. it compiles correctly for the
1811 HPC_EXPLORER + Ethernet PICtail.
1812  
1813 Testing and Performance Notes:
1814 1. This stack version was compiled and tested with the following tool versions:
1815 -MPLAB IDE 7.52
1816 -Microchip C30 version 3.00
1817 -Microchip C18 version 3.10
1818 -HI-TECH PICC-18 version 9.50PL3
1819 2. Using the UDPPerformanceTest.c module, the stack can transmit around
1820 220KBytes/second (1.75Mbits/second) of UDP application data on the
1821 PIC18F97J60 with internal Ethernet @ 41.66667MHz core clock, compiled using
1822 C18 3.10 with debug optimization settings.
1823 3. Using the UDPPerformanceTest.c module, the stack can transmit around
1824 392KBytes/second (3.14Mbits/second) of UDP application data on the
1825 PIC24HJ256GP610 with external ENC28J60 @ 40 MIPS, compiled using
1826 C30 3.00 with debug optimization settings.
1827 4. Using the TCPPerformanceTest.c module, the stack can transmit around
1828 58KBytes/second (464Kbits/second) of TCP application data on the
1829 PIC18F97J60 with internal Ethernet @ 41.66667MHz core clock, compiled using
1830 C18 3.10 with debug optimization settings, over Ethernet when using a tiny
1831 200 byte TX TCP FIFO. Note that performance can be improved significantly
1832 by increasing the FIFO size and performance will drop significantly if the
1833 round trip TCP acknowledgement time is increased (ex: testing over the
1834 Internet instead of Ethernet).
1835 5. Using the TCPPerformanceTest.c module, the stack can transmit around
1836 69KBytes/second (558Kbits/second) of TCP application data on the
1837 PIC24HJ256GP610 with external ENC28J60 @ 40 MIPS, compiled using
1838 C30 3.00 with debug optimization settings, over Ethernet when using a tiny
1839 200 byte TX TCP FIFO. Note that performance can be improved significantly
1840 by increasing the FIFO size and performance will drop significantly if the
1841 round trip TCP acknowledgement time is increased (ex: testing over the
1842 Internet instead of Ethernet).
1843 6. Using the TCPPerformanceTest.c module, the stack can transmit around
1844 178KBytes/second (1.42Mbits/second) of TCP application data on the
1845 PIC24HJ256GP610 with external ENC28J60 @ 40 MIPS, compiled using
1846 C30 3.00 with debug optimization settings, over Ethernet when using a larger
1847 2000 byte TX TCP FIFO. Note that performance will drop significantly if the
1848 round trip TCP acknowledgement time is increased (ex: testing over the
1849 Internet instead of Ethernet).
1850  
1851  
1852 ********
1853 v4.00RC 28 December 2006
1854 ********
1855 IMPORTANT NOTE: If an external serial EEPROM memory is used to store AppConfig,
1856 it's contents will be invalidated the first time you run this
1857 version, restoring the AppConfig defaults. The AppConfig
1858 structure has been optimized.
1859 IMPORTANT NOTE2: If an external serial EEPROM memory for MPFS, you will need to
1860 recreate the MPFS image and program your EEPROM. A 32 bit
1861 addressing format is now used.
1862  
1863  
1864 Changes:
1865 1. Added Simple Mail Transfer Protocol (SMTP) client module and updated
1866 MainDemo.c to exercise the Email transmission functionality when a user
1867 pushes BUTTON0.
1868 2. Added beta Telnet server module. See Known Problems section.
1869 3. Completely revamped the TCP module. A real transmit FIFO and receive FIFO
1870 are allocated for each TCP socket now. This greatly enhances RFC compliance,
1871 communications robustness, and makes application development easier. New
1872 APIs were added for putting and getting arrays and strings (including ROM
1873 variants). Several TCP related bugs are now fixed as a result. Please
1874 report any bugs found in the new implementation.
1875 4. Added TCPPutArray() API.
1876 5. Added TCPPutROMArray() API.
1877 6. Added TCPPutString() API.
1878 7. Added TCPPutROMString() API.
1879 8. Added TCPGetArray() API.
1880 9. Changed TCPIsPutReady() API. Instead of returning a BOOL, it now returns a
1881 WORD. The WORD is a count of the number of bytes that TCPPut(),
1882 TCPPutArray(), etc. can immediately place in the output buffer. MAKE SURE
1883 THAT YOUR CODE DOES NOT COMPARE THE RETURN RESULT OF TCPIsPutReady()
1884 DIRECTLY TO TRUE. For example, "if(TCPIsPutReady(MySocket) == TRUE){...}"
1885 must be converted over to: "if(TCPIsPutReady(MySocket)){...}".
1886 10.Changed TCPIsGetReady() API. Instead of returning a BOOL, it now returns a
1887 WORD. The WORD is a count of the number of bytes that TCPGet() or
1888 TCPGetArray() can immediately obtain. MAKE SURE THAT YOUR CODE DOES NOT
1889 COMPARE THE RETURN RESULT OF TCPIsGetReady() DIRECTLY TO TRUE. For example,
1890 "if(TCPIsGetReady(MySocket) == TRUE){...}" must be converted over to:
1891 "if(TCPIsGetReady(MySocket)){...}".
1892 11.Changed TCPDiscard() return type from BOOL to void.
1893 12.Removed TCP_NO_WAIT_FOR_ACK option. It was defaulted to disabled in the
1894 last two releases of the stack and is not needed with the new TCP module.
1895 13.Updated DNS module to include two new required APIs: DNSBeginUsage() and
1896 DNSEndUsage(). These functions control a one bit ownership semaphore to
1897 allow multiple applications to use the DNS module in series. If invoked
1898 correctly, this will prevent unintended bugs resulting from two applications
1899 trying to use the DNS module at the same time. Old applications, such as
1900 those based around the GenericTCPClient.c example must be updated to use
1901 these functions.
1902 14.Started using a new project structure and folders. You must use MPLAB 7.41
1903 or higher (stack is tested on MPLAB 7.50) to use the default
1904 workspaces/projects, which include files using relative paths. This should
1905 improve compatibility with some future code libraries released by Microchip.
1906 StackTsk.h was broken into TCPIPConfig.h, HardwareProfile.h, and StackTsk.h.
1907 TCPIPConfig.h now includes all stack configuration options and
1908 HardwareProfile.h contains all hardware options. No macros need be globally
1909 defined in MPLAB project now. TCPIP.h is the only header applications must
1910 include now, for any/all modules used.
1911 15.Combined ARP.c/ARP.h and ARPTsk.c/ARPTsk.h into a single file pair:
1912 ARP.c/ARP.h. Applications built using a prior stack revision must remove
1913 all instances including "ARPTsk.h" and replace it with "ARP.h" instead. The
1914 ARP module is now simpler, more linear (easier to read), and being in one
1915 source file, allows the C compiler to optimize better.
1916 16.Added PIC18F67J60_TEST_BOARD hardware profile to HardwareProfiles.h. This
1917 hardware profile is designed for 05-60091 (Rev 1), a development board that
1918 is not in production at this time.
1919 17.Added DSPICDEMNET1 and DSPICDEMNET2 hardware profiles to HardwareProfiles.h
1920 for eventual support of the Microchip dsPICDEM.net 1 and dsPICDEM.net 2
1921 demo boards. These two boards use the RTL8019AS Ethernet controller and a
1922 24LC515 EEPROM. These changes are currently incomplete and these profiles
1923 cannot be used.
1924 18.Began rewriting I2CEEPROM.c to support 16 bit CPUs, including the
1925 dsPIC30F6014 used on the dsPICDEM.net 1 and 2 demo boards. Note that work
1926 here is incomplete and cannot be used as a result -- see Known Problems
1927 section.
1928 19.Partially updated RTL8019AS.c to support 16 bit CPUs, including the
1929 dsPIC30F6014 used on the dsPICDEM.net 1 and 2 demo board. Note that work
1930 here is incomplete and cannot be used as a result -- see Known Problems
1931 section.
1932 20.Updated SNMP.c to use new typedefs in GenericTypedefs.h. Also SNMP was
1933 tested in this version. SNMP.mib was updated some to better reflect current
1934 hardware.
1935 21.Added AN870 SNMP callbacks to MainDemo.c (a feature that was missing in
1936 3.xx releases). This code will get compiled when STACK_USE_SNMP_SERVER is
1937 defined in TCPIPConfig.h.
1938 22.Removed all instances of MPFS_USE_PGRM for storing in internal FLASH program
1939 memory. Storage in internal program memory is now the default. Define
1940 MPFS_USE_EEPROM to override the default and store MPFS in an external EEPROM
1941 memory.
1942 23.Decreased program memory needed for Announce.c module by about 180 bytes.
1943 Multiple inline calls to UDPPut() were removed.
1944 24.UDP checksum checking logic has been improved. The UDP layer now avoids
1945 writing the pseudo header checksum in the RX buffer.
1946 25.Swapped endianess of the returned checksum from CalcIPBufferChecksum().
1947 Rewrote CalcIPBufferChecksum() in Helpers.c. This improves consistency.
1948 26.Improved swapl() in Helpers.c.
1949 27.Improved USART baud rate (SPBRG) calculation for PIC18s. Rounding is now
1950 done to chose the most optimal value and the code will automatically select
1951 high baud rate mode (BRGH=1) if possible. Additional improvements can be
1952 made if using a newer PIC18 with the 16 bit baud rate generator.
1953 28.Added GenericTCPServer.c example file to complement GenericTCPClient.c. The
1954 server is enabled by defining STACK_USE_GENERIC_TCP_SERVER_EXAMPLE in
1955 TCPIPConfig.h.
1956 29.Renamed STACK_USE_GENERIC_TCP_EXAMPLE definition to
1957 STACK_USE_GENERIC_TCP_CLIENT_EXAMPLE for consistency with new server
1958 example.
1959 30.Defaulted MPFS.exe to generate binary MPFS images using 32 bit addressing.
1960 MPFS.h has been modified to also default to use 32 bit addressing of
1961 external EEPROM images. You must rebuild any old MPFS images and reprogram
1962 them if upgrading from a previous TCP/IP stack revision, which defaulted to
1963 use 16 bit addressing.
1964 31.Updated MPFS.exe to #include "TCPIP.h" instead of "..\Headers\Compiler.h" in
1965 C files generated by the utility.
1966 32.Added MPFSv2.exe PC utility for generating large MPFS images in program
1967 memory (ASM30 code) for C30 users. Previously, the C30 compiler placed a
1968 limit of less than 32KB of total MPFS size due to the PSV window size
1969 limitation on PIC24/dsPIC devices. To get around the limitation, use the
1970 new MPFSv2.exe utility to generate an .s file which can be included in your
1971 project instead of the .c file generated by the traditional MPFS.exe utility.
1972  
1973 Fixes:
1974 1. Fixed a bug in ARPProcess() which would incorrectly send an ARP response to
1975 an incorrect MAC & IP address if a TX buffer wasn't immediately available.
1976 2. Fixed a TCP bug where TCPIsGetReady() would return TRUE even if no data was
1977 left in the recieved packet. Previously you had to call TCPGet() one last
1978 time and have it fail before TCPIsGetReady() would return FALSE.
1979 3. Modified TCP state machine. Established connections will no longer
1980 automatically close if left idle for approximately 45 seconds. Note that
1981 your application needs to ensure that no sockets unintentionally get lost
1982 (For example: a server socket that received data only is established and the
1983 cable breaks while connected. In this case, the socket would never be
1984 detected as being disconnected since the server never attempts to transmit
1985 anything).
1986 4. Stopped overclocking dsPIC33 and PIC24H devices. Previously PLLFBD was
1987 incorrectly set to 39 instead of 38 to yield a resulting Fosc of 84MHz
1988 (42MIPS) instead of 80MHz (40MIPS) with the default Explorer 16 development
1989 board. Thanks go to Matt Watkins on the Microchip Ethernet Forum for
1990 pointing this error out.
1991 5. Corrected a bug in IP.c where IPHeaderLen would not be properly initialized
1992 if a NON_MCHP_MAC was used (ex: RTL8019AS) and IPSetRxBuffer() was called.
1993 This bug did not affect ENC28J60 or PIC18F97J60 family support. Thanks go
1994 to Darren Rook for identifying this issue.
1995 6. Updated checksum checking code in ENC28J60.c for latest silicon DMA checksum
1996 errata.
1997 7. Declared TickCount in Tick.c/Tick.h as volatile and implemented an interrupt
1998 safe reading procedure in TickGet(). Since this multibyte variable is
1999 modified in the ISR and read in the mainline code, these changes are needed
2000 to prevent rare inconsistency bugs.
2001 8. Fixed Announce.c so the unicast remoteNode of the requesting packet would be
2002 used rather than the remoteNode of the last received packet, which may not
2003 be correct when transmitting. Thanks go to Brett Caulton for identifying
2004 this issue.
2005 9. Fixed a DHCP bug which would cause DHCP renewals to continually occur after
2006 only 60 seconds once the original lease expired. Thanks go to Brett Caulton
2007 for identifying this issue and fix.
2008 10.Fixed a potential TCP socket leak in the FTP module. Previously
2009 FTPDataSocket would not be reliably initialized nor closed if the connection
2010 was killed forcefully (user killed application, cable disconnected while
2011 transferring, etc.).
2012  
2013 Known Problems:
2014 1. RTL8019AS MAC layer driver has not been updated for new TCP module. Users
2015 requiring RTL8019AS support should continue to use stack version 3.75.
2016 2. I2CEEPROM.c has not been tested or completed. Continue to use I2CEEPROM.c
2017 from stack version 3.75 if this file is needed.
2018 3. Telnet server module is still in development. No user authentication
2019 features are currently implemented. Some telnet clients may render the
2020 telnet server output incorrectly (in the wrong locations or wrong colors).
2021 Testing has only been done with the Microsoft Windows telnet.exe utility
2022 that comes Windows XP.
2023 4. DHCP will continually send out DHCP Request packets when the lease expires and the
2024 original DHCP server that gave the lease is offline. The board will continue to
2025 use the expired IP address until the DHCP server comes back online, at which point
2026 the lease will be renewed or a new discovery will occur. A new discovery should
2027 occur after timing out, instead. It is believed that this problem has always
2028 existed in previous stack revisions.
2029 5. DHCP will continually send out DHCP Request packets when the lease expires and the
2030 original DHCP server that gave the lease does not include Option 54, the Server
2031 Identifier. A new discovery should occur after timing out. It is believed that
2032 this problem has always existed in previous stack revisions.
2033 6. TFTPc module has not been tested with this version.
2034 7. Serial numbers >32K will be displayed on the serial port as a negative value when
2035 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2036 on power up).
2037  
2038  
2039  
2040 ********
2041 v3.75 14 August 2006
2042 ********
2043 Changes:
2044 1. Added beta DNS client module (DNS.c). DHCP was also updated to obtain a DNS
2045 server address. Added AppConfig.PrimaryDNSServer IP address. Added STACK_USE_DNS
2046 configuration macro. To use the DNS client, call DNSResolve() with the server name,
2047 ex: DNSResolve("www.microchip.com"), and then periodically call DNSIsResolved()
2048 until it returns TRUE, ex: DNSIsResolved(&IPAddressDestination). Only one DNS
2049 resolution can be in progress at a time. Because the DNS client is a beta module,
2050 the API or code may change before being finalized. No formal DNS API documentation
2051 is available yet.
2052 2. Added beta NetBIOS Name Service responder module (NBNS.c). Added
2053 AppConfig.NetBIOSName string. Added STACK_USE_NBNS configuration macro. Added
2054 MY_DEFAULT_HOST_NAME macro in StackTsk.h. Now, whenever a NetBIOS broadcast
2055 attempting to resolve AppConfig.NetBIOSName arrives, a response will be made.
2056 This form of name resolution only works on a single subnet. Off the subnet,
2057 manual registration in a DNS server or other means will be needed to allow the
2058 local Host Name to be recognized and translated to an IP address. The default
2059 NetBIOS name for the board is "MCHPBOARD". To test the NetBIOS Name Service
2060 module, try entering http://MCHPBOARD/ into your web browser instead of the board's
2061 IP address.
2062 3. Added beta HTTP client module (GenericTCPClient.c). This module demonstrates how
2063 to make a TCP client application. To test this module, uncomment the
2064 STACK_USE_GENERIC_TCP_EXAMPLE macro in StackTsk.h, recompile, and then press the
2065 BUTTON1 button while the stack is running. RemoteURL[] should be downloaded from
2066 ServerName[] and written to the UART. For the default values of ServerName[] and
2067 RemoteURL[], the HTML search page for "Microchip" will be fetched from
2068 "www.google.com" and written to the serial port. No formal documentation is
2069 available for this example yet.
2070 4. Added Embedded Ethernet Device Discoverer PC project to aid in embedded product
2071 discovery when connected to a network and demonstrate how to write PC applications
2072 which can communicate with embedded devices. The source code for this device is
2073 included. It can be built using the Microsoft Visual C# 2005 Express Edition
2074 compiler. At the time of stack release, this 3rd party PC development tool can be
2075 downloaded at no cost from http://msdn.microsoft.com/vstudio/express/. If using
2076 only the Microchip Device Discoverer executable file without the Visual C# compiler,
2077 the .NET Framework 2.0 must be installed on the local PC. The application setup
2078 utility should allow dynamic downloading of this component if the target machine
2079 does not already have it installed.
2080 5. Updated Announce.c to listen and respond to discovery requests sent to UDP port
2081 30303 starting with the character 'D'. To test this functionality, use the
2082 Embedded Ethernet Device Discoverer on a PC connected to the same subnet.
2083 6. Updated UART configuration menu to accommodate the new beta module configuration
2084 options (DNS server address, device host name).
2085 7. Increased MPFS reserve block to 64 bytes from 32. Also, because the APP_CONFIG
2086 structure was updated, all current MPFS images and data stored in deployed EEPROMs
2087 needs to be updated.
2088 8. Added a means to erase (invalidate) the onboard EEPROM using the BUTTON0 momentary
2089 switch (right-most switch on demo boards with multiple switches). To erase the
2090 EEPROM, hold down BUTTON0, RESET the board (press and release MCLR switch), and
2091 then continue to hold down BUTTON0 for an additional 4 seconds. If you press MCLR
2092 again, the EEPROM contents will now be invalid. If you press '0' on the UART, the
2093 same configuration that was read prior to invalidating the contents will be
2094 written back into the EEPROM. Invalidating the EEPROM allows the MY_DEFAULT_*
2095 constants to get loaded into a previously programmed EEPROM chip. Because of
2096 change #7, this procedure should be done for all currently programmed EEPROMs to
2097 prevent anomalous values from being read.
2098 9. remoteNode in StackTsk.c was changed from private to global scope. Now external
2099 modules can reference the address of the last received packet. Announce.c uses
2100 this to send a unicast response to a broadcast discovery request.
2101 10.All stack modules that can be disabled (DHCP.c, FTP.c, etc) now will no longer
2102 emit a compiler error if you have it in the project without defining the
2103 appropriate macro (STACK_USE_DHCP, STACK_USE_FTP, etc). It will simply generate
2104 no machine code when compiled and the stack will not use that module. Make sure
2105 the proper macro is defined for each module that you wish to use.
2106 11.Added SetRXHashTableEntry() to ENC28J60.c. This function can be used to set the
2107 appropriate bit in the Hash Table registers to join a particular multicast group.
2108 12.Added Realtek RTL8019AS Ethernet controller support to the stack. MAC.c was
2109 renamed to RTL8019AS.c. This Ethernet controller is not recommended for new
2110 designs. RTL8019AS support was reintroduced to provide ongoing assistance to
2111 former Application designs implementing this chip. For new applications, use the
2112 Microchip ENC28J60 or PIC18F97J60 family of microcontrollers.
2113 13.Added I2C EEPROM support for MPFS storage. In older 2.xx stack revisions, I2C
2114 EEPROM was supported by the XEEPROM.c file. This file has been renamed to
2115 I2CEEPROM.c. It is mutually exclusive with SPIEEPROM.c, and only one may be
2116 included in the project at a time.
2117 14.Added new hardware definitions to Compiler.h. Pin mappings for the PICDEMNET and
2118 PIC18F97J60_TEST_BOARD boards have been added. FS_USB was also defined; however,
2119 it is untested and not recommended. See Compiler.h. The PIC18F97J60_TEST_BOARD is
2120 a non-production board that some Early Adopters of the PIC18F97J60 family parts
2121 have.
2122 15.Changed type definitions for BYTE_VAL, WORD_VAL, DWORD_VAL, and moved the generic
2123 typedefs to GenericTypeDefs.h from StackTsk.h. This should improve compatibility
2124 with some future code libraries released by Microchip.
2125 16.LCDBlocking.c module was modified to support 4-bit interfaces to LCD modules. The
2126 PICDEM.net board has the module wired using a 4-bit bus.
2127  
2128  
2129 Fixes:
2130 1. Fixed a serious MAC TXBuffer leak in TCP.c. Previously TCP.c would allocate a
2131 buffer for each socket in use, but under heavy traffic conditions (ex: user holds
2132 down F5 on web browser), the buffer handle might have been discarded before
2133 releasing the buffer. As a result all TCP connections would have lost the ability
2134 to send any application data after the TXBuffer pool ran out.
2135 2. In the TCP_SYN_SENT TCP state, ACKs may only be received (as opposed to SYN+ACK
2136 packets) if the remote node thinks the connection is already open. A RST is now
2137 sent in response to an unexpected ACK, which may improve reconnection time when
2138 this (rare) condition occurs.
2139 3. A bug was present in the UDP module where remote MAC addresses would be cached for
2140 each socket, even when UDPInit() or UDPClose() was called, or the microcontroller
2141 was reset. As a result, responses to incoming packets could have been sent to the
2142 wrong MAC address. UDP Sockets are now properly initialized/closed.
2143 4. Fixed a potential timing bug in LCDBlocking.c. For lower values of CLOCK_FREQ,
2144 insufficient delay time was given to the LCD module, potentially causing improper
2145 operation.
2146 5. Changed PIC24F to default to the XT oscillator fuse rather than HS. The
2147 PIC24FJ128GA010 data sheet, rev. C reports that 8MHz should be used with XT mode,
2148 not HS mode like prior data sheets.
2149 6. Added a couple of wait states to the Realtek RTL8019AS MAC layer module for
2150 NICPut() and NICGet(). Previously, the PICmicro could not operate above
2151 approximately 25MHz without losing communication with the RTL8019AS chip.
2152 7. Updated PC based MPFS utility. When generating C files to be added to your MPLAB
2153 project, the include path to "Compiler.h" is now "..\Include\Compiler.h". The
2154 output file, ex: "MPFSImg.c" should be placed in the "Source" subfolder before
2155 compiling. For example, if you are in the main stack folder with the MPLAB
2156 projects, type: "mpfs /c WebPages Source\MPFSImg.c"
2157 8. IP Gleaning will now get properly disabled when, through the RS232 configuration
2158 application, DHCP and IP Gleaning are disabled. The stack will still respond to
2159 ping requests which have the wrong destination IP address, but a correct MAC
2160 address. However, the stack will continue to keep its statically defined IP
2161 address when DHCP/IP Gleaning are disabled and the ping arrives.
2162 9. SPIEEPROM.c now saves and reconfigures the EEPROM_SPICON1 register (SSPCON1) before
2163 reading or writing to the SPI. After the read/write, it restores the saved state.
2164 This allows the SPI bus to operate at different speeds, depending on what
2165 peripheral is being accessed if other devices share the bus and can support
2166 different speeds. In particular, this fixes the SPI @ 10.4MHz problem on the
2167 PICDEM.net 2 board when using the ENC28J60.
2168  
2169  
2170 Known Problems:
2171 1. DHCP will continually send out DHCP Request packets when the lease expires and the
2172 original DHCP server that gave the lease is offline. The board will continue to
2173 use the expired IP address until the DHCP server comes back online, at which point
2174 the lease will be renewed or a new discovery will occur. A new discovery should
2175 occur after timing out, instead. It is believed that this problem has always
2176 existed in previous stack revisions.
2177 2. DHCP will continually send out DHCP Request packets when the lease expires and the
2178 original DHCP server that gave the lease does not include Option 54, the Server
2179 Identifier. A new discovery should occur after timing out. It is believed that
2180 this problem has always existed in previous stack revisions.
2181 3. When an MPFS .c image file is added to a C30 project, a linking error reporting
2182 insufficient contiguous .const memory may occur when too much data is in the MPFS
2183 image (PSV window size limitation). Using the PSV window, 1 out of every 3 program
2184 memory bytes is wasted.
2185 4. MACSetPMFilter(), MACDisablePMFilter(), and MACCopyRxToTx() have not been tested
2186 and possibly do not work.
2187 5. SNMP, TFTPc modules have not been tested with this version.
2188 6. Serial numbers >32K will be displayed on the serial port as a negative value when
2189 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2190 on power up).
2191 7. The C30 linker may misplace the __CONFIG2 section or disallow usage of MPFS images
2192 that are too big (add too much to the .const code section). The consequences of
2193 this are that the first configuration word at 0x157FC may not get set through code
2194 (must use the Configuration Bits dialog instead), and/or the project will not
2195 compile. This problem has been observed with C30 ver. 2.02 on the PIC24FJ128GA010
2196 product. To work around this problem, the p24FJ128GA010.gld linker script has
2197 been modified. Specifically, line 68 has been commented out, which causes the
2198 linker to place all .text sections after placing all absolute sections. SSR 25966
2199 in the C30 2.02 release notes may be related.
2200 8. It is observed with the Realtek RTL8019AS Ethernet controller and the demo AJAX
2201 web page which self refreshes rapidly, that occasional HTTP GET requests sent by
2202 the computer do not get received by the HTTP server. This is believed to be a
2203 RTL8019AS MAC layer bug. The TCP protocol handles the packet loss, but
2204 application performance suffers while waiting for the TCP retransmission. This
2205 problem is not observed with ENC28J60.c or ETH97J60.c MAC layers.
2206 9. The HI-TECH compiler version 9.50PL1 crashes when compiling LCDBlocking.c with 4
2207 bit mode (PICDEMNET) and using a warning level of -3 or higher. To work around
2208 the problem, the HI TECH projects were set to use warning level -4.
2209  
2210  
2211 Guiding Notes:
2212 1. To use the stack on a classic PICDEM.net demo board with the Realtek Ethernet
2213 controller, a PIC18F452 processor, and Microchip C18:
2214 -Use the C18EEPROM MPLAB project
2215 -Change the processor in the MPLAB IDE
2216 -Change linker script to "18f452i.lkr" in the MPLAB project. Use the one provided
2217 in the Linker subfolder, it has been modified to make more RAM available.
2218 -Update the hardware definitions macro. Click on Project -> Build Options... ->
2219 Project -> MPLAB C18 -> Add PICDEMNET, remove HPC_EXPLORER)
2220 -Remove ENC28J60.c from the project
2221 -Remove SPIEEPROM.c from the project
2222 -Add RTL8019AS.c to the project
2223 -Add I2CEEPROM.c to the project
2224 -Enable all compiler optimizations (Project -> Build Options... -> Project -> MPLAB
2225 C18 -> Categories Optimization -> Enable all)
2226  
2227  
2228  
2229 ********
2230 v3.60 12 July 2006
2231 ********
2232 General Information:
2233 This stack version is being publicly released, so the following changes are with
2234 respect to the prior public stack release (v3.02). Interim stack changes for version
2235 3.16 and 3.50 are documented below for those using non-public releases, but can be
2236 ignored by most people.
2237  
2238  
2239 Troubleshooting notes:
2240 1. If you have an Ethernet PICtail revision 2.1 and are having reliability issues when
2241 viewing the fast-refresh demo web page, you may need to install resistors in series
2242 with the ENC28J60 SI, nCS, and SCK pins. The recommended value is 100 to 200 ohms.
2243 This will reduce signal undershoot caused by long traces (parasitic inductance),
2244 which can violate the absolute maximum electrical specs and cause SPI data
2245 corruption. The HPC Explorer Rev 5 has fairly long traces to the PICtail connector.
2246 2. Enabling C30 2.02 compiler optimizations on the dsPIC33FJ256GP710, PIC24HJ256GP610
2247 ES chips may produce unreliable code.
2248 3. When changing a C30 project to a PIC24H or dsPIC33F processor on the Explorer 16
2249 demo board, the JTAG configuration fuse should be disabled to free the I/O pins
2250 associated with it. JTAG is enabled by default.
2251 4. This stack release was tested using MPLAB 7.40, C18 version 3.03, C30 version 2.02,
2252 and HI TECH PICC18 version 9.50PL1.
2253 5. When using the Ethernet PICtail board and HPC Explorer demo boards, make sure to
2254 plug the power into the Ethernet PICtail and not the HPC Explorer. The HPC
2255 Explorer's power regulator cannot provide enough current.
2256  
2257  
2258 Changes:
2259 1. Source files have been split into separate directories. To compile old
2260 applications with this new stack, application source files may need to be updated
2261 to include the proper path to the stack header files.
2262 2. New MPLAB projects have been created:
2263 -C18EEPROM: Equivalent to the previously named "mpnicee" project. Designed for
2264 PIC18's using the C18 compiler. Web page content, board's IP address,
2265 MAC address, DHCP enabled state, etc. is stored in an external SPI
2266 EEPROM (25LC256 on demo boards). FTP Server demo is included.
2267 -C30EEPROM: New supporting PIC24 and dsPIC controllers using the C30 compiler.
2268 Similar to C18EEPROM.
2269 -C18ProgramMem: Equivalent to the previously named "mpnicpg" project. Web page
2270 content stored in internal FLASH program memory. Board's IP
2271 address, MAC address, DHCP enabled state, etc. is stored only in
2272 RAM and defaults are loaded from MY_DEFAULT_* constants in
2273 StackTsk.h. FTP Server demo is not included. Web pages cannot be
2274 updated remotely.
2275 -C30ProgramMem: New supporting PIC24 and dsPIC controllers using the C30 compiler.
2276 Similar to C18ProgramMem.
2277 -HTC18EEPROM: Equivalent to the previously named "htnicee" project. Designed for
2278 PIC18's using the HI TECH PICC18 compiler. Similar to C18EEPROM.
2279 -HTC18ProgramMem: Equivalent to the previously named "htnicpg" project. Designed
2280 for PIC18's using the HI TECH PICC18 compiler. Similar to
2281 C18ProgramMem.
2282 3. Created hardware definitions (pins, interrupt flags, special registers, etc) in
2283 Compiler.h for easy changing of hardware. Four demo board combinations are
2284 supported out-of-box now:
2285 -EXPLORER_16: Explorer 16 motherboard + Ethernet PICtail Plus daughter card.
2286 Tested with dsPIC33FJ256GP710, PIC24HJ256GP610, and
2287 PIC24F128GA010 ES PIMs.
2288 -HPC_EXPLORER: PICDEM HPC Explorer motherboard + Ethernet PICtail daughter
2289 card. Tested with PIC18F8722 onboard and PIC18F87J10 PIM.
2290 -DSPICDEM11: dsPICDEM 1.1 motherboard + Ethernet PICtail daughter card
2291 (manually air wired). See Compiler.h for proper pins to air wire.
2292 Tested with dsPIC30F6014A PIM.
2293 -PICDEMNET2: PICDEM.net 2 motherboard (PIC18F97J60)
2294 Change boards by changing the defined macro (Project -> Build Options... ->
2295 Project -> MPLAB Cxx -> Add macro). When moving to custom hardware, add an
2296 appropriate profile to Compiler.h. YOUR_BOARD is present as a placeholder.
2297 4. Added Ethernet PICtail Plus schematic (reference ENC28J60 daughter card design for
2298 Explorer 16 demo board). These boards have a Microchip part number of AC164123.
2299 5. Latest ENC28J60 rev. B5 errata workarounds added. The code checks the EREVID
2300 register and implements the appropriate workarounds as needed for the silicon
2301 revision, so rev. B1, B4, and B5 are all supported in this stack release.
2302 6. Significantly revised demonstration web page content in WebPages folder to use
2303 AJAX technology. Using asynchronous JavaScript code executing in the web browser,
2304 the status sections of the page are updated rapidly from the web server without
2305 doing a full page refresh. As a result, a virtually real time update of the
2306 potentiometer and button values can be displayed. Due to the constant use of new
2307 TCP sockets, multiple simultaneous users are not recommended. See the Index.cgi
2308 file for a simple static method of retrieving dynamic variables from the HTTP
2309 server.
2310 7. Changed IP Gleaning procedure. Now, if DHCP is enabled, the DHCP module will
2311 continue to look for a new IP address/renew existing IP address if the IP address
2312 is configured using IP Gleaning. Previously, the DHCP module would be disabled
2313 once a successful ICMP packet was received and used to configure the IP address.
2314 8. MAX_RETRY_COUNTS is 3 (previously it was 3, but an interim release changed it to 5).
2315 9. Updated TCP state machine. It now includes the TCP_FIN_WAIT_2 state. Some other
2316 changes were made to handle errors more robustly.
2317 10.AN0String and AN1String now return all characters excluding the null terminator
2318 when the HTTP server calls HTTPGetVar (except when the string is 0 length).
2319 Previously, the null terminator was returned as well.
2320 11.Dynamic pages (ie: .cgi files) are now served with an expired HTTP header to
2321 prevent browser caching and allow more dynamic content to be displayed.
2322 12.Support for the HI TECH PICC18 compiler has changed. Special Function Register
2323 bits and other definitions have changed substantially from the previous HI TECH
2324 PICC18 projects in TCP/IP stack version 3.02 and earlier. The C18/C30 SFR and
2325 SFRbits naming conventions are now used and special remapping macros in Compiler.h
2326 are used to maintain a consistent syntax. The HI TECH PICC18 projects were tested
2327 with compiler version 9.50PL1 on the HPC Explorer board (PIC18F8722).
2328 13.FTP client hash printing has been added to the FTP server. Now, whenever a chunk
2329 of data is successfully uploaded to the device, a '#' character will appear on the
2330 FTP client screen. The numbers of bytes each '#' represents is variable.
2331 14.To improve maintainability, built in support for the "Compatible" A/D converter
2332 present on older PIC18 parts (ex: PIC18F452) has been removed.
2333 15.Removed old LCD code originally provided for the PICDEM.net demo board.
2334 16.Added LCDBlocking.c and LCDBlocking.h, which implement simple routines for writing
2335 to the LCD module on the Explorer 16 and PICDEM.net 2 development boards. The LCD
2336 on the dsPICDEM 1.1 board is not supported. The stack version and IP address are
2337 shown on the LCD on power up.
2338 17.UART functions in MainDemo.c were replaced with C18 and C30 peripheral library
2339 functions. However, because the UART peripheral libraries are not being updated
2340 for newer silicon devices, the code was copied into UART.c and is compiled with
2341 the stack.
2342 18.Multiple TX buffer support has been implemented. Most stack layers have been
2343 touched. ENC28J60.c has the most extensive changes. Each socket may use only one
2344 TX buffer.
2345 19.Implemented TCP retransmission support regardless of if TCP_NO_WAIT_FOR_ACK is
2346 defined or not.
2347 20.TCP_NO_WAIT_FOR_ACK in StackTsk.h has been undefined by default. This should
2348 increase default TCP connection robustness. Packets sent from the stack to the
2349 remote node will now be detected and retransmitted if lost or corrupted.
2350 21.All TCP packets are now retransmitted immediately after being initially transmitted
2351 when TCP_NO_WAIT_FOR_ACK is undefined. This improves throughput greatly when
2352 communicating with systems which wait a long time before transmitting ACKs. TCP/IP
2353 stacks, such as that used by Microsoft Windows, implement the TCP Delayed
2354 Acknowledgement algorithm, which is why this retransmission is necessary for high
2355 performance. The double transmission feature can be disabled in the Microchip
2356 TCP/IP stack by defining "DEBUG" either in the TCP.c file or the project compiler
2357 macros section. Using DEBUG mode can be useful when trying to look for errors
2358 using Ethreal [ http://www.ethereal/ ].
2359 22.Lowered TCP_START_TIMEOUT_VAL from 60 seconds to 3 seconds. 60 seconds is an
2360 unreasonably long timeout for modern day network speeds.
2361 23.Native support for the SLIP module has been dropped.
2362  
2363  
2364  
2365 Fixes:
2366 1. A new IP address obtained via IP Gleaning will now update the LCD (if present),
2367 invoke the Announce module (for MCHPDetect.exe), and output the new address out
2368 the RS232 port.
2369 2. DHCP client will now correctly use the first DHCP offer received when connected
2370 to a network running multiple DHCP servers. Previously, the board would get no
2371 IP address when attached to a network with multiple DHCP servers (unless the DHCP
2372 request was transmitted before a second DHCP offer was received -- a relatively
2373 rare event). Additionally, DHCPLeaseTime does not get reset to 60 seconds or
2374 the value stored in the last DHCP packet received prior to receiving the ACK.
2375 3. UDPProces() will now correctly process received UDP packets that have a 0x0000
2376 checksum field. The UDP protocol specifies that 0x0000 means the checksum is
2377 disabled. Packets with a 0x0000 checksum were previously thrown away unless the
2378 calculated checksum also happened to be 0x0000.
2379 4. The TCPIsPutReady() function will now honor the remote node's TCP window size. In
2380 other words, if the remote application pauses or cannot handle the incoming data
2381 rate, the TCP flow control feature will correctly function. Previously, if the
2382 remote node ran out of incoming buffer memory, the TCP layer would still allow
2383 more data to be transmitted. This would result in the loss or corruption of
2384 application data, with a potentially broken connection. The change requires 2 more
2385 bytes of RAM per TCP socket (TCB array).
2386  
2387  
2388 Known Problems:
2389 1. On PICDEM.net 2 board ENC28J60 and 25LC256 EEPROM share the same SPI1 module. At
2390 3.3V, the 25LC256 is only rated to 5MHz SPI clock, but the code is setting it to
2391 10.4MHz because the MACInit() function reconfigures the same SPI1 module.
2392 2. DHCP will continually send out DHCP Request packets when the lease expires and the
2393 original DHCP server that gave the lease is offline. The board will continue to
2394 use the expired IP address until the DHCP server comes back online, at which point
2395 the lease will be renewed or a new discovery will occur. A new discovery should
2396 occur after timing out, instead. It is believe that this problem has always
2397 existed in previous stack revisions.
2398 3. DHCP will continually send out DHCP Request packets when the lease expires and the
2399 original DHCP server that gave the lease does not include Option 54, the Server
2400 Identifier. A new discovery should occur after timing out. It is believe that
2401 this problem has always existed in previous stack revisions.
2402 4. The MPFS utility has not been updated. When creating a .c image file, the include
2403 path for the Compiler.h file will be incorrect and need to be manually updated to
2404 "..\Include\Compiler.h".
2405 5. When an MPFS .c image file is added to a C30 project, a linking error reporting
2406 insufficient contiguous .const memory may occur when too much data is in the MPFS
2407 image (PSV window size limitation). Using the PSV window, 1 out of every 3 program
2408 memory bytes is wasted.
2409 6. MACSetPMFilter(), MACDisablePMFilter(), and MACCopyRxToTx() have not been tested
2410 and possibly do not work.
2411 7. SNMP, TFTPc modules have not been tested with this version.
2412 8. Serial numbers >32K will be displayed on the serial port as a negative value when
2413 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2414 on power up).
2415 9. IP Gleaning may not get disabled when, through the RS232 configuration application,
2416 DHCP and IP Gleaning are disabled.
2417 10.The C30 linker may misplace the __CONFIG2 section or disallow usage of MPFS images
2418 that are too big (add too much to the .const code section). The consequences of
2419 this are that the first configuration word at 0x157FC may not get set through code
2420 (must use the Configuration Bits dialog instead), and/or the project will not
2421 compile. This problem has been observed with C30 ver. 2.02 on the PIC24FJ128GA010
2422 product. To work around this problem, the p24FJ128GA010.gld linker script has
2423 been modified. Specifically, line 68 has been commented out, which causes the
2424 linker to place all .text sections after placing all absolute sections. SSR 25966
2425 in the C30 2.02 release notes may be related.
2426  
2427  
2428 Guiding Notes:
2429 1. To change processors using a C18* project:
2430 -Change the processor in the MPLAB IDE
2431 -Change linker script (ex: 18f87j10i.lkr) in the MPLAB project. Use *i.lkr
2432 if the ICD2 is going to be used to debug with.
2433 -Update the hardware definitions in Compiler.h or change your demo board
2434 selection macro. (Project -> Build Options... -> Project -> MPLAB Cxx ->
2435 PICDEMNET2, etc)
2436 2. To change processors using a HTC18* project:
2437 -Change the processor in the MPLAB IDE
2438 -Update the hardware definitions in Compiler.h or change your demo board
2439 selection macro. (Project -> Build Options... -> Project -> MPLAB Cxx ->
2440 PICDEMNET2, etc)
2441 3. To change processors using a C30* project:
2442 -Change the processor in the MPLAB IDE
2443 -Change linker script (ex: p33FJ256GP710.gld) in the MPLAB project.
2444 -Update the hardware definitions in Compiler.h or change your demo board
2445 selection macro. (Project -> Build Options... -> Project -> MPLAB Cxx ->
2446 DSPICDEM11, etc)
2447 -Disable JTAG configuration fuse, if enabled
2448 4. When using the PICDEM.net 2 board, to write code targeting the PIC18F97J60 family
2449 Ethernet module:
2450 -Remove ENC28J60.c from the project
2451 -Add ETH97J60.c to the project
2452 -Plug the Ethernet cable into the left-most RJ45 jack (next to LCD)
2453 5. When using the PICDEM.net 2 board, to write code targeting the ENC28J60 Ethernet
2454 device:
2455 -Make sure ENC28J60.c is in the project
2456 -Make sure that ETH97J60.c is not in the project
2457 -Plug the Ethernet cable into the right-most RJ45 jack (next to board edge)
2458 6. When using the PICDEM.net 2 board, to write code targeting an Ethernet PICtail
2459 module (ENC28J60):
2460 -Make sure ENC28J60.c is in the project
2461 -Make sure that ETH97J60.c is not in the project
2462 -Make sure that the Ethernet PICtail J9 jumper is in the 2-3 position (default).
2463 -Properly update the hardware profile in Compiler.h. ENC_CS_TRIS and ENC_CS_IO
2464 need to be changed from D3 to B3.
2465 -Plug the Ethernet cable into the PICtail
2466 -Plug power into the PICDEM.net 2 board
2467 7. When using the Explorer 16 and Ethernet PICtail Plus demo boards, make sure to mate
2468 the PICtail to the motherboard using the topmost socket position, leaving the cable
2469 hanging over prototyping area. If SPI2 is desired, the PICtail should have the
2470 same orientation but be installed in the middle slot. Using SPI2, the hardware
2471 profile will need to be updated in Compiler.h.
2472  
2473  
2474  
2475 ********
2476 v3.50 13 April 2006
2477 ********
2478 Changes:
2479 1. Improved dsPIC33F and PIC24H support. UART functions are included now instead of
2480 precompiled object files for the PIC24F. The 12-bit A/D converter is now shown in
2481 use on the demo web content. When changing a C30 project to a PIC24H or dsPIC33F
2482 processor on the Explorer 16 demo board, the JTAG configuration fuse should be
2483 disabled to free the I/O pins associated with it. JTAG is enabled by default.
2484 2. Added LCDBlocking.c and LCDBlocking.h, which implement simple routines for writing
2485 to the LCD module on the Explorer 16 development board. The stack version and IP
2486 address are shown on the LCD on power up.
2487 3. Added "C18ProgramMem" and "C30ProgramMem" MPLAB projects for MPFS storage (web page
2488 content) on on-chip program memory. These projects are equivalent to the previously
2489 named "mpnicpg" project in prior stack releases.
2490 4. Multiple TX buffer support has been implemented. Most stack layers have been
2491 touched. ENC28J60.c has the most extensive changes. Each socket may use only one
2492 TX buffer.
2493 5. Implemented TCP retransmission support when TCP_NO_WAIT_FOR_ACK is undefined.
2494 6. TCP_NO_WAIT_FOR_ACK in StackTsk.h has been undefined by default. This should
2495 increase default TCP connection robustness.
2496 7. All TCP packets are now retransmitted immediately after being initially transmitted
2497 when TCP_NO_WAIT_FOR_ACK is undefined. This improves throughput greatly when
2498 communicating with systems which wait a long time before transmitting ACKs.
2499 8. Lowered TCP_START_TIMEOUT_VAL from 60 seconds to 3 seconds.
2500 9. Increased MAX_RETRY_COUNTS from 3 to 5 times.
2501 10. The example HTTP server now returns a content expiration date which has already
2502 past. This prevents web browser caching and allows more dynamic content to be
2503 displayed.
2504 11. Added WebPages_JScript folder, with new web pages that support dynamic page updates
2505 without a full page reload. A tiny page of dynamic variables is returned by the
2506 web server and Javascript executing on the target web browser changes DOM elements
2507 as needed. Button S5 (RA7) on the Explorer 16 demo board and S1 (RB0) on the HPC
2508 Explorer demo board changes the page color scheme. The rapid dynamic updates do
2509 not work on some web browsers (Internet Explorer works, Firefox does not).
2510  
2511  
2512 Known Problems:
2513 1. MPFS utility has not been updated. When creating a .c image file, the include path
2514 for the compiler.h file will be incorrect and need to be manually updated.
2515 2. When an MPFS .c image file is added to a C30 project, a linking error reporting
2516 insufficient contiguous .const memory may occur (PSV window size limitation).
2517 3. MACSetPMFilter(), MACDisablePMFilter(), and MACCopyRxToTx() have not been tested and
2518 possibly do not work.
2519 4. SNMP, TFTPc, SLIP modules have not been tested with this version.
2520 5. Serial numbers >32K will be displayed on the serial port as a negative value when
2521 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2522 on power up).
2523 6. IP Gleaning may not get disabled when, through the RS232 configuration application,
2524 DHCP and IP Gleaning are disabled.
2525 7. The IP address being outputted out the RS232 port and through the Announce module
2526 does not happen when the IP address is configured using IP Gleaning.
2527 8. On the PIC24F with C30 compiler optimizations enabled (such as Option 3, maximum
2528 speed), the project may not work. The PIC24F headers that come with C30 ver. 2.01
2529 declare several SFRs without using the volatile keyword.
2530 9. dsPIC30 support is incomplete. Currently PIC18, PIC24F, PIC24H, and dsPIC33F
2531 processors are supported.
2532  
2533  
2534  
2535 ********
2536 v3.16.00: 06 March 2006
2537 ********
2538 Changes:
2539 1. Added unified support for both the Microchip C18 and C30 compilers. The intention
2540 is to allow one code base to be compiled for any PIC18, PIC24F/H, dsPIC30, or
2541 dsPIC33 product (with adequate memory). See the "Tested Using" section for what is
2542 known to work.
2543 2. To improve maintainability, support for the HI-TECH PICC18 compiler has been
2544 dropped.
2545 3. New project workspaces have been created, "C30EEPROM.mcw" and "C18EEPROM.mcw".
2546 C18EEPROM.mcw is equivalent to the previously named "mpnicee.mcw." C30EEPROM is
2547 intended to be used for PIC24 and dsPIC 16-bit controllers.
2548 4. Source files have been split into separate directories.
2549 5. Latest ENC28J60 rev. B5 errata workarounds added. The code checks the EREVID
2550 register and implements the appropriate workarounds as needed for the silicon
2551 revision, so rev. B1, B4, and B5 are all supported in this stack release.
2552 6. Removed old LCD code originally provided for the PICDEM.net demo board.
2553 7. To improve maintainability, built in support for the "Compatable" A/D converter
2554 present on older PIC18 parts (ex: PIC18F452) has been removed.
2555 8. UART functions in MainDemo.c were replaced with C18 and C30 peripheral library
2556 functions.
2557  
2558 Tested Using:
2559 1. Software:
2560 -MPLAB version 7.31.01
2561 -C18 version 3.02
2562 -C30 version 2.01
2563 2. Hardware:
2564 -PICDEM HPC Explorer rev. 4 (PIC18F8722) + Ethernet PICtail Daughter Board (ENC28J60
2565 B1)
2566 -Explorer 16 rev. 4 (PIC24FJ128GA010 ES and dsPIC33FJ256GP710 ES) + Ethernet PICtail+
2567 Daughter card (ENC28J60 B1).
2568 3. Notes:
2569 -MPLAB 7.31.01 is a development build. The publicly available version 7.31
2570 should work fine, with the exception of being unable to program dsPIC33 and PIC24H
2571 parts with the ICD 2.
2572 -No dsPIC30 or PIC24H parts have been tested yet.
2573  
2574 Known Problems:
2575 1. MPFS utility has not been updated. When creating a .c image file, the include path
2576 for the compiler.h file will be incorrect and need to be manually updated.
2577 2. When an MPFS .c image file is added to a C30 project, a linking error reporting
2578 insufficient contiguous .const memory may occur.
2579 3. On the PIC24FJ128GA010, it is observed that some inbound packets are lost from time
2580 to time with no anticipated reason.
2581 4. MACSetPMFilter(), MACDisablePMFilter(), and MACCopyRxToTx() have not been tested and
2582 possibly do not work.
2583 5. SNMP, TFTPc, SLIP modules have not been tested with this version.
2584 6. Serial numbers >32K will be displayed on the serial port as a negative value when
2585 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2586 on power up).
2587 7. IP Gleaning may not get disabled when, through the RS232 configuration application,
2588 DHCP and IP Gleaning are disabled.
2589 8. The IP address being outputted out the RS232 port and through the Announce module
2590 does not happen when the IP address is configured using IP Gleaning.
2591 9. Multiple TX buffer support is not fully inplemented in the MAC layer, ENC28J60.c.
2592 Stack behavior when TCP_NO_WAIT_FOR_ACK is undefined may be unexpected.
2593  
2594  
2595  
2596 ********
2597 v3.02.00: 20 Feb 2006
2598 ********
2599 Fixes:
2600 1. Changed TXSTART in ENC28J60.c to stop wasting a byte.
2601 2. Changed RXSTOP in ENC28J60.c to always be an odd value to properly implement an
2602 ENC28J60 silicon errata workaround.
2603 3. Changed initialization of ERXRDPT in MACInit() to agree with the current errata.
2604  
2605 Changes:
2606 1. Licence agreement
2607 2. Schematics and other board files to the Ethernet PICtail Daughter Board have been
2608 updated to revision 5. Of significant note, the nRESET pin has been freed and
2609 200 ohm resistors were added to the ENC28J60 SI, nCS, and SCK pins. The added
2610 resistors reduce undershoot caused by stray trace inductance and strong host output
2611 drivers.
2612  
2613 Known Problems:
2614 1. Testing on the PICDEM.net demo board with the Realtek RTL8019AS Ethernet controller
2615 has not been done. Moving to the HPC Explorer demo board has resulted in pinout
2616 and other hardware changes.
2617 2. MACSetPMFilter(), MACDisablePMFilter(), and MACCopyRxToTx() have not been tested and
2618 possibly do not work.
2619 3. SNMP, TFTPc, LCD, SLIP modules have not been tested with this version.
2620 4. The stack may behave incorrectly if compiled using the Hitech compiler with a high
2621 optimizations setting.
2622 5. Serial numbers >32K will be displayed on the serial port as a negative value when
2623 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2624 on power up).
2625 6. IP Gleaning may not get disabled when, through the RS232 configuration application,
2626 DHCP and IP Gleaning are disabled.
2627 7. The IP address being outputted out the RS232 port and through the Announce module
2628 does not happen when the IP address is configured using IP Gleaning.
2629 8. Multiple TX buffer support is not fully inplemented in the MAC layer, ENC28J60.c.
2630 Stack behavior when TCP_NO_WAIT_FOR_ACK is undefined may be unexpected.
2631  
2632  
2633 ********
2634 v3.01.00: 18 Jan 2006
2635 ********
2636 Fixes:
2637 1. Implemented latest ENC28J60 silicon errata workarounds.
2638 2. Fixed a bug in TCP.c and UDP.c which would incorrectly write the packet checksum
2639 into the RX buffer incorrectly when the checksum field was exactly spanning the RX
2640 wrapparound boundary in the ENC28J60. This problem would have caused packets to be
2641 discarded in rare circumstances
2642  
2643  
2644 Known Problems:
2645 1. Testing on the PICDEM.net demo board with the Realtek RTL8019AS Ethernet controller
2646 has not been done. Moving to the HPC Explorer demo board has resulted in pinout
2647 and other hardware changes.
2648 2. MACSetPMFilter(), MACDisablePMFilter(), and MACCopyRxToTx() have not been tested and
2649 possibly do not work.
2650 3. SNMP, TFTPc, LCD, SLIP modules have not been tested with this version.
2651 4. The stack may behave incorrectly if compiled using the Hitech compiler with a high
2652 optimizations setting.
2653 5. Serial numbers >32K will be displayed on the serial port as a negative value when
2654 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2655 on power up).
2656 6. IP Gleaning may not get disabled when, through the RS232 configuration application,
2657 DHCP and IP Gleaning are disabled.
2658 7. The IP address being outputted out the RS232 port and through the Announce module
2659 does not happen when the IP address is configured using IP Gleaning.
2660 8. Multiple TX buffer support is not fully inplemented in the MAC layer, ENC28J60.c.
2661 Stack behavior when TCP_NO_WAIT_FOR_ACK is defined may be unexpected.
2662  
2663  
2664 ********
2665 v3.00.00: 16 Jan 2006
2666 ********
2667 Changes:
2668 1. The stack now targets the PICDEM HPC Explorer demo board (PIC18F8722 MCU) with an
2669 attached Ethernet PICtail Daughter Board (with the Microchip ENC28J60 Ethernet
2670 controller).
2671 2. IP Gleaning is no longer enabled (STACK_USE_IP_GLEANING is not defined) by any of
2672 the default project files.
2673 3. The IP address, whenever it changes, is outputted out the RS232 serial port in
2674 human readable form. Any terminal program, such as HyperTerminal can be used to
2675 read it. This allows the IP address to be easily determined when DHCP is used.
2676 The serial port defaults to 19200 baud when CLOCK_FREQ in Compiler.h is properly
2677 defined.
2678  
2679  
2680 Additions:
2681 1. Microchip ENC28J60 Ethernet controller support. Support is included through the
2682 ENC28J60.c and ENC28J60.h files. Various other files were modified to take
2683 advantage of ENC28J60 specific features, like the hardware DMA/IP checksum engine.
2684 This new MAC driver incorporates several new functions which can be called from any
2685 layer above the MAC. The functions are:
2686 MACSetDuplex()
2687 MACPowerDown()
2688 MACPowerUp()
2689 MACSetPMFilter()
2690 MACDisablePMFilter()
2691 CalcIPBufferChecksum()
2692 MACCalcRxChecksum()
2693 MACCalcTxChecksum()
2694 MACCopyRxToTx()
2695 See the ENC28J60.c file comments for function descriptions. The ENC28J60.c file
2696 also incroporates TestMemory() which can do a power on self test of various hardware
2697 functions. TestMemory() is included and used when MAC_POWER_ON_TEST is defined in
2698 StackTsk.h. It is undefined by default. Defining it will require some program
2699 memory.
2700 2. Announce module. Announce.c and announce.h have been added. When included in the
2701 project, STACK_USE_ANNOUNCE must be defined. This module will broadcast a UDP
2702 message to port 30303 containing the local MAC address whenever the local IP
2703 address changes. This addition is intended to facilitate device discovery on DHCP
2704 enabled networks and eliminate the need for an RS232 connection if board
2705 reconfiguration is not needed. To retrieve the UDP message on your computer, use
2706 the new MCHPDetect.exe program included in the \MCHPDetect subfolder.
2707 3. The spieeprom.c file was added to support SPI EEPROM chips for MPFS storage.
2708 ENC28J60.c and spieeprom.c may both be included and they will share the same SPI
2709 module.
2710  
2711  
2712 Improvements:
2713 1. Renamed files/edited files so that the HI-TECH compiler won't raise messages stating
2714 that include files were spelled wrong.
2715 2. Moved MAX_ICMP_DATA_LEN from StackTsk.c to ICMP.h file for easier maintenance.
2716 3. Corrected STACK_USE_SIIP typo in dhcp.c file - Thanks to Gisle J.B.
2717 4. Implemented UDP checksum logic in UDPProcess() in UDP.c file.
2718 5. Renamed CalcTCPChecksum() in tcp.c file to CalcIPBufferChecksum().
2719 6. Moved CalcIPBufferChecksum() to helpers.c to reuse it for UDP checksum calculation.
2720 7. Modified UDPProcess() in UDP.c and TCPProcess() in TCP.c to include localIP as third
2721 new parameter. This makes pseudo header checksum calculation correct in both
2722 functions. StackTsk.h, UDP.h and TCP.h files were also modified to reflect these
2723 changes.
2724 8. Modified TCP.C file to include compile-time check of STACK_USE_TCP define. If it is
2725 not defined, an error will be displayed.
2726 9. Removed an unnecessary call to MACDiscardRx() when an IP packet is received but
2727 fails version, options length, or header checksum tests.
2728 10. Changed LCD code to be compile time removable by undefining USE_LCD.
2729  
2730  
2731 Fixes:
2732 1. IPHeaderLen in IP.c is initialized properly now when IPGetHeader() is called.
2733 2. Under some circumstances, HandleTCPSeg() would acknowlege, but throw valid received
2734 TCP packets away, resulting in loss of application data. An invalid comparison in
2735 HandleTCPSeg() has been fixed to prevent this situation from occuring.
2736 *** Thanks go to Richard Shelquist for identifying this problem.
2737 3. Fixed StackTsk.c file so that if a static IP address is used and the LINK is
2738 removed, the node IP address is not cleared.
2739 4. Invalid ICMP echo replies are no longer generated for echo requests with a data
2740 length of 33 (one more than the configured maximum).
2741 5. Changed MAX_OPTIONS_LEN from 20 to 40. The maximum IP options length is now in
2742 agreement with the IP RFC.
2743 6. Changed IPSetRxBuffer() from a macro to a function. The function takes into
2744 account any options which may be present in the header of received IP packets.
2745 Previously, possible options were not taken into account when calculating the
2746 offset.
2747  
2748  
2749 Known Problems:
2750 1. Testing on the PICDEM.net demo board with the Realtek RTL8019AS Ethernet controller
2751 has not been done. Moving to the HPC Explorer demo board has resulted in pinout
2752 and other hardware changes.
2753 2. Sometimes when the FTP sever is used, an attempt to put a file is unsuccessful.
2754 The problem may be caused when an HTTP request to GET a file is made at the wrong
2755 time.
2756 3. MACSetPMFilter(), MACDisablePMFilter(), and MACCopyRxToTx() have not been tested and
2757 possibly do not work.
2758 4. SNMP, TFTPc, LCD, SLIP modules have not been tested with this version.
2759 5. The stack may behave incorrectly if compiled using the Hitech compiler with a high
2760 optimizations setting.
2761 6. Serial numbers >32K will be displayed on the serial port as a negative value when
2762 C18 is used and the board is placed in configuration mode (RB0 button is depressed
2763 on power up).
2764 7. IP Gleaning may not get disabled when, through the RS232 configuration application,
2765 DHCP and IP Gleaning are disabled.
2766 8. The IP address being outputted out the RS232 port and through the Announce module
2767 does not happen when the IP address is configured using IP Gleaning.
2768 9. Multiple TX buffer support is not fully inplemented in the MAC layer, ENC28J60.c.
2769 Stack behavior when TCP_NO_WAIT_FOR_ACK is defined may be unexpected.
2770  
2771  
2772  
2773 ********
2774 v2.20.04.01: 9/24/03
2775 ********
2776 1. Recreated MPLAB projects to avoid problems when source is not at \MCHPStack location.
2777  
2778  
2779 ********
2780 v2.20.04: 9/5/03
2781 ********
2782 Fixes:
2783 1. Modified DHCPReset() in DHCP.c to not reset DHCP state machine if it was previously
2784 disabled using DHCPDisable(). This would make sure that if DHCP module was enabled
2785 and application had run-time disabled DHCP and network cable is disconnected,
2786 stack will not clear its IP address.
2787  
2788 2. Rebuilt mib2bib.exe file with static library options. This fixes problem where
2789 one tries to execute this exe, an error occurs about missing DLLs.
2790  
2791  
2792 ********
2793 v2.20.03:
2794 ********
2795 Improvements:
2796 1. When DHCP is enabled, LINK is monitored and IP address is reset on disconnect.
2797 New IP configuration is obtained on LINK reconnect. - For RealTek only.
2798 Modified DHCP.c to add DHCPReset()
2799 Modified MAC.c to add MACIsLinked()
2800 Modified StackTsk.h to add BYTE_VAL def.
2801  
2802 Changes:
2803 1. Modified SMSC91c111.c to add empty MACIsLinked() - will be populated in next rev.
2804  
2805 Bug Fixes:
2806 1. Corrected DHCP logic to accept first DHCP offer instead of second response.
2807 2. Corrected DHCP logic to check for chaddr in DHCP offer and accept one that
2808 matches with local MAC address. This will fix problem where if multiple
2809 nodes were on bus and all requested DHCP address, all would accept response
2810 from one server instead of verifying who was intended node.
2811 3. Fixed UDPClose() in UDP.c to use INVALID_UDP_PORT instead of INVALID_UDP_SOCKET
2812 because of which a closed socket would not be scanned correctly.
2813 4. Modified UDP.h to use long contsant designators for INVALID_UDP_OPRT
2814 to explicitly state that it is a long.
2815  
2816  
2817  
2818 ********
2819 v2.20.02:
2820 ********
2821 Beta version containing TFTP client module.
2822  
2823 Addition:
2824 1. TFTP Client module - See TFTPc.* and TFTPcDemo.c for more information.
2825 See MpTFTPcDemo and HtTFTPcDemo projects for build information.
2826  
2827 Bug Fix:
2828 1. UDPIsGetReady() was modified to overcome compiler rule where only 8-bit value was
2829 used to evaluate non-zero condition.
2830 2. ARPResolve() in ARPTsk was fixed to clear Cache.IPAddr value.
2831  
2832 ********
2833 v2.20.01:
2834 ********
2835 Bug fix:
2836 1. Fixed SMSC91C111.c where MACInit() would hand if ethernet link is not detected.
2837  
2838  
2839 ********
2840 v2.20:
2841 ********
2842 Bug Fixes:
2843 1. General - Removed most of harmless warnings.
2844 2. C18Cfg.asm - Fixed "include" instead of "define".
2845 3. DHCP.c - Increased DHCP_TIMEOUT_VAL to 2 seconds.
2846 Fixed problem where UDP active socket was not set before calling UDP
2847 functions
2848 in SM_DHCP_BROADCAST state.
2849 4. MAC.c - Fixed MACIsTxReady() where under heavy traffic it would always return
2850 FALSE.
2851 This fixes bug where all high level applications would stop
2852 transmitting.
2853 5. TCP.c - Enabled portion of code that performs timeout logic even if
2854 TCP_NO_WAIT_ACK
2855 is defined. This fixes bug where occasionally, tcp applications such as
2856 HTTP server would stop working after few hours.
2857 6. UDP.c - Fixed UDPGet() where it would return FALSE on last good byte.
2858 Fixed UDPProcess() where it was calculating incorrect length.
2859  
2860 Added bFirstRead flag with UDP sockets similar to TCP sockets
2861 so that whenever first UDP byte is read, MAC read pointer will be
2862 reset to begining of correct packet.
2863 This change fixes problem where if one transmits a packet while
2864 UDP packet is pending in a socket, next get to pending UDP socket would
2865 return wrong data. (This is apparent only when there is heavy network
2866 traffic)
2867  
2868 Known Issues:
2869 1. HiTech v8.20 PL4 with all optimization enabled may not work properly.
2870 2. C18 "Static" and "Auto" mode may not be used - there are too many local variables to
2871 fit
2872 in standard stack of 256 bytes. One may modify linker script file to avoid this
2873 limitation.
2874  
2875  
2876  
2877 Improvements:
2878 1. Modified TICK def. in Tick.h to unsigned long to support 32-bit wide SNMP tick.
2879 2. Added SNMP Module (SNMP.c)
2880 3. Added Two new demo projects - DemoSNMPApp and HtDemoSNMPApp.
2881 4. Created MPLAB 6.X projects for different demo configurations.
2882 5. MAC.c - Added MACGetTxOffset().
2883 6. MPFS.c - Added MPFSSeek(), MPFSTell().
2884 7. MPFSImg.*- Rebuilt to reflect v2.20, footprint changes etc.
2885 8. StackTsk.h- Enhanced WORD_VAL, DWORD_VAL defs.
2886 Added STACK_USE_SNMP and related compile-time checks.
2887 9. UDP.h - Added UDPSetTx and UDPSetRx macros.
2888 Moved UDP_SOCKET_INFO structure to header file.
2889 10. WebSrvr.c- Modifed MCHPStack version message and added DATE info to BoardSetup
2890 menu.
2891 11. Added support for SMSC LAN91C111 10/100 Non-PCI ethernet controller
2892 Use "SMSC91C111.C" instead of MAC.c.
2893 "mpnicee_smsc" is a sample project that uses PIC18F8720 and SMSC NIC.
2894 "MasterDemo.c" is a main source file for above project that includes
2895 all modules - must use device with more than 32KB of memory.
2896  
2897  
2898  
2899  
2900 ********
2901 v2.11:
2902 ********
2903 Bug Fixes:
2904 1. Fixed dhcp.c to make it work with new C18 startup code.
2905  
2906 Improvements:
2907 1. Modified websrvr.c DownloadMPFS() to make use of compiler allocated XMODEM data block
2908 rather than use fixed address block starting at 0x400.
2909  
2910  
2911 ********
2912 v2.10: 7/9/02
2913 ********
2914 Bug Fixes:
2915 1. Fixed HTTP Server bug where a form submission with empty parameter value would not
2916 parse correctly.
2917  
2918  
2919  
2920 ********
2921 v2.0: 5/22/02
2922 ********
2923  
2924 ********
2925 New Modules:
2926 ********
2927 1. Added UDP, DHCP, FTP and IP Gleaning
2928 2. Added PICDEM.net LCD support
2929 3. Added board setup through RS-232.
2930  
2931 ********
2932 Improvements:
2933 ********
2934 1. Optimized serial EEPROM access routines in terms of speed and size
2935 (Replaced ee256.* files with eeprom*.h)
2936 2. Improved board setup through RS-232.
2937  
2938 ********
2939 Known Issues:
2940 ********
2941 1. LCD may not display properly on MCLR only.
2942 Workaround: 1. Debug XLCDInit() routine in "xlcdlh"
2943 2. Always do POR reset.
2944  
2945 2. SLIP connection is not very robust.
2946 Workaround: None at this time.
2947  
2948 3. Hi-Tech Compiler:
2949 1. Aggressive optimization breaks the functionality.
2950 Workaround: Apply optimization listed in each source file comment
2951 header.
2952 2. In order to use V8.12, you will need to remove "FTP Server" from
2953 Ht*.pjt.
2954 You will also need to disable all optimizations.
2955  
2956 4. C18 Compler: 1. Static model does not compile.
2957 Workaround: None at this time.
2958 2. Overlay model breaks the functionality.
2959 Workaround: None at this time.
2960 3. All modules does not fit in 32KB memory.
2961 Workaround: 1. None at this time.
2962 2. Sample project disables some modules.
2963  
2964  
2965 ********
2966 New Files:
2967 ********
2968 ========================================================================================
2969 ====================================
2970 File Purpose
2971 ========================================================================================
2972 ====================================
2973 1. delay.* Provides CLOCK_FREQ depenent delay routines.
2974 2. dhcp.* DHCP client support
2975 3. ftp.* FTP server
2976 4. udp.* UDP socket support
2977 5. xeeprom.* Improved ee256.* and renamed.
2978 6. xlcd.* External LCD support.
2979 7. version.log To track changes and history.
2980  
2981  
2982 ********
2983 Changes:
2984 ********
2985 ========================================================================================
2986 ====================================
2987 File Change
2988 To-do for v1.0 stack applications
2989 ========================================================================================
2990 ====================================
2991 1. arptsk.c 1. Fixed STACK_CLIENT_MODE compile errors.
2992 None
2993 2. Modifed ARPIsResolved() to support IP Gleaning
2994 None
2995  
2996 2. c18cfg.asm 1. Added PIC18F452 configuration
2997 None
2998 2. Fixed "include" errors.
2999 None
3000  
3001 3. compiler.h 1. Included "stdlib.h" in both C18 and Hi-Tech compilers.
3002 None
3003 2. Moved CLOCK_FREQ from "stacktsk.h" to this file.
3004 None
3005 3. Added PORTA defs.
3006 None
3007  
3008 4. htnicee.pjt 1. Removed "ee256.c".
3009 None
3010 2. Added "udp.c", "dhcp.c", "ftp.c", "xlcd.c", "xeeprom.c" files
3011 Add these files if needed.
3012  
3013 5. htnicpg.pjt None
3014  
3015 6. htslee.pjt 1. Removed "ee256.c".
3016 None
3017 2. Added "ftp.c", "xlcd.c", "xeeprom.c" files
3018 None
3019  
3020 7. http.c 1. Included compile-time verification that HTTP module is included.
3021 None
3022 2. Put HTTP message strings into one array "HTTPMessages".
3023 None
3024 3. Modified to return "Service Unavailable" message if MPFS is being
3025 None
3026 remotely programmed.
3027 4. Modified SendFile() to make use of sequential EEPROM read.
3028 None
3029  
3030 8. ip.c 1. Added one more paramter to IPGetHeader() to support IP Gleaning
3031 Custom apps using IP needs to be
3032  
3033 modified.
3034  
3035 9. mac.c 1. Replaced fixed delay routines with CLOCK_FREQ dependent
3036 None
3037 routines
3038  
3039 10. mpfs.c 1. Replaced ee256.h with xeeprom.h.
3040 None
3041 2. Added MPFSFormat(), MPFSPut() etc. routines
3042 None
3043 3. Added sequential read and page write operations
3044 Custom apps using MPFS directly
3045  
3046 needs to be modified.
3047 4. Defined MPFS_WRITE_PAGE_SIZE for MPFSPut operations.
3048 Apps using different EEPROM page size
3049  
3050 needs to be modified.
3051  
3052 11. mpnicee.pjt 1. Removed "ee256.c"
3053 None
3054 2. Added "xcld.c", "xeeprom.c" files
3055 None
3056  
3057 12. stacktsk.c 1. Replaced ee256.h with xeeprom.h
3058 None
3059 2. Added IP Gleaning and DHCP support.
3060 None
3061  
3062 13. stacktsk.h 1. Moved CLOCK_FREQ to compiler.h
3063 None
3064 2. Added STACK_USE_DHCP, STACK_USE_FTP_SERVER etc. options
3065 None
3066 3. Added compile-time enable/disable of modules based on selection
3067 of higher level modules.
3068 None
3069 4. Modified MY_DEFAULT_MAC_BYTE? to use Microchip OUI id.
3070 None
3071 5. Added compiler-time check to confirm available TCP sockets
3072 None
3073 6. Added MSB and LSB macros.
3074 None
3075 7. Added SerialNumber etc. to AppConfig structure
3076 None
3077 8. Commented module selection defines: They are defined by cmopiler
3078 None
3079 command-line options.
3080 Real application should define them here in this file.
3081  
3082 14. tcp.c 1. Moved TCP_STATE and TCP_INFO to .h file.
3083 None
3084 2. Fixed TCPIsConnected()
3085 None
3086 3. Fixed TCPDisconnect()
3087 None
3088 4. Modified TransmitTCP() to set receive window of one segment
3089 None
3090 5. Modified TransmitTCP() to use max segment size equal to
3091 predefined value.
3092 None
3093 6. Improved TCP State machine
3094 None
3095  
3096 15. tick.c 1. Modified TICK type to 16-bit.
3097 None
3098 2. Made use of TICK_PRESCALE_VALUE
3099 None
3100 3. Added code to blink PICDEM.net "System LED"
3101 Remove if not required.
3102  
3103 16. websrvr.c 1. Added LCD support
3104 N/A
3105 2. Made TickUpdate() on Timer0 interrupt
3106 N/A
3107 3. Added code to save/restore board configuration
3108 N/A
3109 4. Added board setup via RS-232.
3110 N/A
3111 5. Added call to FTP modules
3112 If needed, add this.
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3