Thanks for input! I'm sorry, but I need to take a couple of steps back now (english is not my native language...) First of all the initialization sequence.
In my main() I changed now to: dial the modem starts a thread that will eventually feed serial data to pppos_input() once everything is up and running. sys_sem_new(&init_sem, 0); tcpip_init(test_init, &init_sem); // we have to wait for initialization to finish sys_sem_wait(&init_sem); sys_sem_free(&init_sem); As the test_init() must run in the main tcpip thread (as it calls the ppp functions), correct ? After this the worker threads are started (that will to netcon_send/netcon_receive of UDP, and send/recv of socket data) //-------------------------------------------------------------------- //-------------------------------------------------------------------- static void test_init(void * arg) { /* remove compiler warning */ const char *username = NULL, *password = NULL; sys_sem_t *init_sem; username = PPP_USERNAME; password = PPP_PASSWORD; init_sem = (sys_sem_t*)arg; /* init randomizer again (seed per thread) */ srand((unsigned int)time(0)); ppp = pppos_create(&ppp_netif, ppp_output_cb, pppLinkStatusCallback, NULL); if (ppp == NULL) { messageDebug(DBG_INFO, __MODULE__, __LINE__, "pppos_create error"); } else { ppp_set_auth(ppp, PPPAUTHTYPE_ANY, username, password); pppapi_connect(ppp, 1); } netif_set_default(&ppp_netif); netif_set_status_callback(&ppp_netif, status_callback); pppapi_set_notify_phase_callback(ppp, notify_phase_cb); netif_set_link_callback(&ppp_netif, link_callback); sys_sem_signal(init_sem); } The thread that is started that takes the SIO data and feeds them to pppos_input() was something I did as I understood from Simon that if PPP_INPROC_IRQ_SAFE is 1, that was safe to do. Can you explain to me if these assumptions are correct ? Then I can try and explain afterwards the idea around bringing the line up/down etc once all is running. -- Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users