Webserver In a Box Investigations


This webpage has been created to provide information on some of the software and hardware enhancements and known issues, found whilst using the EPE/Silicon chip, Web Server In a Box (WIB) design.
There is updated software, with source code and hex images, available for the device and some basic fault finding tips for anyone who builds this interesting project.

The original design, schematic and PCB are copyrighted items owned by Silicon Chip magazine and published in the UK by EPE magazine. I will not provide schematics or PCB layouts so please do not email and ask. Digital copies of the articles are available from either magazine.

Any new software provided on this website is aimed at the larger dsPIC33FJ128GP802 device, not the original dsPIC33FJ64GP802

Known issues with existing software

A short summary of the existing software limitations

  • Secure Socket Layer (SSL) is not supported due to US export controls on Cryptography software. This will restrict email services that use it, like Gmail and Hotmail?
  • The ICMP protocol is not supported. This is due to the original, dsPIC33FJ64GP802, device having run out of code storage space. This prevents 'ping' commands from working.
  • The UART/serial output is apparently inverted This is apparently to support a hacked interface to a PC.
  • The current design requires an Organisationally Unique Identifier (OUI) EEPROM to read the MAC address. There are legal ways to use your own MAC address without a ROM.

As my knowledge of the design increases, these limitations will be removed and the code made available from this website.

Software Compilation

I currently use MPLAB 8.80 and PIC32 C compiler V3.30. The MPLAB project files are provided in the sourcecode download.
The optimisation level of the Compiler is set to Level 1, this is in anticipation of my 60 day free trial of the C compiler expiring by the end of February.

The linker options have been changed to include debug symbols, this increases the image size but aids debug immensely.

New software releases
Note: All software provided on this pages is targeted at the dsPIC33FJ128GP802.

The first release, V1.0 of software is now available.
V1.0 adds the following features:
Removes the need for the OUI MAC
Adds support for the ICMP protocol, 'ping' commands now work.
Fixes a timing bug in the ENC28J60 software (taken from the latest Microchip TCPIP stack).
Download the hex image WIB_Modified_Rev1.zip (78K)
Download the source code WIB_Modified_Rev1_source.zip (707K)

Router Configuration

The original magazine articles covered router setup in some detail, what I will add here are some tips on how I forwarded all web traffic to the WIB and configured the Dynamic DNS forwarding, with a specific example using the BT Homehub router.

Forwarding HTTP and SNTP traffic

My WIB device is configured with an IP address os on my LAN. The following screen shows how I forwarded this traffic to the device:


The HTTP and NTP (Time) server applications are already defined by the router, in this case I have forwarded all traffic to the WIB. Note that this is configured on the Application Sharing page.

Dynamic DNS setup

A simpler way to configure this was to have my router login to my existing Dynamic DNS account, supplied by DynDNS.org
As all WWW traffic on port is automatically forwarded to the WIB, no further configuration is required.


Device Identification

Not strictly required but it does make identification of the device easier in the Homehub settings.
Note: the MAC address is a locally administered address set in the Version 1.0 software, available from this website.


Hardware fault finding

The design is not too difficult to fault-find. As always with any kit, double and triple check your soldering before switching on for the first time and if it does not work, here are a few tips.

When you power the board up and insert a programmed PIC microcontroller, both LEDs will flash at first, then one of them will stop blinking, this is the SD card access LED. If neither LED lights, have you programmed the device correctly?

By default, one LED on the ethernet Magjack will be lit all the time there is a connection (amber LED on my system) the other LED (green) flashes when the device is accessed. If there is no programmed PIC microcontroller, the board will not establish a link of it's own accord.

If you have access to an oscilloscope, the following traces, taken form a working system may help. Click on any image to expand it.

8 MHZ crystal clock for the DSPIC

25 MHz crystal clock for the ENC 28J60 Ethernet device

A Normal Link Pulse (NLP) measured on the Ethernet transmit pins when connected to an Ethernet switch.

SPI access to the Ethernet device, CH1 (yellow) is the Chip Select (CS) pin and CH2 (green) is the 8 MHz SPI clock.

Another SPI access, this time showing the Serial In (SI) on CH1 (yellow) in relation to the SPI clock on CH2 (green).

A final SPI access, this time it shows Serial Out (SO) on channel 1 (yellow) and the SPI clock on channel 2 (green)

Customised PCB

I hope to publish full artworks for this modified PCB shortly, once final testing has been completed. It is the same size as the original PCB.


Future Work

The main reason for building the WIB module was to use it as the basis of a data-logger that operates from the solar power system in my workshop. This required a few changes to the original design. The linear regulator was replaced with a switchmode converter, to reduce power loss but equally important was adding a connection for the I2C bus, to allow connection of multiple sensors.

A future expansion option is to replace the ENC28J60 ethernet device with a Microchip WiFi module to allow direct connection into my existing network. Preliminary work has commenced on the feasibility of this scheme, it is envisaged that a daughter board will plug into the main board to facilitate the WiFi module.

Updated 27 September 2020