# KeepAlive interval

**URL:** https://forum.sierrawireless.com/t/keepalive-interval/3721
**Category:** Open AT
**Created:** [October 8, 2009, 9:31am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721 "2009-10-08T09:31:23Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Jacquesn](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jacquesn](https://forum.sierrawireless.com/u/Jacquesn)
#### Post date: [October 8, 2009, 9:31am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/1 "2009-10-08T09:31:23Z")

</div>

HI

Im working with a Fastrack supreme 20 and Wipsoft 5.10.2020

Im creating a TCP client socket with the following line:

```auto
ClientSocket = wip_TCPClientCreateOpts(PEER_STRADDR, SERVER_PORT, evh,NULL,WIP_COPT_NODELAY,true, WIP_COPT_KEEPALIVE,true,WIP_COPT_END);
```

Ive read in the forum the WIP\_COPT\_KEEPALIVE is default off and fires every 2 hours.

I want to know if it is possible to increase the interval, if so, would I have to modify my socket creation command.

Thank You

---

<div class="post-metadata">

### Author: ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)
#### Post date: [October 8, 2009, 9:40am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/2 "2009-10-08T09:40:24Z")

</div>

Hiya,

Have a look at the wip\_TCPClientCreateOpts() function.

Section 6.5.4.2 in the WIP Connectivity Guide describes the options available - one is WIP\_COPT\_KEEPALIVE - this may do what you want…

ciao, Dave

---

<div class="post-metadata">

### Author: ![Jacquesn](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jacquesn](https://forum.sierrawireless.com/u/Jacquesn)
#### Post date: [October 8, 2009, 11:08am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/3 "2009-10-08T11:08:45Z")

</div>

hi

Thanks for the reply.

Ive had a look at the Docs and im a little confused as how to create the channel with these options.

```auto
wip_TCPClientCreateOpts(PEER_STRADDR, SERVER_PORT, evh,NULL,WIP_COPT_NODELAY,true, WIP_COPT_KEEPALIVE,true,WIP_COPT_END);
```

this is what I currently have,

According to the doc it should be: WIP\_COPT\_KEEPALIVE,1

Does the 1 represent true-false(0,1) or 1 x 10 millisecond , specifying the package send interval

thank you

---

<div class="post-metadata">

### Author: ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)
#### Post date: [October 8, 2009, 11:44am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/4 "2009-10-08T11:44:19Z")

</div>

Hiya,

> [@Jacquesn](#):
>
> Does the 1 represent true-false(0,1) or 1 x 10 millisecond , specifying the package send interval

According to my interpretation of the Docs I have here, it’s 1 x 10 millisecond.

Why do you think it means 'TRUE"?

ciao, Dave

---

<div class="post-metadata">

### Author: ![Jacquesn](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@Jacquesn](https://forum.sierrawireless.com/u/Jacquesn)
#### Post date: [October 8, 2009, 11:51am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/5 "2009-10-08T11:51:47Z")

</div>

hi

I found the following post indicating that the parameter is boolean

> [@](#):
>
> Re: default value of keepalive packets interval
> 
> Postby Ben FT » Tue Jun 09, 2009 11:54 am  
> I’ve been told that the docs are wrong on this. This is the info I had.
> 
> ```
> WIP_COPT_KEEPALIVE u32 value is valid for FTP channels only. The NOOP command will be sent every x tenth of the second; its off by default.
> WIP_COPT_KEEPALIVE for TCP channels is only of boolean relevance; you can either set or reset; by default its off. The KEEPALIVE is sent every 2 hrs.
> 
> ```
> 
> Hope that helps. It was good news for me.

Thanks

---

<div class="post-metadata">

### Author: ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)
#### Post date: [October 8, 2009, 11:54am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/6 "2009-10-08T11:54:26Z")

</div>

Hiya,

Thanks for your link to the other post. Now I’m really confused.

I guess it’s time to go and hassle your Wavecom Distributor.

ciao, Dave

---

<div class="post-metadata">

### Author: ![paruthiv](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@paruthiv](https://forum.sierrawireless.com/u/paruthiv)
#### Post date: [October 14, 2009, 8:39am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/7 "2009-10-14T08:39:08Z")

</div>

Hey

Your are right…!!! 😊 The WIP\_COPT\_KEEPALIVE parameter is actually a boolean and not an u32, that means one can only set the keep alive mechanism on or off, but not set its timer duration, which is set to 75 seconds( i am not sure where you read 2 hrs 😮 ) . Hence reading a value of 1 (TRUE) for WIP\_COPT\_KEEPALIVE means it is activated, while reading 0 (FALSE = default value) means it is deactivated…

Hope it helps you… 😒

---

<div class="post-metadata">

### Author: ![JasonDiplomat](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@JasonDiplomat](https://forum.sierrawireless.com/u/JasonDiplomat)
#### Post date: [October 23, 2009, 8:47am UTC](https://forum.sierrawireless.com/t/keepalive-interval/3721/8 "2009-10-23T08:47:08Z")

</div>

Can your app’ send dummy packets every 40 seconds?
