B4X FEED Problem with TCP socket Android<-->ESP

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: Problem with TCP socket Android<-->ESP است. این موضوع تا کنون 31 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Problem with TCP socket Android<-->ESP
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
31
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
Hi all,

in my 3D printer host app I've a problem than cannot know how to solve.
I'm explain better...

My app communicate over TCP socket with ESP8266 / ESP32 to control a 3D printer, it send and
receive commands. ESP act as server and as WiFi<->Serial bridge, my app as client and connect to ESP.

Because the ESP sketch in written in C++ I avoided to use a stream in Prefix mode and used the standard way,
this forced me to collect on both side the data, not simple in C++ but after a lots of changes worked well.
I do not used AstreamText because I reuse the same socket to send string commands and even to upload
gcode files (as binary data) from Android to ESP SD Card, I just replicated what AstreamText do using a StringBuilder to collect data and CRLF as delimiter, only on the send command sub (strings).

Every command I send to ESP it send to a 3D printer, ESP read response from 3D printer and return back (the original command and reply from 3D printer) to Android as log.
My...



 

عقب
بالا