Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 6 months ago.
VodafoneUSBModem doesn't tidy up after itself
I want to have the VodafoneUSBModem part of my code in a separate subroutine that gets called from the 'test' thread. This way each time I do a bit of communications, the VodafoneUSBModem connects and disconnects. The first call to the subroutine is fine and everything works as expected. The second call causes running lights of death.
To recreate, import VodafoneUSBModemHTTPClientTest and edit it as follows:
- change the line void test(void const*) to void Voda_routine(void)
- delete the while(1) { } at the end of this subroutine
- add this code below the Voda_routine subroutine (above main):
void test(void const*) { int i = 0; while(1) { i++; printf("-------------------------------------------------------> Attempt %d: \n", i); Voda_routine(); printf("-------------------------------------------------------> Success!\n"); Thread::wait(5000); } }
How can this be fixed, is it a bug?