The following page was printed from RemoteCentral.com:
Ikegami SDR-304 Rs232 help (Solved)
| |
|
Topic: | Ikegami SDR-304 Rs232 help (Solved) This thread has 9 replies. Displaying all posts. |
|
Post 1 made on Tuesday December 29, 2009 at 18:23 |
Duct Tape Loyal Member |
Joined: Posts: | November 2008 5,299 |
|
|
Edit: Full list of commands on post 8 Could someone wiser than me take a look at the protocol for this DVR? [Link: ikegami.com]it starts on page 81 of the PDF I am getting stuck on the instructions for BCC "BCC Exclusive OR from byte next to SOH through ETX"
Could someone give me a sample code?
I've never dealt with RS232 codes like these.
Thanks in advance.
Last edited by Duct Tape on January 7, 2010 10:51.
|
|
|
Post 2 made on Tuesday December 29, 2009 at 18:45 |
mark65 Long Time Member |
Joined: Posts: | November 2003 450 |
|
|
This should be the command for CH01: 01 53 30 50 81 80 30 02 43 48 30 31 03 FB
"43 48 30 31" are CH01 converted from ASCII to HEX
"FB" is the BCC. It is calculated using the OR function: 1. Open Windows Calculator 2. Go to View>Scientific or View>Programmer 3. Put the Calculator in HEX mode 4. Use the "Or" function just like "+" or "-" Do not count the "01" at the begining of the string. To calculate the BCC for CH01 enter the following: 53 Or 30 Or 50 Or 81 Or 80 Or 30 Or 02 Or 43 Or 48 Or 30 Or 31 Or 03 Or resulting in FB
|
|
OP | Post 3 made on Tuesday December 29, 2009 at 20:24 |
Duct Tape Loyal Member |
Joined: Posts: | November 2008 5,299 |
|
|
thanks Mark, i see what I was doing wrong now. I wasnt converting the CH01 command to hex and adding it up correctly.
thanks a ton, i will verify the codes tomorrow.
|
|
|
OP | Post 4 made on Wednesday December 30, 2009 at 14:10 |
Duct Tape Loyal Member |
Joined: Posts: | November 2008 5,299 |
|
|
No Dice :(
I get a response of 06, but it doesnt change inputs. I also see the green remote light come on when I send the command.
I tried contacting Ikegami and they arent much help. They said that they think the code I entered is correct and suggested that I re-initialize the unit, which didn't help.
One other thing to note. I had to connect pins 7 and 8 on each DB9 connector and cross them over for the unit to respond at all. connecting pins 2,3, and 5 alone doesnt give me any response back.
|
|
|
Post 5 made on Wednesday December 30, 2009 at 16:35 |
mark65 Long Time Member |
Joined: Posts: | November 2003 450 |
|
|
If you are receiving 06, that means the unit is acknowledging the commands. Just to be sure change the BCC to something else and see what response you get.
I would try connecting Pin 7 of the DVR directly to Pin 8 of the DVR and not run it back to your control system.
|
|
OP | Post 6 made on Wednesday December 30, 2009 at 16:46 |
Duct Tape Loyal Member |
Joined: Posts: | November 2008 5,299 |
|
|
i tried changing the BCC to a random hex code and it still comes back as 06
i connected pins 7 and 8 just now and it still works as before. do i need to do anything with pins 4 and 6?
|
|
|
OP | Post 7 made on Wednesday January 6, 2010 at 12:25 |
Duct Tape Loyal Member |
Joined: Posts: | November 2008 5,299 |
|
|
i got a reply from Ikegami with the proper codes. It turns out that I should have been calculating BCC using Xor, not Or. Now I know what the "Exclusive" part stands for in this part of the instruction: "Exclusive OR from byte next to SOH through ETX"
Exclusive (X) + Or = Xor
I can't believe that I didnt figure that one out on my own. But yay for quality tech support. here is the proper code for CH01 CH01 01,53,31,50,81,80,30,02,43,48,30,31,03,08 I will generate the rest of the codes and post them later, just in case someone might need them someday. thanks for the education Mark John
Last edited by Duct Tape on January 7, 2010 10:53.
|
|
|
OP | Post 8 made on Thursday January 7, 2010 at 10:50 |
Duct Tape Loyal Member |
Joined: Posts: | November 2008 5,299 |
|
|
Front Switch Commands | Operation | Full Hex Code | Camera 1 Single screen display | 01,53,31,50,81,80,30,02,43,48,30,31,03,08 | Camera 2 Single screen display | 01,53,31,50,81,80,30,02,43,48,30,32,03,0B | Camera 3 Single screen display | 01,53,31,50,81,80,30,02,43,48,30,33,03,0A | Camera 4 Single screen display | 01,53,31,50,81,80,30,02,43,48,30,34,03,0D | Auto/Quad | 01,53,31,50,81,80,30,02,41,54,03,17 | Pre-Alarm | 01,53,31,50,81,80,30,02,50,41,03,13 | Timer | 01,53,31,50,81,80,30,02,54,49,03,1F | Menu | 01,53,31,50,81,80,30,02,53,45,03,14 | Search | 01,53,31,50,81,80,30,02,53,43,03,12 | Enter | 01,53,31,50,81,80,30,02,44,43,03,05 | Return/Cancel | 01,53,31,50,81,80,30,02,52,4e,03,1E | Up | 01,53,31,50,81,80,30,02,55,40,03,17 | Down | 01,53,31,50,81,80,30,02,44,57,03,11 | Left | 01,53,31,50,81,80,30,02,4c,46,03,08 | Right | 01,53,31,50,81,80,30,02,52,54,03,04 | Record | 01,53,31,50,81,80,30,02,52,44,03,14 | Pause | 01,53,31,50,81,80,30,02,50,53,03,01 | Rewind | 01,53,31,50,81,80,30,02,46,52,03,16 | Reverse | 01,53,31,50,81,80,30,02,52,56,03,06 | Stop | 01,53,31,50,81,80,30,02,53,54,03,05 | Play | 01,53,31,50,81,80,30,02,50,4c,03,1E | Fast Forward | 01,53,31,50,81,80,30,02,46,46,03,02 | Shift | 01,53,31,50,81,80,30,02,53,49,03,18 | Function Commands | Operation | Full Hex Code | Function Stop | 01,53,31,50,81,80,30,02,53,54,50,4c,03,19 | Funtion Record Stop | 01,53,31,50,81,80,30,02,53,54,52,54,03,03 | Function Camera 1 | 01,53,31,50,81,80,30,02,44,53,30,31,30,31,03,15 | Function Camera 2 | 01,53,31,50,81,80,30,02,44,53,30,31,30,32,03,16 | Function Camera 3 | 01,53,31,50,81,80,30,02,44,53,30,31,30,33,03,17 | Function Camera 4 | 01,53,31,50,81,80,30,02,44,53,30,31,30,34,03,10 | Funtion Auto Quad | 01,53,31,50,81,80,30,02,44,53,30,34,41,03,50 | Funtion Display On | 01,53,31,50,81,80,30,02,44,53,4f,4e,03,14 | Function Display Off | 01,53,31,50,81,80,30,02,44,53,4f,46,03,1C |
Hardware: | Use DB9 crossover cable | Controller Pin 2 to SDR Pin 3 | Controller Pin 3 to SDR Pin 2 | Controler Pin 5 to SDR Pin 5 |
Port Setup on Controller: | Baud Rate: 9600 | Parity: None | Data Bits: 8 | Stop Bits: 1 | Flow: None |
|
|
|
Post 9 made on Thursday January 7, 2010 at 18:48 |
mark65 Long Time Member |
Joined: Posts: | November 2003 450 |
|
|
Never knew that's what the "X" stood for. I learn something new every day.
|
|
OP | Post 10 made on Thursday January 7, 2010 at 18:58 |
Duct Tape Loyal Member |
Joined: Posts: | November 2008 5,299 |
|
|
On January 7, 2010 at 18:48, mark65 said...
Never knew that's what the "X" stood for. I learn something new every day. Is it possible to calculate using OR and Xor without a calculator? is there a long form that I can write down to figure it out? I would love to understand what these calculation methods are doing, instead of just pumping numbers into a calculator.
|
|
|
|
Before you can reply to a message... |
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now. |
Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.
|