> For the complete documentation index, see [llms.txt](https://docs.blynk.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blynk.io/en/blynk-library-firmware-api/configuration.md).

# Configuration

## Blynk.begin()

The easiest way to configure Blynk is to use `Blynk.begin()`:

```cpp
Blynk.begin(auth, ...);
```

It has multiple parameters for different hardware models and it also depends on the type of connection. Follow the example sketches for your specific hardware model.

What happens inside of `Blynk.begin()` function:

1. Connection to the network (WiFi, Ethernet, ...)
2. Call of `Blynk.config(...)` to set Auth Token, Server Address, etc.
3. Attempts to connect to the server once (can block for more than 30s)

If your shield/connection type is not supported yet - you can implement it by yourself. [Here are some examples](https://github.com/blynkkk/blynk-library/tree/master/examples).

## Blynk.config()

`config()` allows you to manage network connection. You can set up your connection type (WiFi, Ethernet, ...) by yourself, and then call:

```cpp
Blynk.config(auth, server, port);
```

or just

```cpp
Blynk.config(auth);
```

**NOTE: After `Blynk.config(...)` is called, your hardware is not yet connected to the server.** It will try to connect while until it hits first instance of `Blynk.run()` or `Blynk.connect()`routine.\
To skip connecting to the server or to disconnect manually, call `Blynk.disconnect()` after configuration.

Use `connectWiFi` to conveniently set up WiFi connection:

```cpp
Blynk.connectWiFi(ssid, pass);
```

To connect to open WiFi networks, set pass to an empty string (`""`).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.blynk.io/en/blynk-library-firmware-api/configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
