Home/Support/Support Forum/Which board update samples apply to RCM67xx?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Which board update samples apply to RCM67xx?

0 votes
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!
asked Oct 20, 2014 in Rabbit Software by jmblack New to the Community (21 points)

Please log in or register to answer this question.

3 Answers

0 votes
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.
answered Oct 20, 2014 by trooper2 Veteran of the Digi Community (589 points)
0 votes
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!
answered Oct 20, 2014 by jmblack New to the Community (21 points)
0 votes
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\tcpip\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:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTTP Upload Form</title>
</head>
<body>
<table border="0" cellspacing="2" cellpadding="1">
<tr>
<td align="right"><b>Current Firmware:</b></td>
<td><?z echo($firmware.running) ?></td>
</tr>
<?z if ($firmware.show_temp == 1) { ?>
<tr>
<td align="right"><b>Last Firmware Uploaded:</b></td>
<td><?z echo ($firmware.temp) ?>
<?z if ($firmware.show_install == -1) { ?>
<br>Image corrupted or not compatible with this hardware.
<?z } ?>
<?z if($firmware.install == -1) { ?>
<?z print($firmware.install_error) ?>
<?z } ?>
<?z if ($firmware.show_install == 1) { ?>
<form action="index.zhtml" method="POST">
<input type="hidden" name="install" value="1">
<input type="submit" value="Install">
</form>
<?z } ?>
</td>
</tr>
<?z } ?>
<tr>
<td></td>
</tr>
<tr>
<td align="right"><b>Upload New Firmware:</b></td>
<td>
<form action="upload.cgi" method="post" enctype="multipart/form-data">
<input type="file" name="/firmware.bin" size="50" /><br />
<input type="submit" value="Upload" /></form>
</td>
</tr>
</table>
</body>
</html>


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
answered Oct 20, 2014 by jmblack New to the Community (21 points)
...