2020-02-06 01:52 AM
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?
2020-02-06 04:05 AM
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.
2020-02-06 06:20 AM
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?