Announcement

Collapse
No announcement yet.

Send Serial data via WiFi to XpicoShield

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Send Serial data via WiFi to XpicoShield

    Right now i am able to stream Serial data generated by Arduino+XPico Shield and read this via WiFi using a TCP / IP client.

    But what I want to do is to stream Serial data from my laptop via WiFi and read it in the Arduino+XPico . I can then parse the data and do something with it. Its not a big data rate i need ... about 90 bytes once every second.

  • #2
    You can setup the serial port to Tunnel mode, accept connections on a TCP port, and stream the data that way. See this section of the wiki for more information on how you can use the serial port of the xPico Wi-Fi:
    http://wiki.lantronix.com/developer/...erialPortSetup

    Comment


    • #3
      Thanks Mariano. I have been doing some reading and landed on this link: http://ltxfaq.custhelp.com/app/answe...75Mv8C~zj~PP~L

      Following that i am able to send Serial data from a XpicoWIFi shield configured as a SoftAP Host to another XpicoWiFi configured as a client. But i am unable to tunnel the data back from Client to the Host . I guess Serial Tunnels are bi-directional. Could anyone point me in the right direction ? Thanks in advance

      Comment


      • #4
        Yes, the Tunnel, once established, is bidirectional. So if you can make the connection and send data from one device to the other, then you should be able to send data back from the other device.

        Mariano

        Comment


        • #5
          Originally posted by mariano View Post
          Yes, the Tunnel, once established, is bidirectional. So if you can make the connection and send data from one device to the other, then you should be able to send data back from the other device.

          Mariano
          Thanks for the clarification.

          My actual requirement is very simple :

          1. Once very 100millisecond the SoftAP module sends a 20byte data to the Client module,
          2. The client module reads it and in turn sends an acknowledgement that is about 10byte long.

          For this do i have to configure anything extra in the Tunnel page or leave the defaults ?

          The terminologies ACCEPT and CONNECT are a bit non-intuitive on the Tunnel config page. The way i understand :

          ACCEPT : Be ready to accept an incoming request to link based on certain criteria like ALWAYS / START Char on the Serial line etc.

          CONNECT : When a specific condition is satisfied connect to another unit using its IP address / Port etc

          Is my understanding right or....?
          Last edited by MogaRaghu; 04-26-2018, 04:23 PM.

          Comment


          • #6
            Your understanding is correct. Make sure the serial line is configured for Tunnel on both devices. On the SoftAP one, leave the Tunnel configuration as default.

            On the client, set the Tunnel Connect mode to Always, and the Host to IP address 192.168.0.1 and port 10001. Then the serial ports of both devices will always be tunneling to each other.

            Comment

            Working...
            X