Welcome, Guest. Please login or register.

Author Topic: Connecting Ethernet device to serial port  (Read 19049 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Speelgoedmannetje

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 9656
    • Show only replies by Speelgoedmannetje
Re: Connecting Ethernet device to serial port
« Reply #44 on: May 25, 2008, 03:38:06 PM »
Quote

bloodline wrote:

Never feel guilty about avoiding your family... you owe them nothing!!! :madashell:
What have you people always against family? I love my family, and vice versa (aunts still treat me as the benjamin of the family :oops:)
And the canary said: \'chirp\'
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Connecting Ethernet device to serial port
« Reply #45 on: May 25, 2008, 03:46:43 PM »
Quote
bloodline wrote:
Remember, this is just my theory... If you can Telent, that make sure you explore that avenue FULLY!!

Have just checked, and it's definitely a config interface only. After outputting the current config, the telnet interface gives you the following options, none of which allow any control or monitoring of what is happening in the device.

Change Setup:
  0 Server
  1 Channel 1
  2 Channel 2
  3 E-mail
  5 Expert
  6 Security
  7 Defaults
  8 Exit without save
  9 Save and exit            Your choice ?

Quote
bloodline wrote:
But yes... I think the solution... if there is one, will come from examining the packets.

It should be fairly easy to have a look at the packets. But I have no idea how I would go about writing an app to custom make a packet and shove it in to the TCP/IP stack. Furthermore, the app would have to monitor traffic coming from the device to detect state changes. I'm losing enthusiasm for this now...

Quote
bloodline wrote:
Well, if it is a fixed function device... then you could easily build a library of packets that correspond to the commands you issue...

Yes, there will be only a limited number of commands I will ever need to send to it, so once the I/O was working I could easily tweak the data it sends to make it do different things. That's the easy part...

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Speelgoedmannetje

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 9656
    • Show only replies by Speelgoedmannetje
Re: Connecting Ethernet device to serial port
« Reply #46 on: May 25, 2008, 04:02:56 PM »
Doesn't offer the export mode a CLI?
Btw. you can use Wireshark to observe the communication, as raw data.
And the canary said: \'chirp\'
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Connecting Ethernet device to serial port
« Reply #47 on: May 25, 2008, 04:43:12 PM »
Quote

motorollin wrote:
Quote
bloodline wrote:
Remember, this is just my theory... If you can Telent, that make sure you explore that avenue FULLY!!

Have just checked, and it's definitely a config interface only. After outputting the current config, the telnet interface gives you the following options, none of which allow any control or monitoring of what is happening in the device.

Change Setup:
  0 Server
  1 Channel 1
  2 Channel 2
  3 E-mail
  5 Expert
  6 Security
  7 Defaults
  8 Exit without save
  9 Save and exit            Your choice ?

Quote
bloodline wrote:
But yes... I think the solution... if there is one, will come from examining the packets.

It should be fairly easy to have a look at the packets. But I have no idea how I would go about writing an app to custom make a packet and shove it in to the TCP/IP stack. Furthermore, the app would have to monitor traffic coming from the device to detect state changes. I'm losing enthusiasm for this now...



Post the IP... I wanna log on :-D

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Connecting Ethernet device to serial port
« Reply #48 on: May 25, 2008, 04:45:23 PM »
Quote

Speelgoedmannetje wrote:
Quote

bloodline wrote:

Never feel guilty about avoiding your family... you owe them nothing!!! :madashell:
What have you people always against family?


I didn't choose my family... I am disappointed with some of their decisions and actions.

Quote

I love my family, and vice versa (aunts still treat me as the benjamin of the family :oops:)


Yet, she still hasn't learned your name?

Offline Speelgoedmannetje

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 9656
    • Show only replies by Speelgoedmannetje
Re: Connecting Ethernet device to serial port
« Reply #49 on: May 25, 2008, 10:48:03 PM »
Benjamin means the youngest son.
And the canary said: \'chirp\'
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Connecting Ethernet device to serial port
« Reply #50 on: May 25, 2008, 11:10:39 PM »
Quote

Speelgoedmannetje wrote:
Benjamin means the youngest son.


Ahhh right you are! I though she might have dementia or something :-)

Offline Speelgoedmannetje

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 9656
    • Show only replies by Speelgoedmannetje
Re: Connecting Ethernet device to serial port
« Reply #51 on: May 25, 2008, 11:15:01 PM »
Quote

bloodline wrote:

Ahhh right you are! I though she might have dementia or something :-)
No, they're all very well. It's just very coincidental that they all love to talk about how I was when I was a kid, (it always has to be me) The whole female side of the family loves to talk about that.
Yes we all know I was a bit weird as a kid. :lol:
And the canary said: \'chirp\'
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Connecting Ethernet device to serial port
« Reply #52 on: May 26, 2008, 02:54:42 PM »
Right, we're going to have a look at the packets going to the RFXCOM's IP address so we can see what is being sent. Then I'm going to try hacking up a socket application in OS X. Shouldn't be a mammoth task to write a small console app which will take the RFXCOM command and IP address as arguments and then transmit the command to the correct IP.

Where this will get more difficult will be receiving data from the RFXCOM. Apparently the software is configured with the RFXCOM's IP address so it knows where to send data. But it also listens for events coming from the RFXCOM so it can act upon them. How would this work? Would I have to maintain an open socket with the RFXCOM's IP address? If I do this, will packets coming from the RFXCOM automatically be delivered via the Mac's TCP/IP stack to my application?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Speelgoedmannetje

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 9656
    • Show only replies by Speelgoedmannetje
Re: Connecting Ethernet device to serial port
« Reply #53 on: May 26, 2008, 04:04:54 PM »
Quote

motorollin wrote:

Where this will get more difficult will be receiving data from the RFXCOM. Apparently the software is configured with the RFXCOM's IP address so it knows where to send data. But it also listens for events coming from the RFXCOM so it can act upon them. How would this work? Would I have to maintain an open socket with the RFXCOM's IP address? If I do this, will packets coming from the RFXCOM automatically be delivered via the Mac's TCP/IP stack to my application?

--
moto
Yeps, TCP uses sockets.
And the canary said: \'chirp\'
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Connecting Ethernet device to serial port
« Reply #54 on: May 26, 2008, 05:03:24 PM »
Do I need to open a socket specifically between the application and the software on the RFXCOM? Or do I just open a socket to the Mac's TCP/IP stack and send a packet addressed with the RFXCOM's IP address?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Speelgoedmannetje

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 9656
    • Show only replies by Speelgoedmannetje
Re: Connecting Ethernet device to serial port
« Reply #55 on: May 26, 2008, 06:33:32 PM »
You must know what port the RFXCOM works on, and it's IP-port. As far as my experience goes, this will be done in a program (on your mac in this case). It can of course also be done using scripts.
And the canary said: \'chirp\'
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Connecting Ethernet device to serial port
« Reply #56 on: May 26, 2008, 06:36:38 PM »
I'm in way over my head here. I found some examples of BSD sockets, one of which "calls" a socket. The main function of it seems to call socket() and connect(). But I don't know whether this is as a client or a server :crazy:

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Speelgoedmannetje

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 9656
    • Show only replies by Speelgoedmannetje
Re: Connecting Ethernet device to serial port
« Reply #57 on: May 26, 2008, 08:54:10 PM »
The device is a server.
And the canary said: \'chirp\'
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Connecting Ethernet device to serial port
« Reply #58 on: May 26, 2008, 09:19:57 PM »
Ok, just need to figure out whether the code I have written is for a client or server. Ugh, I need to put this away until after my exam...

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Connecting Ethernet device to serial port
« Reply #59 from previous page: May 26, 2008, 09:29:41 PM »
Hmm Wikipedia actually helped :-)

http://en.wikipedia.org/wiki/Berkeley_sockets#TCP

Explains how to set up a client and a server. I guess the RFXCOM is doing all the server business, so I'll have a look at the client setup tomorrow after the Exam Of Doom.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10