-->
Page 1 of 2

Re: Need serial bridge / access point

PostPosted: Thu Apr 06, 2017 6:16 pm
by mforcen
I believe that what you want is possible (and may be easy with some references). You should know which protocol uses the app you mention. I mean, the mobile app would use a defined protocol, which defines the content of the packets that the app sends through network.
With that in mind, the idea about your project is to create a server, which accepts connections from the port that your apps uses, and process the packets that receives from other devices. Then, depending on what is received, the ESP should write something through serial.
I would suggest you to use Arduino IDE with ESP8266 board, because it is so simple.
About the timeout, it is a requirement of the TCP protocol. When a client does not send packets in a very long time, the connection closes, because it's a way to proof that the client is still using the connection. A technique to avoid the timeout is to send an empty packet, so it shouldn't be a problem.
Summing up, the process could be:
    Connect to WiFi
    Create the server in the correct port (accept function)
    Receive the packets (callback functions) -> process the data and use the serial line to send information to the telescope.
Sorry for my english.

Re: Need serial bridge / access point

PostPosted: Thu Apr 06, 2017 6:18 pm
by mforcen

Re: Need serial bridge / access point

PostPosted: Sat Apr 08, 2017 1:17 am
by saraedward
I want to be able to control a telescope mount. The telescope mount accepts wired RS-232 serial (I have a MAX3232 converter). The telescope is at a remote site where there is no wifi network of any kind, nor internet connection (other than via cell and cell coverage is spotty). I don’t want or care about an internet connection. I only want to be able to connect a tablet/smart phone to the telescope via wifi (could be Android or iOS based). The tablet/phone has an app on it that is designed specifically to connect to telescopes. The app knows how to command the telescope and how to read data from the telescope. It just needs to get what it sends/receives to a serial link to the telescope. The app is designed to work through the device’s wifi and needs to be given the IP address and port number.

Re: Need serial bridge / access point

PostPosted: Sat Apr 08, 2017 5:02 am
by gbafamily1
I posted an Arduino ESP8266 example program showing how to create a TCP <-> UART bridge with softAP mode. I use it with a GPS receiver but it should work with other serial devices.

viewtopic.php?f=29&t=14447