cancel
Showing results for 
Search instead for 
Did you mean: 

Working with WIFI module.

I work with WIFI module on B-L475E-IOT01A. I want to configure the module as a server and to connect to it with a client (say a phone).

Looking at an example

int wifi_server(void)
{
  bool StopServer = false;
 
  LOG(("\nRunning HTML Server test\n"));
  if (wifi_connect()!=0) return -1;
 
...........................and so on ......................

I see we need to be connected to access point first. But what if there is no AP? Is it possible to establish a direct client-server connection?

2 REPLIES 2

I did so

if (WIFI_STATUS_OK != WIFI_StartServer(SOCKET, WIFI_TCP_PROTOCOL, 1, "", PORT))
    {
        USART_SendString(SYS_USART, "Start server - ERROR\n");
    }
    else
    {
        USART_SendString(SYS_USART, "Start server - SUCCESS\n");
    }

And I get success. But I don't see the devise in the devices list on my laptop.

I configure AP

WIFI_ConfigureAP("myssid", "mypass", WIFI_ECN_WPA2_PSK, 0, 2);

And I see it in the list. So I can connect to it. What I don't understand - how do I receive and send data?