Robin2:
There are 167 pages in that PDF. What pages should I look at ?
If the Cisco device uses standard 12v RS232 signal levels you will need to convert them to TTL levels for the Arduino. The Max232 chip is commonly used for that.
If you can control the Cisco device from a terminal program such as puTTY then you should probably be able to do it from an Arduino. However if it requires SSH I don't know how you would do that, or whether it is possible.
...R
Woops, sorry about that, I was hoping that the info on page 9 would help. I don't quite know what I'm looking for either to be honest. I haven't ever tried to do anything like this before and am not too knowledgable on this subject.
The heart of the API is the API-Engine. This is where all information is stored and processed. The API-engine can be accessed by an easy- to-use Command Line Interface called XACLI using RS-232, Telnet or SSH, or by the XML API Service (TXAS) over HTTP/HTTPS.
The api documentation is mainly talking about the commands that can be used in their "Command Line Interface (XACLI)" which I have used before using my PC/SSH on PuTTy.
Aside from SSH, it also says that you can use Telnet and RS-232 to use the Command Line Interface (XACLI). And I assume this XACLI is the only way to talk to the codec, I couldn't find any other doc on the subject.
And I guess the best way to communicate from Arduino to Codec is RS-232? I've never used Telnet but according to wiki it's not recommended to be used anymore. Created in 1968, plenty of security reasons not to use it, and was pretty much replaced by SSH in 1995.
I have used RS-232 few times on my computer(usb->rs232) to configure some stuff on other machines, and know how to terminate a cable.But didn't know too much about it other than that. Wiki says its what was used in old personal computers for cumminicating with modems, printers, mice, data storage, uninterruptible power supplies, and other peripheral devices, but was replaced by the USB and others. It says its still used with industrial machines, networking equipment and scientific instruments.
So I figured that RS-232 would be the best way to communicate here. My original thought was that I could just hook up the Tx, Rx, and GND
on the arduino to the Tx, Rx, GND on the codec using a RS-232. And you are saying that it will work but I need to use MAX232 chip(thanks for that info btw, lead to some good research questions) which converts the Tx, Rx, CTS, and RTS signals? Lowers voltage from 12v RS232 to 5v TTL
So something like this below is what i need to buy and attach to an arduino?
5PCS Mini RS232 To TTL MAX3232 Converter Adaptor Module Serial Port Board
RS232 To TTL Converter/Adapter Board Module MAX232 Transfer Chip with Cable
I would like to keep the project compact and use something more like the first link, unless anyone has reason not to?
The next question I have is, how would I send/receive data to/from the codec?
Would it be something like this?
#include <SoftwareSerial.h>
SoftwareSerial Codec(10, 11); // RX, TX
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
//write
Codec.println("xConfiguration Audio Output Line 1 Equalizer Mode: Off");
//read
if ( Codec.available() ) {
int inByte = Codec.read();
Serial.write(inByte);
}
}
Do I need to convert the string to HEX or something? Or just send as is?
Also will this method of communication require authentication? Such as a username and password? Or is it just directly sending data to machine. I wont need a username and password like I do on SSH?