12 Replies Latest reply on May 11, 2016 3:27 AM by coolguy

    how to check wifi connection validation

    coolguy

      we use under info

      - wiced version : 3.5.2

      - wifi module : BCM43362

      - main mcu : stm32f

       

      our project is almost the end.

      but we have one issue.

       

      sometimes our module can not receive tcp or udp packet including ping without no reason.

      once this issue occurs, our module can not receive any packet forever.

      but our module can send gateway for ping, or not

      to resolve this issue, we must reboot ap and then link down event called and our module is re-connected.

       

      when wi-fi environment is not good, this issue often occurs

      so i want to know how to check wifi connection validation.

      if there is checking method, to make our module re-connected, wifi connection will check periodically

       

      thank you

        • 1. Re: how to check wifi connection validation
          axel.lin_1746341

          coolguy wrote:

           

          we use under info

          - wiced version : 3.5.2

          - wifi module : BCM43362

          - main mcu : stm32f

           

          our project is almost the end.

          but we have one issue.

           

          sometimes our module can not receive tcp or udp packet including ping without no reason.

          once this issue occurs, our module can not receive any packet forever.

          Can you reproduce this with some snip code or modify the snip code to easily reproduce it?

          Since you mentioned "sometimes", suppose it's not "always" happen.

          So if you can make it easier to reproduce, better chance to fix it.

           

          BTW, which network stack are you using?

          • 2. Re: how to check wifi connection validation
            coolguy

            Thank so much for reply.

             

            We use LwIP and FreeRTOS.

             

            Coz of almost end of project, We are testing consecutive on/off test(rebooting)

            The issue occurs 1 per 1,000 on/off.

             

            If wi-fi environment is good, this issue don't occur.

            but wi-fi environment is NOT good, this issue occur.

             

            I think that it seems unable to receive link down event from wiced api, when wifi environment is not good.

             

            Please let me know how to check wifi validation.

            Thank you.

            • 3. Re: how to check wifi connection validation
              axel.lin_1746341

              Just want to clarify this:

              you mentioned "module can not receive tcp or udp packet including ping"

              and once this issue occurs, "module can not receive any packet forever".

              However """our module can send gateway for ping"""!

               

              If your module can send ping to gateway, the network is not down.

              Checking wifi connection does not work at all.

              You need to figure out why your module *cannot* receive packet!

              Note, if receive fails it must has a error code. what is the error?

              • 4. Re: how to check wifi connection validation
                coolguy

                Thank for the advice.

                 

                we printed log in internal_netconn_tcp_socket_callback function.

                when this issue occurs, there was NO log.

                 

                I think, if network is not down, it should print log.

                right?

                 

                anyway...

                I really want to know why our module cannot receive any packet.

                but according your comment,

                if this issue reproduce, i will check packet in wireshark

                and then i will report.

                 

                MORE advice please.

                thank you.

                 

                • 5. Re: how to check wifi connection validation
                  axel.lin_1746341

                  coolguy wrote:

                   

                  Thank for the advice.

                   

                  we printed log in internal_netconn_tcp_socket_callback function.

                  when this issue occurs, there was NO log.

                  I would suggest print out the return value of wiced_tcp_receive().

                  • 6. Re: how to check wifi connection validation
                    coolguy

                    while this issue check, other issue occurred.

                     

                    our module checks rssi value(wwd_wifi_get_rssi) per 3 minutes

                    suddenly this value change to 0. when wifi connection completed, rssi value was -75 ~ -55.

                    when does rssi value change to 0?

                     

                    help me... please

                    • 7. Re: how to check wifi connection validation
                      axel.lin_1746341

                      coolguy wrote:

                       

                      while this issue check, other issue occurred.

                       

                      our module checks rssi value(wwd_wifi_get_rssi) per 3 minutes

                      suddenly this value change to 0. when wifi connection completed, rssi value was -75 ~ -55.

                      when does rssi value change to 0?

                      I do observe such case where wwd_wifi_get_rssi() returns 0 and some other unusual value, e.g. -9 or -7.

                      I have no idea bout this.

                      • 8. Re: how to check wifi connection validation
                        olivierdufour

                        Hi,

                        I observed that some times the communication with the WiFi chip doesn't work. It can happen then that you can't read RSSI value (0 means you didn't read), or that you can't get mac address. But also that means you won't be able to send/receive packets.

                        I can't tell how often this happens, but it does for sure.

                        • 9. Re: how to check wifi connection validation
                          coolguy

                          Thank you so much for your reply!!

                           

                          If rssi value changes to  0, we implemented rebooting. so our module restored to normal state.

                          Also origin issue(can not receive tcp or udp packet including ping without no reason.) occurs specific AP.

                           

                          Perhaps, If the network status is bad, Both of issues occurs.

                          We hope this issue resolves through reasonable method not rebooting

                          Coz After this project finishes, We are planning to launch next project.

                           

                          Thank you

                          • 10. Re: how to check wifi connection validation
                            axel.lin_1746341

                            We also use wwd_wifi_get_rssi() to verify if a device's RF is ok as part of production procedure.

                            It's annoy if it reports false-positive.

                             

                            Note, I don't think it's related to if network is bad or not.

                            Our production procedure connecting the antenna between client device and AP directly

                            during testing. wwd_wifi_get_rssi() can return 0 in such case.

                            • 11. Re: how to check wifi connection validation
                              coolguy

                              We dont think that WICED platform has something wrong.

                              Only I would like to know method to debug and your advice for our application modifying.

                               

                              rssi value was changed to 0 from -50 ~ -75

                              I think that this has under both possibilities

                              1. application can not communicate with wifi module(wiced api) by something reason.

                              2. network was up and then network was down.

                               

                              if it is Number 1, how to restore communicating with wifi module?(not rebooting)

                              if it is Number 2, why is not "link down callback" called?

                               

                              thank you

                              • 12. Re: how to check wifi connection validation
                                coolguy

                                Hi! olivierdufour

                                 

                                Right.

                                when this issue occurred,

                                our application could not communicate with wifi module including RSSI 0, scan failure, send/receive packet.

                                but I dont think WICED platform has something wrong.

                                I think maybe i dont know accurate way to use WICED api.

                                 

                                Our application used 2 thread and 1 queue except for main thread.