# Trill SDK Methods

```
(bool) start_sender: (NSString*) payload: (int) algo: (int) repeat_count: (float) gap;
```

Start the sending process on the application. The method returns true if sending is started successfully. In case of error check callback onError

**payload**: String to send

**algo**: Algorithm for sending payload ( Algorithm could be TRILL\_ALGO\_NEAR,

TRILL\_ALGO\_MID, TRILL\_ALGO\_FAR

**repeat\_count**: no of times the payload is to be sent.

**repeat\_gap**: Gap between two plays in seconds ( range between 0.2 - 1 ).

```
(bool) stop_sender;
```

Stop the sending process on the application. The method returns true if

sending is successfully stopped. In case of error check callback onError

```
(bool) start_receiver;
```

Start receiving trill tones on the application. The method returns true if the

receiver is successfully started. In case of error check callback onError

```
(bool) stop_receiver;
```

Stop receiving trill tones. The method returns true if the receiver is

successfully stopped. In case of error check callback onError

Sample Code for Sending data:

```
// Start sending data with playing algo as Algo Far, repeat count as 3 and gaps between two play as 0.2
seconds
trill?.start_sender(“abcdef”, TRILL_ALGO_FAR, 3, 0.2);
// Stop Sending Data
trill?.stop_sender();.
```

Sample Code for Receiving data:

```
// Start receiving data
trill?.start_receiver();
// Send SSID and Password with algo OFSR and repeat counter 50
trill?.stop_receiver();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillbit.gitbook.io/trillbit-sdk/ios-support/trill-sdk-for-ios/methods-and-callbacks/trill-sdk-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
