Skip to main content
nandyeezforu
Associate II
October 23, 2015
Question

Command mode and Data mode

  • October 23, 2015
  • 4 replies
  • 1059 views
Posted on October 23, 2015 at 15:50

Hi,

I am using SPWF01SC.11.

my wifi module is connected with micro controller via UART.

Now from the micro controller i sent a command AT+S.SOCKD = 1234(portnumber)

I got a reply ''NOW IN DATA MODE''.

using the port number and IP address i connected the wifi module from my computer using the Socket test software .

Now I have sent a message from the computer.

I would like to know what will happen to the message received in the data mode,

can i receive the same message on the micro controller via UART?

what will happen if i send data from micro controller to the wifi module in the data mode?

I read some manual it is confusing,thats why I am looking for experts guidance :)

    This topic has been closed for replies.

    4 replies

    laerte
    Visitor II
    October 23, 2015
    Posted on October 23, 2015 at 16:13

    Hi John,

    if you send some data via uart during data mode all the stream will be transmitted as data stream via wifi. If you want to return to command mode you have to send via uart the escape sequence AT+S. in a single shot transmission without  <CR> at the end.

    I suggest you to read the ''socket server Application note''

    Cheers

    nandyeezforu
    Associate II
    October 23, 2015
    Posted on October 23, 2015 at 17:01

    Hi laerte,

    I got your point when we send data via uart during data mode all the stream are transmitted and it is working fine for me but my doubt is

    when i receive some data from air on the wifi module in data mode,will it be transferred to the micro controller via UART ?

    Gerardo GALLUCCI
    ST Employee
    October 23, 2015
    Posted on October 23, 2015 at 23:32

    Hi John,

    DataMode works in both directions: UART to WiFi, and WiFi to UART.

    - if something is received (from MCU) over UART, it's sent to the air;

    - if something is received over the air, it's sent to MCU (by UART)

    nandyeezforu
    Associate II
    October 24, 2015
    Posted on October 24, 2015 at 09:17

    Hi gerardo,

    Now I am clear, thanks a lot :)