Birdiection Communication channel between Linux client and server application

This is a discussion on Birdiection Communication channel between Linux client and server application within the Networking/Device Communication forums, part of the General Programming Boards category; hi, I have one Linux gateway application written in C. Currently Linux Gateway behave just like server for the lacal ...

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    Birdiection Communication channel between Linux client and server application

    hi,

    I have one Linux gateway application written in C. Currently Linux Gateway behave just like server for the lacal communication(LAN).

    LAN scenario is like that....
    mobile device =====> search gateway======> small controlling electrical devices

    Mobile Device send the command (method) to the gateway and gateway send the signals to the small controlling electrical devices so that we can control the electrical devices.

    Command execution code written in Gateway.

    Now we want to implement WAN version (Remote Communication) :
    mobile device ==========> Linux server Application =====> search gateway======> small controlling electrical devices

    I want to develop an Remoting Channel Application which can communicate to the Linux Gateway application remotely.

    Linus Server have the public ip.
    Linux Gateway have the private ip assigned by dhcp.
    command (method) in the form of string.

    So that mobile device send the command to Linux Server Application, Linux Server application search the appropriate gateway (in which the particular controlling device attached) & send the command to gateway, Gateway send the signal to controlling devices & vice versa for acknowledge.

    So now linux gateway behave just like a client but all the command execution code written in Gateway.

    My Steps:
    (1)Linux Gateway establish the connection with linux server.
    (2)Linux Gateway wait for command (method) from Linux server. Linux server get the command from mobile device and just pass that command (method) to the Linux gateway.
    (3)After establish the connection anybody (Linux Gateway and Linux server) can send the message to each other.

    I want to develop a remote communication channel (code in Linux and C) or some mechanism between Linux Gateway and Linux server , so that After establish the connection anybody (Linux Gateway and Linux server) can send the message to each other.

    what could be the fine tuned way to achieve the same? What are the other possible thoughts to implement the same thing?

    Any thoughts / link/ sample application will be appreciated.

    Regards,

    Raj

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,854
    What else, apart from port forwarding, does your Linux server need to do?
    What is PortForwarding

    Once you expose your device to the internet at large, you need to start thinking about security, authentication and validation.

    If this were some popular consumer product say, some 'random hacker' might take it on themselves to start sending random packets to "small controlling electrical devices" just to see what happens next.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    3
    Hi,

    Thanks for your reply.....Linux server have a lot of things like web service, communication code with Gateway....currently I only focus on remotely communication code with gateway and this code also store the multiple gateway id for the bidirectional remote communication with each gateway and execute the methods.

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Salem View Post
    What else, apart from port forwarding, does your Linux server need to do?
    What is PortForwarding

    Once you expose your device to the internet at large, you need to start thinking about security, authentication and validation.

    If this were some popular consumer product say, some 'random hacker' might take it on themselves to start sending random packets to "small controlling electrical devices" just to see what happens next.
    X10 Automation ... there's just nothing like coming home to discover all your lights are on, your garage door is wide open, the stereo is blasting, your coffee pot is boiled dry and supper is burning in your electric fry pan and filling the place with smoke....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-27-2011, 11:15 AM
  2. Replies: 1
    Last Post: 05-19-2011, 11:14 PM
  3. Client to Server Communication using a Message Queue
    By cr80expert5 in forum C Programming
    Replies: 2
    Last Post: 05-10-2011, 12:35 AM
  4. Raw Socket Client and Server Communication Problem
    By rplumii in forum C Programming
    Replies: 6
    Last Post: 02-10-2011, 07:02 AM
  5. server client application - (i really need your help)
    By sarahnetworking in forum C Programming
    Replies: 3
    Last Post: 03-01-2008, 10:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21