EmbeddedRelated.com
Forums

RCM3700 Firmware update over GPRS

Started by yasj...@ysmgroup.net May 26, 2011
Hi there! This is my first post to this group.

I'm trying to update my firmware code over a GPRS modem connected to serial port D. I have found info about PPP, which enables an ethernetconnection over a serial port. Connecting to GPRS is no problem at all.
What I do want to know is if it's possible to update firmware through this connection with Rabbit Field Utility. If so, this would be a excellent solution to my problem here.
If not, is there any other way in setting this up without having to connect my modem to the programming port (A)? The problem is that I'm rewriting software for an application product that can't be changed in hardware.

Thanks in advance,

Yasja S. de Miranda
Hi Yasja,

Yes, this is possible but not with the Rabbit Field Utility. When you
connect with GPRS you do not get a fixed IP address so nothing on the
internet can see you device unless it connects first.

What I did with my app was have the server I was talking to check the
current version and if there was an update it would send me a URL for the
file. My app would then download this will to a file and store on SD and
after it was downloaded, it would check the file and if it was OK, it would
reprogramme itself and then reboot.

Now I am not familiar with the RCM3700 so not sure if it can update its own
firmware. If it can, then there is source code in the samples directory for
all of this. I simply ported it to my application with very little work.

Dave...
---
Very funny Scotty, now beam down my clothes!!!
---

From: r... [mailto:r...] On
Behalf Of y...@ysmgroup.net
Sent: 26 May 2011 20:14
To: r...
Subject: [rabbit-semi] RCM3700 Firmware update over GPRS

Hi there! This is my first post to this group.

I'm trying to update my firmware code over a GPRS modem connected to serial
port D. I have found info about PPP, which enables an ethernetconnection
over a serial port. Connecting to GPRS is no problem at all.
What I do want to know is if it's possible to update firmware through this
connection with Rabbit Field Utility. If so, this would be a excellent
solution to my problem here.
If not, is there any other way in setting this up without having to connect
my modem to the programming port (A)? The problem is that I'm rewriting
software for an application product that can't be changed in hardware.

Thanks in advance,

Yasja S. de Miranda

Reply to
update%20over%20GPRS> sender | Reply to
ate%20over%20GPRS> group | Reply
3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BG1zZ0lkAzQwOTI2BHNlYwN
mdHIEc2xrA3JwbHkEc3RpbWUDMTMwNjQ1MzQzOA--?act=reply&messageNum@926> via
web post |
3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BHNlYwNmdHIEc2xrA250cGM
Ec3RpbWUDMTMwNjQ1MzQzOA--> Start a New Topic
Messages in this topic
huBF9TAzk3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BG1zZ0lkAzQwOT
I2BHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTMwNjQ1MzQzOAR0cGNJZAM0MDkyNg--> (1)
Recent Activity:
On May 26, 2011, at 7:43 PM, Dave McLaughlin wrote:
> Now I am not familiar with the RCM3700 so not sure if it can update its own
> firmware. If it can, then there is source code in the samples directory for
> all of this. I simply ported it to my application with very little work.
For Rabbit 2000 and 3000 based boards, take a look at Scott Henion's firmware update utilities (shdesigns.org). Very well made and I've successfully used them in a few projects.

-Tom

In dynamic C (i.e. 9.52) this expressions are the same: char c; unsigned
char c;?

Because in the users manual DC say that char is a unsigned integer (0 a
255), however there are some samples with the expression unsigned char,
why?

Sorry, my English is poor.

muchas Gracias

Melisa
I am always specific about signed and unsigned. That way there is NO confusion as to what you mean or want.
I also add information to my variables so I KNOW what I am working with.
It's a pain if you change a variable from type from one to another, but mistakes happen a lot less often.

I add this as a comment to all my code:

A note about Hungarian notation
An attempt has been made to use a SUBSET of Hungarian notation for the variables.
Variables in general are named this way:



scope and type together are usually called the prefix

scope: g=global
m=local
if there is no scope specified it is probably local to main()

type: u=unsigned (suggest it not be used without a size qualifier)
n=integer (size is determined by processor)
c=character (almost universally 8 bits unsigned)
S=Structure
U=union

These types are NOT standard in the Hungarian notation
n8 = 8 bit variable used with int8
n16= 16 bit variable used with int16
n32= 32 bit variable used with int32

when using stdint.h (C99 compatability):
n8_ = 8 bit variable used with uint8_t (processor independent)
n16_= 16 bit variable used with uint16_t (processor independent)
n32_= 32 bit variable used with uint32_t (processor independent)

name: No restrictions at this time but in general the
first character of each word in the name capitalized

qualifier: not enforced (yet)

examples

gun16_Foo or gun16_Foo: is a global, unsigned, 16 bit variable named Foo

mcFee or mun8Fee or mun8_Fee: is a local, unsigned, 8 bit, variable named Fee

-Pete F

________________________________

From: r... [mailto:r...] On Behalf Of Melisa Salto
Sent: Friday, May 27, 2011 8:51 AM
To: r...
Subject: [rabbit-semi] Inquiry

In dynamic C (i.e. 9.52) this expressions are the same: char c; unsigned char c;?

Because in the users manual DC say that "char" is a unsigned integer (0 a 255), however there are some samples with the expression "unsigned char", why?

Sorry, my English is poor.

muchas Gracias

Melisa
On May 27, 2011, at 5:50 AM, Melisa Salto wrote:
> In dynamic C (i.e. 9.52) this expressions are the same: char c; unsigned char c;?
>
> Because in the users manual DC say that char is a unsigned integer (0 a 255), however there are some samples with the expression unsigned char, why?
Dynamic C didn't have a "signed char" until one of the recent DC 10 releases (maybe 10.60?), so for all previous releases it treated "char" and "unsigned char" as the same type.

In my reading of the C specification, though, it would appear that assigning a signed or unsigned char to a "char" should throw a warning, regardless of whether a platform's "char" is signed or unsigned. Certainly, if you're writing portable code you need to be prepared for platforms that treat "char" as signed (like I've seen with cygwin/gcc).

To answer your question -- using "unsigned char" is clearer than just "char". In my own code, I use "char" for character strings and signed/unsigned char (actually int8_t and uint8_t) for 8-bit integers. I think it adds clarity to the code you're reading.

-Tom
Hi there,

Dave, Thanks for your help :) I know my Rabbit's won't receive any static IPs, but your technique looks fine. May i ask from which subdirectory of the samples library you've got the furrmware-update example?
Thanks

Tom, thanks for the tip! I'll take a look at it, i'm pretty sure these will come in handy.

Greets,

Yasja S. de Miranda
Thanks for your answers, seems to be the same in dinamic c, but now I use

typedef unsigned char BYTE;

for 8 bit integer and char for character strings to it add clarity to
code.

Melisa

De: r... [mailto:r...] En
nombre de Tom Collins
Enviado el: Sado, 28 de Mayo de 2011 01:00 p.m.
Para: r...
Asunto: Re: [rabbit-semi] Inquiry

On May 27, 2011, at 5:50 AM, Melisa Salto wrote:

In dynamic C (i.e. 9.52) this expressions are the same: char c; unsigned
char c;?

Because in the users manual DC say that char is a unsigned integer (0 a
255), however there are some samples with the expression unsigned char,
why?

Dynamic C didn't have a "signed char" until one of the recent DC 10 releases
(maybe 10.60?), so for all previous releases it treated "char" and "unsigned
char" as the same type.

In my reading of the C specification, though, it would appear that assigning
a signed or unsigned char to a "char" should throw a warning, regardless of
whether a platform's "char" is signed or unsigned. Certainly, if you're
writing portable code you need to be prepared for platforms that treat
"char" as signed (like I've seen with cygwin/gcc).

To answer your question -- using "unsigned char" is clearer than just
"char". In my own code, I use "char" for character strings and
signed/unsigned char (actually int8_t and uint8_t) for 8-bit integers. I
think it adds clarity to the code you're reading.

-Tom

__________ Information from ESET Smart Security, version of virus signature
database 6161 (20110528) __________

The message was checked by ESET Smart Security.

http://www.eset.com
Hi Yasja,

Look in here.

C:\DCRABBIT_10.64\Samples\RemoteProgramUpdate

By the way, I only found these in the DC10.64 directory. I could not find
anything in 9.62 so your board may not support this feature.

Dave...
---
Very funny Scotty, now beam down my clothes!!!
---

From: r... [mailto:r...] On
Behalf Of y...@ysmgroup.net
Sent: 27 May 2011 20:46
To: r...
Subject: [rabbit-semi] Re: RCM3700 Firmware update over GPRS

Hi there,

Dave, Thanks for your help :) I know my Rabbit's won't receive any static
IPs, but your technique looks fine. May i ask from which subdirectory of the
samples library you've got the furrmware-update example?
Thanks

Tom, thanks for the tip! I'll take a look at it, i'm pretty sure these will
come in handy.

Greets,

Yasja S. de Miranda

Reply to
update%20over%20GPRS> sender | Reply to
ate%20over%20GPRS> group | Reply
3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BG1zZ0lkAzQwOTM3BHNlYwN
mdHIEc2xrA3JwbHkEc3RpbWUDMTMwNjU5ODQ4Mg--?act=reply&messageNum@937> via
web post |
3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BHNlYwNmdHIEc2xrA250cGM
Ec3RpbWUDMTMwNjU5ODQ4Mg--> Start a New Topic
Messages in this topic
Q5BF9TAzk3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BG1zZ0lkAzQwOT
M3BHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTMwNjU5ODQ4MgR0cGNJZAM0MDkyNg--> (7)
Recent Activity:
For DC9, Digi/Rabbit does not have a remote firmware update solution. You'll have to use Scott Henion's, which is more than adequate.

-Tom
(Sent from my phone; forgive my brevity)

On May 28, 2011, at 8:09 PM, "Dave McLaughlin" wrote:

> Hi Yasja,
>
> Look in here.
>
> C:\DCRABBIT_10.64\Samples\RemoteProgramUpdate
>
> By the way, I only found these in the DC10.64 directory. I could not find
> anything in 9.62 so your board may not support this feature.
>
> Dave...
> ---
> Very funny Scotty, now beam down my clothes!!!
> ---
>
> From: r... [mailto:r...] On
> Behalf Of y...@ysmgroup.net
> Sent: 27 May 2011 20:46
> To: r...
> Subject: [rabbit-semi] Re: RCM3700 Firmware update over GPRS
> Hi there,
>
> Dave, Thanks for your help :) I know my Rabbit's won't receive any static
> IPs, but your technique looks fine. May i ask from which subdirectory of the
> samples library you've got the furrmware-update example?
> Thanks
>
> Tom, thanks for the tip! I'll take a look at it, i'm pretty sure these will
> come in handy.
>
> Greets,
>
> Yasja S. de Miranda
>
> Reply to
> > update%20over%20GPRS> sender | Reply to
> > ate%20over%20GPRS> group | Reply
> > 3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BG1zZ0lkAzQwOTM3BHNlYwN
> mdHIEc2xrA3JwbHkEc3RpbWUDMTMwNjU5ODQ4Mg--?act=reply&messageNum@937> via
> web post |
> > 3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BHNlYwNmdHIEc2xrA250cGM
> Ec3RpbWUDMTMwNjU5ODQ4Mg--> Start a New Topic
> Messages in this topic
> > Q5BF9TAzk3MzU5NzE0BGdycElkAzIzMDczMTYEZ3Jwc3BJZAMxNzA2NTU0MjA1BG1zZ0lkAzQwOT
> M3BHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTMwNjU5ODQ4MgR0cGNJZAM0MDkyNg--> (7)
> Recent Activity: