
WizFi360 is a low cost and low-power consumption industrial-grade WiFi module. It is compatible with IEEE802.11 b/g/n standard and supports SoftAP, Station and SoftAP+Station modes. The serial port baud rate can be up to 2Mbps.
Instructions
WizFi360-EVB-Mini Feature
WizFi360 can be designed with a very simple circuit and data transmission is possible using UART1.
WizFi360 controls AT commands via UART and uses UART0 when Micro USB is connected.
- MicroPython Thonny IDE Install
- Download Thonny and set it up for your Raspberry Pi Pico board.
- Tools -> Options -> Interpreter
- Set Raspberry Pi Pico and COMx in options
Hercules_3.2.8 SETUP utility
- Install Hercules SETUP utility
https://www.hw-group.com/software/hercules-setup-utility
- Open TCP Server from PC which is connected to the same WiFi AP that WizFi360 is connected to.
Ex) IP : 192.168.1.100 Port : 5000
Connect WizFi360-EVB-Mini to Raspberry Pi Pico
Raspberry Pi Pico pin map
WizFi360-EVB-Mini pin map
Schematics
WizFi360-EVB-Mini connection diagram
- There are 3 operation modes of WizFi360.
-Station mode
-SoftAP mode
-Station + SoftAP mode
Station Mode
Station mode is a method in which WizFI360 connects to the AP (Router). Assign IP via DHCP from AP Receive or use by setting Static IP.
- SoftAP mode
In SoftAP mode, WizFI360 operates as an AP. Other devices connect to WizFi360 as a Station. WizFi360 allocates an IP connected to the device, it is only capable of communicating in Local Networks.
We will use station mode.
WizFi360 UART + AT command Test
WizFi360_AT_Client.py
AT+CWJAP_CUR=”SSID”,”PASSWORD
Just enter the ID and PW of the AP (Router) you want to connect to.
AT+CIPSTART=0,”TCP”,”YOUR_IP_ADDRESS”,5000
Input Server’s IP in YOUR_IP_ADDRESS.
import os, sys
import utime
from machine import UART,Pin
print(os.uname())
#LED
led = machine.Pin(25, machine.Pin.OUT)
led.value(0)
utime.sleep(0.5)
led.value(1)
#UART
#uart = machine.UART(0, baudrate=115200, tx=Pin(0), rx=Pin(1))
uart = machine.UART(1, baudrate=115200, tx=Pin(8), rx=Pin(9))
print(“UART Setting…”)
print(uart)
#Functions
def sendCMD_waitResp(cmd, timeout=3000):
print(“CMD: ” + cmd)
uart.write(cmd)
waitResp(timeout)
print()
def waitResp(timeout=3000):
prvMills = utime.ticks_ms()
resp = b””
while (utime.ticks_ms()-prvMills) < timeout:
if uart.any():
resp = b””.join([resp, uart.read(1)])
print(resp)
#AT command Test
sendCMD_waitResp(“AT\r\n”) #AT
sendCMD_waitResp(“AT+GMR\r\n”) #AT ver
utime.sleep(1)
#sendCMD_waitResp(“AT+RST\r\n”) #reset
sendCMD_waitResp(“AT+CWMODE_CUR=1\r\n”) # Station Mode
sendCMD_waitResp(“AT+CWDHCP_CUR=1,1\r\n”) #DHCP on
utime.sleep(1)
sendCMD_waitResp(‘AT+CWJAP_CUR=”SSID”,”PASSWORD”\r\n’) #AP connecting
sendCMD_waitResp(“AT+CIPSTA_CUR?\r\n”) #network chk
#TCP Client
sendCMD_waitResp(“AT+CIPMUX=1\r\n”)
sendCMD_waitResp(‘AT+CIPSTART=0,”TCP”,”YOUR_IP_ADDRESS”,5000\r\n’) #connect Server
print(“connected…”)
print(“RPi-PICO with WizFi360”)
Data = bytes()
while True:
if uart.any()> 0:
Data += uart.read(10)
print(“read…”)
utime.sleep(0.5)
led.value(0)
print(Data.decode(‘utf-8’))
led.value(1)
- WizFi360 return OK, AT command can be used.
- It was confirmed that the server is connected on your PC.
Thank you.
COMMENTS