Change CRC in bin file

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Change CRC in bin file

by Tomás Ó hÉilidhe-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm trying to upload some custom firmware to my router but it won't
accept the firmware file because the CRC check is wrong in it.

What I did was I downloaded a legitimate ".bin" file from the router
manufacturer and then edited it myself with a hex editor, but I don't
know how to go about changing the CRC.

Anyone know?

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Olin Lathrop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tomás Ó hÉilidhe wrote:
> I'm trying to upload some custom firmware to my router but it won't
> accept the firmware file because the CRC check is wrong in it.
>
> What I did was I downloaded a legitimate ".bin" file from the router
> manufacturer and then edited it myself with a hex editor, but I don't
> know how to go about changing the CRC.

Shouldn't this be OT or maybe TECH?


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Jinx-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> > I'm trying to upload some custom firmware to my router but it won't
> > accept the firmware file because the CRC check is wrong in it.

> Shouldn't this be OT or maybe TECH?

Bob, you having lunch ? ;-)


--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Apptech :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> What I did was I downloaded a legitimate ".bin" file from
>> the router
>> manufacturer and then edited it myself with a hex editor,
>> but I don't
>> know how to go about changing the CRC.

> Shouldn't this be OT or maybe TECH?

Maybe.
But I don't think that noising up the channel with "wrong
label" material for the next short while is liable to be
overly useful.

[TECH] is brand spanking new, numbers using it is certain to
be lower than steady-state at present and so it is liable to
be a black hole for many people for now. (And long term for
those who wish it to be).

Under the old system I'd see this as more [EE] than [OT] so
EE seems good to me for now.



            Russell

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Bob Blick-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jinx wrote:
>>> I'm trying to upload some custom firmware to my router but it won't
>>> accept the firmware file because the CRC check is wrong in it.
>
>> Shouldn't this be OT or maybe TECH?
>
> Bob, you having lunch ? ;-)

I should be, eh?

I've got a lot on my plate today, so I'll address this generally now and
in more detail later.

If you don't like a post, please ignore it. If it really bothers you,
send me an email directly.

If you start a thread, do your homework and post a quality message.

Although I think CRC is a valid [EE] topic, the quality of the original
post was extremely low. There's tons of information about router
firmware already on the web so there will definitely be information
addressing this specifically.

If the original post had even included something as basic as the
router's model number, it would have doubled the value of the post. We
need to increase the quality of the posts.

Please don't be a nanny, just ignore posts you don't like, OK? Thanks.

Cheerful regards,

Bob
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Cedric Chang-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You will have to find out what kind of "CRC" is used.  There is no  
standard "CRC" algorithm.  There are literally thousands of CRC  
methods in use.
cc


On Jul 13, 2008, at 1:02 PM, Tomás Ó hÉilidhe wrote:


I'm trying to upload some custom firmware to my router but it won't
accept the firmware file because the CRC check is wrong in it.

What I did was I downloaded a legitimate ".bin" file from the router
manufacturer and then edited it myself with a hex editor, but I don't
know how to go about changing the CRC.

Anyone know?

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist



--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Olin Lathrop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Apptech wrote:
> Under the old system I'd see this as more [EE] than [OT] so
> EE seems good to me for now.

Right, but we're under the new systems now.  I guess I really don't
understand the new definition of EE if this is valid EE.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by sergio masci-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sun, 13 Jul 2008, Cedric Chang wrote:

> You will have to find out what kind of "CRC" is used.  There is no  
> standard "CRC" algorithm.  There are literally thousands of CRC  
> methods in use.
> cc

The CRC algorithm is pretty standard (the only real variations being start
with all zeros, all ones, use 16 bit, 24 bit or 32 bit accumulator), it's
the polynomial that tends to vary. Even so there are CCITT standard
polynomials.

>
>
> On Jul 13, 2008, at 1:02 PM, Tomás Ó hÉilidhe wrote:
>
>
> I'm trying to upload some custom firmware to my router but it won't
> accept the firmware file because the CRC check is wrong in it.
>
> What I did was I downloaded a legitimate ".bin" file from the router
> manufacturer and then edited it myself with a hex editor, but I don't
> know how to go about changing the CRC.
>
> Anyone know?
A little bit of experimentaion should reveal the answer quite quickly.
Start by trying to generate the same CRC supplied in the original ".bin"
file using the standard CRC alogorithm and different polynomials. If it's
a 16 bit polynomial you could try a brute force (all combinations of 16
bits) within a few minutes on a modern PC. I suspect 32 bits wouldn't take
more than a few hours.

Regards
Sergio Masci
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Tamas Rudnai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I guess it is not TECH nor EE as I do not think it is anything to do with
engineering:

> [EE]
> The doing of Electrical/Electronic Engineering that you can do
> yourself. Power stations go into TECH unless it's a power station that
> you can build. So too eg Magnetohydrodynamics etc. Windmill
> alternators and related systems and alternate energy at the doing
> level go into EE. Windfarms into TECH. etc

It is rather a hacking, so I suppose should go to OT:

> [OT]
> This label is for posts that are completely off the topic of
> engineering/technology. The only things we don't ever want to see are
> religious/metaphysical, sex, hate, or political messages.

But I do not mind to be honest, I just ignore this completely as I am not
completely sure if that is legal to modify someone's code in any how and I
am not going to contribute for this.

Tamas



On Mon, Jul 14, 2008 at 12:39 PM, Olin Lathrop <olin_piclist@...>
wrote:

> Apptech wrote:
> > Under the old system I'd see this as more [EE] than [OT] so
> > EE seems good to me for now.
>
> Right, but we're under the new systems now.  I guess I really don't
> understand the new definition of EE if this is valid EE.
>
>
> ********************************************************************
> Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
> (978) 742-9014.  Gold level PIC consultants since 2000.
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>



--
Rudonix DoubleSaver
http://www.rudonix.com
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Apptech :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> Under the old system I'd see this as more [EE] than [OT]
>> so
>> EE seems good to me for now.

> Right, but we're under the new systems now.

If you are not just trolling then I suggest that you reread
what I wrote to see how it addresses your point.

There is no reason that the change to a new system need be a
legalistic sudden change. Common sense suggests that it be
allowed to be a process that people can to adapt to. While
this halcyon honeymoon phase can't be expected to last
indefinitely, expecting people to post to a new tag when,
due to the normal processes of list operation,  many people
will not yet be aware the tag exists or have made a decision
whether to subscribe to it, means that you would be
requiring people to operate a largely "write only" system
for no good reason.

> I guess I really don't
> understand the new definition of EE if this is valid EE.

As above
The suggestion was that a 'grace period' should reasonably
apply until people have had a reasonable chance to adapt to
the changes.


        Russell








--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Bob Ammerman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay,

I agree this isn't EE

I hate to suggest another topic, but...

Many on the PICLIST are primarily EE types, designing hardware, and the
firmware is extras....

Many others on the PICLIST are primarily programmer types, writing firmware
and hooking into hardware (which they may have designed)

We have an EE tag so the EE types can ask about non-PIC but EE related
concepts.

Do we need an SE (software engineering) tag so that programmer types have a
place to ask about non-PIC but programming related topics?

Being one of the programmer types I don't want to be a second class citizen
on the list!!

-- Bob Ammerman
RAm Systems

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Apptech :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I hate to suggest another topic, but...

...

> Do we need an SE (software engineering) tag so that
> programmer types have a
> place to ask about non-PIC but programming related topics?
>
> Being one of the programmer types I don't want to be a
> second class citizen
> on the list!!

I'd assume that at present it belonged in OT or TECH.
What say we see how the new TECH tag settles down and how
happy people are with content.
While I agree that a SE / SOFT / SOFTWARE / ...  or whatever
tag would naturally accommodate many subjects, it took years
to get the TECH tag and there was strong resistance to it. I
imagine that proposing another new tag at this stage would
cause the long term admins to blow a fuse :-). For now I
would be happy enough to see such in TECH and we can see
what the populace who subscribe think after a while.


        Russell


--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Bob Ammerman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My issue is this:

An EE doesn't have to deal with TECH: or OT: garbage if he doesn't want to.
The poor SE has no choice.

My understanding of the PICLIST and its topics is this:

FIRST: The list is primarily for users of PICs.

SECOND: Its initial and still primary purpose for existing is to help people
get things done with PICs.

THIRD: It is an excellent resource for other non-PIC related engineering
info.

FOURTH: It can be, for some, a cool place to 'hang-out' and have need OT
(and now TECH) discussions.

What I am saying is there is no significant difference between and EE and an
SE in regard to the THIRD item above.

Say I am developing a PC-based application that has to do something with
CRCs that I don't understand. How is asking for help with that any different
from an EE asking a question about how to get packaging for a non-PIC
project?

I will repeat: Software types should NOT be second class citizens!

I personally follow TECH and would have no trouble dealing with issues
there, but what if the guy who is an expert on CRCs and could easily answer
my question doesn't care about GW, GE or black holes? (or whatever ends up
in TECH). Then I'm screwed.

Software people of the list, Unite!

---- Bob Ammerman

----- Original Message -----
From: "Apptech" <apptech@...>
To: "Microcontroller discussion list - Public." <piclist@...>
Sent: Monday, July 14, 2008 10:19 AM
Subject: Re: [EE] Change CRC in bin file


>> I hate to suggest another topic, but...
>
> ...
>
>> Do we need an SE (software engineering) tag so that
>> programmer types have a
>> place to ask about non-PIC but programming related topics?
>>
>> Being one of the programmer types I don't want to be a
>> second class citizen
>> on the list!!
>
> I'd assume that at present it belonged in OT or TECH.
> What say we see how the new TECH tag settles down and how
> happy people are with content.
> While I agree that a SE / SOFT / SOFTWARE / ...  or whatever
> tag would naturally accommodate many subjects, it took years
> to get the TECH tag and there was strong resistance to it. I
> imagine that proposing another new tag at this stage would
> cause the long term admins to blow a fuse :-). For now I
> would be happy enough to see such in TECH and we can see
> what the populace who subscribe think after a while.
>
>
>        Russell
>
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Bob Blick-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Mon, 14 Jul 2008 09:55:20 -0400, "Bob Ammerman"
<rammerman@...> said:
> Okay,
>
> I agree this isn't EE

Hi Bob,

In my opinion, CRC belongs in EE because it is something an embedded
engineer will need to deal with.

The elephant in the room is the personalities involved in the original
post and the first reply.

Let's try to get over the personality issues.

Let's try to raise the quality of the posts.

Then everyone will be happy.

Cheerful regards,

Bob "I'm moderating, OK?" Blick

--
http://www.fastmail.fm - IMAP accessible web-mail

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Adam Field :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you're router supports Openwrt (openwrt.org), they're an open
source project and you'll be able to see how the CRC is calculated. Or
you could first get openwrt running and use the command line tools
from there to reflash with your version.

There are some routers with JTAG headers. You can make cheap JTAG to
PC parallel port interfaces that you can flash/debug from.

I'm mostly talking about the Linksys WRT54G family, as they are very
hobbyist/homebrew friendly.

On Sun, Jul 13, 2008 at 3:02 PM, Tomás Ó hÉilidhe <toe@...> wrote:

>
> I'm trying to upload some custom firmware to my router but it won't
> accept the firmware file because the CRC check is wrong in it.
>
> What I did was I downloaded a legitimate ".bin" file from the router
> manufacturer and then edited it myself with a hex editor, but I don't
> know how to go about changing the CRC.
>
> Anyone know?
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Bob Ammerman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So, software that might be in an embedded app, or perhaps might communicate
with an embedded app is ok in EE?

But generic Linux/Windows stuff isn't.

Do I have it?

--- Bob

----- Original Message -----
From: "Bob Blick" <bobblick@...>
To: "Microcontroller discussion list - Public." <piclist@...>
Sent: Monday, July 14, 2008 11:59 AM
Subject: Re: [EE] Change CRC in bin file


>
> On Mon, 14 Jul 2008 09:55:20 -0400, "Bob Ammerman"
> <rammerman@...> said:
>> Okay,
>>
>> I agree this isn't EE
>
> Hi Bob,
>
> In my opinion, CRC belongs in EE because it is something an embedded
> engineer will need to deal with.
>
> The elephant in the room is the personalities involved in the original
> post and the first reply.
>
> Let's try to get over the personality issues.
>
> Let's try to raise the quality of the posts.
>
> Then everyone will be happy.
>
> Cheerful regards,
>
> Bob "I'm moderating, OK?" Blick
>
> --
> http://www.fastmail.fm - IMAP accessible web-mail
>
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist 

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Bob Blick-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 14 Jul 2008 12:23:57 -0400, "Bob Ammerman"
<rammerman@...> said:
> So, software that might be in an embedded app, or perhaps might
> communicate
> with an embedded app is ok in EE?
>
> But generic Linux/Windows stuff isn't.
>
> Do I have it?

Sounds good to me. We aren't making major changes to [EE], just
focusing.

Cheerful regards,

Bob

--
http://www.fastmail.fm - A no graphics, no pop-ups email service

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by William "Chops" Westfield :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jul 14, 2008, at 6:33 AM, sergio masci wrote:

>> You will have to find out what kind of "CRC" is used.  There is no
>> standard "CRC" algorithm.  There are literally thousands of CRC
>> methods in use.
>>
> The CRC algorithm is pretty standard (the only real variations  
> being start
> with all zeros, all ones, use 16 bit, 24 bit or 32 bit  
> accumulator), it's
> the polynomial that tends to vary.

I've seen the "image checksum" here vary from a simple checksum (unix  
"sum" command or IP checksum algorithm) to a CRC (with various  
polynomials), to an MD5 hash.  So yeah, the first step is figure out  
"what kind of CRC is used", keeping in mind that it might not be an  
actual CRC at all in the normal use of the term...

BillW

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Re: Change CRC in bin file

by Apptech :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I suggest that this discussion should be being held in TECH
as it relates to whether material belongs in TECH or
elsewhere. AND the subject line needs changing.

What say any responses are posted there? I'll
dual post this and with a changed subject line.


> My issue is this:

> An EE doesn't have to deal with TECH: or OT: garbage if he
> doesn't want to.
> The poor SE has no choice. ...


Having carefully read that, my original comment applies.

Core:

>> I'd assume that at present it belonged in OT or TECH.
>> What say we see how the new TECH tag settles down and how
>> happy people are with content.
>> While I agree that a SE / SOFT / SOFTWARE / ...  or
>> whatever
>> tag would naturally accommodate many subjects, it took
>> years
>> to get the TECH tag and there was strong resistance to
>> it. I
>> imagine that proposing another new tag at this stage
>> would
>> cause the long term admins to blow a fuse :-). For now I
>> would be happy enough to see such in TECH and we can see
>> what the populace who subscribe think after a while.

I generally agree with your arguments. There may well be
many others who agree. It seems likely that such material
will be migrating out of EE (not my choice except as 1 of N
members). Letting the new arrangement settle down and then
seeing how people feel.

James argued for years that a proliferation of tags would
lead to administrative nightmares AND a demand for still
more tags. He may or may not prove right on the first point.
He seems to be being proven right on the second.