主题 : 99元开源创客神器- NanoPi -来了! 复制链接 | 浏览器收藏 | 打印
自由,自强,共享,共创。
级别: 论坛版主
UID: 12573
精华: 27
发帖: 8838
金钱: 46490 两
威望: 9298 点
贡献值: 27 点
综合积分: 18216 分
注册时间: 2010-01-09
最后登录: 2019-07-16
楼主  发表于: 2015-08-02 02:03

 99元开源创客神器- NanoPi -来了!

管理提醒: 本帖被 mindee 执行加亮操作(2015-08-02)



快速入门
准备工作
要开启你的NanoPi新玩具,请先准备好以下硬件

  • NanoPi主板
  • microSD卡/TF卡: 最小系统需要64M
  • microUSB线
  • 一台运行Linux的电脑,需要联网
制作一张带运行系统的microSD卡
1) 将microSD插入Ubuntu的电脑,用以下命令查看你的SD卡设备名
复制代码
  1. dmesg | tail

当dmesg输出类拟信息 sdc: sdc1 sdc2时,则表示SD卡对应的设备名为 /dev/sdc,也通过用命令cat /proc/partitions来查看。

2) 下载固件并制作microSD卡
复制代码
  1. git clone [url]https://github.com/friendlyarm/sd-fuse_nanopi.git[/url]
  2. cd sd-fuse_nanopi
  3. su
  4. ./fusing.sh /dev/sdx

(注:/dev/sdx请替换为实际的SD卡设备文件名)

运行系统
将制作好的microSD卡插入NanoPi,使用microUSB线连接电脑,NanoPi会上电自动开机,看到板上的蓝色LED闪烁,这说明系统已经开始正常运行了。

通过microUSB登陆NanoPi
用microUSB线将NanoPi连接到电脑后,在电脑上敲入dmesg命令,看到以下输出信息表示连接成功:

复制代码
  1. [12601.100339] usb 2-1.7: Product: FriendlyARM Gadget v2.4
  2. [12601.100343] usb 2-1.7: Manufacturer: Linux 4.1.2-FriendlyARM with s3c-hsudc
  3. [12601.103192] cdc_acm 2-1.7:2.0: This device cannot do calls on its own. It is not a modem.
  4. [12601.103368] cdc_acm 2-1.7:2.0: ttyACM0: USB ACM device
  5. [12601.105300] cdc_ether 2-1.7:2.2 usb0: register 'cdc_ether' at usb-0000:00:1d.0-1.7, CDC Ethernet Device, 46:a1:e7:6d:5c:32

在电脑上输入ifconfig命令,可以看到多了一个usb0的网络设备,这时可以通过ssh到192.168.100.1这个地址来登录NanoPi:

复制代码
  1. ssh root@192.168.100.1

在提示输入密码时,输入预设的密码fa,即可登入。

配置使用Wi-Fi
使用ssh连接NanoPi,输出以下命令配置WiFi:

复制代码
  1. wpa_passphrase YourWiFiESSID 'YourWiFiPassword' >> /etc/wpa.conf
  2. wpa_cli -iwlan0 reconfigure

其中,YourWiFiESSID和YourWiFiPassword请替换成你要连接的无线AP名称和密码, 以后每次开机,都会自动连接该WiFi,你可以通过编辑 /etc/wpa.conf 调整无线AP的设置, 默认是通过dhcp的方式获得IP地址,如果你想更改成静态设置IP地址,可编辑 /usr/sbin/wpa_action,将其中的udhcpc调用改成使用ifconfig命令来设置。

扫描无线AP
用以下命令搜索周边的无线AP:

复制代码
  1. wpa_cli -iwlan0 scan
  2. wpa_cli -iwlan0 scan_result
[ 此帖被mindee在2015-08-02 06:47重新编辑 ]
新手如何向我们反馈有效的信息,以便解决问题,见此贴:
http://www.arm9home.net/read.php?tid-14431.html

[注]: 此处签名链接仅为指引方向,而非解答问题本身.
级别: 新手上路
UID: 87648
精华: 0
发帖: 26
金钱: 130 两
威望: 26 点
贡献值: 0 点
综合积分: 52 分
注册时间: 2013-02-22
最后登录: 2017-11-16
1楼  发表于: 2016-02-24 13:29
wifi有严重的问题。 iw dev wlan0 scan 连续执行一段时间15-30分钟就会出现。

[ 7519.052925] mmc1: Timeout waiting for hardware interrupt.
[ 7519.053152] sdioh_buffer_tofrom_bus: TX FAILED c31b18c0, addr=0x08000, pkt_le
n=256, ERR=-110
[ 7519.061338] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate f
rame.
[ 8313.512911] mmc1: Timeout waiting for hardware interrupt.
[ 8313.513207] sdioh_buffer_tofrom_bus: RX FAILED c0c4f440, addr=0x08000, pkt_le
n=384, ERR=-110
[ 8313.521338] dhdsdio_readframes: read 384 event bytes failed: -35
[ 8313.527303] dhdsdio_rxfail: abort command, terminate frame, send NAK
[12186.737923] mmc1: Timeout waiting for hardware interrupt.
[12186.738279] sdioh_buffer_tofrom_bus: RX FAILED c0c4f440, addr=0x08000, pkt_le
n=384, ERR=-110
[12186.746385] dhdsdio_readframes: read 384 event bytes failed: -35
[12186.752292] dhdsdio_rxfail: abort command, terminate frame, send NAK
[13404.647866] mmc1: Timeout waiting for hardware interrupt.
[13404.648281] sdioh_buffer_tofrom_bus: TX FAILED c31b20c0, addr=0x08000, pkt_le
n=128, ERR=-110
[13404.656294] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate f
rame.
[14227.367811] mmc1: Timeout waiting for hardware interrupt.
[14227.368184] sdioh_buffer_tofrom_bus: TX FAILED c1e5d0c0, addr=0x08000, pkt_le
n=256, ERR=-110
[14227.376226] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate f
rame.
[16622.082754] mmc1: Timeout waiting for hardware interrupt.
[16622.083005] sdioh_buffer_tofrom_bus: TX FAILED c1db78c0, addr=0x08000, pkt_le
n=256, ERR=-110
[16622.091143] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate f
rame.
[17627.502794] mmc1: Timeout waiting for hardware interrupt.
[17627.503202] sdioh_buffer_tofrom_bus: TX FAILED c1db40c0, addr=0x08000, pkt_le
n=128, ERR=-110
[17627.511232] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate f
rame.
[19412.267788] mmc1: Timeout waiting for hardware interrupt.
[19412.268156] sdioh_buffer_tofrom_bus: RX FAILED c302c020, addr=0x08000, pkt_le
n=256, ERR=-110
[19412.276317] dhdsdio_read_control: read 256 control bytes failed: -35
[19412.282468] dhdsdio_rxfail: abort command, terminate frame, send NAK
[19413.763047] dhd_bus_rxctl: resumed on timeout, INT status=0x00000000
[19413.764977] dhd_bus_rxctl: rxcnt_timeout=1, rxlen=0
[19413.775213] dhd_check_hang: Event HANG send up due to  re=1 te=0 e=-110 s=2
[19413.776779] dhd_check_hang: Event HANG send up due to  re=1 te=0 e=-110 s=2
[19413.777263] dhd_start_xmit: xmit rejected pub.up=1 busstate=2
[19413.789456] dhd_start_xmit: Event HANG sent up
[19413.802969] CFG80211-ERROR) wl_run_escan :  Escan set error (-110)
[19413.803540] CFG80211-ERROR) wl_run_escan : error (-110), cnt=1
[19413.815508] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.815864] ANDROID-ERROR)
[19413.821946] CFG80211-ERROR) wl_cfg80211_scan :
[19413.823204] Could not get bssid (-1)
[19413.825214] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.833261] scan error (-110)
[19413.834188] CFG80211-ERROR) wl_cfg80211_disconnect : Reason 3
[19413.858399] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.858773] CFG80211-ERROR) wl_cfg80211_disconnect :
[19413.865031] ANDROID-ERROR)
[19413.866379] Could not get rssi (-1)
[19413.872030] error (-1)
[19413.872171] dhd_stop: Enter c3008800
[19413.882980] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.883318] CFGP2P-ERROR) wl_cfgp2p_bss_isup : 'cfg bss -C 0' failed: -1
[19413.892998] CFGP2P-ERROR) wl_cfgp2p_bss_isup : NOTE: this ioctl error is norm
al when the BSS has not been created yet.
[19413.909640] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.909978] CFG80211-ERROR) wl_notifier_change_state : wlan0:error(-1)
[19413.919714] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.928250] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.928581] CFG80211-ERROR) wl_dongle_down : WLC_DOWN error (-1)
[19413.936508] wl_android_wifi_off in 1
[19413.943067] wl_android_wifi_off in 2: g_wifi_on=1
[19413.943155] dhd_prot_ioctl : bus is down. we have nothing to do
[19413.954484] bcmsdh_oob_intr_unregister: Enter
[19413.954599] wake disabled for irq 54
[19413.957031] dhd_txglom_enable: enable 0
[19413.968192] dhd_bus_devreset:  WLAN OFF DONE
[19413.969178] wifi_platform_set_power = 0
[19413.970703] ======== PULL WL_REG_ON LOW! ========
[19414.039857] wl_android_wifi_off out
[19414.039938] dhd_stop: Exit
[19414.056672] CFG80211-ERROR) wl_cfg80211_hang : In : chip crash eventing
[19414.060200] cfg80211: Calling CRDA to update world regulatory domain
[19414.293505] cfg80211: World regulatory domain updated:
[19414.293616] cfg80211:  DFS Master region: unset
[19414.297404] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gai
n, max_eirp), (dfs_cac_time)
[19414.333084] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 m
Bm), (N/A)
[19414.335567] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 m
Bm), (N/A)
[19414.363422] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 m
Bm), (N/A)
[19414.370812] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AU
TO), (N/A, 2000 mBm), (N/A)
[19414.403283] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AU
TO), (N/A, 2000 mBm), (0 s)
[19414.418981] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000
mBm), (0 s)
[19414.431252] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 m
Bm), (N/A)
[19414.449416] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0
mBm), (N/A)