You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

搭载Android Things的树莓派3:WiFi MAC地址位置及未联网获取可行性

Hey there! Let's tackle your questions about MAC addresses on Raspberry Pi 3 running Android Things:

1. Where to find the WiFi MAC address on Raspberry Pi 3 with Android Things?

You have a couple of reliable ways to retrieve the WiFi MAC address, depending on your setup:

  • Using ADB commands (the most straightforward method for developers):
    • Connect your RPi3 to your development machine via USB or network, then run:
      adb shell ip link show wlan0
      
      Look for the line starting with link/ether — the alphanumeric string separated by colons is your WiFi MAC address.
    • Alternatively, you can directly read the system file storing the address for a cleaner output:
      adb shell cat /sys/class/net/wlan0/address
      
  • If you have a display connected via HDMI, navigate to Android Things' system settings, find the WiFi section (even if not connected), and the MAC address should be listed under network details.
2. Can I get WiFi and Ethernet MAC addresses on Raspberry Pi 3 with Android Things Developer Preview 7 when not connected to any network?

Absolutely! MAC addresses are hardware identifiers built into the WiFi and Ethernet adapters — they don't require an active network connection to be accessible. You can use these ADB methods regardless of network status:

  • For WiFi MAC address:
    adb shell cat /sys/class/net/wlan0/address
    
  • For Ethernet MAC address:
    adb shell cat /sys/class/net/eth0/address
    

These files in the sysfs filesystem are populated as soon as the OS detects the hardware, so you'll get valid MAC addresses even with no network connected.

内容的提问来源于stack exchange,提问作者Andrii Omelchenko

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:19:44