HomeFeatured Raspberry PiM5Stack UnitV2 update brings WiFi

M5Stack UnitV2 update brings WiFi

Adding WiFi to M5Stack UnitV2

I have been waiting for this update ever since I got the M5Stack UnitV2 (review) a tiny little camera with big AI capabilities (for its size). Released initially without WiFi support my UnitV2 patiently awaited the release of the new firmware. The new firmware brings WiFi to UnitV2 and it’s time to update.

“Read the manual”

M5Stack UnitV2
M5Stack UnitV2

The update protocol is pretty straightforward as long as you read the instructions carefully. As usual, I skimmed it over, and run into issues (self-inflicted). So I will share these with you so you don’t make them yourself.

M5Stack UnitV2 firmware update

Download the .zip file and unpack the file to a root directory of a freshly formatted FAT32 microSD card. Don’t change the name. Insert the card before you power the unit up. My M5Stack UnitV2 didn’t blink which cascaded into more issues later as I wasn’t sure if my Unit’s firmware was upgraded.

  1. Put microSD card in
  2. Hold the button down
  3. Plug the USB-C cable and power up the device
  4. Release the button 5 sec later. (my unit didn’t blink but blue LED went out)
  5. Wait until you can log in to the web interface: htttp://unitv2.py or 10.254.239.1

You can verify the update by running cat /etc/os-release and uname -r or check if you can see the WiFi access point created by the device. Reboot the M5Stack UnitV2 before you do any of that just to be sure

NAME=Buildroot
VERSION=2020.02.8
ID=buildroot
VERSION_ID=2020.02.8
PRETTY_NAME="Buildroot 2020.02.8"

4.9.84

Other M5Stack products talked about in detail:

WiFi -able

Now that M5Stack UnitV2 is running the latest firmware, you will notice a new AP around which usually looks like M5UV2_XXXX. You can connect to this directly, or set WiFi credentials to connect to your own WiFi network.

If you look at the back of the M5Stack UnitV2, you will see the most needed credentials for the WiFi AP and the SSH access. There is one more thing you should note:

username: root
password: 7d219bec161177ba75689e71edc1835422b87be17bf92c3ff527b35052bf7d1f

These are root credentials for admin access to your M5Stack UnitV2. You can use the m5stack user, but you may need sudo to set up WiFi credentials, you won’t need the extra privilege if you use a root user.

Pay attention (and don’t make my mistakes) to WiFi credential commands, as they require ” & ‘ symbols to work. I read the docs on a small screen and completely missed these!

Here is the list of commands:

wpa_cli -i wlan0 scan              // Search nearby wifi networks
wpa_cli -i wlan0 scan_result       // print search wifi network results
wpa_cli -i wlan0 add_network       // get the new connection index

wpa_cli -i wlan0 set_network 0 ssid '"name"'  //name is WIFI SSID
wpa_cli -i wlan0 set_network 0 psk '"psk"'    //psk is the WIFI password

wpa_cli -i wlan0 enable_network 0     //Enable network
wpa_cli -i wlan0 list_network         //List all saved connections
wpa_cli -i wlan0 select_network 0     // Switch to serial number 0 network connection

Once connected simply run ping google.com to see if everything is working fine. There was one problem. None of this would stick and survive the reboot. If you are facing the same issue, try the following:

WiFi settings are not sticking?

M5Stack UnitV2 powered by a battery bank and connected to WiFi

Set the WiFi credentials and enable the connection using the above commands via SSH, then open wpa_supplicant.conf file and add your WiFi credentials:

sudo nano /etc/wpa_supplicant.conf

#add at the bottom of the file
network={
    ssid="network-essid"
    scan_ssid=1
    key_mgmt=WPA-PSK
    psk="very secret passphrase"
}

Then Ctrl+X and Y to save the details of your connection. You can then power down the device, connect to the battery and you should see it on your local network. I’m not sure why the settings are not sticking through the commands listed, but this fix should get you out of the WiFi pickle in seconds!

WiFi adventures

Now that I can detach the M5Stack UnitV2 from my PC, I can put the camera anywhere I want, power it by a power bank or USB charger and start collecting photos for machine learning. Something tells me that my first location will be the front door area.

If anything, the value of M5Stack UnitV2 just shoot up and if you can find it in stock it’s the easiest board to get started with machine learning. I’m looking forward to training it as my porch camera and try to detect couriers, neighbours and other events that I can react to with my NodeRED server. AI will definitely bring some bright ideas into my home automation. What other things would you recommend trying? Let me know in this Reddit thread.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

M5Paper

Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs

client-image
client-image

Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on

client-image
client-image

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

0
From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

0
Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

0
Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification

HOW TO...

How to boot Raspberry Pi 5 from NVMe M.2 SSD

0
This is how you can boot your Raspberry PI 5 from NVMe in 10 min! Check out these easy instructions

It took me 2 months to boot CM4 from NVMe

0
Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

0
It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

0
A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

0
How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation