Code Monkey home page Code Monkey logo

wifi-connection-manager's People

Contributors

cy-msur avatar sathishm6 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifi-connection-manager's Issues

Long disconnect times from AP

Have you looked for an answer?
Documentation and seached online

Question/Issue:
The question is related to how to disconnect from an access point meanwhile a lot of data is being sent (to me).

What can we help you with?
So, I´m connected to a "server" using udp. I´ve decided to disconnect and call cy_wcm_deinit().
Sometimes this function works as expected and it may take anywhere from 500ms-1000ms to disconnect.
Once in a while it take very long time, 15-20sec. I can see that the underlying threads keep pumping data into the lwIP stack (using debug logs)
Is there someway to avoid this state?

Context

LBEE5PK2AE chip
STM32CubeIde with STM32-Connectivity 1.2.0

Where did you expect to find the answer?
Online

THANKS!

local variable called by cy_worker_thread_enqueue

Prerequisites

Can you reproduce the problem reliably?
yes

Did you check current release notes for known issues?
yes

If this is not the latest release, have you checked newer releases?

Description:

There are few places in the cy_wcm.c in \COMPONENT_LWIP which call cy_worker_thread_enqueue() to add callback and local variable as parameter, the local variable (cy_wcm_event_t) will soon be invalid after take out by cy_rtos_get_queue for dispatcher from cy_worker_thread_func() in cy_worker_thread.c. this issue will lead unexpected value of cy_wcm_event_t.

Steps to Reproduce:

add register after success of cy_wcm_init():
cy_wcm_register_event_callback(my_call_back_func);

we won't get proper event value such as CY_WCM_EVENT_CONNECTED, etc.

Expected Result:

we should get all valid belong to cy_wcm_event_t event value such as CY_WCM_EVENT_CONNECTED, etc.

Actual Result:

we won't get CY_WCM_EVENT_CONNECTED, instead, it give us invalid value which is out of range cy_wcm_event_t.

Frequency (1/1, 1/50, 1/100):

1/1

Build/Commit:

commit c7c2a01 [c7c2a01]

Target:

STM32H7 with ThreadX+Lwip

Compiler:

IAR 8.50

My fix:
where call cy_worker_thread_enqueue() with non-NULL parameter of *arg, make this local variable as staic, example in
function internal_scan_callback() change
uint32_t scan_status; ----> static uint32_t scan_status;

THANKS!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.