CRC help
Hello
I am writing an app to work on android and blackberry devices.
One of the things that it is connecting to a server with an encrypted string hashed.
The Android that works very well, but I'm having trouble with the blackberry.
Using the converter here: http://hash.online-convert.com/crc32b-generator
I am able to reproduce the CDE I get from the Android. However, it is different from the one generated by the blackberry.
Can someone provide an example of code to generate a correct chain of the CRC? Here is what I use:
int crc = CRC32.update(CRC32.INITIAL_VALUE,inputText.getBytes());
Thank you.
EDIT: I just found out something,
The CRC I want is: 1903129755
But the CRC I receive is:-1903129756
Note that they are the same except for the sign and the last digit...
Just for the follow-up of this.
I works perfectly now. The solution?
I copied both files java (J2SE) in my project and used instead:
java.util.zip.CRC32 and java.util.zip.Checksum
Tags: BlackBerry Developers
Similar Questions
-
Hi all
I have a servo-motor brand Ezi-Servo, which operate by sending the command series for her.
The problem I've got is on CRC Checksum. I tried my best to do, but the result was not the same as the sample code they gave me.
Please check my code and my VI and show me what I'm wrong. I would appreciate.
Polynomial is x 16 + x 15 + x 2 + 1
Some examples of good result of the CRC16
6 A 04 01 00 - CRC16 = 0020
03 00 00 - CRC16 = 01 D9 B 0
My VI below, is
Hello
In regards to our result of offset by comparing the C-program. I already spoke with the support of the product.
The CRC algorithm is CRC 16 Modbus, even we used.
Cause we got wrong with the result is that they did is not calculated CRC of the whole package. they cut part of the outside (example: header, address etc.) and calculate only the data component.
If I appreciate everyone of you guys for helping me solved the problem.
Thank you very much.
-
Re: Internal error CRC on satellite
Hello
I'm trying to restore the operating system on my mother in laws equium. I say yes to erase the entire hard drive and it gives me the plugin screen of your power to say and that is to copy the new files, then I get a crc error internal to the Y then a different location each time (usually in music).
I tried to use another drive of toshiba and also just an os disc. I tried a disc hard diferent and also another dvd player.
Can anyone help?
Thank you
Clare
Hello Clare
Please don't get me wrong, but your ad is quite confusing.
Each Toshiba laptop comes with the pre-installed operating system and install recovery disc. New laptop models are supplied without disk recovery, but with the recovery image saved on the HARD drive and it can be used for the installation of operating system.It will be interesting to know what model of laptop do you have and do you use original Toshiba Recovery for the OS installation disc.
To be honest I don't know what to do, you mean under another drive of Toshiba or just OS disk.
It is not understandable that you think average with different hard drive and also an another dvd player.The whole story is extremely confused. It will be nice if you can provide more specific information.
-
Greetings!
I built an interface to a sensor of bubble Sonotec.
There is a detail that I have not been able to solve; calculation of the CRC.
The manufacturer sent me a pair of examples in based scripting languages, Delphi, and C for the calculation of the CRC. (see attached .txt files)
I made an attempt to interpret the two examples and code creation LabVIEW (see Calc Sonotec CRC.vi)
I built a brute force method that increments the CRC 0 - FF, while checking the bytes of return.
Some commands do not return a response, so no idea as to when my code 'Assumes that the CRC' work on these.
I thank everyone who is interested to help out me.
Mike
-
Series Packet Question: How to calculate CRC
Hi all, I have tryied to find an answer on how to calculate the CRC on a RS232 packet received, its really driving me crazy!
im a beginner, learned how to use labview read on different forums, and I had managed to build really good applications, but im stuck in this, hope someone can help me...
OK, so im constantly receive packets of 15 bytes:
A5 09 0C 00 61 05 1F A0 10 00 05 00 04 05 3F
A5 09 0C 00 61 05 10 00 05 0C 2F 03 A0 1F-3F
A5 09 0C 00 61 05 10 09 05 09 04 09 A0 1F-3F
the supplier for material gave me the following code to calculate the CRC:
Control CRC program:
#define unsigned char uchar
UCHAR CRC_Bitwise8 (uchar * buf, uchar size)
{
UCHAR i, j, b;
UCHAR crc = 0;
for (j = 0; j<>
{
b = * buf ++;
for (i = 0; i<>
{
If (((CRC^b) & 0x01)! = 0)
CRC ^ = 0x18;
CRC > = 1;
b >> = 1 ;
}
}
return crc;
}so my question is, how can we insert this code in labview? any example?
Thanks in advance, this forum has really helped me learn labview in a practical way.
You can use my code for the thread that I've referenced. To play with a web version of my code go here. My code is based on the code on this Web site.
My code to the following parameters:
Calculation of the CRC: Other (specify)
Order of the CRC: 8
Polynomial CRC: 0 x 30
CRC initial value: 0
CRC XOR final value: 0
Reflect the preprocessing of data: TRUE
Match the data before Final XOR: TRUE
In your messages, the A5 09 0c is certainly a header. I think that the 00 following is also part of the header, but without the manual, I can't confirm. 00 will not affect the calculation of the CRC, in order to get the same results with it and without it. So, in your first example, I use 61 05 3F 1E A0 00 05 00 04 10 and the result is 0x05.
-
Calculation of the CRC-16 CCITT
I need help for generating a CRC - 16 CCITT. I've searched high and low and can't find the right one. Here is a list of the sites that I have used to try to find a LabVIEW VI to do the trick:
http://zone.NI.com/DevZone/CDA/EPD/p/ID/1660
https://decibel.NI.com/content/docs/doc-1103
http://forums.NI.com/T5/LabVIEW/CRC-CCITT-16bit-initial-value-of-0xFFFF-or-0x1D0F/TD-p/896664
http://forums.NI.com/T5/LabVIEW/CRC-16-CCITT-of-serial-packets/TD-p/1471386
http://forums.NI.com/T5/LabVIEW/CRC-CCITT/TD-p/109061
http://forums.NI.com/T5/LabVIEW/computing-CRC/TD-p/825325
Some of these even have several CRC to the choice.
Now, what I have is a piece of code C. And this is where I ask for help because I have no idea how to turn C in G. And I'm certainly not fair why this CRC is different from 'standard' ones found in the links above.
I have attached the PDF with the code.
Here are a few hexadecimal strings and their corresponding CRC:
String: 00 CRC 08:07 1
String: 00 09 CRC: 1-06
Chain: 02 22 03 E8 CRC: E5 6a
Chain: 02 27 03 E8 CRC: B5 CF
Chain: 02 29 00 02 CRC: EB 57
String: 04 29 00 01 00 03 CRC: CC 94
Chain: 02 00 64 CRC 3D: 05 38
If there is someone out there willing to give a shot of this I am CERTAINLY happy!
Paul.
Ah. There is a small tweak in there that makes it different from the 'standard' CRC How sneaky of them. This code gives me the results you're looking for.
-
Hello
I am struggling with computation of CRC - 8.
I need to do a VI on crc-8 Photo
When I train with only a 1-byte on datainput
It's ok, but with 2-4 bytes it gives me incorrect checksum.
Any ideas how to make this work Vi ok?
Thanks for any help,
There now :-)
Thank you very much!
-
I searched through the various threads on CRC and am at a loss as to what I really need. I received a specificaiton with almost no information. I am very familiar with the Red Cross Canadian so I hope some of you can help out me.
Requirements
* One CRC 16 bit is calculated for load fields useful sequence number and message. The CRC should be placed after the message payload.
* CRC is calculated according to the standard polynomial x 16 + x 12 + x 5 + 1
* CRC initial value. The computation of the CRC initial value must be zero
Then, I give myself a C code sample which is suppose to calculate CRC using a lookup table. The upper part of the code includes the following comment, "CRC-16-CCITT, Reversed, x ^ (16) + x ^ (12) + x ^ (5) + 1, 0 x 8408.
Verification Test data
Here is a sequence of test data for the verification of the CRC algorithm. This data consists of 16, 16-bit (in hexadecimal format).
0 x 5554 CCCE EEE9 6963 637B 5B 24 DA16 D836 CDB6 EDB6 D5B6 DFB6 DB8E 7B5B C71D 9249
CRC for this sequence of data is 0x86DE
I tried to put this sequence in various vi I found in the forums, but none of them give me the 0x86DE. Even change the entries form 8 bit to bit 16 etc.. Because I can't seem to find out how the CRC is suppose to work I can't debug the problem. I worked with this code as it seems the simplist (wish I could remember who posted it so that I could give credit).
Any help would be appreciated.
Skydyvr,
I fiddled a bit and you got an implementation that I think that works you need (based on one of several others I have done). No tables, so it's a run more slowly, but is generally irrelevent for infrequent calls or short messages.
From the sources I have, it looks like "Kermit" flavor, some descriptions describe as a 'real' CRC-CCITT.
Here's a good link:
Online calculator of the CRC - Lammert Bies
I would like to know if it works for you. I pasted your example chain in and makes it the default input data, just to make demonstration easier.
Best regards
Dave
-
Hello world
I have a problem with the CRC generator I found on this forum and I was hopeing that someone can help me.
I have to send in accordance with the structure of the device:
You see at the end I have to calculate the CRC-16 but the vi that I use does not give me the right values and I don't know why. (keep in mind, I'm a beginner total at CRC)
That's what the result should look like:
STX ID of the slave LENGTH DATA CLRC CRCH 7F 80 01 11 65 82 7F 80 01 0C 2B 82 7F 80 01 05 1 D 82 7F 00 09 4A 2B6D 0000 0000 4F25 AA 5A 7F 80 09 4 B 51EF 0000 0000 D04F 7 D 6 D 7F 00 09 4 C CA2D 0000 0000 222C 5A 42 Help, please!
This seems to work...
-
CRC errors & IO devices errors
HI, I'm having a problem installing some of the games I bought. I have a problem with i/o Device Erros & CRC errors everytime I try to install in my windows vista computer. Is it possible to install these games, I can manage or should I buy another game?
Hi timeoutmode,
Please use the Microsoft Windows 7 forum.
I a detailed description, causes and resolution error CRC errors and i/o device , you might be interested to read it through.
CRC errors
What are CRC errors
CRC Cyclic Redundancy Check is a process that helps identify any errors that might occur during the process of data transmission. The data is usually transmitted in small blocks, and a CRC value is assigned to each block and transmitted with it. This CRC value is checked to the destination to ensure that it matches the CRC value that is passed from the source. A CRC error occurs when the two values (source and destination) do not match, the test fails. The main advantage of the CRC, is that it helps you ensure that the data you have received or downloaded is not damaged or corrupted.
Causes of CRC errorsCRC errors can occur due to a lot of different types of problems. Some of these problems are:
1. damage to the file during the transmission process.
2. a problem occurred when the file has been sent.
3. problems with the device that is accessing or opening the file.
4. problems with the file itself.To resolve these problems, you can try the following:
* Make sure that there are no problems with your network connection or a modem.
* Try to retransmit the file.
* Try to send the file using another method or connection.
* Ensure that the file has been sent using the correct format.I/o device error
The Windows error "I/o device error" means there is an error in the computer's ability to read the data when you try to install a program or to copy data from your CD or DVD drive.
This issue is likely to occur when Windows tries to use a transfer mode that your CD drive cannot use or does not recognize. To resolve this problem, you will need to change the transfer mode in your IDE channel properties.
Measures to change the IDE properties
1. click on the Start button
2. right click on my computer
3. Select manage from the menu that appears
4. in the computer management window, select Device Manager
5. in the right pane, click to expand IDE ATA/ATAPI controllers
6 identify your CD/DVD drive in the menu expanded and right click on the appropriate drive
7. Select Properties
8. in the Properties window, click the Advanced Settings tab
9. in the Transfer Mode box that represents your CD/DVD drive (typically device 1); Open the menu drop down and select PIO only
10. click ok and exit all windowsIf this does not solve your problem, then you need to go back using the procedure above and change device 1 to #9 step will support to 'DMA if available '. Then, change the device 0 to "PIO" only in the Transfer Mode box.
For reference, the device 0 is the primary IDE channel and unit 1 is the secondary IDE channel.
After you change your settings, make sure that restart you your system so that the computer recognizes the changes made. After you restart, check settings to ensure that they are implemented. If they are, your device should now work correctly.
For more information about the I/o device error see: http://www.technoxx.com/io-device-error.html
NOT MS. LINK:
Important note: this response contains a reference to third party World Wide Web site. Microsoft provides this information as a convenience to you. Microsoft does not control these sites and no has not tested any software or information found on these sites; Therefore, Microsoft cannot make any approach to quality, security or the ability of a software or information that are there. There are the dangers inherent in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.In the event that your problem is not resolved, try to run chkdsk on your hard drive to check and fix errors on your hard drive.
You can help solve some computer problems and improve the performance of your computer by making sure that your hard disk has no errors.
Follow the steps in the link: http://windows.microsoft.com/en-US/windows-vista/Check-your-hard-disk-for-errorsHope this helps
Aziz Nadeem - Microsoft Support -
Hello world
I have a new Dell computer. It's a Dell Studio 540 with Windows Vista Home Premium 64 bit, with 1 TG of hard drive and 8 GB of RAM. I have problems with "decompression" of a large number of large compressed files (more than 50 GB). Also, because the files on a DVD are often compressed (in the cab for the majority file), the same error occurred on an installation package. Thus, to resume, I got CRC error on compressed files, while opening the zipper AND my different types of software installation fails with errors of Sami.
Before you answer, please read my steps below:
1. I reinstalled Windows Vista 2 times from scratch with a clean format. Whenever I get the same error on the same files even when there is nothing installed (even the drivers are not installed).
2. I tried to run Windows XP Mini, a very light version of XP is the launch of a CD at startup and run in RAM. The same problem.
3. I did all kinds of tests of the material myself AND with Dell technical support. Nothing was found, and I'm sure it's 99.9% true. Everything has been tested: RAM, hard drive, processor, motherboard, etc. The Dell technical support told me that my computer is 100% functional and that this error is due to some software (Windows) does not very well with 64-bit processor... Everything works well in my work all day EXCEPT for the decompression of data.
4. my files are not damaged: they unzip perfectly on other computers. In addition, the program that do not install because of the CRC error with compressed file are all used before on another computer OR are new. I even changed DVD to the store to get a new one and the problem is still there. I also tried to download the torrent from the .iso file and the same problem happened.
5. the files on my computer are not corrupted by the hard drive. I copy keys usb, directrly on the DVD to the hard drive. All possible tests have been done on the files, and they are ok.
6. I did all kinds of tests such as checkdisk, spyware, etc... but given that the installation has not helped with it, I don't think it's related.My last hope is here... MVP is maybe know a problem in which Windows with zip files. I read a lot of people of the CRC errors, so I'm sure something happens. I am currently with the Dell customer service to get a full refund to buy a new computer without a 64-bit processor because it looks too new for Microsoft.
So if anyone knows something I could try, tweak, change to help me with my problem please let me know.
Thank you very much!
DarkJaff
Hello!
This morning, I realized that I never returned to close this topic. In fact, I work with dell for a number of weeks, talk to like 10 or 15 support technical Member, try something else and you know what works?
Reinstall windows... But in my case, I have reinstalled windows 2 times before they ask me to do it again. So I did and everything worked perfectly... For the third time is lucky: P in fact, perhaps during the first installation of 2, RAM has not been installed properly or has failed for a second, because every file that has been read has become corrupted, but at the same time, everything is normal on my computer seems to work ok... In addition, it could be the update that I did for my BIOS. So, a good test would be to update your BIOS, shut down your computer, check if the ram is installed ok, restart, verify that your ram is detected.
After that, reinstall your windows, but DO NOT use the file you had on your "not working version of windows. I lost a lot of backup of the thing on my computer because even put on my new fresh install of windows, these rar did not work. I needed to pick up an old DVD and they worked
So, I hope this will help!
DarkJaff
-
ATHR.sys blue screen, Help!
When I was using Word to write a book, my computer suddenly crashed on me. It was a BSOD. The file that caused it was athr.sys. A few other things here I found on this topic.
It was a Driver_IRQL_Not_Less_Or_Equal error.
The code was 0x000000D1.
Here are some of my features to the computer:
Acer Aspire 5517 laptop
Windows Vista SP1
AMD Athlon 64 processor
ATI Radeon graphics cardPlease help, thanks.
Hello
Go to Acer and get the latest driver wireless for your version of Windows.
Download - SAVE - go to where you put it-right on - click RUN AS ADMIN
By chance you run Stopzilla?
I hope this helps.
Rob - bicycle - Mark Twain said it is good. -
How to correct or fix a bad CRC downloading Winzip? More information, cause of bad CRC error in file transfer possible. Was told that it could be my network card? Yes, I does not work on a network, but I don't know how I can get around this.
Hello
Bad CRC download from other programs or files, haven't you?
7-zip - free
http://www.7-zip.org/If yes then this is probably your NIC (eventually the cable/wire) or WiFi depending on whether you are using.
I hope this helps.
Rob - bicycle - Mark Twain said it is good. -
Sims 3 gets CRC error during installation
Hello, I would like to know how to get sims 3 to work on my laptop. I downloaded it but it happens with a crc error during installation. I have read that this can be caused when your computer needs to defragment if...
To try to solve this problem, I downloaded a cleaning and defragmentation program. I cleaned my computer and tried to Defrag. I then discovered that I could not defragment if I had vista sp2. I downloaded sp2 eventually with the help of an advisor. There were a few flaws that prevented me to download it myself. Now I have sp2, that he will not yet be defragmentation without gel. So I can not even download the sims 3! Its very frustrating and I was wondering if you could help me to sort this please?
Hi, I have the same error when I tried to install it on my pc.
What I did:
1. run the cleanup utility on the Local C drive windows disk
2. restart your computer.
3 run ccleaner , then click on "cleaner".
Then, got to 'Register' then click Scan then click Fix all issues...
4. prior to installing the Sims 3 game, clean installation disk using a disk cleaner and a microfibre cloth. Make sure the disk is dry until you load it in your DVD player.
5. once the installation is complete, restart the computer. Then, refer to steps 1-4.
-
CRC error SP2 80070017 error code
I'm trying to install SP2 for my Vista Home Premium 64-bit (SP1), but get the CRC 80070017 error code.
I tried the suggestions in SP2 will not install code 80070017 be without success.
I ran the SFC and it stopped at 19% and say me that damaged files where found, and some could not be repaired.
The SBC.log, the System File Checker, is 3 MB big and full of errors.I tried the Checksur KB947821 and I get this:
-----
Audit of manifest Package and catalogs.
(f) CBS servicing\packages\Package_for_KB960714~31bf3856ad364e35~amd64~~6.0.1.0.cat catalog missing 0x00000002
...
'and so on, continuing the KB960714 trace '.
Summary
Found 19 errors
Payload CSI file missing Total Count: 15
Catalogue of CBS missing Total Count: 1
CBS Watchlist package missing Total Count: 3
----
I tried to install the patch KB960714, the newspaper above and failed.Last update was KB947821 yesterday.
The material is Intel Core2Duo E8400, 4 GB RAM, Radeon HD4850.
Help, please.
Thanks for your quick response.
I did the steps mentioned above, see my first post and failed.
What I did to reinstall the system, is not formatting the HD or anything, everything Vista reinstall and reactivate it.
Then I updated my system, 56 updated and checked the system with SFC/scannow, the answer... .found no violation of integrity.
Downloaded SP2 from a stand-alone installation installation process.Everything worked fine , now I have to deal with the ASUS software that the monkey went, but this isn't a big deal.
See you soon
Maybe you are looking for
-
In my iPhone, whay do I have more photos into Albums than in the Photos?
When I enter my iPhone photos there are three icons at the bottom. The left is 'Photos' and the law on "Albums". Inside of the Albums in the "Pictures" section, I have 5 112 pictures, but in the icon at the bottom left 'Photos', I 5 053. This happens
-
Computer tells me to "activate printer" HP Photosmart D110
Original title: HP Photosmart D110 Have been using HP Photosmart D110 with no problems. Now cannot get computer and printer to talk. Diagnosis on the printer show it all that it is in working condition. Computer tells me to "turn on the printer,' whe
-
The display shows "Input not supported".
I went to the account on my computer and everything on the screen was really big. So I went to change the resolution and clicked OK. Then the screen went black and it says "input not supported" and nothing happened so I turned off the computer and tu
-
HP 14-r202tx: lack USB Cobtroller in K8U42PA #AR6
Guys please help me, IAM using Hp 14-r202tx and Windows 7 64 Bit but missing (USB) Universal Serial Bus controller, I was download and installed all the drivers in HP but nothing happen. Can you help me. Thank you
-
Hello I'm trying to sign the BAR file generated from the apk files, but I got this error: Error: Code signing request has failed because it cannot be recorded. Package-Version-Id [gYACgLU-GLg8YtNMuWU17-BoxsM], [gYAEgM4XsG9ppojbj3zOO9gg-Nc], Id [21894