Skip to content

papercodeIN/Luckfox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Luckfox


✨ Enjoying this project? Support our work! ✨

Buy Me a Coffee

Subscribe on YouTube


📺 Luckfox Board Playlists


Environment Details

📌 Luckfox Pico Mini B / Pico Pro / Pico Max / Ultra W / WebBee

Ubuntu Machine

  • Login: pico
  • Password: luckfox
  • Static IP: 172.32.0.70
  • SSH Login:
    ssh pico@172.32.0.70

Buildroot Machine

  • Login: root
  • Password: luckfox
  • Static IP: 172.32.0.93
  • SSH Login:
    ssh root@172.32.0.93

📌 Luckfox Lyra

Buildroot OS

  • Username: root
  • Password: luckfox
  • USB Static IP Address: 192.168.123.100
  • SSH Login:
    ssh root@192.168.123.100

Ubuntu OS

  • Username: lyra
  • Password: luckfox
  • USB Static IP Address: 192.168.123.100
  • SSH Login:
    ssh lyra@192.168.123.100

📌 Wi-Fi Setup on Ubuntu (Luckfox Pico Ultra W)

List Available Wi-Fi Networks

nmcli dev wifi list

Connect to a Wi-Fi Network

sudo nmcli --ask dev wifi connect <network-ssid>

Example:

sudo nmcli --ask dev wifi connect Capgemini_4G

📌 Wi-Fi Hotspot Setup Using nmcli

1. Create a Wi-Fi Hotspot

nmcli d wifi hotspot ifname <wifi_interface> ssid <network_name> password <password>

Example:

nmcli d wifi hotspot ifname wlan0 ssid luckfox_ap password 12345678

This creates a Wi-Fi hotspot named luckfox_ap on interface wlan0 with the password 12345678.

2. Display the Wi-Fi Hotspot Password

nmcli dev wifi show-password

📌 Clear SSH Entries on Windows

To clear all SSH known hosts entries:

echo. > %userprofile%\.ssh\known_hosts

📌 Check CPU Details on Buildroot OS

To check CPU details, use the following commands:

cat /proc/cpuinfo
uname -a

📌 Install Mosquitto MQTT Broker on Luckfox Pico Ultra W

1️⃣ Download & Run the Script

Run the following commands:

wget --no-check-certificate https://raw.githubusercontent.com/papercodeIN/Embedded_Devices/refs/heads/main/LuckFox/Script/install_mosquitto.sh
chmod +x install_mosquitto.sh
./install_mosquitto.sh

2️⃣ Check Mosquitto Status

systemctl status mosquitto

3️⃣ Start/Stop/Restart Mosquitto

  • Start:
sudo systemctl start mosquitto
  • Stop:
sudo systemctl stop mosquitto
  • Restart:
sudo systemctl restart mosquitto

4️⃣ Test Mosquitto

  • Subscribe:
    mosquitto_sub -h localhost -t test/topic
  • Publish:
    mosquitto_pub -h localhost -t test/topic -m "Hello, MQTT!"

If working, you'll see "Hello, MQTT!" in the subscriber terminal. ✅

🎉 Done! Mosquitto is installed and running! 🚀


📌 Install NanoMQ MQTT Broker on Luckfox Pico Ultra W

This guide provides step-by-step instructions to install and run the NanoMQ MQTT broker on a Luckfox Pico Ultra W.

1️⃣ Download NanoMQ Package

Run the following command to download the NanoMQ .deb package:

wget https://www.emqx.com/en/downloads/nanomq/v0.18.2/nanomq-0.18.2-linux-armhf.deb

2️⃣ Change File Ownership (Fix Permission Issue)

Set the correct ownership to prevent permission errors when installing:

sudo chown _apt nanomq-0.18.2-linux-armhf.deb

3️⃣ Install NanoMQ

Run the following command to install the downloaded package:

sudo apt install ./nanomq-0.18.2-linux-armhf.deb

4️⃣ Start NanoMQ

Once installed, start the NanoMQ broker:

nanomq start -d

5️⃣ Verify Installation

Check if NanoMQ is running:

ps aux | grep nanomq

If it's running, you should see an output with nanomq listed.

6️⃣ Configure NanoMQ (Optional)

To modify NanoMQ settings, edit its configuration file:

sudo nano /etc/nanomq.conf

After making changes, restart NanoMQ:

nanomq restart

7️⃣ Test NanoMQ Broker

Subscribe to a topic

Open a terminal and run:

mosquitto_sub -h localhost -t test/topic

Publish a message

In another terminal, send a test message:

mosquitto_pub -h localhost -t test/topic -m "Hello, NanoMQ!"

If working correctly, the subscriber terminal should display:

Hello, NanoMQ!

8️⃣ Get Device IP for MQTT Connection

To connect external clients, find your device’s IP address:

hostname -I | awk '{print $1}'

Use this IP with port 1883 in your MQTT client.

🎉 NanoMQ is now installed and running! 🚀

You can now use NanoMQ for MQTT-based IoT applications on the Luckfox Pico Ultra W.


📌 Install Node-RED and Node.js (Ubuntu)

One-Step Installation

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

📌 File Transfer Using scp

1. Transfer a ZIP File

scp python-periphery-master.zip pico@172.32.0.70:/home/pico

2. Transfer a Directory

scp -r python-periphery-master pico@172.32.0.70:/home/pico

📌 Install Python Library (Ubuntu)

Option 1

1. Navigate to the Transferred Directory

cd python-periphery-master

2. Install the Python Library

sudo python3 setup.py install

Option 2

pip install python-periphery

📌 Control GPIO Using periphery in Python

1. Open Python 3

sudo python3

2. Control GPIO Pins

from periphery import GPIO

# GPIO pin number
Write_Pin = 41
Write_GPIO = GPIO(Write_Pin, "out")

# Set GPIO pin high
Write_GPIO.write(True)

# Set GPIO pin low
Write_GPIO.write(False)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages