Wifi TCP/IP over WAN(wired) and cellular-LTE "bridging"

Hello Guys,

My Project runs PERFECTLY (upload and download of 100kB-200kB files)

-> DSL --> Internet -----V
--> WifiHotSpot1 -----V /
SDCard <-> WINC1500 --> WifiHotSpot2 --> Router --+-> Cable --> Internet --> WebServer
--> WifiHotSpot3 -----^ \
-> LTE --> Internet -----^

EXCEPT:
With the LTE cellular bridge
Small ~300-500Bytes http JSON POSTs work OK
Larger files, the server does not answer

I need to start digging deeper into how the WINC1500 communicates in regards to it's sockets and how it resumes or cancels in the case of faulty/inconsistent internet link.
Looking for a few tips, I don't expect a solution.

  • Can connect to multiple WifiRouters from a list in SDCARD.
  • Recovers everytime when any of the "connected-to" WifiRouter drops.
  • Recovers everytime when the Server stops.
  • I download AND upload 100kB-200kB files to and from the server continuously

I currently have multiple devices that runs 24/7.

  • 200-400 bytes "JSON" POST every 10seconds
  • 100kB-200kB file Download From Internet server --> SD Card every 10 minutes
  • 100kB-200kB file Upload From SD Card --> Internet Server every 10 minutes

200kB transfers typically last 4-5 seconds (40-50kB/sec transfer rate )
I have timeouts where I cancel transfers when the server or Wifi drops and I re-try later and I manage file-transfer interuptions "in the middle of a file-transfer" ( cancel and restart later )

I know that data gets sent because the WINC1500 accepts new data ( 512 Bytes at a time ).
I know that http header is OK because it works fine when the Internet is plain "wire" betwen the hotspot and our Internet provider.

I even tried having multiple routers in series to increase the "ping" to the internet server.
works fine with wired WAN but long files seemed incomplete

Any suggestions ?

Thanks

Something I just noticed :
int n = client.write(filedata,datalength);

client.write returns 0 when the link is cellular ...
I tried with 512 and1024bytes writes.

Which both work very well when the internet connection upstream is all wired.