Which board update samples apply to RCM67xx?

The samples do not mention RCM6700 series, it is hard to figure out what options are (a) applicable or (b) optimal.

Trying to use the upload_firmware sample with
BU_ENABLE_SECONDARY
BU_TEMP_USE_SECONDARY

but when I try to upload the page seems to work until I click upload, whereupon I get an error to the effect that the CGI can’t be found. I’ve no experience with cgi so any help will be appreciated!

Please read AN421 at this link http://www.digi.com/support/productdetail?pid=4885&type=documentation for complete information on Remote Program Update.

The RCM6700 series have a serial flash which is copied over to fast SRAM at runtime. The RPU uses part of the serial flash to update the firmware with the second copy for a power-fail safe update.

I’ve already been trying to wade through AN421 but it does not mention RCM67xx, nor do the code samples. It is very hard to figure out what’s applicable and what isn’t. It needs updating!

I might also point out that the samples themselves will not compile with this processor. And there are inconsistsent samples in the folders

DC\samples cpip\http\httpupld2.c vs the samples in DC\samples\remoteprogramupdate

SO I’ve tried to adapt to my code as detailed below.

By renaming the “ZHTML” sample page (because it doesn’t fit the 8.3 naming limitations!) I have an FAT-based page that presents a browse option with an upload button (URL is http://192.168.2.50/fw/upload.zht and I have coded “.zht” appropriately, same as I’ve been using for years in early DC versions).

This file contains the following:

HTTP Upload Form

Current Firmware:

Last Firmware Uploaded:


	Image corrupted or not compatible with this hardware.

Upload New Firmware:


In my code I have included the following:

SSPEC_MIMETABLE_START
SSPEC_MIME_FUNC(“.zht”,“text/html”,zhtml_handler),
SSPEC_MIME(“.htm”, “text/html”),
SSPEC_MIME(“.gif”, “image/gif”),
SSPEC_MIME(“.jpg”, “image/jpeg”),
SSPEC_MIME(“.cgi”, “”)
SSPEC_MIMETABLE_END

I also have this:

SSPEC_RESOURCETABLE_START
SSPEC_RESOURCE_P_CGI(“upload.cgi”, firmware_upload,
FWREALM, FW_GROUP, 0x0000, SERVER_HTTP, SERVER_AUTH_DIGEST)
SSPEC_RESOURCETABLE_END

When I select a bin file (which is the same file that is running the code) and click upload, the browser URL goes to
http://192.168.2.50/fw/upload.cgi” with a

404 Not Found message.

In my code I have included the following lines from the samples:

#use “board_update.lib”
// function prototype for cgi function to handle file upload
int firmware_upload(HttpState * s);
void install_firmware(void);
void update_webvars(void);

struct {
char running[40];
char temp[40];
int show_temp;
int show_install;
char error[80];
int install;
} firmware;
#web firmware
#web firmware.install
#web_update firmware.install install_firmware

and the referenced functions firmware_upload, install_firmware and update_webvars have been copied in from a sample.

I have searched the DC install folder for upload.cgi: there is no such file.

I understand most of what is happening except what “cgi” is and how to use in in DC.

I’m using DC10.72, by the way.

This is a non-trivial question, as you can see by now