logo elektroda
logo elektroda
X
logo elektroda

How to upload a file to a server via UDP? Help needed.

Kronosss 690 7
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18264022
    Kronosss
    Level 4  
    Hi,

    I have started playing around with the module. I have written a program that correctly connects to my home router, from where it connects to the server via WLAN.
    However, I have a conundrum... How do I upload a file to the server?

    At the moment I send the command and I get the answer:
    "425 No data connection".
    Which is logical, as I only have one port open.

    Greetings.
  • ADVERTISEMENT
  • #2 18264573
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #3 18264647
    Kronosss
    Level 4  
    I work on the cheapest one I could find in the shop.

    The problematic code isn't there yet, after all, as I wrote I don't know how to do it.
    I currently log in to the ftp server with AT commands via port 21:
    AT+CWMODE=1
    AT+CIPMUX=0
    AT+CIPMODE=1
    AT+CWJAP=...
  • ADVERTISEMENT
  • Helpful post
    #4 18264819
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #5 18264849
    Kronosss
    Level 4  
    OK, but how do you mount the second port (data connection) in "AT+CIPMUX=1"?
    And how to switch between these ports?
  • Helpful post
    #6 18264854
    Anonymous
    Level 1  
  • #7 18264880
    Kronosss
    Level 4  
    Something is not working for me. I am entering the commands:
    AT+CWMODE=1
    AT+CIPMUX=1
    AT+CWJAP=logging into the router
    AT+CIPSTART=...
    I then try to mount the second port and a message appears:
    ERROR
    2,CLOSED

    How should the second port for data be started?
  • #8 18267985
    Anonymous
    Level 1  

Topic summary

The discussion revolves around uploading a file to a server via UDP using AT commands. The user successfully connects to their home router but encounters a "425 No data connection" error due to only one port being open. Responses suggest using the AT+CIPSENDEX command for single connections and AT+CIPMUX=1 for multiple connections. The user seeks clarification on how to establish a second port for data transfer and how to manage multiple connections. Helpful suggestions include using AT+CIPSENDBUF for non-blocking data transfer and specifying link IDs in the AT+CIPSTART command for multiple TCP connections.
Summary generated by the language model.
ADVERTISEMENT