There is a problem with my hotspot

hi everyone, 

 My hotspot can be connected via a mobile phone, but it cannot be connected via a computer. I want to know why. I want to implement the microcontroller as a server and send the information to any device connected to it. How can I do it?

#include "WiFi_AP_thread.h"
#include "nx_api.h"
void my_ap_wifi_callback(sf_wifi_callback_args_t * p_args)
{

}
;
static int wifi_module_provision(void)
{
sf_wifi_provisioning_t g_provision_info;
ssp_err_t ssp_err = SSP_SUCCESS;

/** Set other provisioning configuration */
g_provision_info.mode = SF_WIFI_INTERFACE_MODE_AP;
g_provision_info.security = SF_WIFI_SECURITY_TYPE_WPA2; /* change this setting to work with other Security types*/
g_provision_info.encryption = SF_WIFI_ENCRYPTION_TYPE_AUTO;
g_provision_info.p_callback = my_ap_wifi_callback;
g_provision_info.channel = 11;
nx_system_initialize();

strcpy((char *)&g_provision_info.ssid, "YYK_ap");
strcpy((char *)&g_provision_info.key, "12345678");

/*call the Wi-Fi module provision API*/
ssp_err = g_sf_wifi0.p_api->provisioningSet(g_sf_wifi0.p_ctrl, &g_provision_info);

if(ssp_err)
{

return 1;
}
else
{
return 0;
}

}
#define START_IP_ADDRESS_LIST IP_ADDRESS(192,168,1,100)
#define END_IP_ADDRESS_LIST IP_ADDRESS(192,168,1,154)
static UINT status;
static void DHCP_Server_Start(void)
{
UINT addresses_added;
status = nx_dhcp_create_server_ip_address_list(
&g_dhcp_server0,
0,
START_IP_ADDRESS_LIST,
END_IP_ADDRESS_LIST,
&addresses_added
);
if(status !=0 )
{
while(1)tx_thread_sleep (10);
}
status = nx_dhcp_set_interface_network_parameters(&g_dhcp_server0, 0,NX_DHCP_SUBNET_MASK,IP_ADDRESS(192,168,1,2), IP_ADDRESS(192,168,1,4));
if(status !=0 )
{
while(1)tx_thread_sleep (10);
}
/* Start the DHCP Server. */
status = nx_dhcp_server_start(&g_dhcp_server0);
if(status !=0 )
{
while(1)tx_thread_sleep (10);
}
}
/* WiFi AP Thread entry function */
//extern int wait_for_link(void);

void udp()
{




}


void WiFi_AP_thread_entry(void)
{
/* TODO: add your own code here */
int returnstatus = 0;
g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_00, IOPORT_LEVEL_HIGH);
g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_01, IOPORT_LEVEL_HIGH);
g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_02, IOPORT_LEVEL_HIGH);
tx_thread_sleep(3000);
status = nx_ip_address_set(&g_ip0,IP_ADDRESS(192,168,1,2),NX_DHCP_SUBNET_MASK);
g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_00, IOPORT_LEVEL_LOW);
g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_01, IOPORT_LEVEL_LOW);
g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_02, IOPORT_LEVEL_LOW);
if(status !=0 )
{
while(1)tx_thread_sleep (10);
}
dhcp_server_init0();

if (returnstatus == 0) /* network link is established */
{
returnstatus = wifi_module_provision(); /*provision the Wi-Fi module */

g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_01, IOPORT_LEVEL_HIGH);
g_ioport.p_api->pinWrite(IOPORT_PORT_06_PIN_02, IOPORT_LEVEL_HIGH);
if (returnstatus == 0)
{
DHCP_Server_Start();

while (1)
{
tx_thread_sleep (10);
}
}

}
while (1)
{
tx_thread_sleep (10);
}
}
void tx_application_define_user(void * first_unused_memory)
{
R_BSP_SoftwareDelay(2,BSP_DELAY_UNITS_SECONDS);
}

 

  • Hello yyk,

    What operating system do you have on that computer and what is the type of your WLAN adapter?

    Best regards,
    masj
  • In reply to masj:

    hello masj

    Thank you for your reply,I installed win10 operating system.

  • In reply to masj:

    It's a lot of computers are not connected.
    Best regards
    yyk
  • In reply to yyk:

    Hello yyk,

    As the first step you can check Application And Services Logs.

    You can open Computer Management. On the left side from the list select Event Viewer->Application and Services Logs->Microsoft->Windows->WLAN-AutoConfig->Operational.

    Then after trying to connect to the hotspot you should see latest log records. There should be Failure Reason information.

    Best regards,
    masj
  • In reply to masj:

    hello masj
    Wireless security failed. The WLAN Auto Configuration service cannot connect to the wireless network. The WLAN autoconfiguration service failed to start the bearer network.These are its tips,I don't know how to solve this problem.
    Best regards
    yyk
  • In reply to masj:

    Hello masj
    I found a win7 computer, the connection was successful, but I am even more confused
    Regards masj
  • In reply to yyk:

    Hello yyk,

    Could you tell me what was the type of the computer with Win7 and what is the manufacturer of that machine?

    Best regards,
    masj
  • In reply to masj:

    hello masj
    My is ThinkPad, win7 is HP
    Best regards
    yyk
  • In reply to yyk:

    Hello yyk,

    If it is not problem for you I would be glad if you can prepare some kind of summary in the form:
    laptop manufacturer (if it was laptop), operating system, WLAN card, was unable to connect or connected.

    And you can try in Device Manager for you WLAN card uninstall driver, refresh devices in Device Manager and try to connect again with gt202 hotspot.

    Thanks,
    masj
  • In reply to masj:

    hi masj
    I think it's a clash of chips. Win7 can be connected, but win10 can't. Moreover, I encountered a new problem: sending data 80-90 times (through TCP) or ping for a period of time (host IP), WiFi interrupts.
    Best wishes
    yyk
  • In reply to yyk:

    Hello yyk,

    What WLAN adapter is being used on Win7 and what on Win10 computers? Is it Intel Centrino you mentioned above in both cases?

    Best Regards,
    masj
  • In reply to masj:

    hi masj
    I use gt202 on sk_s7g2 as a WiFi hotspot. But my win10 computer can't connect it. The mobile phone and the win7 computer can be connected. Win10 Intel (R) Centrino (R) Advanced-N 6205
    Win7 FAST Wireless N Adapter
    I hope you can give me a solution
    Best Regards,
    yyk
  • In reply to yyk:

    Hi yyk,

    Having USB WiFi adpater connected to the computer with Win10 does stable connection can be achieved ?

    Best Regards,
    masj