15AH, San Francisco

California, United States.

Send Your Mail At:

tianyingkejishe@sina.cn

Working Hours

Mon-Sat: 9.30am To 7.00pm

分类标题

Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et dolore feugait.

分类归档 智能设备

RT5350WIFI开发板OpenWrt硬件篇

一、开发板简介

     开发板采用古老的RT5350路由级SOC作为主芯片,意在打造一款性价比极高的WiFi开发板,Openwrt学习板。为啥用古老的芯片呢?为啥不用当前流行的MT7688、MT7628呢?在路由器的历史舞台上有过这么样的芯片,它叫RT5350f,应用在多家厂家的路由器上,包括TP-link、Tenda、D-link等等,历经尽7年之久才退役,它的稳定性是经得住考验的,它的开发资料是多之又多,关于它的开发问题,百度都能找到。同学们啊,咱们是来干嘛的,学习啊。学习最缺少的是啥???前辈的经验分享啊,在这品牌泛滥的时代,系统性的资料更让人珍惜。
    那为啥说他相加比极高呢,他能跑Linux啊,他的主频350MHz啊。但他的价格跟ESP8266一个价格,有人说他早就停产了,确实停产了,但你忽略了中国人的智慧,他们无声无息的做了大量库存。他们早就知道物联网时代需要的是什么,只是为了更好地学习。
    那有人问了, 学习 这么个古老的东西会不会落后啊,那我可以很高兴地告诉你知识啥时候都不会落后,Linux都经历了多少世纪,学会了这个开发板,MT7688、MT7628,甚至高通的芯片开发板,都不在话下,顶大多看几个不同CPU的datasheet,但你的思路一直很清晰,知道如何自己面对一款新CPU需要什么,如何去做。

二、资源介绍:
1、WiFi IEEE802.11 b/g/n
2、I2S音频接口
3、I2C总线接口
4、USB主口
5、百兆以太口网口
6、两个普通IO口

三、应用方向:

路由器、机器人、WiFi模组、语音识别、音响……

四、开发资料

1、开发板原理图、PCB图。
2、入门教程。

五、实验课程

1、mqtt 服务。
2、远程摄像头。
3、WiFi音响。

Python3异常-AttributeError: module ‘sys’ has no attribute ‘setdefaultencoding

基于python3.6.1版本,在一个.py文件中,加入这3行:
import requests, re, sys
reload(sys)
sys.setdefaultencoding(“utf-8”)
出现这样的错误:
sys.setdefaultencoding(“utf-8”)
AttributeError: module ‘sys’ has no attribute ‘setdefaultencoding’
原因分析:
Python3字符串默认编码unicode, 所以sys.setdefaultencoding也不存在了
解决:
去掉,sys.setdefaultencoding

PyQt5 AttributeError: ‘QGridLayout’ object has no attribute ‘setMargin’

PyQt4和PyQt5版本差异。

PyQt4采用:QVBoxLayout的setMargin方法

PyQt5采用:QVBoxLayout的setContentsMargins方法

 

错误提示: return QtGui.QApplication.translate(context, text, disambig)
AttributeError: module ‘PyQt5.QtGui’ has no attribute ‘QApplication’

修改:return QApplication.translate(context, text, disambig)

原因:PyQt4和PyQt5版本差异。

 

错误提示:NameError: name ‘unicode’ is not defined

修改:Python2 的unicode 函数在 Python3 中被命名为 str。在 Python3 中使用 ·str 来代替 Python2 中的 unicode.

原因:There is no such name in Python 3, no. You are trying to run Python 2 code in Python 3. In Python 3, unicode has been renamed to str.

dpkg: 处理软件包 XXXX (–configure)时出错解决方法

正在设置 ubuntu-drivers-common (1:0.4.17.7) ...
/var/lib/dpkg/info/ubuntu-drivers-common.postinst: 21: /var/lib/dpkg/info/ubuntu-drivers-common.postinst: py3compile: not found
dpkg: 处理软件包 ubuntu-drivers-common (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
正在设置 gconf2 (3.2.6-3ubuntu6) ...
/var/lib/dpkg/info/gconf2.postinst: 74: /var/lib/dpkg/info/gconf2.postinst: gconf-schemas: not found
dpkg: 处理软件包 gconf2 (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
dpkg: 依赖关系问题使得 aisleriot 的配置工作不能继续:
 aisleriot 依赖于 gconf2 (>= 2.28.1-2);然而:
  软件包 gconf2 尚未配置。
 
dpkg: 处理软件包 aisleriot (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 software-properties-gtk 的配置工作不能继续:
 software-properties-gtk 依赖于 ubuntu-drivers-common (>= 1:0.2.75);然而:
  软件包 ubuntu-drivers-common 尚未配置。
 
dpkg: 处理软件包 software-properties-gtk (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 apturl 的配置工作不能继续:
 apturl 依赖于 software-properties-gtk;然而:
  软件包 software-properties-gtk 尚未配置。
 
dpkg: 处理软件包 apturl (--configure)时出错:
 依赖关系问题 - 仍未被配置
因为错误消息指示这是由于上一个问题导致的错误,没有写入 apport 报告。
                                                                    由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                        由于已经达到 MaxReports 限制,没有写入 apport 报告。
            正在设置 blueman (2.0.4-1ubuntu2) ...
/var/lib/dpkg/info/blueman.postinst: 40: /var/lib/dpkg/info/blueman.postinst: py3compile: not found
dpkg: 处理软件包 blueman (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 catfish (1.4.2-0ubuntu1) ...
/var/lib/dpkg/info/catfish.postinst: 6: /var/lib/dpkg/info/catfish.postinst: py3compile: not found
dpkg: 处理软件包 catfish (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
正在设置 python3-pyatspi (2.18.0+dfsg-3) ...
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    /var/lib/dpkg/info/python3-pyatspi.postinst: 6: /var/lib/dpkg/info/python3-pyatspi.postinst: py3compile: not found
dpkg: 处理软件包 python3-pyatspi (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 python3-speechd (0.8.3-1ubuntu3) ...
/var/lib/dpkg/info/python3-speechd.postinst: 6: /var/lib/dpkg/info/python3-speechd.postinst: py3compile: not found
dpkg: 处理软件包 python3-speechd (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 gnome-orca 的配置工作不能继续:
 gnome-orca 依赖于 python3-pyatspi (>= 2.10);然而:
  软件包 python3-pyatspi 尚未配置。
 gnome-orca 依赖于 python3-speechd (>= 0.8);然而:
  软件包 python3-speechd 尚未配置。
 
dpkg: 处理软件包 gnome-orca (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    由于已经达到 MaxReports 限制,没有写入 apport 报告。
                        dpkg: 依赖关系问题使得 gtk-theme-config 的配置工作不能继续:
 gtk-theme-config 依赖于 gconf2;然而:
  软件包 gconf2 尚未配置。
 
dpkg: 处理软件包 gtk-theme-config (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 libgnomevfs2-common 的配置工作不能继续:
 libgnomevfs2-common 依赖于 gconf2 (>= 2.28.1-2);然而:
  软件包 gconf2 尚未配置。
 
dpkg: 处理软件包 libgnomevfs2-common (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 libgnomevfs2-0:amd64 的配置工作不能继续:
 libgnomevfs2-0:amd64 依赖于 libgnomevfs2-common (= 1:2.24.4-6.1ubuntu1);然而:
  软件包 libgnomevfs2-common 尚未配置。
 
dpkg: 处理软件包 libgnomevfs2-0:amd64 (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 libgnome2-common 的配置工作不能继续:
 libgnome2-common 依赖于 gconf2 (>= 2.28.1-2);然而:
  软件包 gconf2 尚未配置。
 
dpkg: 处理软件包 libgnome2-common (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 libgnome-2-0:amd64 的配置工作不能继续:
 libgnome-2-0:amd64 依赖于 libgnomevfs2-0 (>= 1:2.17.90);然而:
  软件包 libgnomevfs2-0:amd64 尚未配置。
 libgnome-2-0:amd64 依赖于 libgnome2-common (= 2.32.1-5ubuntu1);然而:
  软件包 libgnome2-common 尚未配置。
 
dpkg: 处理软件包 libgnome-2-0:amd64 (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 libgnome2-bin 的配置工作不能继续:
 libgnome2-bin 依赖于 libgnome-2-0;然而:
  软件包 libgnome-2-0:amd64 尚未配置。
 
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    由于已经达到 MaxReports 限制,没有写入 apport 报告。
                        dpkg: 处理软件包 libgnome2-bin (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 libgnome2-0:amd64 的配置工作不能继续:
 libgnome2-0:amd64 依赖于 libgnome-2-0 (= 2.32.1-5ubuntu1);然而:
  软件包 libgnome-2-0:amd64 尚未配置。
 libgnome2-0:amd64 依赖于 libgnome2-bin (= 2.32.1-5ubuntu1);然而:
  软件包 libgnome2-bin 尚未配置。
 
dpkg: 处理软件包 libgnome2-0:amd64 (--configure)时出错:
 依赖关系问题 - 仍未被配置
dpkg: 依赖关系问题使得 libbonoboui2-0:amd64 的配置工作不能继续:
 libbonoboui2-0:amd64 依赖于 libgnome2-0 (>= 2.17.3);然而:
  软件包 libgnome2-0:amd64 尚未配置。
 
dpkg: 处理软件包 libbonoboui2-0:amd64 (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    由于已经达到 MaxReports 限制,没有写入 apport 报告。
                        dpkg: 依赖关系问题使得 libgnomeui-0:amd64 的配置工作不能继续:
 libgnomeui-0:amd64 依赖于 libbonoboui2-0 (>= 2.15.1);然而:
  软件包 libbonoboui2-0:amd64 尚未配置。
 libgnomeui-0:amd64 依赖于 libgnome-2-0;然而:
  软件包 libgnome-2-0:amd64 尚未配置。
 libgnomeui-0:amd64 依赖于 libgnomevfs2-0 (>= 1:2.17.90);然而:
  软件包 libgnomevfs2-0:amd64 尚未配置。
 
dpkg: 处理软件包 libgnomeui-0:amd64 (--configure)时出错:
 依赖关系问题 - 仍未被配置
正在设置 lightdm-gtk-greeter-settings (1.2.1-0ubuntu1) ...
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    /var/lib/dpkg/info/lightdm-gtk-greeter-settings.postinst: 6: /var/lib/dpkg/info/lightdm-gtk-greeter-settings.postinst: py3compile: not found
dpkg: 处理软件包 lightdm-gtk-greeter-settings (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 python3-psutil (3.4.2-1) ...
/var/lib/dpkg/info/python3-psutil.postinst: 6: /var/lib/dpkg/info/python3-psutil.postinst: py3compile: not found
dpkg: 处理软件包 python3-psutil (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 menulibre 的配置工作不能继续:
 menulibre 依赖于 python3-psutil;然而:
  软件包 python3-psutil 尚未配置。
 
dpkg: 处理软件包 menulibre (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 mugshot (0.3.1-0ubuntu1) ...
/var/lib/dpkg/info/mugshot.postinst: 6: /var/lib/dpkg/info/mugshot.postinst: py3compile: not found
dpkg: 处理软件包 mugshot (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 nautilus-share 的配置工作不能继续:
 nautilus-share 依赖于 apturl;然而:
  软件包 apturl 尚未配置。
 
dpkg: 处理软件包 nautilus-share (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 onboard (1.2.0-0ubuntu5) ...
/var/lib/dpkg/info/onboard.postinst: 6: /var/lib/dpkg/info/onboard.postinst: py3compile: not found
dpkg: 处理软件包 onboard (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 onboard-data 的配置工作不能继续:
 onboard-data 依赖于 onboard (>= 0.99.0~alpha1~tr1507);然而:
  软件包 onboard 尚未配置。
 
dpkg: 处理软件包 onboard-data (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 python3-feedparser (5.1.3-3build1) ...
/var/lib/dpkg/info/python3-feedparser.postinst: 6: /var/lib/dpkg/info/python3-feedparser.postinst: py3compile: not found
dpkg: 处理软件包 python3-feedparser (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 python3-mako (1.0.3+ds1-1ubuntu1) ...
/var/lib/dpkg/info/python3-mako.postinst: 6: /var/lib/dpkg/info/python3-mako.postinst: py3compile: not found
dpkg: 处理软件包 python3-mako (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 rhythmbox (3.3-1ubuntu7) ...
/var/lib/dpkg/info/rhythmbox.postinst: 6: /var/lib/dpkg/info/rhythmbox.postinst: py3compile: not found
dpkg: 处理软件包 rhythmbox (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 totem-plugins (3.18.1-1ubuntu4) ...
/var/lib/dpkg/info/totem-plugins.postinst: 6: /var/lib/dpkg/info/totem-plugins.postinst: py3compile: not found
dpkg: 处理软件包 totem-plugins (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    dpkg: 依赖关系问题使得 unity-scope-openclipart 的配置工作不能继续:
 unity-scope-openclipart 依赖于 python3-feedparser;然而:
  软件包 python3-feedparser 尚未配置。
 
dpkg: 处理软件包 unity-scope-openclipart (--configure)时出错:
 依赖关系问题 - 仍未被配置
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 unity-tweak-tool (0.0.7ubuntu2) ...
/var/lib/dpkg/info/unity-tweak-tool.postinst: 6: /var/lib/dpkg/info/unity-tweak-tool.postinst: py3compile: not found
dpkg: 处理软件包 unity-tweak-tool (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 xfpanel-switch (1.0.4-0ubuntu1) ...
/var/lib/dpkg/info/xfpanel-switch.postinst: 6: /var/lib/dpkg/info/xfpanel-switch.postinst: py3compile: not found
dpkg: 处理软件包 xfpanel-switch (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。
                                                    正在设置 ssh-import-id (5.5-0ubuntu1) ...
/var/lib/dpkg/info/ssh-import-id.postinst: 14: /var/lib/dpkg/info/ssh-import-id.postinst: py3compile: not found
dpkg: 处理软件包 ssh-import-id (--configure)时出错:
 子进程 已安装 post-installation 脚本 返回错误状态 127
由于已经达到 MaxReports 限制,没有写入 apport 报告。

 

解决方法:

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old //现将info文件夹更名
 
sudo mkdir /var/lib/dpkg/info //再新建一个新的info文件夹
sudo apt-get update && apt-get -f install //不用解释了吧
sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old //执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_old文件夹下
sudo rm -rf /var/lib/dpkg/info //把自己新建的info文件夹删掉
sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info //把以前的info文件夹重新改

 

子进程 已安装 pre-removal 脚本 返回了错误号 1或2 与 子进程 已安装 post-installation 脚本 返回了错误号 1或2

一、子进程 已安装 pre-removal 脚本 返回了错误号 1或2 解决办法:

sudo vim /var/lib/dpkg/status

找到Package: <package name>,比如Package: vsftpd

删除这部分的描述,删到下个Package: XXX前就好。存档后,再进行操作就OK了。

二、子进程 已安装 post-installation 脚本 返回了错误号 1或2 解决办法:

sudo rm /var/lib/dpkg/info/<package name>.*

比如sudo rm /var/lib/dpkg/info/vsftpd.*,存档后,再进行操作就OK了。

Alter FPGA回读芯片内部程序文件

实际应用中会碰到,手头没有编写的程序,而又想复制一台一模一样的FPGA设备,那再次教你一招,从设备里读取程序,下载到另一个设备里。

1、建立项目

file -> new projec wizard

根据向导填写FPGA硬件信息

2、打开编程界面

tools -> programer

添加FPGA型号,添加配置flash型号。

 

 

 

 

 

 

 

点击start编程,待进度条显示100%后,点击savefile

AltiumDesiger一个项目中存在多个原理图和多个PCB文件一一对应方法

1.首先建立相应的电路原理图和 PCB 文件,结果如图 1 所示


1

2.Porjects 中选择对应 SCHDOC , 右键, 选择 show defferences… , 如图 2 所示。


2


3.
勾选 Advenced Mode ,如图 3 所示。


3


4.
然后在右侧栏中选择新建立的那个 PCBDOC ,点击 OK 确认操作,如图 4 所示。

4


5.
在出现的 Defferences between × × × 对话框中,右击鼠标,选择 Updata all in
一栏(其他几栏请自己体会)
,如图 5 所示。


5


6.
点选图 5 所示对话框左下方的 Create Engineering Change Order…. ( 该按钮在未
执行上一步时为灰色) 。 在新出现的
Engineering Change Order 对话框中, Validate
Changes
, 然后 Execute Changes ,完成将某一个 SCHDOC 导入对应的 PCBDOC
如图
6 所示。


6


7.
同理,如果要将某几个 SCHDOC 导入一个 PCBDOC ,则需执行好几次。


PS:如果直接是整个 Project 中的 SCHDOC 导入一个 PCB,请选择工具栏中的
Design–updata × × × ×即可。