Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Decoding an unknown protocol on: June 22, 2014, 08:08:42 am
Hi all,
I am hoping that someone might be able to offer some advice on the best way to 'sniff and decode' an unknown protocol.

You see, I'm on a mission to automate things around my house with Arduino and this one has been on the burner for a while but I have spent almost the whole weekend trying to work out how these devices 'talk'.

The Item in question is a ducted reverse cycle air conditioner.  It's made by LG and it uses some sort of signalling protocol between the wired remotes (2) and the main 'in-roof' unit.

I've googled so much it's not funny but the protocol does not seem to have been published or reverse engineered by anyone else.

My findings so far:
0-12v logic
'Signal' pin has a very low pullup on it
It appears to be some sort of one wire bus where all devices can be masters or slaves
Each controller sends a 'poll' every 30 seconds or so - Approximately 20 bits X 2 (seems to send the same data twice)
Data is sent by the device by pulling the 12v line low with a 20ms data pulse width.
If the controller does not get a response in 10 tries, it 'errors' so it must be expecting a response

Can anyone tell me the best way to analyse the protocol to decode it?

I used OLS to capture the attached image of the protocol stream but from there I'm not sure on the best way forward - i.e comparing streams and decoding the 0's and 1's
2  Topics / Device Hacking / Gopro wifi control with Arduino on: April 28, 2013, 05:52:24 am
Hi all,  I'm hoping someone has played with this before but perhaps i'm the first.

I have a GoPro HD2 camera with WiFi attachment - It acts as a wireless access point.

I have paired with this, a wireless AP in Client mode - i.e it's acting like a computer connecting to the camera but connects to the network so i can access it via any 'pc' on the network.

The camera is controlled via HTTP GET requests in the form of http://<ip>/bacpac/PW?t=<password>&p=%01

I can jump on my PC and enter the string above into a browser and it turns the camera on - Beatutiful i think!

I created an arduino sketch to connect to the camera and turn it on:

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0x00, 0x28, 0x8B, 0x62, 0xC9, 0xED };
byte ip[] = { 10, 5, 5, 110 };
IPAddress server(10,5,5,9); // GoPro

// constants won't change. They're used here to
// set pin numbers:
const int sensorpin = 18;     // the number of the pushbutton pin
const int ledPin =  2;      // the number of the LED pin
const int solenoid = 3;
boolean movement = 0;

EthernetClient client;

void setup() {
  // start the Ethernet connection:
  Serial.println("Starting Network");
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
//  Ethernet.begin(mac,ip);
  Serial.println("Connecting to GoPro");
  // Try to get the status of the gopro
  if (client.connect(server, 80)) {
    // Make a HTTP request:
    Serial.println("Powering on GoPro");
    client.println("GET /bacpac/PW?t=blahblah&p=%01 HTTP/1.0");
  else {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);     
  pinMode(solenoid, OUTPUT);
  digitalWrite(ledPin, HIGH);
  digitalWrite(solenoid, HIGH);
  // initialize the pushbutton pin as an input:
  pinMode(sensorpin, INPUT);   
  digitalWrite(sensorpin, LOW);

but it bombs out at the client.connect line i.e can't even open port 80 as if there is no IP or there is no physical connection but from the PC i can ping the Arduino and the camera fine.

I know this is a very specific thing and i'm probably strugling for someone to have an answer off the bat but has anyone tried anything like this before?
3  Using Arduino / Programming Questions / Re: Can you convert a HEX byte to a literal character array? on: December 26, 2012, 04:36:37 am
Tom takes the win!  Thank you so much.

Bob - As you wrote it, it was effectively changing a array of type Byte to Char which is not quite what i wanted.  As Tom stated, i wanted the literal characters, not the HEX value of the chars. Confusing I know.

To be honest i thought it would be much easier than that Tom!

Thanks again
4  Using Arduino / Programming Questions / Re: Time and SIM900 on: December 26, 2012, 04:10:56 am
I've never tried it on mine but i'm pretty sure you're not supposed to include the < & >. 

Try AT+CCLK ="12/12/26,15:04:50+08"
5  Using Arduino / Programming Questions / Re: Can you convert a HEX byte to a literal character array? on: December 26, 2012, 04:06:30 am
Thanks for the reply but I tried some mangling with the char() function just now and have not been able to get the required output.

The problem i see with your example is it's still referencing the value as a char rather than a 2 character 'string'.
6  Using Arduino / Programming Questions / Can you convert a HEX byte to a literal character array? on: December 26, 2012, 02:38:38 am
Ok, here's my problem - I have a byte array and i need to pull out the values but i want their hexidecimal values as a char array - can this be done?


byte myArr = {0x3D, 0xFF};

and i want a char array as such:
char charArr[4] = {'3', 'D', 'F', 'F'}

I have searched but I can not find any examples of how this might be achieved - Is this possible?
Pages: [1]