Setting WiFi Access Point Mode on the RT1062

I’ve received a few emails about this.Here’s an example:

# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# WiFi AP Mode Example
# This example shows how to use WiFi in Access Point mode.
import network
import socket

SSID = "OPENMV_AP"  # Network SSID
KEY = "1234567890"  # Network key (must be 10 chars)
HOST = ""  # Use first available interface
PORT = 8080  # Arbitrary non-privileged port

# Init wlan module and connect to network
wlan = network.WLAN(network.AP_IF)
wlan.config(ssid=SSID, key=KEY, channel=2)
print("AP mode started. SSID: {} IP: {}".format(SSID, wlan.ifconfig()[0]))

def recvall(sock, n):
    # Helper function to recv n bytes or return None if EOF is hit
    data = bytearray()
    while len(data) < n:
        packet = sock.recv(n - len(data))
        if not packet:
            raise OSError("Timeout")
    return data

def start_streaming(server):
    print("Waiting for connections..")
    client, addr = server.accept()

    # set client socket timeout to 5s
    print("Connected to " + addr[0] + ":" + str(addr[1]))

    while True:
            # Read data from client
            data = recvall(client, 1024)
            # Send it back
        except OSError as e:
            print("start_streaming(): socket error: ", e)

while True:
        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        # Bind and listen
        server.bind([HOST, PORT])

        # Set server socket to blocking
        while True:
    except OSError as e:
        print("Server socket error: ", e)

Hi, i tried this and the RT 1062 is not being shown as an access point .

I assume this script only needs the first SSID and KEY edited ?
That is what i did. Ran it in the IDE and i dont see a signal from the RT.

where do we find the IP address for the 1062 ?

i will try changing the true and false edits

Hi, in AP mode it will appear as a WiFi network. When you connect to the system the board will have the gateway IP address. Like for example, or etc.

Okay. Got it to show and connect.
Now how to see the stream ? i’ved typed in the required ip addresses as needed . Also tried some apps.

The example I posted above is not an MJPEG streamer.