RS422 Panasonic serial control protocol problem (Arduino)

9 posts / 0 new
Last post
Offline

Location

Saint-Petersburg
Russia
Joined: 01/09/2017
Posts: 3
RS422 Panasonic serial control protocol problem (Arduino)

Hello!

 

Today we try to make Arduino based converter from VISCA RS422 (produced by ATEM 1 M/E) to Panasonic AW series serial control protocol (for AW-HE100 cameras).

 

We have RS422/485 to TTL shield connected to arduino nano (with software serial). And we can communicate with ATEM succesfully.

But we can't communicate with a cameras nor Vaddio panel, which can manage he100..

I "can" send command to camera, but it react not as expected and return trash as answer...

For test, we connect arduino to Vaddio panel, as a sniffer. And we've got something crazy :)

Commands looks like well formed, well sized, but they totally different from commands described in panasonic protocol...

Example of data:

6E  75 D6 E5  0
6E  55 D9 56  B9  4B 95 9F E5  0
6E  75 76 56  B9  57 95 9F E5  B9  4B 95 9F E5 0
6E  75 76 56  0
6E  D5 59 AC  B9  4B 95 9F E5  0
6E  75 F6 56  0
6E  D5 59 AC  B9  4B 95 9F E5  0
6E  75 F6 56  B9  57 95 9F E5  B9  4B 95 9F E5 0
6E  55 F6 56  B9  57 95 9F E5  B9  4B 95 9F E5 0
6E  55 76 56  B9  57 95 9F E5  B9  4B 95 9F E5 0
6E  55 36 56  B9  57 95 9F E5  B9  4B 95 9F E5 0
6E  55 F6 56  B9  57 95 9F E5  B9  4B 95 9F E5 0
6E  55 F6 56  0

6E  55 59 56  B9  4B 95 9F E5  0
6E  75 D6 E5  0
6E  55 59 56  B9  4B 95 9F E5  0

but

commands must be like this

ex)1 PAN Stop command
# P 5 0 [CR]
H'23 H'50 H'35 H'30 H'0D
ex2) PAN/TILT Absolute Position command
# U 8 0 0 0 8 0 0 0 [CS] [CR]
H'23 H'55 H'38 H'30 H'30 H'30 H'38 H'30 H'30 H'30 H'08 H'0D

So 6E - must be 0x23, 0 must be 0x0D etc.

or something like this

[STX] O ? ? : ? ( ? ? ) [ETX]
H'02 H'4F H'** H'** H'3A H'** (H'** H'**) H'03

 

So, my question - is anyone have succesfully communication with panasonic AW protocol via 422 interface?

 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 75
RS232

Hi,

The Panasonic AW series serial control protocol is RS232, not RS422.

I don't know much about them, maybe they are cross compatible but I would doubt it.

Colin

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Saint-Petersburg
Russia
Joined: 01/09/2017
Posts: 3
Hi! No,no. AW-HE100 manual

Hi!

No,no. AW-HE100 manual described control serial port as RS422. And our current working scheme - Vaddio panel -> RS232/RS422 Moxa converter - >RS422 on Panasonic camera.

 

 

Offline

Location

Leeds
United Kingdom
Joined: 12/07/2015
Posts: 75
Ah ok. I was looking at

Ah ok. I was looking at this http://www.vaddio.com/library?path=d&file=tc_panasonic_he100_protocol.pdf

ATEM 2 M/E 4K, ATEM 1 M/E 4K, HyperDeck Studio Pro 4K, DeckLink Mini Recorder

Custom SKAARHOJ based controller

 

Offline

Location

Daarlerveen
Netherlands
Joined: 28/02/2012
Posts: 57
Converter

Post your piece of code where you print the data to the serial port..  You probabbly sending it in the wrong format to the port.

Also if i may suggest ditch the nano.. Softserial is not really helpfull not if you want it realiable and fast..

Choose a processor with minimum of 2 hardware serial ports, and 1 USB for debug purposes..  So i would suggest you buy an Atmega 2560..   Then if you have figured it all out you can still try go smaller and use soft serial..  But i won't recommend it.

Daniel Wittenaar

Xtreemtec Media Productions

The Willows Developments

Offline

Location

Saint-Petersburg
Russia
Joined: 01/09/2017
Posts: 3
re
Xtreemtec wrote:

Post your piece of code where you print the data to the serial port..  You probabbly sending it in the wrong format to the port.

Also if i may suggest ditch the nano.. Softserial is not really helpfull not if you want it realiable and fast..

Choose a processor with minimum of 2 hardware serial ports, and 1 USB for debug purposes..  So i would suggest you buy an Atmega 2560..   Then if you have figured it all out you can still try go smaller and use soft serial..  But i won't recommend it.

 

Hello!

We have tried UNO and run it without software serial, on hardware serial with a same results.

Code is simple:

#include <SoftwareSerial.h>

// Define debug
#define debug

// Define our tx/rx pins

#define OutTx 10   // tx pin
#define OutRx 11   // rx pin

SoftwareSerial OutSerial(OutRx,OutTx);

// define some variables

byte OutCommandArray [16];
byte OutByte;

void setup() {

  OutSerial.begin(9600);    // set OUT speed
  OutSerial.listen();

  #ifdef debug
    // init terminal serial
    Serial.begin(115200);
    Serial.println("Started - vtester");
  #endif

}

void loop() {
  byte c;
  if(OutSerial.available()>0){
     c=OutSerial.read();
     #ifdef debug
      if(c>-1){
        Serial.println(c,HEX);        
      }
    #endif
  }
}

After all it looks like incorrect baudrate. I made a test with a two arduinos - one send data which I expected to receive, another receive it. If sender speed is 4800 and receiver 9600 - I have result which very close to data I have received from the Vaddio panel. But I can't understand where I make an error...

 

 

Offline

Location

Daarlerveen
Netherlands
Joined: 28/02/2012
Posts: 57
code

What you are doing is Serial.print (Which is an ASCII form of printing)  And then HEX because you want to print HEX.. 

If you want to send true Hexadecimal code try this:

Serial.write(c);

;)   

 

Have no board with me at home at the moment.. But i'm pretty sure this is your problem.   I could do some tests tomorrow when i'm at the office again.

Daniel Wittenaar

Xtreemtec Media Productions

The Willows Developments

Offline

Location

Daarlerveen
Netherlands
Joined: 28/02/2012
Posts: 57
code

So did this fix your problem?  Just wondering ;)

Daniel Wittenaar

Xtreemtec Media Productions

The Willows Developments

Offline

Location

Madrid,
Spain
Joined: 11/06/2014
Posts: 1
 I´m doing a software

 I´m doing a software controller for 3 AW-HE130 cameras using LAN control, but this camera have the same commands serial protocol of the AW-HE100 PTZ cameras, I read/write many times the RS422 port of HE60/120 and 130 cameras, I use a RS422 port is using a computer with a terminal program (Advanced serial port terminal or Putty) with a cheap RS422/232 adapter (maybe you need a RS232/USB if dont have RS232 ports), you need do a Cable with TX+- and RX+- cross connection between Panasonic pinout and your interface.

 With a Arduino with unbalanced entry (TTL) maybe you read false datas due to the RS422 is a Balanced port and you read over voltage over GND, I think  you need add a RS422 Buffer to read Data+ and Data - without GND connection. You can find Maxin or Dallas IC´s to do this.

  I use another way  to read it, using a RS422/LAN interface Extron IP T S series (cheap on eBay), this convert RS422 to a IP port and you can read with the network card and a terminal program (Advanced of Eltima)  the port,  in the way of 192.168.254.254:2001 (port 1).

 

 Juan.

Juanjo, Madrid.