Wip_write()

how to use wip_write() function in EvhCrtlUart1(adl_fcmEvent_e evnt) function…

The function of wip_write() is not affected by where you call it from!

when i trying to send data through wip_write other than this void evh( wip_event_t *ev, void *ctx) function,

connection closes automatically…

WIP, like the rest of Open-AT is Event-Driven - therefore, you have to ensure that you call functions in the appropriate relation to the Events that you receive.

Again, there is a State Diagram in the WIP documentation that describes this - see: https://forum.sierrawireless.com/t/keeping-tcp-socket-alive/5033/1

And this is illustrated in the examples in the WIP User Guide, and the WIP examples included with the SDK.

See: https://forum.sierrawireless.com/t/switch-command-mode-to-data-mode/5087/1

For a paper on the principles of Event-Driven programming, see:
https://forum.sierrawireless.com/t/good-paper-on-event-driven-programming/3848/1

Event-Driven programming is probably easiest achieved by structuring your code as State Machines (or Finite State Machines; FSM);
For some articles on State Machine programming, see:
https://forum.sierrawireless.com/t/good-paper-on-event-driven-programming/3848/1