---
title: "How to send AT command to WizFi360-EVB-Pico using Kaluma.js"
url: "https://maker.wiznet.io/gemma/projects/how-to-send-at-command-to-wizfi360-evb-pico-using-kaluma-js/"
markdown_url: "https://maker.wiznet.io/gemma/projects/how-to-send-at-command-to-wizfi360-evb-pico-using-kaluma-js/md"
type: "WCC: WIZnet Created Content"
author: "gemma"
author_url: "https://maker.wiznet.io/gemma/"
original_author: "Gemma"
published: "2022-12-05"
language: "en"
tags: ["WizFi360-EVB-Pico"]
hardware: ["WIZnet WizFi360-EVB-Pico"]
likes: 7
views: 1795
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# How to send AT command to WizFi360-EVB-Pico using Kaluma.js

> This tutorial explains how to use kaluma basics and how to connect to WiFi using WizFi360 and send AT commands.

Original author: Gemma

## Components

- **WIZnet WizFi360-EVB-Pico** x 1
- Software: **Kaluma.js** ([docs](https://kalumajs.org/))

## Article

## 1. Introduction

This tutorial explains how to use `Kaluma` basics and how to connect to WiFi using `WizFi360` and send AT commands.

### 1.1. What is Kaluma?

Kaluma is a tiny and efficient JavaScript runtime for RP2040 (Raspberry Pi Pico). Please refer the below link for more its details.

<https://kalumajs.org/>

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670230616%2Epng)

## 2. Getting Started (Turn on the built-in LED)

### 2.1. Upload the firmware

Download the .uf2 firmware file from the link below and upload it to the WizFi360-EVB-Pico.

<https://kalumajs.org/download/>

### 2.2. Install Kaluma CLI

In order to program Pico with Kaluma runtime, [Kaluma CLI](https://github.com/kaluma-project/kaluma-cli) must first be installed. Node.js must be pre-installed.

```plaintext
npm install -g @kaluma/cli
```

After the installation, run the blow commands to check the help and the name of the connected serial port.

```plaintext
# Check the CLI help
> kaluma help

# Check the serial port
> kaluma ports
```

### 2.3. Connect with Terminal

Connect to Pico and send commands through a serial terminal program such as `Putty` or `TeraTerm`.

Sending the `.hi` command prints kaluma's welcome message.

```plaintext
> .hi
```

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670230832%2Epng)

### 2.4. Turn on the built-in LED

Enter the below commands sequentially in the terminal to turn on the built-in LED.

Sending `digitalWrite(25, HIGH)` command turns the light on, and sending the `digitalWrite(25, LOW)` command turns it off.

```plaintext
> pinMode(25, OUTPUT);
> digitalWrite(25, HIGH);
```

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670230869%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670230890%2Epng)

## 3. Send a AT Command to WizFi360

In Kaluma's basic example, WiFi communication is implemented by connecting an ESP8266 to a basic Pico board.

However, in this tutorial, WizFi360 built into the board is used to implement Wi-Fi communication.

### 3.1. UART

Enter the following commands in the terminal. Set the port and other options for UART communication. If you enter the last command, you can check the set port and other option information.

```plaintext
> const {UART} = require('uart');
> let uart1 = new UART(1, {baudrate: 115200, tx: 4, rx: 5, bufferSize: 1024});
> uart1.on('data', d=>{print(String.fromCharCode.apply(null, d))});
```

Items in `_native` can be set as options when creating a UART object.

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670230957%2Epng)

## 3.2. Send a AT Command

#### 3.2.1. Test AT Startup

Check if WizFi360 is properly connected and responds to AT commands normally.

If you send the string `AT\r\n` to the Pico via UART1, you can receive an echo of the sent command followed by a result `OK`.

```plaintext
> uart1.write('AT\r\n');
```

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670230999%2Epng)

#### 3.2.2. Reset WizFi360

if you see the ready, initialization is successful.

```plaintext
> uart1.write('AT+RST\r\n');
```

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670231022%2Epng)

#### 3.2.3. Check Mac address

```plaintext
> uart1.write('AT+CIPSTAMAC_CUR?\r\n');
```

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670231044%2Epng)

#### 3.2.4. Set station mode

Set WizFi360 to Station mode.

```plaintext
> uart1.write('AT+CWMODE_CUR=1\r\n');
```

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670231066%2Epng)

#### 3.2.5. Enable DHCP

```plaintext
> uart1.write('AT+CWDHCP_CUR=1,1\r\n');
```

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670231086%2Epng)

#### 3.2.6. Connect to the AP

Connect to an available AP. Enter the `SSID` and `PASSWORD `of the WiFi router to use and send the command.

```plaintext
> uart1.write('AT+CWJAP_CUR="WIFI_SSID","WIFI_PASSWORD"\r\n');
```

If the connection is successful, the output is as shown below.

![](https://maker.wiznet.io/upload/ckeditor5/521703101%5F1670231126%2Epng)

So, we learned how to send AT commands to WizFi360-EVB-Pico and connect to WiFi using Kaluma. More various AT commands of WizFi360 can be found the [link](https://docs.wiznet.io/img/products/wizfi360/wizfi360ds/wizfi360atcomex_v103e.pdf).

---

Source: https://maker.wiznet.io/gemma/projects/how-to-send-at-command-to-wizfi360-evb-pico-using-kaluma-js/
