我在我的 Raspberry Pi 上运行 Arch Linux ARM,我需要在启动时启动一个 python(它应该一直运行,直到它崩溃或机器断电)程序,启动后根本没有用户输入。
我对 Arch 有点陌生,所以我真的不知道如何编写服务等等。
我无法让任何设备(Win7、Win8 或 Android)连接到我可怜的人的无线接入点(树莓派 + rtl8192cu 芯片组 USB 适配器(Belkin N300 micro)+ hostapd + dnsmasq)。单击/点击“连接”后,我只是收到一条错误消息,指出无法连接。分配静态 IP 然后连接也不成功,因此它不是 IP/DHCP/dnsmasq 问题。sudo hostapd -dd /etc/hostapd/hostapd.conf不提供任何线索;客户端尝试连接时没有错误消息。/etc/hostapd/hostapd.conf非常简单,只有接口、ssid 和通道声明。我没有做任何桥接、NAT 或通过这个设置上网...我只需要它作为一个接入点,所以我在车里通过网络浏览器连接到它(我的 Android 不做广告- 不幸的是)。这是 hostapd 的输出(即'
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x1f85648
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 …Run Code Online (Sandbox Code Playgroud) 我是 Linux 新手(RaspBian for RaspBerry Pi,但我认为没有区别),我必须安装一个 USB 无线网络适配器(产品是 TP-Link TL-WN725N,这个:http://www .tp-link.it/products/details/?model=TL-WN725N )
现在,我认为这不会被我的系统自动识别,因为如果我执行ifconfig命令,我会获得以下输出:
pi@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:2a:9f:b0
inet addr:192.168.1.8 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:475 errors:0 dropped:0 overruns:0 frame:0
TX packets:424 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34195 (33.3 KiB) TX bytes:89578 (87.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 …Run Code Online (Sandbox Code Playgroud) 我正在使用 Raspbian(基于 Debian)操作系统开发 Raspberry Pi。为了测试,我在/etc/rc.local:
python /home/pi/test.py
Run Code Online (Sandbox Code Playgroud)
启动此脚本运行良好。但问题是我忘记了脚本中有一个无限循环,例如:
while True:
print 'Hello"
time.sleep(5)
Run Code Online (Sandbox Code Playgroud)
这个循环阻塞了系统启动,所以我无法进入系统编辑脚本。Ctrl+C 无法杀死它。所以我想知道如何杀死一个从 开始的连续进程rc.local?
我有几十个 Raspberry Pi,用作家庭实验室实验的一部分。我在一个 Pi 上创建了一个 Rasbian(Debian 的 Pi 特定版本)的安装,我想将它传播到 Pis 的其余部分。
Pis 使用 MicroSD 卡(其中我购买的所有卡都是相同的 8GB 容量和相同的型号)。以前,我使用 dd 创建“金牌大师”MicroSD 卡的映像,但是这需要很长时间,因为它会生成 8GB SD 卡的逐字节映像并且必须将其全部写入(即使卡上的总已用空间可能是 300 兆或更少)。
有3个分区;一个引导分区(包含内核)、一个根文件系统分区(包含大部分操作系统)和第三个特殊分区。
而不是使用 dd,我想知道是否有可能将分区表复制到文件,将分区表写回新的 SD 卡,然后使用我可信赖的 rsync 命令将数据本身复制回每个划分。
这可能吗?或者我最好只使用 parted 并尝试编写脚本来复制分区表?
谢谢!
我正在使用 Raspberry Pi 开发机器人,但在 X11 转发方面遇到问题。当我要运行我的脚本时:
sudo python myscript.py
Run Code Online (Sandbox Code Playgroud)
我收到错误:
Putty X11 proxy: Authorisation not recognised
(Imagen Combinada:3642) : Gtk-Warning **: cannot open display: localhost:10.0
Run Code Online (Sandbox Code Playgroud)
我正在使用 PuTTY 和 Xming(启用 SSH -> X11 -> 启用 X11 转发)。
有人知道这里会发生什么,我该如何解决?
我一直有麻烦试图使用ssh连接到我的树莓派服务器来验证我的MacBook Air的客户。关于为什么这不起作用有什么建议吗?
~/.ssh/authorized_keys文件夹中~/.ssh和~/.ssh/*文件夹设置权限/etc/ssh/sshd_config文件中启用 RSAAuthentication 和 PubkeyAuthentication>>> ssh -vvv -i ~/.ssh/id_rsa pi@raspberrypi.local
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to raspberrypi.local [192.168.0.13] port 777.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/addie/.ssh/id_rsa" as …Run Code Online (Sandbox Code Playgroud) 所以我有一个带 USB 存储功能的路由器,我还有一个 Raspberry Pi 2 和 WD 外置硬盘 1TB。
我想把它变成 NAS 和 torrent 盒,但我想知道一直插入外部硬盘是否安全?安全我的意思是硬盘在一年后不会因为持续读/写而损坏。
这个低级驱动程序的东西很新,有很多地方会出错。基本上我正在尝试使用 lirc 获得一个红外发射器。我已经导致了晶体管销23 IR,但没有什么在/dev/lirc或/dev/lirc0
我安装了 lirc apt-get install lirc,
然后添加dtoverlay=lirc-rpi,gpio_out_pin=23,gpio_in_pin=22到config.txt并更改lirc_options.conf为
driver = default
device = /dev/lirc0
Run Code Online (Sandbox Code Playgroud)
然而,没有什么的/dev,如果我尝试发送与irsend我得到hardware does not support sending。lircd 的系统状态显示此错误:
Error: could not get file information for /dev/lirc0
Run Code Online (Sandbox Code Playgroud)
我正在使用运行带有Linux raspberrypi 4.19.42-v7+ #1219固件的Raspbian Stretch 的 RPi 3B 。
我不知道您可能需要什么其他命令转储,所以请发表评论,我会添加到问题中
注意:我正在阅读,gpio-ir但是这似乎只是接收器。任何带有红外传输的图书馆的链接也将不胜感激。
为什么“iw wlan0 scan”不稳定?有时它会提供输出,但大多数情况下不会返回任何内容,并提供“资源繁忙”或“网络已关闭”错误消息。我用 shell 脚本编写了这个扫描,这是问题吗?关于根本原因/修复还有其他想法吗?
是什么原因导致此资源繁忙问题?资源繁忙错误始终是上述两个错误中的第一个错误。
raspberry-pi ×10
linux ×7
ssh ×2
arch-linux ×1
bash ×1
debian ×1
dmesg ×1
drivers ×1
hard-drive ×1
hostapd ×1
ir ×1
lirc ×1
networking ×1
openssh ×1
partitioning ×1
putty ×1
python ×1
raspbian ×1
sd-card ×1
ssid ×1
systemd ×1
ubuntu ×1