您尚未登录。

楼主 #1 2020-04-18 22:20:29

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

从网上找了一份esp8089-spi的驱动,但是编译失败了。
源码位置在这。
https://github.com/notabucketofspam/ESP8089-SPI/blob/master/README.md

文中说,可以使用ESP8266或者ESP8089都是可以的。只不过ESP8266需要把SPI flash拆掉。
咱们先编译一下驱动吧。

我改了Makefile的KBUILD,指向F1C200S linux-5.2源码目录。
使用make ARCH=arm CROSS_COMPILE=arm-linux-命令进行编译,得来如下结果:
syteco.png

这是什么原因?
还有他居然说这个内核不支持无线?什么鬼







以下由 @哇酷小二 2020-05-09 添加:
------------------------------------------
不方便git clone的朋友本站下载: ESP8089-SPI_20200509.7z

离线

#2 2020-04-18 22:34:22

kekemuyu
会员
注册时间: 2018-12-13
已发帖子: 849
积分: 710

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

最近也在研究linux驱动,发现驱动编写真不是人干的,涉及到的东西太多了,编译出错了,安装驱动出错了,根本就无从下手,想要彻底搞明白,还得从linux源码看起。

离线

#3 2020-04-18 22:49:07

黄粱梦
会员
注册时间: 2020-03-17
已发帖子: 45
积分: 39

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

$ grep ieee80211_rx_napi -r .
./net/mac80211/rx.c:void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
./net/mac80211/rx.c:EXPORT_SYMBOL(ieee80211_rx_napi);
./include/net/mac80211.h: * ieee80211_rx_napi - receive frame from NAPI context


要使能 网络驱动里面的 80211

离线

楼主 #4 2020-04-19 06:18:13

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

黄粱梦 说:

$ grep ieee80211_rx_napi -r .
./net/mac80211/rx.c:void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
./net/mac80211/rx.c:EXPORT_SYMBOL(ieee80211_rx_napi);
./include/net/mac80211.h: * ieee80211_rx_napi - receive frame from NAPI context


要使能 网络驱动里面的 80211

多谢指点,今天试一下。
进度在此更新

离线

楼主 #5 2020-04-19 13:22:28

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

多谢大佬,勾选很多80211的东西,编译内核之后,再次编译驱动成功出了.ko。
有时间试一下

离线

楼主 #6 2020-04-19 14:47:27

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

dika@dika-pc:~/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master$ make ARCH=arm CROSS_COMPILE=arm-linux-


*** WARNING: This kernel lacks wireless extensions.
Wireless drivers will not work properly.


make -C /home/dika/DVPM_linux-5.2/linux-nano-5.2-tf M=/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master
make[1]: Entering directory '/home/dika/DVPM_linux-5.2/linux-nano-5.2-tf'
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_debug.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/sdio_sif_esp.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_io.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_file.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.o
In file included from ./include/linux/mm_types.h:12:0,
                 from ./include/linux/mmzone.h:21,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/slab.h:15,
                 from ./include/linux/crypto.h:19,
                 from ./include/crypto/hash.h:11,
                 from ./include/linux/uio.h:10,
                 from ./include/linux/socket.h:8,
                 from ./include/linux/compat.h:15,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:37,
                 from /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c:17:
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c: In function ‘esp_pub_init_all’:
./include/linux/completion.h:54:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  struct completion work = COMPLETION_INITIALIZER(work)
  ^
./include/linux/completion.h:74:43: note: in expansion of macro ‘DECLARE_COMPLETION’
 # define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
                                           ^~~~~~~~~~~~~~~~~~
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c:81:2: note: in expansion of macro ‘DECLARE_COMPLETION_ONSTACK’
  DECLARE_COMPLETION_ONSTACK(complete);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c:221:0:
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/eagle_fw1.h: In function ‘esp_download_fw’:
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/eagle_fw1.h:8:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
 static u8 eagle_fw1[] =
 ^~~~~~
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_sip.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_ext.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_ctrl.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_mac80211.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_utils.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_pm.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/testmode.o
  LD [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp8089-spi.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp8089-spi.mod.o
  LD [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp8089-spi.ko
make[1]: Leaving directory '/home/dika/DVPM_linux-5.2/linux-nano-5.2-tf'

这是编译时的信息

离线

楼主 #7 2020-04-19 15:15:39

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

首先对

*** WARNING: This kernel lacks wireless extensions.
Wireless drivers will not work properly.

进行分析。
查看esp8089-spi的Makefile,发现这么一句话,

config_check:
	@if [ -z "$(CONFIG_WIRELESS_EXT)$(CONFIG_NET_RADIO)" ]; then \
		echo; echo; \
		echo "*** WARNING: This kernel lacks wireless extensions."; \
		echo "Wireless drivers will not work properly."; \
		echo; echo; \
	fi

那么我们就去搜一下。
在内核目录使用make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
然后按下/键,进行搜索CONFIG_WIRELESS_EXT,
找到

 Symbol: WIRELESS_EXT [=n ]
  │ Type  : bool 
  │   Defined at net/wireless/Kconfig:2 
  │   Depends on: NET [=y] && WIRELESS [=y]

然后我就去kernel/net/wireless/Kconfig中找WIRELESS_EXT

config WIRELESS_EXT
	bool

更改为

config WIRELESS_EXT
	def_bool y

就OK了,再次编译

dika@dika-pc:~/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master$ make ARCH=arm CROSS_COMPILE=arm-linux-
make -C /home/dika/DVPM_linux-5.2/linux-nano-5.2-tf M=/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master
make[1]: Entering directory '/home/dika/DVPM_linux-5.2/linux-nano-5.2-tf'
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_debug.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/sdio_sif_esp.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_io.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_file.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.o
In file included from ./include/linux/mm_types.h:12:0,
                 from ./include/linux/mmzone.h:21,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/slab.h:15,
                 from ./include/linux/crypto.h:19,
                 from ./include/crypto/hash.h:11,
                 from ./include/linux/uio.h:10,
                 from ./include/linux/socket.h:8,
                 from ./include/linux/compat.h:15,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:37,
                 from /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c:17:
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c: In function ‘esp_pub_init_all’:
./include/linux/completion.h:54:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  struct completion work = COMPLETION_INITIALIZER(work)
  ^
./include/linux/completion.h:74:43: note: in expansion of macro ‘DECLARE_COMPLETION’
 # define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
                                           ^~~~~~~~~~~~~~~~~~
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c:81:2: note: in expansion of macro ‘DECLARE_COMPLETION_ONSTACK’
  DECLARE_COMPLETION_ONSTACK(complete);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_main.c:221:0:
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/eagle_fw1.h: In function ‘esp_download_fw’:
/home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/eagle_fw1.h:8:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
 static u8 eagle_fw1[] =
 ^~~~~~
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_sip.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_ext.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_ctrl.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_mac80211.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_utils.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp_pm.o
  CC [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/testmode.o
  LD [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp8089-spi.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp8089-spi.mod.o
  LD [M]  /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/esp8089-spi.ko
make[1]: Leaving directory '/home/dika/DVPM_linux-5.2/linux-nano-5.2-tf'

没有刚才的提示信息了

离线

楼主 #8 2020-04-19 15:22:18

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

几个warning信息不用管的,

error:ISO C90 forbids mixed declarations 云云

说的就是,禁止将声明和代码混合,就是说要先声明,再用,不用管的,
意思就是

int a ;
a = getnum();
int b ;
b = getnum();

这样不行,
你需要这样:

int a ;
int b ;
a = getnum();
b = getnum();

离线

楼主 #9 2020-04-19 19:20:13

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

如果我想使用SPI接口接WIFI的话,是不是应该在设备树里说明呢?设备树里该如何去写?

离线

楼主 #10 2020-04-19 19:34:20

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

先参考这个帖子进行一些配置看看 https://whycan.cn/t_3754.html。
先把SPI搞定可以用再说接wifi

离线

#11 2020-04-19 19:42:15

黄粱梦
会员
注册时间: 2020-03-17
已发帖子: 45
积分: 39

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

接到spi flash那组引脚,
dts写到 spi 节点下面就可以了.

离线

楼主 #12 2020-04-19 20:09:39

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我将dtsi修改如下:

在pio分组下
 spi0_pc_pins: spi0-pc-pins {
				pins = "PC0","PC1","PC2","PC3";
				function = "spi0";
			};

在soc分组下(我是从4.15内核设备树中复制过来的)
 spi0: spi@1c05000 {
			compatible = "allwinner,suniv-spi",
				     "allwinner,sun8i-h3-spi";
			reg = <0x01c05000 0x1000>;
			interrupts = <10>;
			clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
			clock-names = "ahb", "mod";
			resets = <&ccu RST_BUS_SPI0>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

我将dts修改如下

&spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi0_pc_pins>;
        status = "okay";
};

然后我将编译出来的esp8089-spi.ko放到了板子的文件系统/opt中。

执行modprobe esp8089-spi.ko
# modprobe esp8089-spi.ko
modprobe: can't change directory to '/lib/modules': No such file or directory

我手动mkdir创建了/lib目录的modules文件夹
再次modprobe esp8089-spi.ko
# modprobe esp8089-spi.ko
modprobe: can't change directory to '5.2.0-licheepi-nano': No such file or directory
我手动mkdir创建了/lib/modules/目录的5.2.0-licheepi-nano文件夹
再次modprobe esp8089-spi.ko
# modprobe esp8089-spi.ko
modprobe: can't open 'modules.dep': No such file or directory

这个modules.dep是什么鬼???去查查

离线

楼主 #13 2020-04-19 20:15:35

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

从这个博客中看https://blog.csdn.net/qq_39101111/article/details/78773362
好像是缺东西,depmod,这个指令我的文件系统没有,那么我就再编译一遍buildroot,添加上这个指令。
同时要记得,手动将esp8089-spi.ko放到/lib/modules/5.2.0-licheepi-nano目录中。
我先去编译buildroot了,
这段时候可以去看个电视

离线

#14 2020-04-19 21:10:33

rongwinzip
会员
注册时间: 2020-03-14
已发帖子: 51
积分: 4.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

据说回复才有积分,我来支持大师

离线

楼主 #15 2020-04-19 21:13:34

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

做一下标记

# cd /lib/modules/5.2.0-licheepi-nano/
# ls
esp8089-spi.ko
# depmod
# ls
esp8089-spi.ko   modules.alias    modules.dep      modules.symbols
# modprobe esp8089-spi.ko
[   59.630001] esp8089_spi: loading out-of-tree module taints kernel.
[   59.682075] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   60.305428] esp8089_spi: FAILED to find master
[   60.328536] esp8089_spi: FAILED to create slave
[   60.351455] Unable to handle kernel NULL pointer dereference at virtual address                                                            000001a8
[   60.396146] pgd = (ptrval)
[   60.417170] [000001a8] *pgd=83254831, *pte=00000000, *ppte=00000000
[   60.460005] Internal error: Oops: 17 [#1] ARM
[   60.482718] Modules linked in: esp8089_spi(O+)
[   60.505401] CPU: 0 PID: 122 Comm: modprobe Tainted: G           O      5.2.0-lic                                                           heepi-nano #7
[   60.550047] Hardware name: Allwinner suniv Family
[   60.572839] PC is at spi_setup+0x4/0x164
[   60.594988] LR is at sif_platform_new_device+0x38/0x88 [esp8089_spi]
[   60.636851] pc : [<c0423420>]    lr : [<bf00023c>]    psr: 60000013
[   60.678439] sp : c3217d7c  ip : 00000000  fp : bf00f490
[   60.701620] r10: 00000003  r9 : bf03b9e0  r8 : 00000000
[   60.724673] r7 : bf03bba4  r6 : 00000000  r5 : bf00f400  r4 : bf03bba0
[   60.766000] r3 : 1ea5b1d7  r2 : 1ea5b1d7  r1 : 60000093  r0 : 00000000
[   60.807214] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   60.849221] Control: 0005317f  Table: 83220000  DAC: 00000051
[   60.889929] Process modprobe (pid: 122, stack limit = 0x(ptrval))
[   60.931219] Stack: (0xc3217d7c to 0xc3218000)
[   60.953276] 7d60:                                                                                                                           bf03bba0
[   60.996208] 7d80: bf00f400 bf00023c bf03bba0 bf00f000 00000000 bf0410a0 00000000                                                            c0a3bf00
[   61.039109] 7da0: c0a03028 ffffe000 bf041000 00000000 bf03b9e0 00000024 c0a03028                                                            c0102cc0
[   61.082670] 7dc0: c0a03028 00000000 c0a76050 c0700c80 c08318f0 00000000 c3fdee00                                                            c0a36640
[   61.126169] 7de0: c3217df8 c3fdee04 c3fdee44 1ea5b1d7 bf03ba28 20000013 c3fdf020                                                            00080000
[   61.170070] 7e00: 00000001 0080007f bf03b9e0 1ea5b1d7 bf03b9e0 00000001 c32cc320                                                            00000001
[   61.213941] 7e20: c3bfcba4 00000024 c0a03028 c016f088 00000001 c016e1bc c3217f38                                                            00000001
[   61.257947] 7e40: c3bfcb80 c016e1c4 bf03b9ec 00007fff bf03b9e0 c016ba84 00000041                                                            bf03ba28
[   61.302507] 7e60: 000d05f0 bf03bad4 bf047844 bf03b9e0 c4a50708 bf03bb78 bf042000                                                            c0701b8c
[   61.347315] 7e80: 00000000 00000000 ffffe000 00000000 bf000000 00000000 00000000                                                            00000000
[   61.392105] 7ea0: 00000000 00000000 00000000 00000000 6e72656b 00006c65 00000000                                                            00000000
[   61.436708] 7ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000                                                            00000000
[   61.481700] 7ee0: 00000000 00000000 00000000 1ea5b1d7 7fffffff c0a03028 00000000                                                            00000003
[   61.526818] 7f00: 000d05f0 c0101208 c3216000 00000000 000cfc80 c016e980 7fffffff                                                            00000000
[   61.572258] 7f20: 00000003 00000000 00000000 c4a0c000 00044758 00000000 c4a19bba                                                            c4a46660
[   61.617726] 7f40: c4a0c000 00044758 c4a501e0 c4a50080 c4a4a55c 0003c000 0003de40                                                            00006604
[   61.663561] 7f60: 0003f098 00000000 00000000 00000000 000065f4 00000020 00000021                                                            00000017
[   61.709573] 7f80: 00000000 00000011 00000000 1ea5b1d7 000d05a8 000d05f0 000d05a8                                                            000d05f0
[   61.755883] 7fa0: 0000017b c0101000 000d05f0 000d05a8 00000003 000d05f0 00000000                                                            000d0690
[   61.802241] 7fc0: 000d05f0 000d05a8 000d05f0 0000017b 000d0690 000d0690 00000000                                                            000cfc80
[   61.848786] 7fe0: bec1db28 bec1db18 000263ec b6f008a0 60000010 00000003 00000000                                                            00000000
[   61.895790] [<c0423420>] (spi_setup) from [<00000000>] (0x0)
[   61.940327] Code: ebff0d15 eafffff9 c080caa4 e92d4030 (e59031a8)
[   61.985796] ---[ end trace b39325ed7e1d8da4 ]---
Segmentation fault

离线

#16 2020-04-19 22:42:05

rongwinzip
会员
注册时间: 2020-03-14
已发帖子: 51
积分: 4.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

[   60.305428] esp8089_spi: FAILED to find master
SPI 没通的感觉

离线

#17 2020-04-20 13:37:33

asdfwyg
会员
注册时间: 2020-04-10
已发帖子: 26
积分: 26

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

esp8266是串口的吧,速度肯定很慢,还使用usb或者sdio的好。

离线

楼主 #18 2020-04-20 21:22:41

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

先把/dev/spixxx搞出来再说,应该是要研究一下设备树,对设备树不太懂

离线

#19 2020-04-20 21:32:30

xk100
会员
注册时间: 2018-12-13
已发帖子: 73
积分: 56.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

看的这眼花啊,感觉驱动这东西真的太深了。完全没法玩。

离线

#20 2020-04-20 21:34:33

飞翔工控
会员
注册时间: 2019-11-21
已发帖子: 95
积分: 93.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡 说:

先把/dev/spixxx搞出来再说,应该是要研究一下设备树,对设备树不太懂

驱动spi网卡, 不用搞出 /dev/spi0.0

除非你想应用层往 spi 设备写数据.

离线

#21 2020-04-20 21:41:15

arychen
会员
注册时间: 2019-04-06
已发帖子: 275
积分: 250.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

速度怎么样?   melis上好像大家用的不多,有没有人扩展到melis上的。

离线

楼主 #22 2020-04-20 22:25:08

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

飞翔工控 说:

驱动spi网卡, 不用搞出 /dev/spi0.0

除非你想应用层往 spi 设备写数据.

多谢

离线

楼主 #23 2020-04-20 22:26:14

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我已经弄出来了/dev/spi0.0,
好像没啥用,
挂载模块还是一样的信息,因为我没有接WIFI模块。
今天我把WIFI模块弄好了,明天连上试试

离线

楼主 #24 2020-04-20 22:27:36

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

-384ef6df1d899013.jpg50fac5bf889cabdd.jpg

离线

楼主 #25 2020-04-20 22:28:39

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

asdfwyg 说:

esp8266是串口的吧,速度肯定很慢,还使用usb或者sdio的好。

不慢,能稳定1.2MB/S,很快的

离线

楼主 #26 2020-04-20 22:30:20

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

arychen 说:

速度怎么样?   melis上好像大家用的不多,有没有人扩展到melis上的。

速度1MBytes/S以上,速度绝对可以

离线

#27 2020-04-20 22:37:41

kekemuyu
会员
注册时间: 2018-12-13
已发帖子: 849
积分: 710

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡 说:

从这个博客中看https://blog.csdn.net/qq_39101111/article/details/78773362
好像是缺东西,depmod,这个指令我的文件系统没有,那么我就再编译一遍buildroot,添加上这个指令。
同时要记得,手动将esp8089-spi.ko放到/lib/modules/5.2.0-licheepi-nano目录中。
我先去编译buildroot了,
这段时候可以去看个电视

depmod加进去就可以了吗?编译好的驱动可以分享吗?

离线

楼主 #28 2020-04-21 21:26:04

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

esp8089-spi.ko
# cp esp8089-spi.ko /lib/modules/5.2.0-licheepi-nano/
esp8089-spi.ko   modules.alias    modules.dep      modules.symbols
# cp esp8089-spi.ko /lib/modules/5.2.0-licheepi-nano/
# modprobe esp8089-spi.ko
[   33.725660] esp8089_spi: loading out-of-tree module taints kernel.
[   33.777373] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   34.401079] esp8089_spi: FAILED to find master
[   34.424137] esp8089_spi: FAILED to create slave
[   34.446956] esp8089_spi: I will go dead   ##这句是我自己加的,打印出来了。
[   34.468930] Unable to handle kernel NULL pointer dereference at virtual addre                                  ss 000001a8
[   34.513349] pgd = (ptrval)
[   34.534138] [000001a8] *pgd=83216831, *pte=00000000, *ppte=00000000
[   34.576547] Internal error: Oops: 17 [#1] ARM
[   34.598981] Modules linked in: esp8089_spi(O+)
[   34.621376] CPU: 0 PID: 119 Comm: modprobe Tainted: G 



struct spi_device* sif_platform_new_device(void) {
  master = spi_busnum_to_master(esp_board_spi_devices[0].bus_num);
  if(!master)
    printk("esp8089_spi: FAILED to find master\n");
  spi = spi_new_device( master, esp_board_spi_devices );
  if(!spi)
    printk("esp8089_spi: FAILED to create slave\n");
  printk("esp8089_spi: I will go dead\n");
  if(spi_setup(spi))
    printk("esp8089_spi: FAILED to setup slave\n");
  return spi;
}

离线

楼主 #29 2020-04-21 21:26:49

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

说明spi_new_device有问题,这个spi值不能setup

离线

楼主 #30 2020-04-21 21:28:27

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

1) 首先申请设备驱动结构体。
        2) 调用spi_setup(spi)函数对设备信息初始化。
因为申请的设备驱动结构体有问题。
明天再说。

离线

楼主 #31 2020-04-21 22:51:39

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

有人一起吗?
我感觉是不是github给的引脚定义是错的呀,
我搜了搜树莓派的引脚定义,有一个20是GND呀,怎么可能是spi的一个脚呢?
还有对826与主控连接的cs和miso mosi对不上,感觉github是瞎写的吧

离线

#32 2020-04-22 11:45:30

czllong1989
会员
注册时间: 2019-10-31
已发帖子: 8
积分: 7.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

这个用esp8266是真香 量大 便宜 1MB/s速度很快了 一般的应用都可以了

离线

楼主 #33 2020-04-23 08:04:10

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

像大佬求助,是不是github上用的接口是错的,不是spi呀,我该从哪里找到网卡驱动正确spi接口定义

离线

楼主 #34 2020-04-23 19:02:20

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

还是没有人,看来我这个项目太高端了...

离线

楼主 #35 2020-04-23 21:26:17

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

从串口信息来看,是这段代码出了问题,我们一个个分析

struct spi_device* sif_platform_new_device(void) {
  master = spi_busnum_to_master(esp_board_spi_devices[0].bus_num);
  if(!master)
    printk("esp8089_spi: FAILED to find master\n");
  spi = spi_new_device( master, esp_board_spi_devices );
  if(!spi)
    printk("esp8089_spi: FAILED to create slave\n");
  printk("esp8089_spi: I will go dead\n");
  if(spi_setup(spi))
    printk("esp8089_spi: FAILED to setup slave\n"); 
  printk("esp8089_spi: I am OK\n");
  return spi;
}

首先看

master = spi_busnum_to_master(esp_board_spi_devices[0].bus_num);

其中,esp_board_spi_devices[]为前面定义的结构体

static struct spi_board_info esp_board_spi_devices[] = {
  {
    .modalias = "ESP8089_0",
    .max_speed_hz = MAX_SPEED_HZ,
    .bus_num = 1,
    .chip_select = 0,
    .mode = 0,
  },
};

bus_num就是1
spi_busnum_to_master(1)研究一下
每个master都对应一个bus num。
注册spi slave设备,由dts解析得到,dts会指定spi slave 挂载在哪个bus num下,由bus num就可以得到对应的spi master 了

离线

楼主 #36 2020-04-23 21:38:54

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

将bus_num改为0之后,就是如下

# modprobe esp8089-spi.ko
[   11.554796] esp8089_spi: loading out-of-tree module taints kernel.
[   11.606600] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   12.230317] esp8089_spi: esp_spi_dummy_probe enter
[   12.254156] sun6i-spi 1c05000.spi: chipselect 0 already in use
[   12.296718] esp8089_spi: FAILED to create slave
[   12.319904] esp8089_spi: I will go dead
[   12.342262] Unable to handle kernel NULL pointer dereference at virtual addre               ss 000001a8
[   12.387280] pgd = (ptrval)

离线

楼主 #37 2020-04-23 21:47:11

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

woc,,牛逼!!!

# cd /lib/modules/5.2.0-licheepi-nano/
# modprobe esp8089-spi.ko
[   12.181054] esp8089_spi: loading out-of-tree module taints kernel.
[   12.233128] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   12.857475] esp8089_spi: esp_spi_dummy_probe enter
[   12.881136] esp8089_spi: I will go dead
[   12.903368] esp8089_spi: I am OK
[   12.924720] esp8089_spi: register board OK
[   12.946892] esp8089_spi: sem_timeout = 0
[   13.182012] esp8089_spi: ESP8089 power up OK
[   13.204773] esp8089_spi: esp_spi_probe ENTER
[   13.226888] esp8089_spi: esp_setup_spi
[   13.248167] esp8089_spi: sif_spi_protocol_init
[   13.269955] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c,                                                                                                   1559
[   13.313000] esp8089_spi: fail_count = 0
[   13.437998] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   13.579642] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c,                                                                                                   1559
[   13.622443] esp8089_spi: fail_count = 1
[   13.746389] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   13.888106] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c,                                                                                                   1559
[   13.931011] esp8089_spi: fail_count = 2
[   14.055044] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   14.196744] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c,                                                                                                   1559
[   14.239826] esp8089_spi: fail_count = 3
[   14.364670] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   14.506752] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c,                                                                                                   1559
[   14.550011] esp8089_spi: fail_count = 4
[   14.675678] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   14.817810] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c,  

离线

楼主 #38 2020-04-23 21:53:14

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

今天就先到这。
记录一下我今天干了啥,
1,修改设备树,把SPI让出来,不能占用SPI,要okay的状态
2,驱动中的busnum改为0

离线

楼主 #39 2020-04-23 21:54:50

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

完整版打印日志如下

# modprobe esp8089-spi.ko
[   14.160787] esp8089_spi: loading out-of-tree module taints kernel.
[   14.212248] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   14.836264] esp8089_spi: esp_spi_dummy_probe enter
[   14.859719] esp8089_spi: I will go dead
[   14.881817] esp8089_spi: I am OK
[   14.903073] esp8089_spi: register board OK
[   14.925106] esp8089_spi: sem_timeout = 0
[   15.161968] esp8089_spi: ESP8089 power up OK
[   15.184532] esp8089_spi: esp_spi_probe ENTER
[   15.206471] esp8089_spi: esp_setup_spi
[   15.227518] esp8089_spi: sif_spi_protocol_init
[   15.249056] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   15.291547] esp8089_spi: fail_count = 0
[   15.416100] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   15.557168] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   15.599577] esp8089_spi: fail_count = 1
[   15.723559] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   15.864807] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   15.907158] esp8089_spi: fail_count = 2
[   16.030840] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   16.172182] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   16.214934] esp8089_spi: fail_count = 3
[   16.339190] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   16.480864] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   16.523665] esp8089_spi: fail_count = 4
[   16.648389] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   16.790452] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   16.833929] esp8089_spi: fail_count = 5
[   16.958406] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   17.100829] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   17.144925] esp8089_spi: fail_count = 6
[   17.270024] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   17.412897] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   17.457390] esp8089_spi: fail_count = 7
[   17.582389] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   17.725779] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   17.770330] esp8089_spi: fail_count = 8
[   17.895073] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   18.038762] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   18.084524] esp8089_spi: fail_count = 9
[   18.210388] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   18.356068] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   18.403822] esp8089_spi: fail_count = 10
[   18.530763] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   18.677695] esp8089_spi: first error exit
[   18.701399] esp8089_spi: esp_spi_probe EXIT
[   18.725104] eagle: probe of spi0.0 failed with error -110
[   18.750141] esp8089_spi: sem_timeout = 0
[   18.773383] esp8089_spi: esp_spi_init err 0
#

离线

楼主 #40 2020-04-23 21:55:36

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

下一步就是,改gpio,
驱动需要控制GPIO来复位ESP8266

离线

#41 2020-04-23 22:11:02

xyyangkun
会员
注册时间: 2018-03-14
已发帖子: 18
积分: 17

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

F1C100S的spi操作与树莓派相同吗? 这个移植的关键是把spi通信搞通吧

离线

楼主 #42 2020-04-23 22:18:48

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

xyyangkun 说:

F1C100S的spi操作与树莓派相同吗? 这个移植的关键是把spi通信搞通吧

现在有/dev/spi0.0节点呢,spi应该可以用了。
现在不知道esp8266与板子连接的spi是哪几个脚。
因为github上那个人用的不是8266的spi脚

离线

#43 2020-04-24 08:58:22

jambogo
会员
注册时间: 2020-03-27
已发帖子: 7
积分: 7

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

mark 一下,多一种接口方案增加接口灵活性。

离线

楼主 #44 2020-04-25 08:49:09

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

离线

#45 2020-04-25 11:24:10

xyyangkun
会员
注册时间: 2018-03-14
已发帖子: 18
积分: 17

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡 说:

现在有/dev/spi0.0节点呢,spi应该可以用了。
现在不知道esp8266与板子连接的spi是哪几个脚。
因为github上那个人用的不是8266的spi脚

这个是不是需要通过spi把8266的固件传过去后,8266才可以正常工作?我看这个代码里好像没有8266的固件。
这一步考虑没?

离线

楼主 #46 2020-04-25 11:30:53

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

xyyangkun 说:

这个是不是需要通过spi把8266的固件传过去后,8266才可以正常工作?我看这个代码里好像没有8266的固件。
这一步考虑没?

代码里有固件的,就是那3个.h文件

离线

楼主 #47 2020-04-25 22:06:56

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

里面是RK的IO操作
spi_stub.c

/*
 * Copyright (c) 2013 Espressif System.
 *
 *  sdio stub code for allwinner
 */
#include <asm/io.h>
#include <mach/irqs.h>
#include <mach/io.h>
#include <mach/iomux.h>
#include <mach/pmu.h>
#include <linux/gpio.h>
#include <asm/gpio.h>
#include <asm/mach/irq.h>
#include "linux/spi/spi.h"//#include "../drivers/spi/rk29_spim.h"

#include "esp_sif.h"

//#define SPI_FREQ (20000000)                             //  1. 22.5Mhz     2. 45Mhz
#define SPI_FREQ (30000000)                             //  1. 22.5Mhz     2. 45Mhz

//Below are for spi HZ 22.5M
#if (SPI_FREQ == 30000000)

#define CMD_RESP_SIZE   (10) //(50)    //Common respon wait time
#define DATA_RESP_SIZE_W   (142+45) // (1024*13)//   (1024*16)  //(398+400) // (1024*10)    //Only for Write bytes function, data write response.  max:(361+109) 
#define DATA_RESP_SIZE_R   (231+75) //  (340+102)  //(231+75)//(340+102)   //Only for Read bytes function, data write response    max:(340+102) 

#define BLOCK_W_DATA_RESP_SIZE_EACH          (10)           //For each data write resp size, in block write 
#define BLOCK_W_DATA_RESP_SIZE_FINAL (152) // (142+52)   //For final data write resp size, in block write ,max: 119

#define BLOCK_R_DATA_RESP_SIZE_1ST   (265)  // (231+75)    //For each data read resp size, in block read  ,max: 134
#define BLOCK_R_DATA_RESP_SIZE_EACH    (10)  // (20)   //For each data read resp size, in block read 

#elif(SPI_FREQ == 20000000)

#define CMD_RESP_SIZE (10)    //Common respon wait time
#define DATA_RESP_SIZE_W (103+40)    //Only for Write bytes function, data write response.  max: 103
#define DATA_RESP_SIZE_R (118+40)    //Only for Read bytes function, data write response  max: 118
//w: oxFF : 218 clock.     oxFE : 214 clock.  

#define BLOCK_W_DATA_RESP_SIZE_EACH          (20)           //For each data write resp size, in block write 
#define BLOCK_W_DATA_RESP_SIZE_FINAL     (112+40)    //For final data write resp size, in block write ,max :112

#define BLOCK_R_DATA_RESP_SIZE_1ST          (123+40)   //For each data read resp size, in block read ,max: 123
#define BLOCK_R_DATA_RESP_SIZE_EACH       (20)   //For each data read resp size, in block read 

#endif

//0xE5 ~0xFF  30us totoal 
//

struct spi_device_id esp_spi_id[] = {
        {"esp_spi_0", 0},
        {"esp_spi_1", 1},
        {},
};


#ifdef  REGISTER_SPI_BOARD_INFO

static struct spi_board_info esp_board_spi_devices[] = {       
        {
                .modalias  = "esp_spi_0",
                .bus_num = 0,   //0 or 1
                .max_speed_hz  = 18*1000*1000,
                .chip_select   = 0,             
                .mode   = SPI_MODE_3,
        },
};

void sif_platform_register_board_info(void) {
        spi_register_board_info(esp_board_spi_devices, ARRAY_SIZE(esp_board_spi_devices));
}
#endif  /*REGISTER_SPI_BOARD_INFO*/


#define RK30_GPIO0_BASE          RK2928_GPIO0_BASE
#define GPIO_NO                  RK30_PIN0_PA0
#define GPIO_BASE_ADDR           ((unsigned char __iomem *) RK30_GPIO0_BASE)
#define GPIO_INT_MASK_OFFSET     GPIO_INTEN
#define GPIO_INT_STAT_OFFSET     GPIO_PORTS_EOI

int sif_platform_get_irq_no(void)
{
	return gpio_to_irq(GPIO_NO);
}

int sif_platform_is_irq_occur(void)
{      
	return 1;
}

void sif_platform_irq_clear(void)
{
}

void sif_platform_irq_mask(int mask)
{
	if (mask)
		disable_irq_nosync(sif_platform_get_irq_no());
	else
		enable_irq(sif_platform_get_irq_no());
}

int sif_platform_irq_init(void)
{
	int ret;

	printk(KERN_ERR "%s enter\n", __func__);

	if ( (ret = gpio_request(GPIO_NO, "esp_spi_int")) != 0) {
		printk(KERN_ERR "request gpio error\n");
		return ret;
	}

	gpio_direction_input(GPIO_NO);

        sif_platform_irq_clear();
	sif_platform_irq_mask(1);

        udelay(1);

	return 0;
}


void sif_platform_irq_deinit(void)
{
	gpio_free(GPIO_NO);
}


void sif_platform_reset_target(void)
{
        gpio_direction_output(RK30_PIN1_PB3, GPIO_LOW);
        mdelay(200);
        gpio_direction_output(RK30_PIN1_PB3, GPIO_HIGH);
        mdelay(200);
}

void sif_platform_target_poweroff(void)
{
        gpio_direction_output(RK30_PIN1_PB3, GPIO_LOW);

}

void sif_platform_target_poweron(void)
{
        mdelay(200);
        gpio_direction_output(RK30_PIN1_PB3, GPIO_LOW);
        mdelay(200);
        gpio_direction_output(RK30_PIN1_PB3, GPIO_HIGH);
        mdelay(200);
}

void sif_platform_target_speed(int high_speed)
{
}

#ifdef ESP_ACK_INTERRUPT
void sif_platform_ack_interrupt(struct esp_pub *epub)
{
	sif_platform_irq_clear();
}
#endif //ESP_ACK_INTERRUPT


module_init(esp_spi_init);
module_exit(esp_spi_exit);
 

离线

楼主 #48 2020-04-25 22:07:32

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

里面应该是树莓派的IO操作
spi_stub.c

#define MHz (1000000)

/* https://www.signal.com.tr/pdf/cat/8n-esp8266_spi_reference_en_v1.0.pdf */

#define SPI_FREQ (10000000)
//#define SPI_FREQ (20000000)                             //  1. 22.5Mhz     2. 45Mhz
//#define SPI_FREQ (30000000)                             //  1. 22.5Mhz     2. 45Mhz

//Below are for spi HZ 22.5M
#if (SPI_FREQ == 30000000)

#define CMD_RESP_SIZE   (10) //(50)    //Common respon wait time
#define DATA_RESP_SIZE_W   (142+45) // (1024*13)//   (1024*16)  //(398+400) // (1024*10)    //Only for Write bytes function, data write response.  max:(361+109) 
#define DATA_RESP_SIZE_R   (231+75) //  (340+102)  //(231+75)//(340+102)   //Only for Read bytes function, data write response    max:(340+102) 

#define BLOCK_W_DATA_RESP_SIZE_EACH          (10)           //For each data write resp size, in block write 
#define BLOCK_W_DATA_RESP_SIZE_FINAL (152) // (142+52)   //For final data write resp size, in block write ,max: 119

#define BLOCK_R_DATA_RESP_SIZE_1ST   (265)  // (231+75)    //For each data read resp size, in block read  ,max: 134
#define BLOCK_R_DATA_RESP_SIZE_EACH    (10)  // (20)   //For each data read resp size, in block read 

#elif(SPI_FREQ == 20000000)

#define CMD_RESP_SIZE (10)    //Common respon wait time
#define DATA_RESP_SIZE_W (103+40)    //Only for Write bytes function, data write response.  max: 103
#define DATA_RESP_SIZE_R (118+40)    //Only for Read bytes function, data write response  max: 118
//w: oxFF : 218 clock.     oxFE : 214 clock.  

#define BLOCK_W_DATA_RESP_SIZE_EACH          (20)           //For each data write resp size, in block write 
#define BLOCK_W_DATA_RESP_SIZE_FINAL     (112+40)    //For final data write resp size, in block write ,max :112

#define BLOCK_R_DATA_RESP_SIZE_1ST          (123+40)   //For each data read resp size, in block read ,max: 123
#define BLOCK_R_DATA_RESP_SIZE_EACH       (20)   //For each data read resp size, in block read 
//0xE5 ~0xFF  30us totoal 

#elif (SPI_FREQ == 10000000)

#define CMD_RESP_SIZE 10
#define DATA_RESP_SIZE_W 99
#define DATA_RESP_SIZE_R 10

#define BLOCK_W_DATA_RESP_SIZE_EACH  30
#define BLOCK_W_DATA_RESP_SIZE_FINAL 152

#define BLOCK_R_DATA_RESP_SIZE_1ST   61
#define BLOCK_R_DATA_RESP_SIZE_EACH  30

#else /* Per 1*MHz */

#define CMD_RESP_SIZE                 (0*(SPI_FREQ/1000000)+10)
#define DATA_RESP_SIZE_W              (4.4*(SPI_FREQ/1000000)+55)
#define DATA_RESP_SIZE_R              (14.8*(SPI_FREQ/1000000)-138)

#define BLOCK_W_DATA_RESP_SIZE_EACH   (-1*(SPI_FREQ/1000000)+40)
#define BLOCK_W_DATA_RESP_SIZE_FINAL  (0*(SPI_FREQ/1000000)+152)

#define BLOCK_R_DATA_RESP_SIZE_1ST    (10.2*(SPI_FREQ/1000000)-41)
#define BLOCK_R_DATA_RESP_SIZE_EACH   (-1*(SPI_FREQ/1000000)+40)

#endif

/*
x per 10*MHz

CMD_RESP_SIZE                 0x+10
DATA_RESP_SIZE_W              44x+55
DATA_RESP_SIZE_R              148x-138
                              
BLOCK_W_DATA_RESP_SIZE_EACH   -10x+40
BLOCK_W_DATA_RESP_SIZE_FINAL  0x+152

BLOCK_R_DATA_RESP_SIZE_1ST    102x-41
BLOCK_R_DATA_RESP_SIZE_EACH   -10x+40
*/

#include "esp_sif.h"
#include "linux/interrupt.h"
#include "linux/spi/spi.h"
#include <linux/init.h>

#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/module.h>
#include <linux/moduleparam.h>

/* *** *** Board info *** *** */

struct spi_device_id esp_spi_id[] = { 
  {"ESP8089_0", 0},
  {"ESP8089_1", 1},
  {"ESP8089_2", 2},
  {},
};
MODULE_DEVICE_TABLE(spi, esp_spi_id);

static int esp_cs0_pin = 16;
module_param(esp_cs0_pin, int, 0);
MODULE_PARM_DESC(esp_cs0_pin, "SPI chip select zero");

#ifdef REGISTER_SPI_BOARD_INFO

#define MAX_SPEED_HZ (20*MHz)

static struct spi_master *master;
static struct spi_device *spi;

static struct spi_board_info esp_board_spi_devices[] = {
  {
    .modalias = "ESP8089_0",
    .max_speed_hz = MAX_SPEED_HZ,
    .bus_num = 0,
    .chip_select = 0,
    .mode = 0,
  },
};

void sif_platform_register_board_info(void) {
  //spi_register_board_info(esp_board_spi_devices, ARRAY_SIZE(esp_board_spi_devices));
}

struct spi_device* sif_platform_new_device(void) {
  master = spi_busnum_to_master(esp_board_spi_devices[0].bus_num);
  if(!master)
    printk("esp8089_spi: FAILED to find master\n");
  spi = spi_new_device( master, esp_board_spi_devices );
  if(!spi)
    printk("esp8089_spi: FAILED to create slave\n");
  printk("esp8089_spi: I will go dead\n");
  if(spi_setup(spi))
    printk("esp8089_spi: FAILED to setup slave\n"); 
  printk("esp8089_spi: I am OK\n");
  return spi;
}
#endif

/* *** *** Interrupt *** *** */

static int esp_interrupt = 26;
module_param(esp_interrupt, int, 0);
MODULE_PARM_DESC(esp_interrupt, "Interrupt pin");

int sif_platform_irq_init(void) { 
  int ret;

	printk(KERN_ERR "esp8089_spi: %s enter\n", __func__);

	if ( (ret = gpio_request(esp_interrupt, "esp_interrupt")) != 0) {
		printk(KERN_ERR "esp8089_spi: request gpio error\n");
		return ret;
	}
	gpio_direction_input(esp_interrupt);

  sif_platform_irq_clear();
	sif_platform_irq_mask(1);

  udelay(1);

	return 0;
}

void sif_platform_irq_deinit(void) {
	gpio_free(esp_interrupt);
}

int sif_platform_get_irq_no(void) { 
	return gpio_to_irq(esp_interrupt);
} 

int sif_platform_is_irq_occur(void) { 
  return 1;
}

void sif_platform_irq_clear(void) {

}

void sif_platform_irq_mask(int mask) {
	if (mask)
		disable_irq_nosync(sif_platform_get_irq_no());
	else
		enable_irq(sif_platform_get_irq_no());
}

void sif_platform_target_speed(int high_speed) {

}

#ifdef ESP_ACK_INTERRUPT
void sif_platform_ack_interrupt(struct esp_pub *epub) {
	sif_platform_irq_clear();
}
#endif

/* *** *** Platform power *** *** */

/* 
HSPI:
  GPIO12  HMISO
  GPIO13  HMOSI
  GPIO14  HSCLK
  GPIO15  HCS

SPI:
  GPIO6   SCLK
  GPIO7   MISO
  GPIO8   MOSI
  GPIO11  CS

SDIO:
  GPIO6   SDCLK
  GPIO7   SDD0
  GPIO8   SDD1
  GPIO9   SDD2
  GPIO10  SDD3
  GPIO11  SDCMD
*/

static int esp_reset_gpio = 13;
module_param(esp_reset_gpio, int, 0);
MODULE_PARM_DESC(esp_reset_gpio, "ESP8089 CHIP_EN GPIO number");

void sif_platform_reset_target(void) {
  gpio_request(esp_reset_gpio, "esp_reset_gpio");
  gpio_direction_output(esp_reset_gpio, 0);
  mdelay(200);
  gpio_direction_output(esp_reset_gpio, 1);
  mdelay(200);
  gpio_free(esp_reset_gpio);
}

void sif_platform_target_poweroff(void) {
  gpio_direction_output(esp_reset_gpio, 0);
}

void sif_platform_target_poweron(void) {
  gpio_request(esp_reset_gpio, "esp_reset_gpio");
  mdelay(200);
  gpio_direction_output(esp_reset_gpio, 0);
  mdelay(200);
  gpio_direction_output(esp_reset_gpio, 1);
  mdelay(200);
  gpio_free(esp_reset_gpio);
}

//module_init(esp_spi_init);
late_initcall(esp_spi_init);
module_exit(esp_spi_exit);

离线

楼主 #49 2020-04-25 22:18:55

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

那么,需要调的有2项,
1.找个IO用做esp_reset_gpio,然后参照驱动自己写.c操作IO,使用万用表测量IO状态,看是否能动。
2.连接spi的4个io到arduino 的adc脚,实时读取信号状态,打印到串口绘图器。挂载驱动模块,看是否有信号。

离线

楼主 #50 2020-04-25 22:19:37

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

有大佬做起了吗?
坑我已经挖好了。

离线

楼主 #51 2020-04-26 11:22:57

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

SPI 1MHz

# insmod esp8089-spi.ko
[   17.952847] esp8089_spi: loading out-of-tree module taints kernel.
[   18.004636] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   18.028754] esp8089_spi: poweron
[   18.650540] esp8089_spi: esp_spi_dummy_probe enter
[   18.674024] esp8089_spi: I will go dead
[   18.696104] esp8089_spi: I am OK
[   18.717387] esp8089_spi: register board OK
[   18.739441] esp8089_spi: sem_timeout = 0
[   18.971992] esp8089_spi: ESP8089 power up OK
[   18.994566] esp8089_spi: esp_spi_probe ENTER
[   19.016477] esp8089_spi: esp_setup_spi
[   19.037504] esp8089_spi: sif_spi_protocol_init
[   19.059051] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   19.101610] esp8089_spi: fail_count = 0
[   19.226331] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   19.367306] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   19.409756] esp8089_spi: fail_count = 1
[   19.533739] rx:[0x7e],[0x13],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.674991] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   19.717502] esp8089_spi: fail_count = 2
[   19.841174] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.982489] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   20.025333] esp8089_spi: fail_count = 3
[   20.149896] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.291597] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   20.334566] esp8089_spi: fail_count = 4
[   20.458476] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.600450] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   20.644036] esp8089_spi: fail_count = 5
[   20.768435] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.910754] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   20.954281] esp8089_spi: fail_count = 6
[   21.078735] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   21.221554] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   21.266070] esp8089_spi: fail_count = 7
[   21.391336] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   21.534522] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   21.579003] esp8089_spi: fail_count = 8
[   21.704930] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   21.848840] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   21.894883] esp8089_spi: fail_count = 9
[   22.021035] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   22.166974] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   22.215061] esp8089_spi: fail_count = 10
[   22.342137] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   22.489415] esp8089_spi: first error exit
[   22.513264] esp8089_spi: esp_spi_probe EXIT
[   22.537086] eagle: probe of spi0.0 failed with error -110
[   22.562279] esp8089_spi: sem_timeout = 0
[   22.585622] esp8089_spi: esp_spi_init err 0

离线

楼主 #52 2020-04-26 11:24:34

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

SPI 15MHz

# insmod esp8089-spi.ko
[   14.900929] esp8089_spi: loading out-of-tree module taints kernel.
[   14.952975] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   14.977090] esp8089_spi: poweron
[   15.598862] esp8089_spi: esp_spi_dummy_probe enter
[   15.622305] esp8089_spi: I will go dead
[   15.644433] esp8089_spi: I am OK
[   15.665721] esp8089_spi: register board OK
[   15.687822] esp8089_spi: sem_timeout = 0
[   15.921987] esp8089_spi: ESP8089 power up OK
[   15.944590] esp8089_spi: esp_spi_probe ENTER
[   15.966546] esp8089_spi: esp_setup_spi
[   15.987586] esp8089_spi: sif_spi_protocol_init
[   16.009206] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   16.051926] esp8089_spi: fail_count = 0
[   16.176664] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   16.317848] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   16.360380] esp8089_spi: fail_count = 1
[   16.484384] rx:[0x7e],[0x13],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   16.625686] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   16.668282] esp8089_spi: fail_count = 2
[   16.792084] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   16.933510] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   16.976461] esp8089_spi: fail_count = 3
[   17.100712] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   17.242400] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   17.285400] esp8089_spi: fail_count = 4
[   17.409749] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   17.551823] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   17.595541] esp8089_spi: fail_count = 5
[   17.719894] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   17.862428] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   17.906287] esp8089_spi: fail_count = 6
[   18.030713] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   18.173591] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   18.218119] esp8089_spi: fail_count = 7
[   18.343120] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   18.486304] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   18.530786] esp8089_spi: fail_count = 8
[   18.655660] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   18.799412] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   18.845437] esp8089_spi: fail_count = 9
[   18.971166] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.117060] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   19.165190] esp8089_spi: fail_count = 10
[   19.292546] rx:[0xff],[0xfe],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.439672] esp8089_spi: first error exit
[   19.463473] esp8089_spi: esp_spi_probe EXIT
[   19.487289] eagle: probe of spi0.0 failed with error -110
[   19.512469] esp8089_spi: sem_timeout = 0
[   19.535793] esp8089_spi: esp_spi_init err 0

离线

楼主 #53 2020-04-26 11:35:12

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

目前卡住的位置,还没有达到把固件上传到wifi模块那一步

static int esp_spi_probe(struct spi_device *spi) 
{
        int err;
        struct esp_pub *epub;
        struct esp_spi_ctrl *sctrl;

  printk("esp8089_spi: %s ENTER\n", __func__);

        //esp_dbg(ESP_DBG_ERROR, "esp8089_spi: %s enter\n", __func__);

/* -------------------------------------------------------------------------- */

	err = esp_setup_spi(spi);

	if (err) {
		esp_dbg(ESP_DBG_ERROR, "esp8089_spi: %s setup_spi error[%d]\n", __func__, err);
                if(sif_sdio_state == ESP_SDIO_STATE_FIRST_INIT)
			goto _err_spi;
		else
			goto _err_second_init;
	}
	//esp_dbg(ESP_DBG_ERROR, "esp8089_spi: %s init_protocol\n", __func__);

/* -------------------------------------------------------------------------- */

	err = sif_spi_protocol_init(spi);//在这卡住了 @@@@@@@

	if(err) {
    if(sif_sdio_state == ESP_SDIO_STATE_FIRST_INIT)
			goto _err_spi;
		else
			goto _err_second_init;
	}

	if(sif_sdio_state == ESP_SDIO_STATE_FIRST_INIT){
		sctrl = kzalloc(sizeof(struct esp_spi_ctrl), GFP_KERNEL);

		if (sctrl == NULL) {
                	err = -ENOMEM;
			goto _err_spi;
		}

		/* temp buffer reserved for un-dma-able request */
		sctrl->dma_buffer = kzalloc(ESP_DMA_IBUFSZ, GFP_KERNEL);

离线

楼主 #54 2020-04-26 11:40:32

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

离线

楼主 #55 2020-04-26 11:42:03

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

离线

楼主 #56 2020-04-26 16:08:38

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

什么鬼??

[   21.298456] esp8089_spi: esp_pub_init_all
[   21.324239] esp8089_spi: downloadesp_download_fw
[   21.457072] random: crng init done
[   21.871575] esp8089_spi: sif_platform_irq_init enter
[   21.898407] esp8089_spi: sif sif_enable_irq failed
[   32.481935] resetting event timeout
[   32.506446] esp8089_spi: esp_init_all failed: -110
[   32.532108] esp8089_spi: first error exit
[   32.556646] esp8089_spi: esp_spi_probe EXIT
[   32.581431] esp8089_spi: sem_timeout = 0
[   32.605472] esp8089_spi: esp_spi_init err 0

离线

楼主 #57 2020-04-26 16:09:29

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

看起来固件是下进去了,但是中断脚设置不行,还得研究一下中断脚

离线

楼主 #58 2020-04-26 16:23:29

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

woc,是不是起来了呀,CS脚工作起来了好像一直在运行,,
首先对比一下/dev目录的东西,挂载前和挂载后,
挂载前的/dev

# ls
adsp                ptyv8               ttyda
audio               ptyv9               ttydb
console             ptyva               ttydc
cpu_dma_latency     ptyvb               ttydd
dri                 ptyvc               ttyde
dsp                 ptyvd               ttydf
fb0                 ptyve               ttye0
full                ptyvf               ttye1
gpiochip0           ptyw0               ttye2
kmsg                ptyw1               ttye3
log                 ptyw2               ttye4
mem                 ptyw3               ttye5
memory_bandwidth    ptyw4               ttye6
mixer               ptyw5               ttye7
mmcblk0             ptyw6               ttye8
mmcblk0p1           ptyw7               ttye9
mmcblk0p2           ptyw8               ttyea
network_latency     ptyw9               ttyeb
network_throughput  ptywa               ttyec
null                ptywb               ttyed
ptmx                ptywc               ttyee
pts                 ptywd               ttyef
ptya0               ptywe               ttyp0
ptya1               ptywf               ttyp1
ptya2               ptyx0               ttyp2
ptya3               ptyx1               ttyp3
ptya4               ptyx2               ttyp4
ptya5               ptyx3               ttyp5
ptya6               ptyx4               ttyp6
ptya7               ptyx5               ttyp7
ptya8               ptyx6               ttyp8
ptya9               ptyx7               ttyp9
ptyaa               ptyx8               ttypa
ptyab               ptyx9               ttypb
ptyac               ptyxa               ttypc
ptyad               ptyxb               ttypd
ptyae               ptyxc               ttype
ptyaf               ptyxd               ttypf
ptyb0               ptyxe               ttyq0
ptyb1               ptyxf               ttyq1
ptyb2               ptyy0               ttyq2
ptyb3               ptyy1               ttyq3
ptyb4               ptyy2               ttyq4
ptyb5               ptyy3               ttyq5
ptyb6               ptyy4               ttyq6
ptyb7               ptyy5               ttyq7
ptyb8               ptyy6               ttyq8
ptyb9               ptyy7               ttyq9
ptyba               ptyy8               ttyqa
ptybb               ptyy9               ttyqb
ptybc               ptyya               ttyqc
ptybd               ptyyb               ttyqd
ptybe               ptyyc               ttyqe
ptybf               ptyyd               ttyqf
ptyc0               ptyye               ttyr0
ptyc1               ptyyf               ttyr1
ptyc2               ptyz0               ttyr2
ptyc3               ptyz1               ttyr3
ptyc4               ptyz2               ttyr4
ptyc5               ptyz3               ttyr5
ptyc6               ptyz4               ttyr6
ptyc7               ptyz5               ttyr7
ptyc8               ptyz6               ttyr8
ptyc9               ptyz7               ttyr9
ptyca               ptyz8               ttyra
ptycb               ptyz9               ttyrb
ptycc               ptyza               ttyrc
ptycd               ptyzb               ttyrd
ptyce               ptyzc               ttyre
ptycf               ptyzd               ttyrf
ptyd0               ptyze               ttys0
ptyd1               ptyzf               ttys1
ptyd2               random              ttys2
ptyd3               shm                 ttys3
ptyd4               snd                 ttys4
ptyd5               tty                 ttys5
ptyd6               tty0                ttys6
ptyd7               tty1                ttys7
ptyd8               tty10               ttys8
ptyd9               tty11               ttys9
ptyda               tty12               ttysa
ptydb               tty13               ttysb
ptydc               tty14               ttysc
ptydd               tty15               ttysd
ptyde               tty16               ttyse
ptydf               tty17               ttysf
ptye0               tty18               ttyt0
ptye1               tty19               ttyt1
ptye2               tty2                ttyt2
ptye3               tty20               ttyt3
ptye4               tty21               ttyt4
ptye5               tty22               ttyt5
ptye6               tty23               ttyt6
ptye7               tty24               ttyt7
ptye8               tty25               ttyt8
ptye9               tty26               ttyt9
ptyea               tty27               ttyta
ptyeb               tty28               ttytb
ptyec               tty29               ttytc
ptyed               tty3                ttytd
ptyee               tty30               ttyte
ptyef               tty31               ttytf
ptyp0               tty32               ttyu0
ptyp1               tty33               ttyu1
ptyp2               tty34               ttyu2
ptyp3               tty35               ttyu3
ptyp4               tty36               ttyu4
ptyp5               tty37               ttyu5
ptyp6               tty38               ttyu6
ptyp7               tty39               ttyu7
ptyp8               tty4                ttyu8
ptyp9               tty40               ttyu9
ptypa               tty41               ttyua
ptypb               tty42               ttyub
ptypc               tty43               ttyuc
ptypd               tty44               ttyud
ptype               tty45               ttyue
ptypf               tty46               ttyuf
ptyq0               tty47               ttyv0
ptyq1               tty48               ttyv1
ptyq2               tty49               ttyv2
ptyq3               tty5                ttyv3
ptyq4               tty50               ttyv4
ptyq5               tty51               ttyv5
ptyq6               tty52               ttyv6
ptyq7               tty53               ttyv7
ptyq8               tty54               ttyv8
ptyq9               tty55               ttyv9
ptyqa               tty56               ttyva
ptyqb               tty57               ttyvb
ptyqc               tty58               ttyvc
ptyqd               tty59               ttyvd
ptyqe               tty6                ttyve
ptyqf               tty60               ttyvf
ptyr0               tty61               ttyw0
ptyr1               tty62               ttyw1
ptyr2               tty63               ttyw2
ptyr3               tty7                ttyw3
ptyr4               tty8                ttyw4
ptyr5               tty9                ttyw5
ptyr6               ttyS0               ttyw6
ptyr7               ttyS1               ttyw7
ptyr8               ttyS2               ttyw8
ptyr9               ttyS3               ttyw9
ptyra               ttyS4               ttywa
ptyrb               ttyS5               ttywb
ptyrc               ttyS6               ttywc
ptyrd               ttyS7               ttywd
ptyre               ttya0               ttywe
ptyrf               ttya1               ttywf
ptys0               ttya2               ttyx0
ptys1               ttya3               ttyx1
ptys2               ttya4               ttyx2
ptys3               ttya5               ttyx3
ptys4               ttya6               ttyx4
ptys5               ttya7               ttyx5
ptys6               ttya8               ttyx6
ptys7               ttya9               ttyx7
ptys8               ttyaa               ttyx8
ptys9               ttyab               ttyx9
ptysa               ttyac               ttyxa
ptysb               ttyad               ttyxb
ptysc               ttyae               ttyxc
ptysd               ttyaf               ttyxd
ptyse               ttyb0               ttyxe
ptysf               ttyb1               ttyxf
ptyt0               ttyb2               ttyy0
ptyt1               ttyb3               ttyy1
ptyt2               ttyb4               ttyy2
ptyt3               ttyb5               ttyy3
ptyt4               ttyb6               ttyy4
ptyt5               ttyb7               ttyy5
ptyt6               ttyb8               ttyy6
ptyt7               ttyb9               ttyy7
ptyt8               ttyba               ttyy8
ptyt9               ttybb               ttyy9
ptyta               ttybc               ttyya
ptytb               ttybd               ttyyb
ptytc               ttybe               ttyyc
ptytd               ttybf               ttyyd
ptyte               ttyc0               ttyye
ptytf               ttyc1               ttyyf
ptyu0               ttyc2               ttyz0
ptyu1               ttyc3               ttyz1
ptyu2               ttyc4               ttyz2
ptyu3               ttyc5               ttyz3
ptyu4               ttyc6               ttyz4
ptyu5               ttyc7               ttyz5
ptyu6               ttyc8               ttyz6
ptyu7               ttyc9               ttyz7
ptyu8               ttyca               ttyz8
ptyu9               ttycb               ttyz9
ptyua               ttycc               ttyza
ptyub               ttycd               ttyzb
ptyuc               ttyce               ttyzc
ptyud               ttycf               ttyzd
ptyue               ttyd0               ttyze
ptyuf               ttyd1               ttyzf
ptyv0               ttyd2               urandom
ptyv1               ttyd3               vcs
ptyv2               ttyd4               vcs1
ptyv3               ttyd5               vcsa
ptyv4               ttyd6               vcsa1
ptyv5               ttyd7               vcsu
ptyv6               ttyd8               vcsu1
ptyv7               ttyd9               zero

挂载后的/dev

# ls /dev/
adsp                ptyv8               ttyda
audio               ptyv9               ttydb
console             ptyva               ttydc
cpu_dma_latency     ptyvb               ttydd
dri                 ptyvc               ttyde
dsp                 ptyvd               ttydf
fb0                 ptyve               ttye0
full                ptyvf               ttye1
gpiochip0           ptyw0               ttye2
kmsg                ptyw1               ttye3
log                 ptyw2               ttye4
mem                 ptyw3               ttye5
memory_bandwidth    ptyw4               ttye6
mixer               ptyw5               ttye7
mmcblk0             ptyw6               ttye8
mmcblk0p1           ptyw7               ttye9
mmcblk0p2           ptyw8               ttyea
network_latency     ptyw9               ttyeb
network_throughput  ptywa               ttyec
null                ptywb               ttyed
ptmx                ptywc               ttyee
pts                 ptywd               ttyef
ptya0               ptywe               ttyp0
ptya1               ptywf               ttyp1
ptya2               ptyx0               ttyp2
ptya3               ptyx1               ttyp3
ptya4               ptyx2               ttyp4
ptya5               ptyx3               ttyp5
ptya6               ptyx4               ttyp6
ptya7               ptyx5               ttyp7
ptya8               ptyx6               ttyp8
ptya9               ptyx7               ttyp9
ptyaa               ptyx8               ttypa
ptyab               ptyx9               ttypb
ptyac               ptyxa               ttypc
ptyad               ptyxb               ttypd
ptyae               ptyxc               ttype
ptyaf               ptyxd               ttypf
ptyb0               ptyxe               ttyq0
ptyb1               ptyxf               ttyq1
ptyb2               ptyy0               ttyq2
ptyb3               ptyy1               ttyq3
ptyb4               ptyy2               ttyq4
ptyb5               ptyy3               ttyq5
ptyb6               ptyy4               ttyq6
ptyb7               ptyy5               ttyq7
ptyb8               ptyy6               ttyq8
ptyb9               ptyy7               ttyq9
ptyba               ptyy8               ttyqa
ptybb               ptyy9               ttyqb
ptybc               ptyya               ttyqc
ptybd               ptyyb               ttyqd
ptybe               ptyyc               ttyqe
ptybf               ptyyd               ttyqf
ptyc0               ptyye               ttyr0
ptyc1               ptyyf               ttyr1
ptyc2               ptyz0               ttyr2
ptyc3               ptyz1               ttyr3
ptyc4               ptyz2               ttyr4
ptyc5               ptyz3               ttyr5
ptyc6               ptyz4               ttyr6
ptyc7               ptyz5               ttyr7
ptyc8               ptyz6               ttyr8
ptyc9               ptyz7               ttyr9
ptyca               ptyz8               ttyra
ptycb               ptyz9               ttyrb
ptycc               ptyza               ttyrc
ptycd               ptyzb               ttyrd
ptyce               ptyzc               ttyre
ptycf               ptyzd               ttyrf
ptyd0               ptyze               ttys0
ptyd1               ptyzf               ttys1
ptyd2               random              ttys2
ptyd3               shm                 ttys3
ptyd4               snd                 ttys4
ptyd5               tty                 ttys5
ptyd6               tty0                ttys6
ptyd7               tty1                ttys7
ptyd8               tty10               ttys8
ptyd9               tty11               ttys9
ptyda               tty12               ttysa
ptydb               tty13               ttysb
ptydc               tty14               ttysc
ptydd               tty15               ttysd
ptyde               tty16               ttyse
ptydf               tty17               ttysf
ptye0               tty18               ttyt0
ptye1               tty19               ttyt1
ptye2               tty2                ttyt2
ptye3               tty20               ttyt3
ptye4               tty21               ttyt4
ptye5               tty22               ttyt5
ptye6               tty23               ttyt6
ptye7               tty24               ttyt7
ptye8               tty25               ttyt8
ptye9               tty26               ttyt9
ptyea               tty27               ttyta
ptyeb               tty28               ttytb
ptyec               tty29               ttytc
ptyed               tty3                ttytd
ptyee               tty30               ttyte
ptyef               tty31               ttytf
ptyp0               tty32               ttyu0
ptyp1               tty33               ttyu1
ptyp2               tty34               ttyu2
ptyp3               tty35               ttyu3
ptyp4               tty36               ttyu4
ptyp5               tty37               ttyu5
ptyp6               tty38               ttyu6
ptyp7               tty39               ttyu7
ptyp8               tty4                ttyu8
ptyp9               tty40               ttyu9
ptypa               tty41               ttyua
ptypb               tty42               ttyub
ptypc               tty43               ttyuc
ptypd               tty44               ttyud
ptype               tty45               ttyue
ptypf               tty46               ttyuf
ptyq0               tty47               ttyv0
ptyq1               tty48               ttyv1
ptyq2               tty49               ttyv2
ptyq3               tty5                ttyv3
ptyq4               tty50               ttyv4
ptyq5               tty51               ttyv5
ptyq6               tty52               ttyv6
ptyq7               tty53               ttyv7
ptyq8               tty54               ttyv8
ptyq9               tty55               ttyv9
ptyqa               tty56               ttyva
ptyqb               tty57               ttyvb
ptyqc               tty58               ttyvc
ptyqd               tty59               ttyvd
ptyqe               tty6                ttyve
ptyqf               tty60               ttyvf
ptyr0               tty61               ttyw0
ptyr1               tty62               ttyw1
ptyr2               tty63               ttyw2
ptyr3               tty7                ttyw3
ptyr4               tty8                ttyw4
ptyr5               tty9                ttyw5
ptyr6               ttyS0               ttyw6
ptyr7               ttyS1               ttyw7
ptyr8               ttyS2               ttyw8
ptyr9               ttyS3               ttyw9
ptyra               ttyS4               ttywa
ptyrb               ttyS5               ttywb
ptyrc               ttyS6               ttywc
ptyrd               ttyS7               ttywd
ptyre               ttya0               ttywe
ptyrf               ttya1               ttywf
ptys0               ttya2               ttyx0
ptys1               ttya3               ttyx1
ptys2               ttya4               ttyx2
ptys3               ttya5               ttyx3
ptys4               ttya6               ttyx4
ptys5               ttya7               ttyx5
ptys6               ttya8               ttyx6
ptys7               ttya9               ttyx7
ptys8               ttyaa               ttyx8
ptys9               ttyab               ttyx9
ptysa               ttyac               ttyxa
ptysb               ttyad               ttyxb
ptysc               ttyae               ttyxc
ptysd               ttyaf               ttyxd
ptyse               ttyb0               ttyxe
ptysf               ttyb1               ttyxf
ptyt0               ttyb2               ttyy0
ptyt1               ttyb3               ttyy1
ptyt2               ttyb4               ttyy2
ptyt3               ttyb5               ttyy3
ptyt4               ttyb6               ttyy4
ptyt5               ttyb7               ttyy5
ptyt6               ttyb8               ttyy6
ptyt7               ttyb9               ttyy7
ptyt8               ttyba               ttyy8
ptyt9               ttybb               ttyy9
ptyta               ttybc               ttyya
ptytb               ttybd               ttyyb
ptytc               ttybe               ttyyc
ptytd               ttybf               ttyyd
ptyte               ttyc0               ttyye
ptytf               ttyc1               ttyyf
ptyu0               ttyc2               ttyz0
ptyu1               ttyc3               ttyz1
ptyu2               ttyc4               ttyz2
ptyu3               ttyc5               ttyz3
ptyu4               ttyc6               ttyz4
ptyu5               ttyc7               ttyz5
ptyu6               ttyc8               ttyz6
ptyu7               ttyc9               ttyz7
ptyu8               ttyca               ttyz8
ptyu9               ttycb               ttyz9
ptyua               ttycc               ttyza
ptyub               ttycd               ttyzb
ptyuc               ttyce               ttyzc
ptyud               ttycf               ttyzd
ptyue               ttyd0               ttyze
ptyuf               ttyd1               ttyzf
ptyv0               ttyd2               urandom
ptyv1               ttyd3               vcs
ptyv2               ttyd4               vcs1
ptyv3               ttyd5               vcsa
ptyv4               ttyd6               vcsa1
ptyv5               ttyd7               vcsu
ptyv6               ttyd8               vcsu1
ptyv7               ttyd9               zero

挂载完整打印信息如下:

# modprobe esp8089-spi.ko
[   95.688812] esp8089_spi: loading out-of-tree module taints kernel.
[   95.741441] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   95.765422] esp8089_spi: poweron
[   96.387139] esp8089_spi: esp_spi_dummy_probe enter
[   96.410540] esp8089_spi: I will go dead
[   96.432614] esp8089_spi: I am OK
[   96.453823] esp8089_spi: register board OK
[   96.475790] esp8089_spi: sem_timeout = 0
[   96.712043] esp8089_spi: ESP8089 power up OK
[   96.734478] esp8089_spi: esp_spi_probe ENTER
[   96.756241] esp8089_spi: esp_setup_spi
[   96.777099] esp8089_spi: sif_spi_protocol_init
[   96.798455] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   96.840698] esp8089_spi: fail_count = 0
[   96.965062] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   97.105917] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   97.148312] esp8089_spi: fail_count = 1
[   97.273686] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   97.414738] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   97.456957] esp8089_spi: fail_count = 2
[   97.580939] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   98.221376] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1578
[   98.266542] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   98.807767] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1591
[   98.853626] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   99.395096] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1603
[   99.441481] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   99.983821] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1617
[  100.030828] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  100.574038] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1630
[  100.620951] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  101.164762] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1643
[  101.213307] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  101.757707] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  101.805890] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  102.350613] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  102.400344] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  102.946778] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  102.997877] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  103.546238] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  103.599613] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  104.149105] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  104.202882] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  104.752619] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  104.806487] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  105.356591] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  105.410714] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  105.961113] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  106.015706] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  106.566018] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1668
[  106.620083] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  106.671116] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1681
[  106.725178] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  106.776159] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1694
[  106.830105] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  107.885182] esp8089_spi: esp_pub_init_all
[  107.910962] esp8089_spi: downloadesp_download_fw
[  107.948002] random: crng init done
[  108.457730] esp8089_spi: sif_platform_irq_init enter
[  108.682929] esp_host:bdf5087c3deb
[  108.682929] esp_target: e826c2b3c9fd 57 18202
[  108.682929]
[  108.754269] esp_readwrite_file: file /system/lib/modules/test_results filp_open error
[  108.807356] esp8089_spi: first normal exit
[  108.832108] esp8089_spi: esp_spi_probe EXIT
[  108.856864] esp8089_spi: sem_timeout = 0
[  108.880921] esp8089_spi: esp_spi_remove
[  109.022172] esp8089_spi: esp_spi_probe ENTER
[  109.046057] esp8089_spi: esp_setup_spi
[  109.069029] esp8089_spi: sif_spi_protocol_init
[  109.092510] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[  109.138970] esp8089_spi: fail_count = 0
[  109.265424] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  109.410344] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[  109.456558] esp8089_spi: fail_count = 1
[  109.582142] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  109.726810] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[  109.772626] esp8089_spi: fail_count = 2
[  109.897947] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  110.541520] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1578
[  110.589422] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[  111.133165] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1591
[  111.180911] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[  111.724615] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1603
[  111.772396] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  112.316162] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1617
[  112.363925] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  112.907706] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1630
[  112.955502] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  113.499256] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1643
[  113.546952] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  114.091379] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  114.140416] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  114.685987] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  114.735674] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  115.282003] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  115.333521] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  115.881856] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  115.934723] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  116.484208] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  116.537977] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  117.087691] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  117.141635] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  117.691596] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  117.745683] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  118.296061] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[  118.350494] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  118.900869] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1668
[  118.955132] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  119.006037] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1681
[  119.060398] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  119.111387] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1694
[  119.165337] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[  120.219675] esp8089_spi: esp_pub_init_all
[  120.245395] esp8089_spi: downloadesp_download_fw
[  120.878445] esp8089_spi: sif_platform_irq_init enter
[  120.935677] esp8089_spi: esp_spi_probe EXIT
[  120.961321] esp8089_spi: esp_spi_init err 0
[  120.992229] esp_host:bdf5087c3deb
[  120.992229] esp_target: e826c2b3c9fd 57 18202
[  120.992229]

离线

楼主 #59 2020-04-26 16:30:34

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

请问,这是跑起来了吗?

# ifconfig wlan0 up
[  569.902089] esp_op_add_interface STA
# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          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 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr AC:D0:74:70:73:35
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#

离线

楼主 #60 2020-04-26 16:36:48

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

先简单总结一下把,
1.要改为SPI模式
2.spi的模式要选对
3.需要2个IO
4.需要配置中断脚
5.

离线

#61 2020-04-26 16:46:52

hameyou
会员
注册时间: 2018-04-15
已发帖子: 197
积分: 4.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

楼主真有耐心,不错赞一个

离线

楼主 #62 2020-04-26 17:04:18

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

大佬告诉我配置wifi用iw,,装一个

离线

楼主 #63 2020-04-26 17:25:04

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

能搜到WIFI了

离线

#64 2020-04-26 20:19:45

XZHDJH
会员
注册时间: 2020-01-18
已发帖子: 37
积分: 37

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

拾柴来了

离线

楼主 #65 2020-04-26 21:15:00

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

iw只能连接无密码的WIFI,现在的wifi协议不支持

# iw wlan0 connect huawei3
# [  723.742594] wlan0: authenticate with e0:a3:ac:1d:7d:5b
[  723.768122] wlan0: send auth to e0:a3:ac:1d:7d:5b (try 1/3)
[  723.823034] wlan0: authenticated
[  723.852631] wlan0: associate with e0:a3:ac:1d:7d:5b (try 1/3)
[  723.908738] wlan0: RX AssocResp from e0:a3:ac:1d:7d:5b (capab=0x401 status=0 aid=1)
[  723.955519] wlan0: associated
[  723.979399] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

连上了我手机的热点

离线

楼主 #66 2020-04-26 21:26:35

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

同一局域网可以互相ping,但是没有dns东西,没放访问外网

离线

楼主 #67 2020-04-26 22:10:02

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

buildroot制作出来的最小rootfs真是啥都缺.....

离线

楼主 #68 2020-04-26 22:21:36

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

# while [ 1 ]; do
> data;wget ftp://192.168.43.1:3721/Downloads/DKTool_0229.rar -O /dev/null ;data
;
> done;

离线

楼主 #69 2020-04-26 22:27:25

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

QQ截图20200426222516.png
使用wget 下载手机ftp的DKTool文件
手机显示的速度大约在350KB/S,
我使用SPI的速度是1MHZ

离线

#70 2020-04-27 00:19:29

hzqlz
会员
注册时间: 2018-03-23
已发帖子: 170
积分: 148

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

厉害厉害,持续关注,我一直用ESP8266做开发,还没有大佬这钻研精神

离线

楼主 #71 2020-04-27 07:48:31

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

#cd /lib/modules/5.2.0-licheepi-nano/
#modprobe esp8089-spi.ko
#ifconfig wlan0 up
#iw wlan0 connect huawei3
#ifconfig wlan0 192.168.43.45
# while [ 1 ]; do
> data;wget ftp://192.168.43.1:3721/Downloads/DKTool_0229.rar -O /dev/null ;data;
> done;

离线

楼主 #72 2020-04-27 07:50:19

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

原来昨天测试350KB/s的SPI速度是10MHz,
今天测试了一下30MHz,在800KB/S左右

离线

楼主 #73 2020-04-27 07:59:03

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

50MHz的SPI 初始化失败,
不能超30MHz,

最近编辑记录 迪卡 (2020-04-27 08:02:38)

离线

楼主 #74 2020-04-27 08:28:23

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

QQ截图20200427082723.png
使用30MHz SPI
小测,
中间断了一次是因为手机APP退到了后台

离线

楼主 #75 2020-04-27 08:30:16

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

QQ图片20200427082951.jpg

离线

#76 2020-04-27 08:39:11

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡再把微信配网搞定, 配合F1C100s, 做些不在乎功耗的物联网产品竞争力还是蛮强的。

离线

#77 2020-04-27 11:51:39

路人甲
会员
注册时间: 2017-09-07
已发帖子: 202
积分: 199.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

这个驱动稳定性如何?我记得前面的帖子里面的驱动三下五除二就挂了,基本没有找到稳定的。

离线

楼主 #78 2020-04-27 12:35:35

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

路人甲 说:

这个驱动稳定性如何?我记得前面的帖子里面的驱动三下五除二就挂了,基本没有找到稳定的。

晚上我挂一着试试,目前来说,ftp下载文件还是挺稳定的,下了几十轮都没事。

离线

楼主 #79 2020-04-27 12:38:26

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

创建一个方便用的文件系统,免得缺什么都要去重新buildroot,太麻烦了。
就用debian吧,
debian分很多版本
9 stretch
8 jessie
7 wheezy
6 squeeze
5 lenny
4 etch

sudo apt-get install debootstrap
debootstrap --foreign --verbose --arch=armel  jessie rootfs http://ftp2.cn.debian.org/debian

离线

楼主 #80 2020-04-27 12:43:42

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

离线

楼主 #81 2020-04-27 21:56:51

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

离线

楼主 #82 2020-04-27 22:07:47

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

QQ截图20200427220710.png

不会玩,连密码都不会改,太难了

离线

楼主 #83 2020-04-27 23:00:26

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

26ceccd9c504f699.png


安装晕哥给的帖子的教程,debian跑起来了。
但是我的文件系统中的udhcp有问题,所以还不能访问外网,明天研究一下,可以访问外网的话就可以apt了

离线

#84 2020-04-27 23:10:15

jiangming1399
会员
注册时间: 2018-06-14
已发帖子: 113
积分: 113

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

root密码必须在设定rootfs的时候弄,不然空密码很可能进不去;现在已经有Debian10Buster了,为啥不用最新的呢

离线

#85 2020-04-27 23:50:55

ifree64
会员
注册时间: 2019-06-27
已发帖子: 74
积分: 143.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

支持一下大佬!不能支持wpa密码的WiFi吗?

离线

楼主 #86 2020-04-28 08:41:57

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

QQ截图20200428084113.png
dhcp搞好了,可以上网APT了

离线

楼主 #87 2020-04-30 22:34:10

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

离线

#88 2020-04-30 22:43:42

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪神牛叉





离线

#89 2020-05-01 19:47:03

xyyangkun
会员
注册时间: 2018-03-14
已发帖子: 18
积分: 17

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

1. 可以用iperf测试这个网卡的收发数据的性能。
2. esp8266的 GPIO15/MTDO  必需是拉高的状态吗?

离线

#90 2020-05-03 17:24:37

xyyangkun
会员
注册时间: 2018-03-14
已发帖子: 18
积分: 17

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

请问,想用这个spi接8266,一定要把flash焊掉吗?我这边用的nodemcu, 拆壳比较费劲!!

离线

楼主 #91 2020-05-03 18:47:48

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

xyyangkun 说:

1. 可以用iperf测试这个网卡的收发数据的性能。
2. esp8266的 GPIO15/MTDO  必需是拉高的状态吗?

我用了iperf,基本上10Mbps,拉不拉高可以试试

离线

楼主 #92 2020-05-03 19:26:57

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

xyyangkun 说:

请问,想用这个spi接8266,一定要把flash焊掉吗?我这边用的nodemcu, 拆壳比较费劲!!

我也是nodemcu,拆下来的模块,拆掉了壳

离线

#93 2020-05-07 04:56:43

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪神NB
我尝试在openwrt跑跑看,不知道能不能长期用,还有就是8266在这种工作模式下的休眠和唤醒会不会有问题

离线

楼主 #94 2020-05-07 07:34:45

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

ma6254 说:

迪神NB
我尝试在openwrt跑跑看,不知道能不能长期用,还有就是8266在这种工作模式下的休眠和唤醒会不会有问题

休眠??老子不让他休眠

离线

#95 2020-05-08 09:43:21

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪神,我搞到这里了,接下去怎么搞,要搞中断口或者EN口吗?

root@OpenWrt:~# insmod esp8089-spi.ko
[   19.267713] esp8089_spi: loading out-of-tree module taints kernel.
[   19.276448] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   19.882064] esp8089_spi: esp_spi_dummy_probe enter
[   19.886991] esp8089_spi: register board OK
[   19.891086] esp8089_spi: sem_timeout = 0
[   20.105470] esp8089_spi: ESP8089 power up OK
[   20.110065] esp8089_spi: esp_spi_probe ENTER
[   20.114338] esp8089_spi: esp_setup_spi
[   20.118173] esp8089_spi: sif_spi_protocol_init
[   20.122617] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   20.129245] esp8089_spi: fail_count = 0
[   20.234938] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   20.342720] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   20.349337] esp8089_spi: fail_count = 1
[   20.454818] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   20.562585] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   20.569200] esp8089_spi: fail_count = 2
[   20.674696] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   20.782472] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   20.789088] esp8089_spi: fail_count = 3
[   20.894560] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   21.002336] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   21.008951] esp8089_spi: fail_count = 4
[   21.114433] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   21.222210] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   21.228827] esp8089_spi: fail_count = 5
[   21.334298] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   21.442086] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   21.448703] esp8089_spi: fail_count = 6
[   21.556023] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   21.663783] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   21.670398] esp8089_spi: fail_count = 7
[   21.775866] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   21.883617] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   21.890231] esp8089_spi: fail_count = 8
[   21.995690] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   22.103444] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   22.110060] esp8089_spi: fail_count = 9
[   22.215553] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   22.323312] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   22.329926] esp8089_spi: fail_count = 10
[   22.437331] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   22.545097] esp8089_spi: first error exit
[   22.549127] esp8089_spi: esp_spi_probe EXIT
[   22.553342] eagle: probe of spi0.0 failed with error -110
[   22.558887] esp8089_spi: sem_timeout = 0
[   22.562811] esp8089_spi: esp_spi_init err 0
root@OpenWrt:~#

离线

#96 2020-05-08 09:58:53

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我看到加载驱动的时候可以指定参数,比如说中断口
我的板子是荔枝zero,想用PB5作为中断口,但是他对应的参数是int型的

/* *** *** Interrupt *** *** */

static int esp_interrupt = 26;
module_param(esp_interrupt, int, 0);
MODULE_PARM_DESC(esp_interrupt, "Interrupt pin");
root@OpenWrt:~# insmod esp8089-spi.ko esp_interrupt=PB5
[   25.373115] esp8089_spi: loading out-of-tree module taints kernel.
[   25.381419] esp8089_spi: `PB5' invalid for parameter `esp_interrupt'

离线

#97 2020-05-08 10:00:12

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

_20200508095940.jpg

离线

楼主 #98 2020-05-08 11:54:06

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

那你算一下PB5是多少呀
A是0
B是32
32+5

离线

#99 2020-05-08 15:40:29

mysteryli
会员
注册时间: 2020-03-05
已发帖子: 486
积分: 391
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

牛逼

离线

#100 2020-05-08 16:51:32

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡 说:

那你算一下PB5是多少呀
A是0
B是32
32+5

感谢迪大大的回复,原来还可以这样算的,我基础知识太差了

之前直接接排针容易掉,找了个nodemcu的板子给焊上去了,但是rx输出还是一样的,一直是00

root@OpenWrt:~# insmod esp8089-spi.ko esp_reset_gpio=36 esp_interrupt=37
[   35.284414] esp8089_spi: loading out-of-tree module taints kernel.
[   35.293242] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   35.898977] esp8089_spi: esp_spi_dummy_probe enter
[   35.903832] esp8089_spi: register board OK
[   35.907996] esp8089_spi: sem_timeout = 0
[   36.125445] esp8089_spi: ESP8089 power up OK
[   36.130047] esp8089_spi: esp_spi_probe ENTER
[   36.134346] esp8089_spi: esp_setup_spi
[   36.138168] esp8089_spi: sif_spi_protocol_init
[   36.142609] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.149234] esp8089_spi: fail_count = 0
[   36.255791] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   36.363546] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.370163] esp8089_spi: fail_count = 1
[   36.475697] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   36.583461] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.590079] esp8089_spi: fail_count = 2
[   36.697425] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   36.805183] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.811798] esp8089_spi: fail_count = 3
[   36.917287] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.025043] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.031662] esp8089_spi: fail_count = 4
[   37.137145] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.244897] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.251512] esp8089_spi: fail_count = 5
[   37.356994] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.464749] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.471366] esp8089_spi: fail_count = 6
[   37.577472] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.685211] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.691827] esp8089_spi: fail_count = 7
[   37.797296] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.905036] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.911651] esp8089_spi: fail_count = 8
[   38.017126] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   38.124866] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   38.131481] esp8089_spi: fail_count = 9
[   38.236956] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   38.344697] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   38.351312] esp8089_spi: fail_count = 10
[   38.456870] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   38.564619] esp8089_spi: first error exit
[   38.568638] esp8089_spi: esp_spi_probe EXIT
[   38.572852] eagle: probe of spi0.0 failed with error -110
[   38.578399] esp8089_spi: sem_timeout = 0
[   38.582322] esp8089_spi: esp_spi_init err 0

_20200508164806.png
_20200508164625.jpg
_20200508164620.jpg
_20200508164634.jpg

最近编辑记录 ma6254 (2020-05-08 16:54:02)

离线

#101 2020-05-09 08:28:33

春风吹又生
会员
注册时间: 2020-02-25
已发帖子: 61
积分: 60

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

请教迪卡大佬, 为什么ESP8089 和 ESP8266 都可以通过SPI接主控芯片?
他们是不是同一个DIE?有什么区别呢?

离线

#102 2020-05-09 11:06:51

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

楼主大佬有没有 dts 参考一下呢?

离线

#103 2020-05-09 11:58:23

路人甲
会员
注册时间: 2017-09-07
已发帖子: 202
积分: 199.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我思故我在 说:

楼主大佬有没有 dts 参考一下呢?

感觉不需要,

按readme, 应该这样执行命令或许就可以了:

modprobe esp8089-spi esp_reset_gpio=13 esp_cs0_pin=16 esp_interrupt=26

离线

#104 2020-05-09 16:33:32

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

有进展,起码有数据了,改了spi设备树的interrupts,感觉哪里还没配置好,板子是荔枝zero

root@OpenWrt:~# uname -a
Linux OpenWrt 4.14.14-licheepi-zero+ #3 SMP Fri May 8 21:46:55 CST 2020 armv7l GNU/Linux
root@OpenWrt:~# insmod esp8089-spi.ko esp_reset_gpio=33 esp_interrupt=32
[   41.873059] esp8089_spi: loading out-of-tree module taints kernel.
[   41.881785] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   42.487522] esp8089_spi: esp_spi_dummy_probe enter
[   42.492375] esp8089_spi: register board OK
[   42.496540] esp8089_spi: sem_timeout = 0
[   42.714973] esp8089_spi: ESP8089 power up OK
[   42.719538] esp8089_spi: esp_spi_probe ENTER
[   42.723810] esp8089_spi: esp_setup_spi
[   42.727645] esp8089_spi: sif_spi_protocol_init
[   42.732088] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   42.738716] esp8089_spi: fail_count = 0
[   42.844994] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   42.853177] eagle spi0.0: SPI transfer failed: -110
[   42.858111] spi_master spi0: failed to transfer one message from queue
[   42.864634] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   43.074977] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   43.083239] eagle spi0.0: SPI transfer failed: -110
[   43.088162] spi_master spi0: failed to transfer one message from queue
[   43.094685] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   43.102355] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   43.210101] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   43.216712] esp8089_spi: fail_count = 1
[   43.324968] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   43.333144] eagle spi0.0: SPI transfer failed: -110
[   43.338055] spi_master spi0: failed to transfer one message from queue
[   43.344575] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   43.554974] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   43.563239] eagle spi0.0: SPI transfer failed: -110
[   43.568164] spi_master spi0: failed to transfer one message from queue
[   43.574684] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   43.582350] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   43.690095] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   43.696708] esp8089_spi: fail_count = 2
[   43.804981] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   43.813171] eagle spi0.0: SPI transfer failed: -110
[   43.818106] spi_master spi0: failed to transfer one message from queue
[   43.824630] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   44.034994] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   44.043258] eagle spi0.0: SPI transfer failed: -110
[   44.048179] spi_master spi0: failed to transfer one message from queue
[   44.054698] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   44.062377] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   44.170128] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   44.176743] esp8089_spi: fail_count = 3
[   44.284972] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   44.293146] eagle spi0.0: SPI transfer failed: -110
[   44.298061] spi_master spi0: failed to transfer one message from queue
[   44.304580] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   44.514977] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   44.523239] eagle spi0.0: SPI transfer failed: -110
[   44.528157] spi_master spi0: failed to transfer one message from queue
[   44.534676] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   44.542341] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   44.650086] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   44.656700] esp8089_spi: fail_count = 4
[   44.764974] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   44.773151] eagle spi0.0: SPI transfer failed: -110
[   44.778069] spi_master spi0: failed to transfer one message from queue
[   44.784589] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   44.994972] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   45.003235] eagle spi0.0: SPI transfer failed: -110
[   45.008152] spi_master spi0: failed to transfer one message from queue
[   45.014673] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   45.022336] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   45.130081] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   45.136698] esp8089_spi: fail_count = 5
[   45.244965] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   45.253140] eagle spi0.0: SPI transfer failed: -110
[   45.258051] spi_master spi0: failed to transfer one message from queue
[   45.264570] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   45.475002] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   45.483259] eagle spi0.0: SPI transfer failed: -110
[   45.488171] spi_master spi0: failed to transfer one message from queue
[   45.494691] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   45.502358] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   45.610110] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   45.616722] esp8089_spi: fail_count = 6
[   45.724980] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   45.733156] eagle spi0.0: SPI transfer failed: -110
[   45.738080] spi_master spi0: failed to transfer one message from queue
[   45.744601] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   45.955006] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   45.963266] eagle spi0.0: SPI transfer failed: -110
[   45.968179] spi_master spi0: failed to transfer one message from queue
[   45.974699] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   45.982365] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   46.090110] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   46.096726] esp8089_spi: fail_count = 7
[   46.205025] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   46.213210] eagle spi0.0: SPI transfer failed: -110
[   46.218159] spi_master spi0: failed to transfer one message from queue
[   46.224681] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   46.434985] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   46.443251] eagle spi0.0: SPI transfer failed: -110
[   46.448179] spi_master spi0: failed to transfer one message from queue
[   46.454700] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   46.462369] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   46.570113] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   46.576726] esp8089_spi: fail_count = 8
[   46.684971] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   46.693149] eagle spi0.0: SPI transfer failed: -110
[   46.698069] spi_master spi0: failed to transfer one message from queue
[   46.704590] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   46.914970] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   46.923236] eagle spi0.0: SPI transfer failed: -110
[   46.928156] spi_master spi0: failed to transfer one message from queue
[   46.934677] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   46.942346] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   47.050092] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   47.056706] esp8089_spi: fail_count = 9
[   47.164964] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   47.173139] eagle spi0.0: SPI transfer failed: -110
[   47.178049] spi_master spi0: failed to transfer one message from queue
[   47.184567] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   47.394978] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   47.403233] eagle spi0.0: SPI transfer failed: -110
[   47.408148] spi_master spi0: failed to transfer one message from queue
[   47.414669] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   47.422336] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   47.530080] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   47.536693] esp8089_spi: fail_count = 10
[   47.644974] spi_master spi0: spi0.0: timeout transferring 6 bytes@100000Hz for 110(100)ms
[   47.653147] eagle spi0.0: SPI transfer failed: -110
[   47.658057] spi_master spi0: failed to transfer one message from queue
[   47.664578] esp8089_spi: sif_spi_write_raw_proto: failed, error: -110
[   47.874976] spi_master spi0: spi0.0: timeout transferring 10 bytes@100000Hz for 110(100)ms
[   47.883240] eagle spi0.0: SPI transfer failed: -110
[   47.888155] spi_master spi0: failed to transfer one message from queue
[   47.894675] esp8089_spi: spierr sif_spi_write_async_read_proto: failed, error: -110
[   47.902341] rx:[0x00],[0xbf],[0xc0],[0xab],[0x03],[0xbf],[0x0b],[0x00],[0x00],[0x00]
[   48.010096] esp8089_spi: first error exit
[   48.014102] esp8089_spi: esp_spi_probe EXIT
[   48.018330] eagle: probe of spi0.0 failed with error -110
[   48.023868] esp8089_spi: sem_timeout = 0
[   48.027830] esp8089_spi: esp_spi_init err 0
root@OpenWrt:~# 
		spi0: spi@1c68000 {
			compatible = "allwinner,sun8i-h3-spi";
			reg = <0x01c68000 0x1000>;
			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
			clock-names = "ahb", "mod";
			resets = <&ccu RST_BUS_SPI0>;
			pinctrl-names = "default";
			pinctrl-0 = <&spi0_pins>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

最近编辑记录 ma6254 (2020-05-09 16:38:00)

离线

#105 2020-05-09 17:46:54

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

逻辑分析仪抓了下
_20200509174446.png_20200509174501.png_20200509174517.png

离线

#106 2020-05-09 18:52:29

lhc200
会员
注册时间: 2020-05-09
已发帖子: 8
积分: 8

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

哥们,哪里的板子?
我也想弄一个;
淘宝买的,给个链接


自己做的,能否共享pcb;谢谢

离线

楼主 #107 2020-05-09 22:17:17

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

ma6254 说:

感谢迪大大的回复,原来还可以这样算的,我基础知识太差了

之前直接接排针容易掉,找了个nodemcu的板子给焊上去了,但是rx输出还是一样的,一直是00

root@OpenWrt:~# insmod esp8089-spi.ko esp_reset_gpio=36 esp_interrupt=37
[   35.284414] esp8089_spi: loading out-of-tree module taints kernel.
[   35.293242] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   35.898977] esp8089_spi: esp_spi_dummy_probe enter
[   35.903832] esp8089_spi: register board OK
[   35.907996] esp8089_spi: sem_timeout = 0
[   36.125445] esp8089_spi: ESP8089 power up OK
[   36.130047] esp8089_spi: esp_spi_probe ENTER
[   36.134346] esp8089_spi: esp_setup_spi
[   36.138168] esp8089_spi: sif_spi_protocol_init
[   36.142609] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.149234] esp8089_spi: fail_count = 0
[   36.255791] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   36.363546] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.370163] esp8089_spi: fail_count = 1
[   36.475697] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   36.583461] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.590079] esp8089_spi: fail_count = 2
[   36.697425] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   36.805183] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   36.811798] esp8089_spi: fail_count = 3
[   36.917287] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.025043] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.031662] esp8089_spi: fail_count = 4
[   37.137145] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.244897] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.251512] esp8089_spi: fail_count = 5
[   37.356994] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.464749] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.471366] esp8089_spi: fail_count = 6
[   37.577472] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.685211] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.691827] esp8089_spi: fail_count = 7
[   37.797296] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   37.905036] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   37.911651] esp8089_spi: fail_count = 8
[   38.017126] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   38.124866] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   38.131481] esp8089_spi: fail_count = 9
[   38.236956] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   38.344697] esp8089_spi: /home/mjc/test/ESP8089-SPI/spi_sif_esp.c, 1559
[   38.351312] esp8089_spi: fail_count = 10
[   38.456870] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   38.564619] esp8089_spi: first error exit
[   38.568638] esp8089_spi: esp_spi_probe EXIT
[   38.572852] eagle: probe of spi0.0 failed with error -110
[   38.578399] esp8089_spi: sem_timeout = 0
[   38.582322] esp8089_spi: esp_spi_init err 0

https://whycan.cn/files/members/2303/_20200508164806.png
https://whycan.cn/files/members/2303/_20200508164625.jpg
https://whycan.cn/files/members/2303/_20200508164620.jpg
https://whycan.cn/files/members/2303/_20200508164634.jpg

板子不错,这样焊比较整洁

离线

楼主 #108 2020-05-09 22:18:01

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

春风吹又生 说:

请教迪卡大佬, 为什么ESP8089 和 ESP8266 都可以通过SPI接主控芯片?
他们是不是同一个DIE?有什么区别呢?

应该是同一个die,但是也是有区别的

离线

楼主 #109 2020-05-09 22:18:51

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我思故我在 说:

楼主大佬有没有 dts 参考一下呢?

dts没有啥 就配置好spi,指定好引脚就行

离线

楼主 #110 2020-05-09 22:21:49

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

没看懂你是抓的哪几部分,分析一下呗,en,interrupt,cs,clk,miso,mosi

离线

楼主 #111 2020-05-09 22:23:24

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

lhc200 说:

哥们,哪里的板子?
我也想弄一个;
淘宝买的,给个链接


自己做的,能否共享pcb;谢谢

都是这种无意义的回复是不能加分的,而且也对自己没什么帮助,一味索取不行的。

离线

#112 2020-05-10 09:21:57

xyyangkun
会员
注册时间: 2018-03-14
已发帖子: 18
积分: 17

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

[   26.600400] Adding 905212k swap on /var/swap.  Priority:-2 extents:4 across:1167356k SSFS
[   66.371975] esp8089_spi: loading out-of-tree module taints kernel.
[   66.396631] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   67.015290] esp8089_spi: esp_spi_dummy_probe enter
[   67.015484] esp8089_spi: register board OK
[   67.015497] esp8089_spi: sem_timeout = 0
[   67.226446] esp8089_spi: ESP8089 power up OK
[   67.226881] esp8089_spi: esp_spi_probe ENTER
[   67.226892] esp8089_spi: esp_setup_spi
[   67.226920] esp8089_spi: sif_spi_protocol_init
[   67.226933] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   67.226940] esp8089_spi: fail_count = 0
[   67.352574] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   67.453473] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   67.453485] esp8089_spi: fail_count = 1
[   67.561299] rx:[0x3f],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   67.662171] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   67.662184] esp8089_spi: fail_count = 2
[   67.770685] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   68.375609] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1578
[   68.380606] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   68.884734] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1591
[   68.888699] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   69.392803] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1603
[   69.397658] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   69.901795] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1617
[   69.907142] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.411257] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1630
[   70.415723] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.919875] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1643
[   70.931100] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.435197] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   71.439793] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.943983] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   71.950147] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.454206] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   72.458791] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.963012] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   72.968017] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.472106] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   73.476040] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.980207] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   73.984614] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   74.488777] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   74.493607] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   74.997712] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   75.002035] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.506140] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1668
[   75.509766] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.509787] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1681
[   75.509929] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.509941] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1694
[   75.510079] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   76.530982] esp8089_spi: esp_pub_init_all
[   76.531125] esp8089_spi: esp_download_fw
[   77.025219] esp8089_spi: sif_platform_irq_init enter
[   77.244191] esp_host:bdf5087c3deb
               esp_target: e826c2b3c9fd 57 18202

[   77.244321] esp_readwrite_file: file /system/lib/modules/test_results filp_open error
[   77.245832] esp8089_spi: first normal exit
[   77.245848] esp8089_spi: esp_spi_probe EXIT
[   77.246132] esp8089_spi: sem_timeout = 0
[   77.246206] esp8089_spi: esp_spi_remove
[   77.376590] esp8089_spi: esp_spi_probe ENTER
[   77.376606] esp8089_spi: esp_setup_spi
[   77.376614] esp8089_spi: sif_spi_protocol_init
[   77.376628] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   77.376634] esp8089_spi: fail_count = 0
[   77.485191] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   77.586224] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   77.586238] esp8089_spi: fail_count = 1
[   77.693635] rx:[0x3f],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   77.794564] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   77.794577] esp8089_spi: fail_count = 2
[   77.901298] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   78.506161] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1578
[   78.510096] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   79.014201] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1591
[   79.019392] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   79.523503] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1603
[   79.528183] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   80.032309] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1617
[   80.036776] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   80.540880] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1630
[   80.545516] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   81.049727] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1643
[   81.061853] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   81.565989] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   81.570411] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   82.074605] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   82.079556] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   82.583775] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   82.589059] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   83.093204] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   83.145532] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   83.649765] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   83.654466] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   84.158628] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   84.163003] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   84.667139] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   84.671465] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.175548] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   85.180071] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.684170] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1668
[   85.689675] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.689695] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1681
[   85.689837] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.689851] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1694
[   85.689987] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   86.710515] esp8089_spi: esp_pub_init_all
[   86.710532] esp8089_spi: esp_download_fw
[   87.314819] esp8089_spi: sif_platform_irq_init enter
[   87.363840] esp_host:bdf5087c3deb
               esp_target: e826c2b3c9fd 57 18202

[   87.588031] esp8089_spi: esp_spi_probe EXIT
[   87.588344] esp8089_spi: esp_spi_init err 0
[   88.913171] esp_op_add_interface STA
[   88.915054] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   90.110801] wlan0: authenticate with 20:dc:e6:fd:c9:77
[   90.111152] wlan0: send auth to 20:dc:e6:fd:c9:77 (try 1/3)
[   90.122334] wlan0: authenticated
[   90.126579] wlan0: associate with 20:dc:e6:fd:c9:77 (try 1/3)
[   90.137107] wlan0: RX AssocResp from 20:dc:e6:fd:c9:77 (capab=0x431 status=0 aid=2)
[   90.137311] wlan0: associated
[   90.571333] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

成功把8266当成wifi网卡,之前的出现以下错误是en脚没有使能。直接接到3.3V后,可以下载固件,并正常加载ko.

[   72.081984] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   72.182922] esp8089_spi: first error exit
[   72.182938] esp8089_spi: esp_spi_probe EXIT
[   72.187142] eagle: probe of spi0.0 failed with error -110
[   72.187353] esp8089_spi: sem_timeout = 0
[   72.187367] esp8089_spi: esp_spi_init err 0
[  177.692206] esp8089_spi: esp_spi_exit

离线

#113 2020-05-11 10:45:17

ma6254
会员
注册时间: 2019-11-03
已发帖子: 41
积分: 24

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

可喜可贺,我也调通了
生成了一个大的空文件来测试速度

PC:

sudo dd if=/dev/zero of=./zero.bin bs=1G seek=100 count=0
python3 -m http.server

板子里:

root@OpenWrt:~# curl -o /dev/null  "http://192.168.43.234:8000/a.zip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 26  286M   26 76.5M    0     0   972k      0  0:05:01  0:01:20  0:03:41  967k^C
root@OpenWrt:~# curl -o /dev/null  "http://192.168.43.234:8000/zero.bin"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 10.0G    0 7451k    0     0   964k      0  3:01:06  0:00:07  3:00:59  978k^C

离线

#114 2020-05-11 14:13:22

xiezonglin
会员
注册时间: 2020-03-07
已发帖子: 12
积分: 5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

你后来都很顺利吗?我一直都有一个问题,就是开启中断后就提示超时,看了一下代码应该是等待中断超时,可是我明明设置了中断,而且我这时如果把中断脚接到地就可以成功下一步,而且后面还可以搜到AP(或者我CS脚拉到地也可以)

[ 59.382190] esp8089_spi: sif_platform_irq_init enter
[   69.602131] resetting event timeout
[   69.605657] esp8089_spi: esp_init_all failed: -110
[   69.610435] esp8089_spi: first error exit
[   69.614611] esp8089_spi: esp_spi_probe EXIT
[   69.619080] esp8089_spi: sem_timeout = 0
[   69.623112] esp8089_spi: esp_spi_init err 0
xyyangkun 说:
[   26.600400] Adding 905212k swap on /var/swap.  Priority:-2 extents:4 across:1167356k SSFS
[   66.371975] esp8089_spi: loading out-of-tree module taints kernel.
[   66.396631] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   67.015290] esp8089_spi: esp_spi_dummy_probe enter
[   67.015484] esp8089_spi: register board OK
[   67.015497] esp8089_spi: sem_timeout = 0
[   67.226446] esp8089_spi: ESP8089 power up OK
[   67.226881] esp8089_spi: esp_spi_probe ENTER
[   67.226892] esp8089_spi: esp_setup_spi
[   67.226920] esp8089_spi: sif_spi_protocol_init
[   67.226933] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   67.226940] esp8089_spi: fail_count = 0
[   67.352574] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   67.453473] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   67.453485] esp8089_spi: fail_count = 1
[   67.561299] rx:[0x3f],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   67.662171] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   67.662184] esp8089_spi: fail_count = 2
[   67.770685] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   68.375609] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1578
[   68.380606] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   68.884734] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1591
[   68.888699] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   69.392803] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1603
[   69.397658] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   69.901795] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1617
[   69.907142] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.411257] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1630
[   70.415723] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.919875] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1643
[   70.931100] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.435197] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   71.439793] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.943983] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   71.950147] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.454206] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   72.458791] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.963012] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   72.968017] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.472106] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   73.476040] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.980207] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   73.984614] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   74.488777] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   74.493607] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   74.997712] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   75.002035] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.506140] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1668
[   75.509766] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.509787] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1681
[   75.509929] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.509941] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1694
[   75.510079] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   76.530982] esp8089_spi: esp_pub_init_all
[   76.531125] esp8089_spi: esp_download_fw
[   77.025219] esp8089_spi: sif_platform_irq_init enter
[   77.244191] esp_host:bdf5087c3deb
               esp_target: e826c2b3c9fd 57 18202

[   77.244321] esp_readwrite_file: file /system/lib/modules/test_results filp_open error
[   77.245832] esp8089_spi: first normal exit
[   77.245848] esp8089_spi: esp_spi_probe EXIT
[   77.246132] esp8089_spi: sem_timeout = 0
[   77.246206] esp8089_spi: esp_spi_remove
[   77.376590] esp8089_spi: esp_spi_probe ENTER
[   77.376606] esp8089_spi: esp_setup_spi
[   77.376614] esp8089_spi: sif_spi_protocol_init
[   77.376628] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   77.376634] esp8089_spi: fail_count = 0
[   77.485191] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   77.586224] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   77.586238] esp8089_spi: fail_count = 1
[   77.693635] rx:[0x3f],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   77.794564] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1559
[   77.794577] esp8089_spi: fail_count = 2
[   77.901298] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   78.506161] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1578
[   78.510096] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   79.014201] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1591
[   79.019392] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   79.523503] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1603
[   79.528183] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   80.032309] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1617
[   80.036776] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   80.540880] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1630
[   80.545516] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   81.049727] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1643
[   81.061853] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   81.565989] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   81.570411] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   82.074605] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   82.079556] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   82.583775] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   82.589059] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   83.093204] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   83.145532] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   83.649765] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   83.654466] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   84.158628] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   84.163003] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   84.667139] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   84.671465] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.175548] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1655
[   85.180071] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.684170] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1668
[   85.689675] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.689695] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1681
[   85.689837] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.689851] esp8089_spi: /data/raspberry/8266/ESP8089-SPI/spi_sif_esp.c, 1694
[   85.689987] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   86.710515] esp8089_spi: esp_pub_init_all
[   86.710532] esp8089_spi: esp_download_fw
[   87.314819] esp8089_spi: sif_platform_irq_init enter
[   87.363840] esp_host:bdf5087c3deb
               esp_target: e826c2b3c9fd 57 18202

[   87.588031] esp8089_spi: esp_spi_probe EXIT
[   87.588344] esp8089_spi: esp_spi_init err 0
[   88.913171] esp_op_add_interface STA
[   88.915054] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   90.110801] wlan0: authenticate with 20:dc:e6:fd:c9:77
[   90.111152] wlan0: send auth to 20:dc:e6:fd:c9:77 (try 1/3)
[   90.122334] wlan0: authenticated
[   90.126579] wlan0: associate with 20:dc:e6:fd:c9:77 (try 1/3)
[   90.137107] wlan0: RX AssocResp from 20:dc:e6:fd:c9:77 (capab=0x431 status=0 aid=2)
[   90.137311] wlan0: associated
[   90.571333] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

成功把8266当成wifi网卡,之前的出现以下错误是en脚没有使能。直接接到3.3V后,可以下载固件,并正常加载ko.

[   72.081984] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[   72.182922] esp8089_spi: first error exit
[   72.182938] esp8089_spi: esp_spi_probe EXIT
[   72.187142] eagle: probe of spi0.0 failed with error -110
[   72.187353] esp8089_spi: sem_timeout = 0
[   72.187367] esp8089_spi: esp_spi_init err 0
[  177.692206] esp8089_spi: esp_spi_exit

离线

楼主 #115 2020-05-12 08:19:12

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我试了一下,去掉中断不可以呢。
把这部分屏蔽不行呢。在esp_main.c

gl_bootup_cplx = &complete;
    epub->wait_reset = 0;
    sif_enable_irq(epub);
   
    if(epub->sdio_state == ESP_SDIO_STATE_SECOND_INIT || sif_get_ate_config() == 1){
        ret = sip_poll_bootup_event(epub->sip);
    } else {
        ret = sip_poll_resetting_event(epub->sip);
        if (ret == 0) {
            sif_lock_bus(epub);
            sif_interrupt_target(epub, 7);
            sif_unlock_bus(epub);
        }
       
    }

    gl_bootup_cplx = NULL;

    if (sif_get_ate_config() == 1)
        ret = -EOPNOTSUPP;

离线

楼主 #116 2020-05-12 08:20:30

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

没有注释的

iroot@dika-pc:~# insmod esp8089-spi.ko
[   65.213159] esp8089_spi: loading out-of-tree module taints kernel.
[   65.228569] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   65.234474] esp8089_spi: poweron
[   65.838454] esp8089_spi: esp_spi_dummy_probe enter
[   65.844056] esp8089_spi: I will go dead
[   65.848284] esp8089_spi: I am OK
[   65.851806] esp8089_spi: register board OK
[   65.856390] esp8089_spi: sem_timeout = 0
[   66.072035] esp8089_spi: ESP8089 power up OK
[   66.077361] esp8089_spi: esp_spi_probe ENTER
[   66.082243] esp8089_spi: esp_setup_spi
[   66.086392] esp8089_spi: sif_spi_protocol_init
[   66.091242] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   66.101061] esp8089_spi: fail_count = 0
[   66.231834] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   66.340450] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   66.350274] esp8089_spi: fail_count = 1
[   66.463608] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   66.572247] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   66.582060] esp8089_spi: fail_count = 2
[   66.694617] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   67.302569] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1578
[   67.317987] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   67.826062] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1591
[   67.841357] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   68.349446] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1603
[   68.365341] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   68.873472] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1617
[   68.888651] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   69.396793] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1630
[   69.425463] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   69.933547] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1643
[   69.967208] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.511327] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   70.563405] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.108057] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   71.160695] rx:[0xff],[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.707169] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   71.763010] rx:[0xff],[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.311245] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   72.368811] rx:[0xff],[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.918426] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   72.976042] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.525712] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   73.583312] rx:[0xff],[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   74.133500] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   74.191117] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   74.741480] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   74.799126] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.349603] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1668
[   75.407202] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.458201] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1681
[   75.515852] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.566801] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1694
[   75.624272] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   76.680657] esp8089_spi: esp_pub_init_all
[   76.706385] esp8089_spi: downloadesp_download_fw
[   76.857114] random: crng init done
[   76.881730] random: 7 urandom warning(s) missed due to ratelimiting
[   80.223072] esp8089_spi: sif_platform_irq_init enter
[   80.527507] esp_host:bdf5087c3deb
[   80.527507] esp_target: e826c2b3c9fd 57 18202
[   80.527507]
[   80.598417] esp_readwrite_file: file /system/lib/modules/test_results filp_open error
[   80.654330] esp8089_spi: first normal exit
[   80.678966] esp8089_spi: esp_spi_probe EXIT
[   80.703763] esp8089_spi: sem_timeout = 0
[   80.727807] esp8089_spi: esp_spi_remove
[   80.922225] esp8089_spi: esp_spi_probe ENTER
[   80.946062] esp8089_spi: esp_setup_spi
[   80.968991] esp8089_spi: sif_spi_protocol_init
[   80.992377] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   81.038581] esp8089_spi: fail_count = 0
[   81.172482] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   81.317245] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   81.363166] esp8089_spi: fail_count = 1
[   81.493955] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   81.638384] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   81.683966] esp8089_spi: fail_count = 2
[   81.814245] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   82.457645] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1578
[   82.508701] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   83.052275] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1591
[   83.103360] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   83.646886] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1603
[   83.697736] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   84.241324] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1617
[   84.292412] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   84.835998] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1630
[   84.896748] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   85.440487] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1643
[   85.493332] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   86.038020] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   86.091099] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   86.636770] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   86.690563] rx:[0xff],[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   87.236891] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   87.291195] rx:[0xff],[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   87.839591] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   87.896524] rx:[0xff],[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   88.445959] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   88.503078] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   89.052786] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   89.110293] rx:[0xff],[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   89.660406] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   89.718079] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   90.268586] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   90.326790] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   90.877317] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1668
[   90.935472] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   90.986449] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1681
[   91.044053] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   91.094952] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1694
[   91.153159] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   92.209866] esp8089_spi: esp_pub_init_all
[   92.235656] esp8089_spi: downloadesp_download_fw
[   95.764156] esp8089_spi: sif_platform_irq_init enter
[   95.824475] esp8089_spi: esp_spi_probe EXIT
[   95.850211] esp8089_spi: esp_spi_init err 0
[   95.892594] esp_host:bdf5087c3deb
[   95.892594] esp_target: e826c2b3c9fd 57 18202
[   95.892594]

离线

楼主 #117 2020-05-12 08:21:01

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

注释的

root@dika-pc:~# insmod esp8089-spi.ko
[   54.669147] esp8089_spi: loading out-of-tree module taints kernel.
[   54.684727] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   54.690480] esp8089_spi: poweron
[   55.294695] esp8089_spi: esp_spi_dummy_probe enter
[   55.300136] esp8089_spi: I will go dead
[   55.304497] esp8089_spi: I am OK
[   55.308054] esp8089_spi: register board OK
[   55.312607] esp8089_spi: sem_timeout = 0
[   55.531980] esp8089_spi: ESP8089 power up OK
[   55.537324] esp8089_spi: esp_spi_probe ENTER
[   55.542201] esp8089_spi: esp_setup_spi
[   55.546358] esp8089_spi: sif_spi_protocol_init
[   55.551210] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   55.561021] esp8089_spi: fail_count = 0
[   55.692091] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   55.800619] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   55.810433] esp8089_spi: fail_count = 1
[   55.922643] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   56.031229] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   56.041045] esp8089_spi: fail_count = 2
[   56.153565] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   56.761553] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1578
[   56.778179] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   57.286414] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1591
[   57.303044] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   57.811272] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1603
[   57.828048] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   58.336241] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1617
[   58.351534] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   58.859752] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1630
[   58.888941] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   59.397107] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1643
[   59.430476] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   59.974777] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   60.026648] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   60.571363] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   60.624304] rx:[0xff],[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   61.170744] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   61.225841] rx:[0xff],[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   61.774241] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   61.831059] rx:[0xff],[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   62.380644] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   62.438487] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   62.988421] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   63.047642] rx:[0xff],[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   63.597803] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   63.655841] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   64.206337] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   64.264346] rx:[0xff],[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   64.814901] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1668
[   64.873001] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   64.923916] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1681
[   64.981589] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   65.032581] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1694
[   65.089883] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   66.146896] esp8089_spi: esp_pub_init_all
[   66.172604] esp8089_spi: downloadesp_download_fw
[   66.337374] random: crng init done
[   69.540394] esp8089_spi: first normal exit
[   69.565672] esp8089_spi: esp_spi_probe EXIT
[   69.591165] esp8089_spi: sem_timeout = 0
[   69.615827] esp8089_spi: esp_spi_remove
[   69.752243] esp8089_spi: esp_spi_probe ENTER
[   69.776637] esp8089_spi: esp_setup_spi
[   69.800169] esp8089_spi: sif_spi_protocol_init
[   69.824209] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   69.871830] esp8089_spi: fail_count = 0
[   70.006603] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.152729] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   70.199998] esp8089_spi: fail_count = 1
[   70.331260] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.476976] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   70.523961] esp8089_spi: fail_count = 2
[   70.655079] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.800530] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   70.847144] esp8089_spi: fail_count = 3
[   70.978064] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.123087] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   71.169345] esp8089_spi: fail_count = 4
[   71.299906] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.444655] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   71.490520] esp8089_spi: fail_count = 5
[   71.621241] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.765606] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   71.811168] esp8089_spi: fail_count = 6
[   71.941996] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.086032] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   72.131192] esp8089_spi: fail_count = 7
[   72.261107] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.404730] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   72.449561] esp8089_spi: fail_count = 8
[   72.579921] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.723926] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   72.769761] esp8089_spi: fail_count = 9
[   72.910199] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.056031] esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   73.104049] esp8089_spi: fail_count = 10
[   73.236265] rx:[0xff],[0xff],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.383368] esp8089_spi: esp_spi_remove
[   73.407044] esp8089_spi: esp_spi_remove no sctrl
[   73.431183] eagle: probe of spi0.0 failed with error -110
[   73.456373] esp8089_spi: esp_spi_init err 0
root@dika-pc:~#

离线

楼主 #118 2020-05-12 08:21:33

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

另外可以不接CS,但需要将CS接到GND

离线

#119 2020-05-13 00:54:23

huxiao45
会员
注册时间: 2019-11-04
已发帖子: 10
积分: 4.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪神牛X,特来膜拜下,改后的文件发一份上来?

离线

#120 2020-05-24 22:58:59

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我用spi1接8266-12f 数据线时钟线都有数据了 可是出现了以下错误 不知道什么原因 插个眼

...
esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1681
rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1694
rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
esp8089_spi: spierr byte read cmd resp 0x00 no recv
esp8089_spi: spierr byte read cmd resp 0x00 no recv
...
esp8089_spi: spierr byte read cmd resp 0x00 no recv

离线

#121 2020-06-05 14:29:08

molin2050
会员
注册时间: 2020-01-06
已发帖子: 31
积分: 19.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

每次启动都要下载一次固件吗?可不可以跳过这部分

离线

#122 2020-06-05 14:46:06

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

molin2050 说:

每次启动都要下载一次固件吗?可不可以跳过这部分

可以, 通过 sunxi-fel 下载到 dram 跑:

https://whycan.cn/t_2449.html





离线

#123 2020-06-05 15:00:25

guangozhiosu
会员
注册时间: 2020-06-03
已发帖子: 5
积分: 5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

这个下载了没反应是怎么回事

离线

#124 2020-06-10 09:49:59

秦皇岛岛主
会员
注册时间: 2020-05-22
已发帖子: 59
积分: 38

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

此文必须标记

离线

#125 2020-06-10 14:59:44

xiaodianlu210
会员
注册时间: 2020-06-09
已发帖子: 6
积分: 6

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

不错,正要调试ESP8089

离线

楼主 #126 2020-06-12 07:18:39

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

QQ图片20.png

离线

#127 2020-06-19 02:56:38

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

卡在挺靠前的位置了

root@pop-os:/lib/modules/5.2.0-licheepi-nano+# ls
esp8089-spi.ko     modules.builtin      modules.dep.bin  modules.softdep
modules.alias      modules.builtin.bin  modules.devname  modules.symbols
modules.alias.bin  modules.dep          modules.order    modules.symbols.bin
root@pop-os:/lib/modules/5.2.0-licheepi-nano+# modprobe esp8089-spi.ko
modprobe: FATAL: Module esp8089-spi.ko not found in directory /lib/modules/5.2.0-licheepi-nano+

这。。。什么鬼?我已经把.ko拷过去了啊?

各位大佬有没有什么思路?

========
解决了

root@pop-os:/lib/modules/5.2.0-licheepi-nano+# modprobe esp8089-spi

原来要这样。。。

最近编辑记录 DoZh (2020-06-19 03:01:01)

离线

#128 2020-07-01 09:12:43

gzhssl
会员
注册时间: 2019-11-22
已发帖子: 18
积分: 62.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我也出现了这个错误提示,多次重启之后加载ESP8089模块会报EXT4 xxxxx的错误,因为我的rootfs分区是EXT4的,于是改为EXT3之后就OK了,顺利出现WLAN0~~~,不知道你这个跟我一样不

逸俊晨晖 说:

我用spi1接8266-12f 数据线时钟线都有数据了 可是出现了以下错误 不知道什么原因 插个眼

...
esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1681
rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
esp8089_spi: /home/dika/DVPM_linux-5.2/spiwifi1/ESP8089-SPI-master/spi_sif_esp.c, 1694
rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
esp8089_spi: spierr byte read cmd resp 0x00 no recv
esp8089_spi: spierr byte read cmd resp 0x00 no recv
...
esp8089_spi: spierr byte read cmd resp 0x00 no recv

离线

楼主 #129 2020-07-01 12:17:42

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

调试成功的来报个名

离线

#130 2020-07-01 17:49:39

hikaru0
会员
注册时间: 2020-07-01
已发帖子: 0
积分: 0

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

感谢分享,先mark了,闲了调试看看。。。。。

离线

#131 2020-07-26 22:14:42

wlcccccc
会员
注册时间: 2019-12-06
已发帖子: 72
积分: 67.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

有没有 esp8089 的原理图?

离线

#132 2020-07-28 22:49:34

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

没辙了,怎么调试ESP8089/8266都没反应.

有没有哪位大佬能够指点一二?

用的是f1c100s的PA0-PA3做SPI1,ESP8089和8266都试过,换了几块板子了,感觉芯片都没有响应。。。

终端输出:

root@pop-os:~# insmod /lib/modules/5.2.0-licheepi-nano+/esp8089-spi.ko esp_reset_gpio=130 esp_cs0_pin=0 esp_interrupt=131
[  100.487205] esp8089_spi: loading out-of-tree module taints kernel.
[  100.502255] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[  101.107979] esp8089_spi: esp_spi_dummy_probe enter
[  101.113372] esp8089_spi: register board OK
[  101.117707] esp8089_spi: sem_timeout = 0
[  101.339049] esp8089_spi: ESP8089 power up OK
[  101.344184] esp8089_spi: esp_spi_probe ENTER
[  101.348713] esp8089_spi: esp_setup_spi
[  101.352844] esp8089_spi: sif_spi_protocol_init
[  101.357535] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.366256] esp8089_spi: fail_count = 0
[  101.484912] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.593085] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.601821] esp8089_spi: fail_count = 1
[  101.711623] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.819797] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.828460] esp8089_spi: fail_count = 2
[  101.938086] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.046329] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.055057] esp8089_spi: fail_count = 3
[  102.170503] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.290458] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.311082] esp8089_spi: fail_count = 4
[  102.427085] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.546976] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.567478] esp8089_spi: fail_count = 5
[  102.683231] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.803629] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.825123] esp8089_spi: fail_count = 6
[  102.941701] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.063014] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.084966] esp8089_spi: fail_count = 7
[  103.201628] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.322898] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.344858] esp8089_spi: fail_count = 8
[  103.461802] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.583043] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.604976] esp8089_spi: fail_count = 9
[  103.721343] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.842613] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.864570] esp8089_spi: fail_count = 10
[  103.981306] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  104.102631] esp8089_spi: first error exit
[  104.113547] esp8089_spi: esp_spi_probe EXIT
[  104.124558] eagle: probe of spi1.0 failed with error -110
[  104.137024] esp8089_spi: sem_timeout = 0
[  104.147740] esp8089_spi: esp_spi_init err 0
root@pop-os:~#

原理图:
Snipaste_2020-07-28_22-35-28.png


逻辑分析仪吐出来的时序图:
Snipaste_2020-07-28_22-42-07.png
Snipaste_2020-07-28_22-48-52.png

ESP8266串口0输出的启动信息:

 ets Jan  8 2013,rst cause:1, boot mode:(6,2)


 ets Jan  8 2013,rst cause:1, boot mode:(6,6)

waiting for host

 ets Jan  8 2013,rst cause:1, boot mode:(6,6)

waiting for host

离线

#133 2020-07-29 13:43:55

xiezonglin
会员
注册时间: 2020-03-07
已发帖子: 12
积分: 5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

DoZh 说:

没辙了,怎么调试ESP8089/8266都没反应.

有没有哪位大佬能够指点一二?

用的是f1c100s的PA0-PA3做SPI1,ESP8089和8266都试过,换了几块板子了,感觉芯片都没有响应。。。

终端输出:

root@pop-os:~# insmod /lib/modules/5.2.0-licheepi-nano+/esp8089-spi.ko esp_reset_gpio=130 esp_cs0_pin=0 esp_interrupt=131
[  100.487205] esp8089_spi: loading out-of-tree module taints kernel.
[  100.502255] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[  101.107979] esp8089_spi: esp_spi_dummy_probe enter
[  101.113372] esp8089_spi: register board OK
[  101.117707] esp8089_spi: sem_timeout = 0
[  101.339049] esp8089_spi: ESP8089 power up OK
[  101.344184] esp8089_spi: esp_spi_probe ENTER
[  101.348713] esp8089_spi: esp_setup_spi
[  101.352844] esp8089_spi: sif_spi_protocol_init
[  101.357535] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.366256] esp8089_spi: fail_count = 0
[  101.484912] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.593085] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.601821] esp8089_spi: fail_count = 1
[  101.711623] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.819797] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.828460] esp8089_spi: fail_count = 2
[  101.938086] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.046329] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.055057] esp8089_spi: fail_count = 3
[  102.170503] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.290458] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.311082] esp8089_spi: fail_count = 4
[  102.427085] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.546976] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.567478] esp8089_spi: fail_count = 5
[  102.683231] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.803629] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.825123] esp8089_spi: fail_count = 6
[  102.941701] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.063014] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.084966] esp8089_spi: fail_count = 7
[  103.201628] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.322898] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.344858] esp8089_spi: fail_count = 8
[  103.461802] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.583043] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.604976] esp8089_spi: fail_count = 9
[  103.721343] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.842613] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.864570] esp8089_spi: fail_count = 10
[  103.981306] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  104.102631] esp8089_spi: first error exit
[  104.113547] esp8089_spi: esp_spi_probe EXIT
[  104.124558] eagle: probe of spi1.0 failed with error -110
[  104.137024] esp8089_spi: sem_timeout = 0
[  104.147740] esp8089_spi: esp_spi_init err 0
root@pop-os:~#

原理图:
https://whycan.cn/files/members/2701/Snipaste_2020-07-28_22-35-28.png


逻辑分析仪吐出来的时序图:
https://whycan.cn/files/members/2701/Snipaste_2020-07-28_22-42-07.png
https://whycan.cn/files/members/2701/Snipaste_2020-07-28_22-48-52.png

ESP8266串口0输出的启动信息:

 ets Jan  8 2013,rst cause:1, boot mode:(6,2)


 ets Jan  8 2013,rst cause:1, boot mode:(6,6)

waiting for host

 ets Jan  8 2013,rst cause:1, boot mode:(6,6)

waiting for host

感觉还是芯片工作不正常或者没焊接好,CHIP_EN脚看看是不是高电平

离线

#134 2020-08-11 18:49:48

lignin
会员
注册时间: 2020-03-21
已发帖子: 115
积分: 113.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我的几乎都是这样,可能几十次之中会有一个能够接受到数据的

root@lign-G3-3579:~# insmod esp8089-spi.ko esp_reset_gpio=100 esp_interrupt=101
[   40.118584] esp8089_spi: loading out-of-tree module taints kernel.
[   40.141832] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   40.747336] esp8089_spi: esp_spi_dummy_probe enter
[   40.752689] esp8089_spi: register board OK
[   40.757011] esp8089_spi: sem_timeout = 0
[   40.978375] esp8089_spi: ESP8089 power up OK
[   40.983429] esp8089_spi: esp_spi_probe ENTER
[   40.987947] esp8089_spi: esp_setup_spi
[   41.029403] esp8089_spi: sif_spi_protocol_init
[   41.034135] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   41.042747] esp8089_spi: fail_count = 0
[   41.179144] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   41.287232] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   41.295755] esp8089_spi: fail_count = 1
[   41.408015] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   41.516195] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   41.524725] esp8089_spi: fail_count = 2
[   41.636543] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   41.744690] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   41.753208] esp8089_spi: fail_count = 3
[   41.866619] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   41.974690] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   41.994558] esp8089_spi: fail_count = 4
[   42.115036] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   42.234544] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   42.254508] esp8089_spi: fail_count = 5
[   42.383613] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   42.503734] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   42.524648] esp8089_spi: fail_count = 6
[   42.649902] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   42.770822] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   42.792176] esp8089_spi: fail_count = 7
[   42.913071] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   43.033852] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   43.055174] esp8089_spi: fail_count = 8
[   43.173997] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   43.294812] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   43.316164] esp8089_spi: fail_count = 9
[   43.513360] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   43.634279] esp8089_spi: /home/lign/work/lichee/linux_sd/ESP8089-SPI/spi_sif_esp.c, 1559
[   43.655658] esp8089_spi: fail_count = 10
[   43.775698] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   43.896530] esp8089_spi: first error exit
[   43.907218] esp8089_spi: esp_spi_probe EXIT
[   43.918009] eagle: probe of spi1.0 failed with error -110
[   43.930260] esp8089_spi: sem_timeout = 0
[   43.940746] esp8089_spi: esp_spi_init err 0

离线

#135 2020-08-11 19:28:21

lignin
会员
注册时间: 2020-03-21
已发帖子: 115
积分: 113.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我也是,你的问题解决了吗

DoZh 说:

没辙了,怎么调试ESP8089/8266都没反应.

有没有哪位大佬能够指点一二?

用的是f1c100s的PA0-PA3做SPI1,ESP8089和8266都试过,换了几块板子了,感觉芯片都没有响应。。。

终端输出:

root@pop-os:~# insmod /lib/modules/5.2.0-licheepi-nano+/esp8089-spi.ko esp_reset_gpio=130 esp_cs0_pin=0 esp_interrupt=131
[  100.487205] esp8089_spi: loading out-of-tree module taints kernel.
[  100.502255] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[  101.107979] esp8089_spi: esp_spi_dummy_probe enter
[  101.113372] esp8089_spi: register board OK
[  101.117707] esp8089_spi: sem_timeout = 0
[  101.339049] esp8089_spi: ESP8089 power up OK
[  101.344184] esp8089_spi: esp_spi_probe ENTER
[  101.348713] esp8089_spi: esp_setup_spi
[  101.352844] esp8089_spi: sif_spi_protocol_init
[  101.357535] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.366256] esp8089_spi: fail_count = 0
[  101.484912] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.593085] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.601821] esp8089_spi: fail_count = 1
[  101.711623] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.819797] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.828460] esp8089_spi: fail_count = 2
[  101.938086] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.046329] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.055057] esp8089_spi: fail_count = 3
[  102.170503] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.290458] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.311082] esp8089_spi: fail_count = 4
[  102.427085] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.546976] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.567478] esp8089_spi: fail_count = 5
[  102.683231] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.803629] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.825123] esp8089_spi: fail_count = 6
[  102.941701] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.063014] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.084966] esp8089_spi: fail_count = 7
[  103.201628] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.322898] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.344858] esp8089_spi: fail_count = 8
[  103.461802] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.583043] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.604976] esp8089_spi: fail_count = 9
[  103.721343] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.842613] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.864570] esp8089_spi: fail_count = 10
[  103.981306] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  104.102631] esp8089_spi: first error exit
[  104.113547] esp8089_spi: esp_spi_probe EXIT
[  104.124558] eagle: probe of spi1.0 failed with error -110
[  104.137024] esp8089_spi: sem_timeout = 0
[  104.147740] esp8089_spi: esp_spi_init err 0
root@pop-os:~#

原理图:
https://whycan.cn/files/members/2701/Snipaste_2020-07-28_22-35-28.png


逻辑分析仪吐出来的时序图:
https://whycan.cn/files/members/2701/Snipaste_2020-07-28_22-42-07.png
https://whycan.cn/files/members/2701/Snipaste_2020-07-28_22-48-52.png

ESP8266串口0输出的启动信息:

 ets Jan  8 2013,rst cause:1, boot mode:(6,2)


 ets Jan  8 2013,rst cause:1, boot mode:(6,6)

waiting for host

 ets Jan  8 2013,rst cause:1, boot mode:(6,6)

waiting for host

离线

#136 2020-08-14 10:13:03

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

谢谢指点,

我也感觉是芯片没焊好,甚至怀疑是板子不对,然后重焊、重画了板子甚至拿了一块esp12f飞线,结果一样。。。。。

我再查查吧。。。。

xiezonglin 说:

感觉还是芯片工作不正常或者没焊接好,CHIP_EN脚看看是不是高电平

root@pop-os:~# insmod /lib/modules/5.2.0-licheepi-nano+/esp8089-spi.ko esp_reset_gpio=130 esp_cs0_pin=0 esp_interrupt=131
[  100.487205] esp8089_spi: loading out-of-tree module taints kernel.
[  100.502255] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[  101.107979] esp8089_spi: esp_spi_dummy_probe enter
[  101.113372] esp8089_spi: register board OK
[  101.117707] esp8089_spi: sem_timeout = 0
[  101.339049] esp8089_spi: ESP8089 power up OK
[  101.344184] esp8089_spi: esp_spi_probe ENTER
[  101.348713] esp8089_spi: esp_setup_spi
[  101.352844] esp8089_spi: sif_spi_protocol_init
[  101.357535] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.366256] esp8089_spi: fail_count = 0
[  101.484912] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.593085] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.601821] esp8089_spi: fail_count = 1
[  101.711623] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.819797] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.828460] esp8089_spi: fail_count = 2
[  101.938086] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.046329] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.055057] esp8089_spi: fail_count = 3
[  102.170503] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.290458] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.311082] esp8089_spi: fail_count = 4
[  102.427085] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.546976] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.567478] esp8089_spi: fail_count = 5
[  102.683231] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.803629] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.825123] esp8089_spi: fail_count = 6
[  102.941701] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.063014] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.084966] esp8089_spi: fail_count = 7
[  103.201628] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.322898] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.344858] esp8089_spi: fail_count = 8
[  103.461802] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.583043] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.604976] esp8089_spi: fail_count = 9
[  103.721343] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.842613] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.864570] esp8089_spi: fail_count = 10
[  103.981306] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  104.102631] esp8089_spi: first error exit
[  104.113547] esp8089_spi: esp_spi_probe EXIT
[  104.124558] eagle: probe of spi1.0 failed with error -110
[  104.137024] esp8089_spi: sem_timeout = 0
[  104.147740] esp8089_spi: esp_spi_init err 0
root@pop-os:~#

离线

#137 2020-08-14 10:13:39

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

还没呢,情况和你一样,芯片无响应。

lignin 说:

我也是,你的问题解决了吗

root@pop-os:~# insmod /lib/modules/5.2.0-licheepi-nano+/esp8089-spi.ko esp_reset_gpio=130 esp_cs0_pin=0 esp_interrupt=131
[  100.487205] esp8089_spi: loading out-of-tree module taints kernel.
[  100.502255] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[  101.107979] esp8089_spi: esp_spi_dummy_probe enter
[  101.113372] esp8089_spi: register board OK
[  101.117707] esp8089_spi: sem_timeout = 0
[  101.339049] esp8089_spi: ESP8089 power up OK
[  101.344184] esp8089_spi: esp_spi_probe ENTER
[  101.348713] esp8089_spi: esp_setup_spi
[  101.352844] esp8089_spi: sif_spi_protocol_init
[  101.357535] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.366256] esp8089_spi: fail_count = 0
[  101.484912] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.593085] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.601821] esp8089_spi: fail_count = 1
[  101.711623] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  101.819797] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  101.828460] esp8089_spi: fail_count = 2
[  101.938086] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.046329] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.055057] esp8089_spi: fail_count = 3
[  102.170503] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.290458] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.311082] esp8089_spi: fail_count = 4
[  102.427085] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.546976] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.567478] esp8089_spi: fail_count = 5
[  102.683231] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  102.803629] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  102.825123] esp8089_spi: fail_count = 6
[  102.941701] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.063014] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.084966] esp8089_spi: fail_count = 7
[  103.201628] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.322898] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.344858] esp8089_spi: fail_count = 8
[  103.461802] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.583043] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.604976] esp8089_spi: fail_count = 9
[  103.721343] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  103.842613] esp8089_spi: /home/dozh/embedded_linux/f1c200s/ESP8089-SPI/spi_sif_esp.c, 1559
[  103.864570] esp8089_spi: fail_count = 10
[  103.981306] rx:[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00],[0x00]
[  104.102631] esp8089_spi: first error exit
[  104.113547] esp8089_spi: esp_spi_probe EXIT
[  104.124558] eagle: probe of spi1.0 failed with error -110
[  104.137024] esp8089_spi: sem_timeout = 0
[  104.147740] esp8089_spi: esp_spi_init err 0
root@pop-os:~#

离线

楼主 #138 2020-08-14 11:44:17

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

请大家看第60楼,我已经给了提示,这里要注意

离线

#139 2020-08-16 00:01:08

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

谢谢大佬提醒,我再调一下spi接口驱动模式试试

迪卡 说:

请大家看第60楼,我已经给了提示,这里要注意

离线

#140 2020-08-24 23:52:15

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

DoZh 说:

谢谢大佬提醒,我再调一下spi接口驱动模式试试

试了下,每次大概会在重试到70次左右的时候,开始输出0xff 0xfe 0x03 ... , 但预期的应该是0xff 0xff 0x01,感觉正好有一个一位的位移。。。。

设备树里的spi mode0和 mode3都试过,一样。。比较懵。。。

Snipaste_2020-08-24_23-51-04.png

离线

#141 2020-08-26 18:42:11

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

用MCU简单验证了一下,每次都正常输出0xff 0xff 0x01, 看逻辑分析仪想到可能是f1c200s的SCK在CS脚拉低之前有一个脉冲,找了下可能可以这样解决:

https://linux-sunxi.org/SPIdev#LOW_on_SCK_line_on_transfer_start_when_using_SPI-Mode3

有时间试一下

离线

#142 2020-08-26 23:01:11

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

DoZh 说:

用MCU简单验证了一下,每次都正常输出0xff 0xff 0x01, 看逻辑分析仪想到可能是f1c200s的SCK在CS脚拉低之前有一个脉冲,找了下可能可以这样解决:

https://linux-sunxi.org/SPIdev#LOW_on_SCK_line_on_transfer_start_when_using_SPI-Mode3

有时间试一下


改了驱动代码,这个问题解决了,进下载固件的部分了,开始报下面的错误:

[  201.832613] esp8089_spi: spierr byte read cmd resp 0x00 no recv
[  201.865102] esp8089_spi: spierr byte read cmd resp 0x00 no recv
[  201.897660] esp8089_spi: spierr byte read cmd resp 0x00 no recv
[  201.930467] esp8089_spi: spierr byte read cmd resp 0x00 no recv

怀疑是中断的问题,继续调吧

离线

#143 2020-09-02 23:46:12

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

DoZh 说:
DoZh 说:

用MCU简单验证了一下,每次都正常输出0xff 0xff 0x01, 看逻辑分析仪想到可能是f1c200s的SCK在CS脚拉低之前有一个脉冲,找了下可能可以这样解决:

https://linux-sunxi.org/SPIdev#LOW_on_SCK_line_on_transfer_start_when_using_SPI-Mode3

有时间试一下


改了驱动代码,这个问题解决了,进下载固件的部分了,开始报下面的错误:

[  201.832613] esp8089_spi: spierr byte read cmd resp 0x00 no recv
[  201.865102] esp8089_spi: spierr byte read cmd resp 0x00 no recv
[  201.897660] esp8089_spi: spierr byte read cmd resp 0x00 no recv
[  201.930467] esp8089_spi: spierr byte read cmd resp 0x00 no recv

怀疑是中断的问题,继续调吧

从ESP8089换成8266,问题直接消失了。。。。

现在看起来网络是通了,但是中断脚是接地的,不然驱动初始化的时候还是会报另一个错。
这种情况下CPU一直在响应中断,终端都卡的要死。。。

还是要继续想办法,比如能不能屏蔽初始化时的中断超时检测。

自己跑一会内存居然还出错了。。。。

[  963.708463] kworker/u2:4: page allocation failure: order:0, mode:0xa20(GFP_ATOMIC), nodemask=(null)
[  963.729931] CPU: 0 PID: 105 Comm: kworker/u2:4 Tainted: G           O      5.2.0-licheepi-nano+ #45

离线

#144 2020-09-07 18:24:58

DoZh
会员
注册时间: 2019-12-20
已发帖子: 17
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

先这样改吧,屏蔽掉初始化时的中断检测,改完就算是调通了

--- a/esp_sip.c
+++ b/esp_sip.c
@@ -46,6 +46,7 @@
 #include "esp_ext.h"
 #endif /* USE_EXT_GPIO */
 
+extern struct task_struct *sif_irq_thread;

........

@@ -2206,7 +2207,11 @@ sip_poll_bootup_event(struct esp_sip *sip)
        esp_dbg(ESP_DBG_TRACE, "******time remain****** = [%d]\n", ret);
        if (ret <= 0) {
                esp_dbg(ESP_DBG_ERROR, "bootup event timeout\n");
-               return -ETIMEDOUT;
+               //return -ETIMEDOUT;
+               sip->epub->wait_reset = 0;
+               wake_up_process(sif_irq_thread);
+               esp_dbg(ESP_DBG_ERROR, "for unknow reason,we may not be informed the boot/rst complete event, assume it completed and continue here\n");
+               msleep(50);
        }       
 
        if(sif_get_ate_config() == 0){
@@ -2240,7 +2245,11 @@ sip_poll_resetting_event(struct esp_sip *sip)
        esp_dbg(ESP_DBG_TRACE, "******time remain****** = [%d]\n", ret);
        if (ret <= 0) {
                esp_dbg(ESP_DBG_ERROR, "resetting event timeout\n");
-               return -ETIMEDOUT;
+               //return -ETIMEDOUT;
+               sip->epub->wait_reset = 0;
+               wake_up_process(sif_irq_thread);
+               esp_dbg(ESP_DBG_ERROR, "for unknow reason,we may not be informed the boot/rst complete event, assume it completed and continue here\n");
+               msleep(50);
        }   

最近编辑记录 DoZh (2020-09-07 18:26:00)

离线

#145 2020-12-30 23:08:51

EE
会员
注册时间: 2020-10-04
已发帖子: 106
积分: 103.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

前几天画板子前调了一天搞不定,反复看这个帖子,看来看来看去都像考试题。不会
第二天没有办法之下请出神器:树莓派。
按照原来帖子,树莓派的接法,很快跑通,然后再调板子。一共花了一天半。

要点:
- 按照rockchip的文档对确定好电路,按照github原贴对一遍。https://wenku.baidu.com/view/e93f719184254b35eefd3474.html
- cs 接地(如rockchip设计)
- 下载外网文件700K/s,同时用 PC 测试 9M/s
- 芯片好烫(我是拆了一共nodemcu飞线来用)

- 树莓派真是居家良药


下面是我的改动 git diff

diff --git i/.gitignore w/.gitignore
index c6127b3..b88f0e7 100644
--- i/.gitignore
+++ w/.gitignore
@@ -50,3 +50,5 @@ modules.order
 Module.symvers
 Mkfile.old
 dkms.conf
+
+.cache.mk
diff --git i/Makefile w/Makefile
index c25d8fa..693ae60 100755
--- i/Makefile
+++ w/Makefile
@@ -9,7 +9,8 @@ KVERS_ARCH ?= $(shell arch)
 # KBUILD is the path to the Linux kernel build tree.  It is usually the
 # same as the kernel source tree, except when the kernel was compiled in
 # a separate directory.
-KBUILD ?= $(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)
+# KBUILD ?= /work/f1c100s/f1c100s-linux #$(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)
+KBUILD ?= /work/f1c100s/f1c100s-linux
 
 ifeq (,$(KBUILD))
 $(error Kernel build tree not found - please set KBUILD to configured kernel)
diff --git i/spi_stub.c w/spi_stub.c
index d4ffd96..26b075e 100755
--- i/spi_stub.c
+++ w/spi_stub.c
@@ -3,9 +3,9 @@
 
 /* https://www.signal.com.tr/pdf/cat/8n-esp8266_spi_reference_en_v1.0.pdf */
 
-#define SPI_FREQ (10000000)
+//#define SPI_FREQ (10000000)
 //#define SPI_FREQ (20000000)                             //  1. 22.5Mhz     2. 45Mhz
-//#define SPI_FREQ (30000000)                             //  1. 22.5Mhz     2. 45Mhz
+#define SPI_FREQ (30000000)                             //  1. 22.5Mhz     2. 45Mhz
 
 //Below are for spi HZ 22.5M
 #if (SPI_FREQ == 30000000)
@@ -109,9 +109,9 @@ static struct spi_board_info esp_board_spi_devices[] = {
   {
     .modalias = "ESP8089_0",
     .max_speed_hz = MAX_SPEED_HZ,
-    .bus_num = 1,
-    .chip_select = 0,
-    .mode = 0,
+    .bus_num = 0,
+    .chip_select = 1,
+    .mode = SPI_MODE_3,
   },
 };
 

离线

#146 2021-01-03 12:57:00

whyabc666
封禁
注册时间: 2019-12-12
已发帖子: 378
积分: 365

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

不是说v3s有大神搞定了ESP8089WiFi驱动?sdio的,USB?阉割版,m4驱动常规USBWiFi然后配置写死搞出个普及版?

最近编辑记录 whyabc666 (2021-01-03 13:44:13)

离线

#147 2021-01-07 20:18:22

EE
会员
注册时间: 2020-10-04
已发帖子: 106
积分: 103.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

更新

新做的一块板子放了一颗8266做wifi,调试后发现

- 最少连接 3 根信号线就可以正常工作: CLK / MISO / MOSI,其余:INT 悬空,EN/RST 上拉,CS 下拉
- 上述接线方式 WIFI 不能重新复位,需要掉电才能重新配置,所以实用的是 上面三根 + EN/RST
- WIFI速度: CPU 轻负载时内网测试速度800KB/s,CPU 有较多负载时速度减半 @30MHz

离线

#148 2021-05-01 12:07:26

eddid
会员
注册时间: 2021-03-23
已发帖子: 1
积分: 0.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡 说:
ma6254 说:

迪神NB
我尝试在openwrt跑跑看,不知道能不能长期用,还有就是8266在这种工作模式下的休眠和唤醒会不会有问题

休眠??老子不让他休眠

请问怎么让ESP8089不进入休眠,我刚把它驱动起来,就回了消息20(SIP_EVT_SLEEP)

[W/SDIO] vdd=0,bit=23,power_mode=0
clock 0Hz busmode 1 powermode 1 cs 0 Vdd 23 width 0 
clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 23 width 0 
clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 23 width 0 
clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 23 width 0 
[E/MMC] mmc err=0x00000100,risr_reg=0x00000000,risr=0x00000104
[E/MMC] [err]:0x00000100,  RTO
[E/MMC] mmc cmd 8 err
clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 14 width 0 
clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 14 width 0 
[D/SDIO] function 0, CIS tuple code 1, length 3
CISTPL_MANFID[0] 0x6666 0x1111[D/SDIO] function 0, CIS tuple code 21, length 2
[D/SDIO] function 0, CIS tuple code 1a, length 5
[D/SDIO] function 0, CIS tuple code 1b, length 8
clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 14 width 0 
clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 14 width 2 
CISTPL_MANFID[1] 0x6666 0x1111[D/SDIO] function 1, CIS tuple code 21, length 2
[D/SDIO] function 1, CIS tuple code 80, length 1
[D/SDIO] function 1, CIS tuple code 81, length 1
[D/SDIO] function 1, CIS tuple code 82, length 1
sdio_function_num=1,manufacturer=6666,product=1111esp8089 manufacturer=6666,product=1111sdio_function[1]->product=0x1111[I/esp] esp_sif_sdio_probe >> enter
SDIO: enabling function func[1]=800cebb0 with func[0]=800ceaec
SDIO: enabled function successfull
[I/esp]  esp_sif_sdio_probe >> power_on err 0 
[D/esp] 

                 SLC data 0x12102500, ID 0x00000600

[E/esp] esp_msg_level=0x00000007[I/esp] esp_sif_sdio_init_all offset=0x10,addr=0x40100000,len=0xc130
[I/esp] esp_sif_sdio_init_all offset=0xc148,addr=0x3ffe8000,len=0xf4
[I/esp] esp_sif_sdio_init_all offset=0xc244,addr=0x3ffe8100,len=0x920
SDIO: enabling IRQ for function 1
[I/esp] sending bootup
[I/esp] sip_alloc_skbuf ptr=800cf294,len=16,sip_type=0,sip_cmd=5
[I/esp] sip_cmd=5,seq=222
[I/esp] sip_free_skbuff ptr=800cf294,len=16,ref=1
[I/e[I/esp]  sif_dsr enter 0 
[D/esp] sif_dsr real_intr_cnt 1[I/esp] sip_rx enter
[I/esp] sip_rx rx_buf=800d2bc8 first_sz=12 ref=1
[I/esp]  sip_rx first_skb only
[I/esp] esp_sip_rx_pkt_process Hcredits 0x0000c068, realCredits 104
[D/esp] sip_update_tx_credits:before add, credits is 0
[I/esp] sip_update_tx_credits:after add 104, credits is 104
[I/esp] esp_sip_rx_pkt_process first_pkt_len 12, whole pkt len 12 
[I/esp] seq 0 
[I/esp] sip_parse_events evtid=0
[I/esp] sip_alloc_skbuf ptr=800d2de4,len=140,sip_type=0,sip_cmd=7
[I/esp] sip_cmd=7,seq=0
[I/esp] sip_free_skbuff ptr=800d2de4,len=140,ref=1
[I/esp] sip_free_skbuff ptr=800d2bc8,len=12,ref=1
[I/esp]  sif_dsr enter 1 
[D/esp] sif_dsr bogus_intr_cnt 1
sgussent bootup
[I/esp] polling resetting event... 
[I/esp]  sif_dsr enter 2 
[D/esp] sif_dsr real_intr_cnt 2[I/esp] sip_rx enter
[I/esp] sip_rx rx_buf=800d2bc8 first_sz=256 ref=1
[I/esp]  sip_rx first_skb only
[I/esp] esp_sip_rx_pkt_process Hcredits 0x00100001, realCredits 1
[D/esp] sip_update_tx_credits:before add, credits is 103
[I/esp] sip_update_tx_credits:after add 1, credits is 104
[I/esp] esp_sip_rx_pkt_process first_pkt_len 256, whole pkt len 256 
[I/esp] seq 1 
[I/esp] sip_parse_events evtid=8
[I/esp] esp_target: e826c2b3c9fd 57 18202
[I/esp] sip_free_skbuff ptr=800d2bc8,len=256,ref=1
[I/esp]  sif_dsr enter 3 
[D/esp] sif_dsr real_intr_cnt 3[I/esp] sip_rx enter
[I/esp] sip_rx rx_buf=800d2bc8 first_sz=12 ref=1
[I/esp]  sip_rx first_skb only
[I/esp] esp_sip_rx_pkt_process Hcredits 0x0000c000, realCredits 0
[I/esp] esp_sip_rx_pkt_process first_pkt_len 12, whole pkt len 12 
[I/esp] seq 2 
[I/esp] sip_parse_events evtid=16
[I/esp] sip_free_skbuff ptr=800d2bc8,len=12,ref=1
[I/esp]  sif_dsr enter 4 
[D/esp] sif_dsr bogus_intr_cnt 2
[I/esp]  sif_dsr enter 5 
[D/esp] sif_dsr bogus_intr_cnt 3
[I/esp] target resetting 0
[I/esp]  esp_sif_sdio_probe return  0
[I/esp] first normal exit
SDIO: disabling IRQ for function 1
[E/MMC] mmc err=0x00000100,risr_reg=0x00000010,risr=0x00000114
[E/MMC] [err]:0x00000100,  RTO
[E/MMC] mmc cmd 52 err
[E/esp] sif_disable_irq release irq failed
[W/SDIO] vdd=14,bit=23,power_mode=2
clock 50000000Hz busmode 1 powermode 2 cs 0 Vdd 23 width 0 
clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 23 width 0 
clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 23 width 0 
clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 23 width 0 
[E/MMC] mmc err=0x00000100,risr_reg=0x00000000,risr=0x00000104
[E/MMC] [err]:0x00000100,  RTO
[E/MMC] mmc cmd 8 err
clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 14 width 0 
clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 14 width 0 
[D/SDIO] function 0, CIS tuple code 1, length 3
CISTPL_MANFID[0] 0x6666 0x1111[D/SDIO] function 0, CIS tuple code 21, length 2
[D/SDIO] function 0, CIS tuple code 1a, length 5
[D/SDIO] function 0, CIS tuple code 1b, length 8
clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 14 width 0 
clock 50000000Hz busmode 2 powermode 2 cs 0 Vdd 14 width 2 
CISTPL_MANFID[1] 0x6666 0x1111[D/SDIO] function 1, CIS tuple code 21, length 2
[D/SDIO] function 1, CIS tuple code 80, length 1
[D/SDIO] function 1, CIS tuple code 81, length 1
[D/SDIO] function 1, CIS tuple code 82, length 1
sdio_function_num=1,manufacturer=6666,product=1111esp8089 manufacturer=6666,product=1111sdio_function[1]->product=0x1111[I/esp] esp_sif_sdio_probe >> enter
SDIO: enabling function func[1]=800cebcc with func[0]=800ceaec
SDIO: enabled function successfull
[I/esp]  esp_sif_sdio_probe >> power_on err 0 
[D/esp] 

                 SLC data 0x12102500, ID 0x00000600

[I/esp] esp_sif_sdio_init_all offset=0x10,addr=0x40100000,len=0xfcc8
[I/esp] esp_sif_sdio_init_all offset=0xfce0,addr=0x3ffe8000,len=0x3de
[I/esp] esp_sif_sdio_init_all offset=0x100c6,addr=0x3ffe83e0,len=0x4b4
SDIO: enabling IRQ for function 1
[I/esp] sending bootup
[I/esp] sip_alloc_skbuf ptr=800d2bf4,len=16,sip_type=0,sip_cmd=5
[I/esp] sip_cmd=5,seq=286
[I/esp] sip_free_skbuff ptr=800d2bf4,len=16,ref=1
[I/esp] sent bootup
[I/esp] polling bootup event... 
[I/esp]  sif_dsr enter 6 
[D/esp] sif_dsr real_intr_cnt 4[I/esp] sip_rx enter
[I/esp] sip_rx rx_buf=800d2c20 first_sz=12 ref=1
[I/esp]  sip_rx first_skb only
[I/esp] esp_sip_rx_pkt_process Hcredits 0x0000c068, realCredits 104
[D/esp] sip_update_tx_credits:before add, credits is 0
[I/esp] sip_update_tx_credits:after add 104, credits is 104
[I/esp] esp_sip_rx_pkt_process first_pkt_len 12, whole pkt len 12 
[I/esp] seq 0 
[I/esp] sip_parse_events evtid=0
[I/esp] sip_alloc_skbuf ptr=800d2e3c,len=140,sip_type=0,sip_cmd=7
[I/esp] sip_cmd=7,seq=0
[I/esp] sip_free_skbuff ptr=800d2e3c,len=140,ref=1
[I/esp] sip_free_skbuff ptr=800d2c20,len=12,ref=1
[I/esp]  sif_dsr enter 7 
[D/esp] sif_dsr bogus_intr_cnt 4
[I/esp]  sif_dsr enter 8 
[D/esp] sif_dsr real_intr_cnt 5[I/esp] sip_rx enter
[I/esp] sip_rx rx_buf=800d2c20 first_sz=28 ref=1
[I/esp]  sip_rx first_skb only
[I/esp] esp_sip_rx_pkt_process Hcredits 0x0001c001, realCredits 1
[D/esp] sip_update_tx_credits:before add, credits is 103
[I/esp] sip_update_tx_credits:after add 1, credits is 104
[I/esp] esp_sip_rx_pkt_process first_pkt_len 28, whole pkt len 28 
[I/esp] seq 1 
[I/esp] sip_parse_events evtid=1
[I/esp] sip_post_init tx_blksz 260 rx_blksz 524 mac ac:d0:74:d3:f8:c6
[I/esp] sip_free_skbuff ptr=800d2c20,len=28,ref=1
[I/esp]  sif_dsr enter 9 
[D/esp] sif_dsr real_intr_cnt 6[I/esp] sip_rx enter
[I/esp] sip_rx rx_buf=800d2c20 first_sz=256 ref=1
[I/esp]  sip_rx first_skb only
[I/esp] esp_sip_rx_pkt_process Hcredits 0x00100000, realCredits 0
[I/esp] esp_sip_rx_pkt_process first_pkt_len 256, whole pkt len 256 
[I/esp] seq 2 
[I/esp] sip_parse_events evtid=8
[I/esp] esp_target: e826c2b3c9fd 57 18202
[I/esp] sip_free_skbuff ptr=800d2c20,len=256,ref=1
[I/esp]  sif_dsr enter 10 
[D/esp] sif_dsr bogus_intr_cnt 5
[I/esp]  sif_dsr enter 11 
[D/esp] sif_dsr bogus_intr_cnt 6
[I/esp] target booted up
[I/esp]  esp_sif_sdio_probe return  0
[I/esp] second normal exit
[I/esp]  sif_dsr enter 12 
[D/esp] sif_dsr real_intr_cnt 7[I/esp] sip_rx enter
[I/esp] sip_rx rx_buf=800d2bf4 first_sz=12 ref=1
[I/esp] s
[I/esp]  sip_rx first_skb only
[I/esp] esp_sip_rx_pkt_process Hcredits 0x0000c000, realCredits 0
[I/esp] esp_sip_rx_pkt_process first_pkt_len 12, whole pkt len 12 
[I/esp] seq 3 
[I/esp] sip_parse_events evtid=20                                    //ESP进入休眠?
[I/esp] sip_free_skbuff ptr=800d2bf4,len=12,ref=1
[I/esp]  sif_dsr enter 13 
[D/esp] sif_dsr bogus_intr_cnt 7

离线

#149 2021-05-11 17:15:47

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

大佬们看看我这接线对吗?
QQ截图20210511171224.png
QQ截图20210511171051.png

离线

#150 2021-05-11 17:48:15

loveme758
会员
注册时间: 2021-01-25
已发帖子: 17
积分: 0.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

该评论内容与本帖子无关,鼓励各位坑友积极发言讨论与帖子有关的内容!

离线

  • 不通过:与技术无关

#151 2021-06-27 09:56:12

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我也来了,今天开搞

离线

#152 2021-06-27 14:52:25

scy251147
会员
注册时间: 2021-05-16
已发帖子: 31
积分: 15.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

f1c100s怎么和8266接线对应呢?

离线

#153 2021-07-07 09:19:36

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

停在距离大神喊牛逼的位置无所适从

[   80.631193] esp8089_spi: loading out-of-tree module taints kernel.
[   80.645144] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   81.249796] sun6i-spi 1c05000.spi: chipselect 0 already in use
[   81.255804] esp8089_spi: FAILED to create slave
[   81.260399] 8<--- cut here ---
[   81.263558] Unable to handle kernel NULL pointer dereference at virtual address 000001b8
[   81.271743] pgd = (ptrval)
[   81.274482] [000001b8] *pgd=80ca3831, *pte=00000000, *ppte=00000000
[   81.280794] Internal error: Oops: 17 [#1] ARM
[   81.285167] Modules linked in: esp8089_spi(O+)
[   81.289658] CPU: 0 PID: 122 Comm: insmod Tainted: G        W  O      5.7.1 #7

大佬们给看看呗

离线

#154 2021-07-07 09:32:00

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

[   81.249796] sun6i-spi 1c05000.spi: chipselect 0 already in use
[   81.255804] esp8089_spi: FAILED to create slave

SPI-CS 已经被flash使用了吧?





离线

#155 2021-07-07 09:40:28

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

哇酷小二 说:

[   81.249796] sun6i-spi 1c05000.spi: chipselect 0 already in use
[   81.255804] esp8089_spi: FAILED to create slave

SPI-CS 已经被flash使用了吧?

没有flash
设备树配置如下:

dtsi
pio节点下面

            spi0_pins: spi0-pins {
               	pins = "PC0", "PC1", "PC2", "PC3";
                function = "spi0";
            };

soc节点下面

        spi0:spi@1c05000 {
            compatible = "allwinner,suniv-spi", "allwinner,sun8i-h3-spi";
            reg = <0x01c05000 0x1000>;
            interrupts = <0xa>;
            clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
            clock-names = "ahb", "mod";
            resets = <&ccu RST_BUS_SPI0>;
            status = "disabled";
            #address-cells = <1>;
            #size-cells = <0>;
        };

dts

&spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi0_pins>;
        status = "okay";
        spidev@0x00 {
               compatible = "spidev";
               spi-max-frequency = <100000000>;
               reg = <0>;
		};
};

刚好把spi0.0让出来
spi-cs都接地了
QQ截图20210707094200.png


问题正好停在在36~37之间的位置

最近编辑记录 twzy (2021-07-07 09:42:32)

离线

#156 2021-07-07 09:57:44

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,388
积分: 1902
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

请问为什么要拉低到地呢?





离线

#157 2021-07-07 10:02:46

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

哇酷小二 说:

请问为什么要拉低到地呢?

看了一下147楼,人家让下拉,我直接拉倒地了,:lol:自己给自己挖了个坑

离线

#158 2021-08-18 15:21:23

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

请问如何修改Makefile的KBUILD,指向F1C200S linux-5.2源码目录?

MODNAME = esp8089-spi



# By default, we try to compile the modules for the currently running

# kernel.  But it's the first approximation, as we will re-read the

# version from the kernel sources.

KVERS_UNAME ?= $(shell uname -r)

KVERS_ARCH ?= $(shell arch)



# KBUILD is the path to the Linux kernel build tree.  It is usually the

# same as the kernel source tree, except when the kernel was compiled in

# a separate directory.

KBUILD ?= $(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)

离线

#159 2021-08-18 15:24:44

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@542396750@qq.com

@@ -9,7 +9,8 @@ KVERS_ARCH ?= $(shell arch)
# KBUILD is the path to the Linux kernel build tree.  It is usually the
# same as the kernel source tree, except when the kernel was compiled in
# a separate directory.
-KBUILD ?= $(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)
+# KBUILD ?= /work/f1c100s/f1c100s-linux #$(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)
+KBUILD ?= /work/f1c100s/f1c100s-linux

离线

#160 2021-08-18 16:17:49

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

QQ截图20210818161632.png
使用模组方式接线方式如图

离线

楼主 #161 2021-08-18 18:08:43

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

twzy 说:

得把flash拆了吧,这条不能没有

离线

#162 2021-08-19 14:26:14

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

RST      PE3  131
EN   PE4
IRQ  PE5  32*4+5=133
CS  PC1  32*2+1=65

# cd /lib/modules/5.4.77/
# insmod esp8089-spi.ko esp_reset_gpio=131 esp_cs0_pin=65  esp_interrupt=133
[   18.120825] esp8089_spi: loading out-of-tree module taints kernel.
[   18.139153] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   18.744422] esp8089_spi: esp_spi_dummy_probe enter
[   18.749446] esp8089_spi: register board OK
[   18.753547] esp8089_spi: sem_timeout = 0
[   18.977012] esp8089_spi: ESP8089 power up OK
[   18.981721] esp8089_spi: esp_spi_probe ENTER
[   18.986158] esp8089_spi: esp_setup_spi
[   18.989941] esp8089_spi: sif_spi_protocol_init
[   18.994379] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   19.001762] esp8089_spi: fail_count = 0
[   19.111812] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.219538] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   19.226879] esp8089_spi: fail_count = 1
[   19.338297] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.446178] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   19.453478] esp8089_spi: fail_count = 2
[   19.564533] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.672268] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   19.679606] esp8089_spi: fail_count = 3
[   19.791680] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   19.899419] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   19.906761] esp8089_spi: fail_count = 4
[   20.019025] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.126777] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   20.134073] esp8089_spi: fail_count = 5
[   20.245284] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.353022] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   20.360360] esp8089_spi: fail_count = 6
[   20.474072] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.581866] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   20.589210] esp8089_spi: fail_count = 7
[   20.701654] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.809694] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   20.817038] esp8089_spi: fail_count = 8
[   20.927312] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   21.035576] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   21.042875] esp8089_spi: fail_count = 9
[   21.153863] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   21.262108] esp8089_spi: /home/obm/123/ESP8089-SPI_20200509/spi_sif_esp.c, 1559
[   21.269450] esp8089_spi: fail_count = 10
[   21.379834] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   21.488100] esp8089_spi: first error exit
[   21.492122] esp8089_spi: esp_spi_probe EXIT
[   21.496415] eagle: probe of spi0.0 failed with error -110
[   21.501954] esp8089_spi: sem_timeout = 0
[   21.505958] esp8089_spi: esp_spi_init err 0

卡在这一步,大佬求搭救

离线

#163 2021-08-20 10:25:49

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@542396750@qq.com
En 或RST 只配置一个就行

离线

#164 2021-08-20 10:28:55

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@542396750@qq.com

.bus_num = 0,  //根据实际情况填写
.chip_select = 1, //根据实际情况填写
.mode = SPI_MODE_3

离线

楼主 #165 2021-08-20 11:58:32

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

twzy 说:

@542396750@qq.com

.bus_num = 0,  //根据实际情况填写
.chip_select = 1, //根据实际情况填写
.mode = SPI_MODE_3

我调试过程中,关键卡在这个模式方面,前面我提了

离线

#166 2021-08-20 12:13:07

xboot
会员
注册时间: 2019-10-15
已发帖子: 692
积分: 434

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡 说:
twzy 说:

得把flash拆了吧,这条不能没有

ESP8266这种用法,是不是固件由驱动下载进去,然后8266仅仅作为一个网卡,本身没有实现任何协议栈,具体的协议栈还是由linux提供的,这种方式,如果想裸奔使用,欠缺哪些东西。看这带宽眼谗,比起串口好太多了。

离线

#167 2021-08-20 19:42:46

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

离线

#168 2021-08-24 09:54:07

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 163
积分: 19.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

542396750@qq.com 说:

好了,被模块上的丝印坑了,找到esp8266ex规格书,对应引脚重新接上好了

离线

#169 2021-08-30 08:31:34

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

遇到一个和奇怪的问题,开发板接受数据正常,通过ssh进行访问操作都正常 ,但是只要大量发送数据,比如作为Web服务器被访问,wifi就挂了


root@SnailCard:~# dmesg |grep wlan0
[  241.525691] wlan0: authenticate with 78:44:fd:7e:02:88
[  241.531292] wlan0: send auth to 78:44:fd:7e:02:88 (try 1/3)
[  241.742250] wlan0: send auth to 78:44:fd:7e:02:88 (try 2/3)
[  241.755538] wlan0: authenticated
[  241.772270] wlan0: associate with 78:44:fd:7e:02:88 (try 1/3)
[  241.982257] wlan0: associate with 78:44:fd:7e:02:88 (try 2/3)
[  241.998657] wlan0: RX AssocResp from 78:44:fd:7e:02:88 (capab=0x1411 status=0 aid=1)
[  242.009522] wlan0: associated
[  242.014791] wlan0: Limiting TX power to 20 (20 - 0) dBm as advertised by 78:44:fd:7e:02:88
[  572.506851] wlan0: authenticate with 78:44:fd:7e:02:88   #在这里开始作为Web服务器被访问
[  572.514157] wlan0: send auth to 78:44:fd:7e:02:88 (try 1/3)
[  572.725587] wlan0: send auth to 78:44:fd:7e:02:88 (try 2/3)
[  572.935684] wlan0: send auth to 78:44:fd:7e:02:88 (try 3/3)
[  573.145784] wlan0: authentication with 78:44:fd:7e:02:88 timed out

调了好几天,毫无头绪,目前怀疑两点:
1 模块坏了
2 使用的144楼的方案,屏蔽了初始化时的中断检测

离线

#170 2021-09-17 10:51:40

wu200180
会员
注册时间: 2021-07-08
已发帖子: 1
积分: 0.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

每次insmode 再rmood,再次insmod就失败

离线

#171 2021-09-26 11:04:06

binbin
会员
注册时间: 2020-04-08
已发帖子: 15
积分: 4.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

迪卡 说:
twzy 说:

@542396750@qq.com

.bus_num = 0,  //根据实际情况填写
.chip_select = 1, //根据实际情况填写
.mode = SPI_MODE_3

我调试过程中,关键卡在这个模式方面,前面我提了

esp8086 SDIO 接口,如果使用 spi 接 口,要怎么设定的

离线

#172 2021-09-28 10:10:33

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@binbin
看#126

离线

#173 2021-10-10 15:38:55

binbin
会员
注册时间: 2020-04-08
已发帖子: 15
积分: 4.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

哦,直接按这个 接口连接, 那 ic  不用设定 用SDIO  还是  SPI 通信吧

离线

#174 2021-11-24 13:00:10

wk_neo
会员
注册时间: 2021-11-24
已发帖子: 4
积分: 4

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

看着楼主的更贴,感觉肝在疼

离线

#175 2022-01-02 14:57:03

h8416
会员
注册时间: 2020-03-03
已发帖子: 22
积分: 12

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

esp32-hosted 这个怎么看呀

离线

#176 2022-01-27 14:23:30

CHSHIQING
会员
注册时间: 2020-11-27
已发帖子: 47
积分: 2

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

貌似用esp8266很容易就断开连接,有什么好的解决方法吗

离线

#177 2022-03-10 15:49:58

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

大佬,esp8266 哪些脚要连到f1c200s阿? GPIO15 0 2 需要连接吗?

离线

#178 2022-03-11 10:23:00

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@迪卡
大佬 怎么改SPI 的频率

离线

#179 2022-03-11 10:25:34

lx9744
会员
注册时间: 2022-03-11
已发帖子: 1
积分: 1

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

你这个方向错了

离线

#180 2022-03-11 12:06:57

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@542396750@qq.com
大佬 我也卡在这里 解决了么

离线

#181 2022-03-11 12:07:52

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

lx9744 说:

你这个方向错了

大佬 哪里错了 请指点

离线

#182 2022-03-11 16:44:24

FakeBBA
会员
注册时间: 2022-02-25
已发帖子: 5
积分: 0

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我用8266做家电和物联网,没想到还能这样用,做四轴时有改造8266做成SPI高速网络模块做数据回传,速度稳定1.5M没问题

离线

#183 2022-05-13 22:42:44

future
会员
注册时间: 2021-11-28
已发帖子: 49
积分: 26

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

老哥,请教下,我从https://github.com/notabucketofspam/ESP8089-SPI/
下载了这从这个地址下载了这个驱动程序,在程序中好像没有使能spi接口啊,这些宏都没有打开是什么情况,是在编译的时候打开的吗
我现在想要使用f1的spi1来驱动这个该怎么修改啊
[img]图片https://whycan.com/files/members/7831/2022-05-13 22-23-37屏幕截图.png[/img]

离线

#185 2022-06-08 09:12:46

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

跟帖,后面遇到初始化时中断无响应,把CS接地就行了

离线

#186 2022-06-14 21:50:26

资本家大善人
会员
注册时间: 2021-03-26
已发帖子: 191
积分: 131.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

拆了好多,总算成功了,开始ping测试1000多毫秒延时,板子CS引脚下拉到GND就快了
QQ截图20220614214643.pngQQ截图20220614214701.pngQQ截图20220614214653.png
CS未下拉至GND
QQ图片20220614214523.png
CS下拉到GND
QQ图片20220614214531.png

离线

#187 2022-06-17 09:48:13

你在卖萌吗
会员
注册时间: 2022-06-17
已发帖子: 12
积分: 57

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

一直卡在这个部分,这个要怎么解决呢?
root@hellolinux:~# insmod esp8089-spi.ko
[  109.163676] esp8089_spi: loading out-of-tree module taints kernel.
[  109.177688] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[  109.783281] esp8089_spi: esp_spi_dummy_probe enter
[  109.788243] esp8089_spi: register board OK
[  109.792342] esp8089_spi: sem_timeout = 0
[  110.013138] esp8089_spi: ESP8089 power up OK
[  110.017965] esp8089_spi: esp_spi_probe ENTER
[  110.022244] esp8089_spi: esp_setup_spi
[  110.026182] esp8089_spi: sif_spi_protocol_init
[  110.030632] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  110.038333] esp8089_spi: fail_count = 0
[  110.167328] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  110.275072] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  110.282712] esp8089_spi: fail_count = 1
[  110.394538] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  110.502237] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  110.509915] esp8089_spi: fail_count = 2
[  110.621057] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  110.728824] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  110.736503] esp8089_spi: fail_count = 3
[  110.849851] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  110.957586] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  110.965259] esp8089_spi: fail_count = 4
[  111.078778] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  111.186505] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  111.194184] esp8089_spi: fail_count = 5
[  111.307702] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  111.415453] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  111.423132] esp8089_spi: fail_count = 6
[  111.536572] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  111.644299] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  111.651941] esp8089_spi: fail_count = 7
[  111.763225] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  111.870912] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  111.878591] esp8089_spi: fail_count = 8
[  111.991711] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  112.099452] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  112.107132] esp8089_spi: fail_count = 9
[  112.220564] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  112.328320] esp8089_spi: /home/persai/Downloads/new/ESP8089-SPI/spi_sif_esp.c                                                             , 1559
[  112.335999] esp8089_spi: fail_count = 10
[  112.449538] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                                                             ,[0xff]
[  112.557301] esp8089_spi: first error exit
[  112.561318] esp8089_spi: esp_spi_probe EXIT
[  112.565601] eagle: probe of spi0.0 failed with error -110
[  112.571221] esp8089_spi: sem_timeout = 0
[  112.575247] esp8089_spi: esp_spi_init err 0
root@hellolinux:~#

离线

#188 2022-06-17 11:56:46

资本家大善人
会员
注册时间: 2021-03-26
已发帖子: 191
积分: 131.5

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@你在卖萌吗
板子啥都不接也会出现这个
检查硬件 检查SPI模式3

离线

#189 2022-06-17 22:22:54

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@你在卖萌吗
CS 接地

离线

#190 2022-06-18 13:17:45

你在卖萌吗
会员
注册时间: 2022-06-17
已发帖子: 12
积分: 57

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

资本家大善人 说:

@你在卖萌吗
板子啥都不接也会出现这个
检查硬件 检查SPI模式3

好的,我检查一下,我使用群友编译出来驱动的是能用的,我的SPI配置是

static struct spi_board_info esp_board_spi_devices[] = {
  {
    .modalias = "ESP8089_0",
    .max_speed_hz = MAX_SPEED_HZ,
    .bus_num = 0,
    .chip_select = 0,
    .mode = SPI_MODE_3,
  },
};

不知道对不对

离线

#191 2022-06-18 13:18:34

你在卖萌吗
会员
注册时间: 2022-06-17
已发帖子: 12
积分: 57

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

LinuxGo 说:

@你在卖萌吗
CS 接地

我有试过了,示波器显示的情况是MOSI没输出,应该是驱动配置有点问题

离线

#192 2022-06-18 18:02:17

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@twzy
我的也是ssh正常,只要下载或者上传大文件,一段时间就挂了,不知怎么解决

离线

#193 2022-08-03 23:24:05

tevada2010
会员
注册时间: 2022-07-23
已发帖子: 54
积分: 69

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@资本家大善人
我使用 v3s + esp8089 连接到 wifi。 10 分钟后,连接断开。

# ping www.baidu.com
PING www.baidu.com (14.215.177.38): 56 data bytes
64 bytes from 14.215.177.38: seq=0 ttl=56 time=10.405 ms
[  252.489515] esp_sdio_remove enter
[  252.494046] sif_disable_irq release irq failed
[  252.498511] ------------[ cut here ]------------
[  252.503258] WARNING: CPU: 0 PID: 5 at kernel/workqueue.c:3031 __flush_work+0x184/0x1ac
[  252.511186] Modules linked in: esp8089
[  252.514944] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.2.0-licheepi-zero #3
[  252.522154] Hardware name: Allwinner sun8i Family
[  252.526864] Workqueue: events_freezable mmc_rescan
[  252.531678] [<c010ec34>] (unwind_backtrace) from [<c010b6cc>] (show_stack+0x10/0x14)
[  252.539419] [<c010b6cc>] (show_stack) from [<c0715720>] (dump_stack+0x94/0xa8)
[  252.546641] [<c0715720>] (dump_stack) from [<c011d984>] (__warn+0xfc/0x114)
[  252.553598] [<c011d984>] (__warn) from [<c011dab0>] (warn_slowpath_null+0x40/0x48)
[  252.561161] [<c011dab0>] (warn_slowpath_null) from [<c0133eec>] (__flush_work+0x184/0x1ac)
[  252.569421] [<c0133eec>] (__flush_work) from [<c0136fc8>] (__cancel_work_timer+0x110/0x1ec)
[  252.577800] [<c0136fc8>] (__cancel_work_timer) from [<bf004168>] (sip_detach+0xe8/0x1bc [esp8089])
[  252.586778] [<bf004168>] (sip_detach [esp8089]) from [<bf000fe0>] (esp_sdio_remove+0x60/0x1ac [esp8089])
[  252.596265] [<bf000fe0>] (esp_sdio_remove [esp8089]) from [<c0539780>] (sdio_bus_remove+0x30/0xf8)
[  252.605225] [<c0539780>] (sdio_bus_remove) from [<c04330b4>] (device_release_driver_internal+0xdc/0x1a0)
[  252.614701] [<c04330b4>] (device_release_driver_internal) from [<c0431bec>] (bus_remove_device+0xcc/0xf8)
[  252.624260] [<c0431bec>] (bus_remove_device) from [<c042e2a0>] (device_del+0x13c/0x324)
[  252.632250] [<c042e2a0>] (device_del) from [<c0539c08>] (sdio_remove_func+0x1c/0x28)
[  252.639987] [<c0539c08>] (sdio_remove_func) from [<c0537a34>] (mmc_sdio_remove+0x40/0x70)
[  252.648159] [<c0537a34>] (mmc_sdio_remove) from [<c0537c44>] (mmc_sdio_detect+0x6c/0xf8)
[  252.656242] [<c0537c44>] (mmc_sdio_detect) from [<c052fe30>] (mmc_rescan+0x1bc/0x38c)
[  252.664066] [<c052fe30>] (mmc_rescan) from [<c0135e64>] (process_one_work+0x150/0x358)
[  252.671976] [<c0135e64>] (process_one_work) from [<c0136098>] (worker_thread+0x2c/0x518)
[  252.680062] [<c0136098>] (worker_thread) from [<c013b854>] (kthread+0x120/0x150)
[  252.687453] [<c013b854>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[  252.694663] Exception stack(0xc3845fb0 to 0xc3845ff8)
[  252.699701] 5fa0:                                     00000000 00000000 00000000 00000000
[  252.707868] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  252.716034] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  252.722767] ---[ end trace c2da1efaf38c4f3d ]---
[  252.727432] wlan0: deauthenticating from c8:e7:d8:34:27:84 by local choice (Reason: 3=DEAUTH_LEAVING)
[  252.831695] mmc1: card 0001 removed
[  252.887836] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[  252.908732] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[  252.923924] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[  252.939568] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[  252.949438] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[  252.962697] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[  252.971128] mmc1: new high speed SDIO card at address 0001
[  252.990913] 8<--- cut here ---
[  252.993997] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[  253.002247] pgd = 6ae702fa
[  253.004956] [00000004] *pgd=00000000
[  253.008538] Internal error: Oops: 17 [#1] SMP ARM
[  253.013235] Modules linked in: esp8089
[  253.016989] CPU: 0 PID: 5 Comm: kworker/0:0 Tainted: G        W         5.2.0-licheepi-zero #3
[  253.025584] Hardware name: Allwinner sun8i Family
[  253.030297] Workqueue: events_freezable mmc_rescan
[  253.035123] PC is at esp_sdio_probe+0x48/0x3e4 [esp8089]
[  253.040432] LR is at sdio_bus_probe+0xfc/0x114
[  253.044868] pc : [<bf001174>]    lr : [<c0539944>]    psr: 20060013
[  253.051124] sp : c3845d98  ip : 29aaaaab  fp : c0b04c48
[  253.056340] r10: 0000000e  r9 : bf00a188  r8 : bf00a188
[  253.061557] r7 : c32bf400  r6 : bf00d080  r5 : bf039784  r4 : 00000000
[  253.068073] r3 : c32bf408  r2 : 00000003  r1 : 00000000  r0 : c32bf400
[  253.074592] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  253.081716] Control: 10c5387d  Table: 432b406a  DAC: 00000051
[  253.087455] Process kworker/0:0 (pid: 5, stack limit = 0xb741b1b1)
[  253.093626] Stack: (0xc3845d98 to 0xc3846000)
[  253.097979] 5d80:                                                       bf00d0e8 0000000e
[  253.106147] 5da0: c0b04c48 c32bf408 00000000 c32bf400 bf00d0e8 bf00a188 bf00d0e8 c0539944
[  253.114315] 5dc0: c0b838c8 c32bf408 00000000 c0b838cc 00000001 c04329b4 c32bf408 bf00d0e8
[  253.122482] 5de0: c0432e1c c0b04c48 00000001 00000000 00000001 c0432c34 c0b41240 00000000
[  253.130650] 5e00: 00000000 c0b87250 bf00d0e8 c3845e64 c32bf408 00000000 c3845e64 c0432e1c
[  253.138818] 5e20: c0b04c48 00000001 00000000 00000001 c0b04c48 c0430cc8 00000001 c39a0c6c
[  253.146986] 5e40: c31dd2b8 3e4fcf47 c32bf408 c32bf408 c0b04c48 c32bf44c c3300008 c0432764
[  253.155153] 5e60: 00000cc0 c32bf408 00000001 3e4fcf47 c32bf408 c32bf408 c0b3b860 c3300008
[  253.163321] 5e80: 00000000 c0431b18 c32bf408 00000000 c0b04c48 c042f5cc c32bf400 c3b91000
[  253.171489] 5ea0: 00000001 c052f164 c3300004 3e4fcf47 c3845ec8 c32bf400 c32bf408 c3300004
[  253.179657] 5ec0: c3b91000 c3300398 c3300000 c0539bd8 00000000 00000001 c3300004 c0538f40
[  253.187824] 5ee0: 00000000 c3845ef7 00000000 00000000 00000000 00000000 10ffff00 3e4fcf47
[  253.195992] 5f00: ffffff92 c3b9128c 00061a80 c3b91000 c086bfc0 c086bfcc c3b91290 00000000
[  253.204160] 5f20: c3dee880 c052ff78 c380d680 c3b9128c c3dee880 c3df1c00 00000000 c0135e64
[  253.212328] 5f40: c3dee898 c0b03d00 c380d680 c3dee880 c380d694 c3dee898 c0b03d00 c3844000
[  253.220496] 5f60: 00000008 c0136098 00000000 c3816980 c38168c0 00000000 c380d680 c013606c
[  253.228663] 5f80: c381699c c3833eac 00000000 c013b854 c38168c0 c013b734 00000000 00000000
[  253.236830] 5fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[  253.244997] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  253.253164] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[  253.261360] [<bf001174>] (esp_sdio_probe [esp8089]) from [<c0539944>] (sdio_bus_probe+0xfc/0x114)
[  253.270233] [<c0539944>] (sdio_bus_probe) from [<c04329b4>] (really_probe+0x1dc/0x2e0)
[  253.278147] [<c04329b4>] (really_probe) from [<c0432c34>] (driver_probe_device+0x60/0x1a0)
[  253.286406] [<c0432c34>] (driver_probe_device) from [<c0430cc8>] (bus_for_each_drv+0x74/0xb8)
[  253.294925] [<c0430cc8>] (bus_for_each_drv) from [<c0432764>] (__device_attach+0xd0/0x13c)
[  253.303181] [<c0432764>] (__device_attach) from [<c0431b18>] (bus_probe_device+0x84/0x8c)
[  253.311352] [<c0431b18>] (bus_probe_device) from [<c042f5cc>] (device_add+0x444/0x5e4)
[  253.319263] [<c042f5cc>] (device_add) from [<c0539bd8>] (sdio_add_func+0x5c/0x70)
[  253.326741] [<c0539bd8>] (sdio_add_func) from [<c0538f40>] (mmc_attach_sdio+0x270/0x370)
[  253.334825] [<c0538f40>] (mmc_attach_sdio) from [<c052ff78>] (mmc_rescan+0x304/0x38c)
[  253.342652] [<c052ff78>] (mmc_rescan) from [<c0135e64>] (process_one_work+0x150/0x358)
[  253.350566] [<c0135e64>] (process_one_work) from [<c0136098>] (worker_thread+0x2c/0x518)
[  253.358653] [<c0136098>] (worker_thread) from [<c013b854>] (kthread+0x120/0x150)
[  253.366044] [<c013b854>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[  253.373255] Exception stack(0xc3845fb0 to 0xc3845ff8)
[  253.378299] 5fa0:                                     00000000 00000000 00000000 00000000
[  253.386466] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  253.394632] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  253.401243] Code: e5954018 e3a01000 e5851018 e2873008 (e5948004)
[  253.407446] ---[ end trace c2da1efaf38c4f3e ]---
ping: sendto: Network is unreachable

离线

#194 2022-08-23 11:28:52

744219909
会员
注册时间: 2022-07-29
已发帖子: 31
积分: 124

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

终于出现网卡驱动了,记录这开心时刻

root@bai-Aspire-E1-421:~# insmod /opt/esp8089-spi.ko                            
[   42.995608] esp8089_spi: loading out-of-tree module taints kernel.           
[   43.029092] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb                       
[   43.833820] esp8089_spi: esp_spi_dummy_probe enter                           
[   43.838886] esp8089_spi: register board OK                                   
[   43.842986] esp8089_spi: sem_timeout = 0                                     
[   44.893907] esp8089_spi: ESP8089 power up OK                                 
[   44.898692] esp8089_spi: esp_spi_probe ENTER                                 
[   44.902975] esp8089_spi: esp_setup_spi                                       
[   44.964295] esp8089_spi: sif_spi_protocol_init                               
[   44.968771] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c9
[   44.976475] esp8089_spi: fail_count = 0                                      
[   45.204078] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   45.311780] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c9
[   45.319370] esp8089_spi: fail_count = 1                                      
[   45.644075] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   45.751763] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c9
[   45.759357] esp8089_spi: fail_count = 2                                      
[   46.084070] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   46.690709] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c8
[   47.314252] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff]
[   47.821078] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c1
[   48.454236] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff]
[   48.961099] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c3
[   49.484234] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   49.991063] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c7
[   50.524240] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   51.031090] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c0
[   51.554233] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   52.061055] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c3
[   52.584240] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   53.091090] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   53.624230] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   54.131111] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   54.664240] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   55.171085] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   55.694245] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   56.201107] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   56.724232] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   57.231083] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   57.764232] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   58.271093] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   58.794233] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   59.301120] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   59.824234] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   60.331055] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   60.864231] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   61.371116] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c8
[   61.914236] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   61.921991] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c1
[   61.944355] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   61.952111] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c4
[   61.974350] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   63.996780] esp8089_spi: esp_pub_init_all                                    
[   64.000850] esp8089_spi: esp_download_fw                                     
[   64.029468] random: crng init done                                           
[   64.899351] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                       
[   64.899379] esp8089_spi: sif_platform_irq_init enter                         
[   64.909597] yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy                      
[   65.205813] esp_host:bdf5087c3deb                                            
[   65.205813] esp_target: e826c2b3c9fd 57 18202                                
[   65.205813]                                                                  
[   65.220416] esp_readwrite_file: file /system/lib/modules/test_results filp_or
[   65.274543] esp8089_spi: first normal exit                                   
[   65.278726] esp8089_spi: esp_spi_probe EXIT                                  
[   65.283259] esp8089_spi: sem_timeout = 0                                     
[   65.287398] esp8089_spi: esp_spi_remove                                      
[   65.426840] esp8089_spi: esp_spi_probe ENTER                                 
[   65.431139] esp8089_spi: esp_setup_spi                                       
[   65.435041] esp8089_spi: sif_spi_protocol_init                               
[   65.439490] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c9
[   65.447099] esp8089_spi: fail_count = 0                                      
[   65.714066] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   65.821777] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c9
[   65.829374] esp8089_spi: fail_count = 1                                      
[   66.154070] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   66.261776] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c9
[   66.269372] esp8089_spi: fail_count = 2                                      
[   66.594069] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   67.200737] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c8
[   67.824233] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff]
[   68.331123] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c1
[   68.934237] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff]
[   69.441105] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c3
[   69.984236] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   70.491122] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c7
[   71.014240] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   71.521082] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c0
[   72.044231] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   72.551064] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c3
[   73.074232] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   73.581106] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   74.114230] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   74.621052] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   75.140385] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   75.647242] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   76.174243] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   76.681080] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   77.224234] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   77.731090] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   78.254234] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   78.761075] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   79.284239] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   79.791082] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   80.324233] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   80.831074] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c5
[   81.354229] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   81.861037] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c8
[   82.384233] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   82.392048] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c1
[   82.424270] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   82.432024] esp8089_spi: /home/bai/software/ESP8089-SPI-master/spi_sif_esp.c4
[   82.454377] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   84.476548] esp8089_spi: esp_pub_init_all                                    
[   84.480583] esp8089_spi: esp_download_fw                                     
[   85.597536] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                       
[   85.597563] esp8089_spi: sif_platform_irq_init enter                         
[   85.607778] yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy                      
[   85.725871] ------------[ cut here ]------------                             
[   85.735762] WARNING: CPU: 0 PID: 194 at kernel/irq/manage.c:524 enable_irq+00
[   85.743483] Unbalanced enable for IRQ 65                                     
[   85.747396] Modules linked in: esp8089_spi(O+)                               
[   85.751859] CPU: 0 PID: 194 Comm: kspiirqd/eagle Tainted: G           O    46
[   85.760872] Hardware name: Allwinner suniv Family                            
[   85.765623] [<c010e544>] (unwind_backtrace) from [<c010b52c>] (show_stack+0x)
[   85.773370] [<c010b52c>] (show_stack) from [<c0116918>] (__warn+0xc0/0xf0)   
[   85.780241] [<c0116918>] (__warn) from [<c01165ac>] (warn_slowpath_fmt+0x38/)
[   85.787723] [<c01165ac>] (warn_slowpath_fmt) from [<c0148498>] (enable_irq+0)
[   85.795813] [<c0148498>] (enable_irq) from [<bf000230>] (spi_irq_thread+0x48)
[   85.804822] [<bf000230>] (spi_irq_thread [esp8089_spi]) from [<c012ece8>] (k)
[   85.813448] [<c012ece8>] (kthread) from [<c0107e88>] (ret_from_fork+0x14/0x2)
[   85.820655] ---[ end trace cced0687c4545830 ]---                             
[   85.938008] esp8089_spi: esp_spi_probe EXIT                                  
[   85.942528] esp8089_spi: esp_spi_init err 0                                  
[   85.954343] esp_host:bdf5087c3deb                                            
[   85.954343] esp_target: e826c2b3c9fd 57 18202                                
[   85.954343]                                                                  
root@bai-Aspire-E1-421:~# ip a                                                  
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defau0
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00                       
    inet 127.0.0.1/8 scope host lo                                              
       valid_lft forever preferred_lft forever                                  
2: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default ql0
    link/ether 18:fe:34:61:d0:57 brd ff:ff:ff:ff:ff:ff

离线

#195 2022-08-23 15:39:43

touchey
会员
注册时间: 2020-05-18
已发帖子: 143
积分: 16

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@744219909
稳定性测试了吗

离线

#196 2022-08-23 17:37:24

744219909
会员
注册时间: 2022-07-29
已发帖子: 31
积分: 124

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

touchey 说:

@744219909
稳定性测试了吗

没有,刚连上外网。现在在弄apt源配置。明天上班的时候再测试

最近编辑记录 744219909 (2022-08-23 17:41:02)

离线

#197 2022-08-30 01:51:24

黑蛋
会员
注册时间: 2022-07-01
已发帖子: 7
积分: 27

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

modprobe esp8089-spi.ko                                                                                  
[   27.188993] esp8089_spi: loading out-of-tree module taints kernel.                                      
[   27.207159] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb                                                  
[   27.816544] esp8089_spi: esp_spi_dummy_probe enter                                                      
[   27.825723] esp8089_spi: register board OK                                                              
[   27.833917] esp8089_spi: sem_timeout = 0                                                                
[   28.054724] esp8089_spi: ESP8089 power up OK                                                            
[   28.063741] esp8089_spi: esp_spi_probe ENTER                                                            
[   28.072424] esp8089_spi: esp_setup_spi                                                                  
[   28.080505] esp8089_spi: sif_spi_protocol_init                                                          
[   28.089243] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559                    
[   28.103132] esp8089_spi: fail_count = 0                                                                 
[   28.223750] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   28.337868] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559                    
[   28.351740] esp8089_spi: fail_count = 1                                                                 
[   28.474338] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   28.588375] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559                    
[   28.602186] esp8089_spi: fail_count = 2                                                                 
[   28.723686] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   29.336633] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1578                    
[   29.366553] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]                    
[   29.879656] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1591                    
[   29.902138] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]                    
[   30.415227] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1603                    
[   30.440394] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   30.953453] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1617                    
[   30.975877] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   31.488935] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1630                    
[   31.514586] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   32.027718] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1643                    
[   32.052173] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   32.565209] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   32.590464] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   33.103573] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   33.139303] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   33.652363] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   33.677319] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   34.190377] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   34.214739] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   34.727719] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   34.752307] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   35.265381] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   35.289065] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   35.802078] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   35.826945] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   36.339974] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655                    
[   36.362567] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   36.875605] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1668                    
[   36.899451] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   36.913430] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1681                    
[   36.939312] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   36.953330] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1694                    
[   36.979086] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]                    
[   38.036730] esp8089_spi: esp_pub_init_all                                                               
[   38.045015] esp8089_spi: esp_download_fw                                                                
[   38.621052] esp8089_spi: sif_platform_irq_init enter                                                    
[   49.125337] resetting event timeout                                                                     
[   49.131110] esp8089_spi: esp_init_all failed: -110                                                      
[   49.140078] esp8089_spi: first error exit                                                               
[   49.148204] esp8089_spi: esp_spi_probe EXIT                                                             
[   49.156738] esp8089_spi: sem_timeout = 0                                                    
[   49.164852] esp8089_spi: esp_spi_init err 0 

我前面都有数据就是后面resetting的时候失败了。。。。苦恼中

离线

#198 2022-08-30 09:09:50

744219909
会员
注册时间: 2022-07-29
已发帖子: 31
积分: 124

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@黑蛋
你看一下你的复位脚弄对了没,我记得insmod的时候,8266的led指示灯会闪烁一下

离线

#199 2022-08-30 14:46:35

黑蛋
会员
注册时间: 2022-07-01
已发帖子: 7
积分: 27

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

芯片是esp8089 我用的是spi0,中断PD19(115),reset是PD21(117)cs是pc1(65)不知道是不是硬件问题,电压表不在身边。。。

static struct spi_board_info esp_board_spi_devices[] = {
  {
    .modalias = "ESP8089_0",
    .max_speed_hz = MAX_SPEED_HZ,
    .bus_num = 0,
    .chip_select = 0,
    .mode = SPI_MODE_3,
  },
};
static int esp_cs0_pin = 65;
static int esp_interrupt = 115;
static int esp_reset_gpio = 117;

最近编辑记录 黑蛋 (2022-08-30 14:50:24)

离线

#200 2022-08-30 15:18:02

黑蛋
会员
注册时间: 2022-07-01
已发帖子: 7
积分: 27

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

我直接把cs接地了,这是可以了吗

insmod esp8089-spi.ko 
[   19.051605] esp8089_spi: loading out-of-tree module taints kernel.
[   19.069799] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   19.079361] <<<<<<<<sif_platform_target_poweron>>>>>>>>>>>>
[   19.688136] <<<<<<<<sif_platform_target_poweron>>>>>>>>>>>>
[   19.698782] esp8089_spi: esp_spi_dummy_probe enter
[   19.708012] esp8089_spi: register board OK
[   19.716408] esp8089_spi: sem_timeout = 0
[   19.934722] esp8089_spi: ESP8089 power up OK
[   19.943672] esp8089_spi: esp_spi_probe ENTER
[   19.952300] esp8089_spi: esp_setup_spi
[   19.960340] esp8089_spi: sif_spi_protocol_init
[   19.969043] esp8089_spi: /home/linux/ɡ面/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   19.982912] esp8089_spi: fail_count = 0
[   20.104520] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.218558] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   20.232368] esp8089_spi: fail_count = 1
[   20.353133] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   20.467114] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   20.480930] esp8089_spi: fail_count = 2
[   20.604499] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   21.217433] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1578
[   21.243607] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   21.756712] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1591
[   21.781739] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   22.294814] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1603
[   22.318766] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   22.831868] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1617
[   22.854277] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   23.367382] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1630
[   23.390235] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   23.903285] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1643
[   23.926986] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   24.440038] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   24.466933] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   24.980000] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   25.006169] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   25.519192] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   25.542059] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   26.055144] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   26.078940] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   26.591957] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   26.616834] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   27.129877] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   27.152055] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   27.665081] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   27.689109] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   28.202196] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   28.226268] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   28.739264] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1668
[   28.762023] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   28.776012] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1681
[   28.800574] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   28.814551] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1694
[   28.838091] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   29.888796] esp8089_spi: esp_pub_init_all
[   29.897096] esp8089_spi: esp_download_fw
[   30.452949] esp8089_spi: sif_platform_irq_init enter
[   30.462246] <<<<<<<<<<sif_platform_irq_init>>>>>>>>>>>>>
[   30.471765] <<<<<<<<<<sif_platform_irq_init>>>>>>>>>>>>>
[   30.688197] esp_host:bdf5087c3deb
[   30.688197] esp_target: e826c2b3c9fd 57 18202
[   30.688197] 
[   30.706851] esp_readwrite_file: file /system/lib/modules/test_results filp_open error
[   30.722019] esp8089_spi: first normal exit
[   30.730214] esp8089_spi: esp_spi_probe EXIT
[   30.738652] esp8089_spi: sem_timeout = 0
[   30.746705] esp8089_spi: esp_spi_remove 
[   30.884875] esp8089_spi: esp_spi_probe ENTER
[   30.893160] esp8089_spi: esp_setup_spi
[   30.900951] esp8089_spi: sif_spi_protocol_init
[   30.909436] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   30.922935] esp8089_spi: fail_count = 0
[   31.043092] rx:[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   31.156859] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   31.170497] esp8089_spi: fail_count = 1
[   31.294416] rx:[0xff],[0x09],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   31.408430] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1559
[   31.422228] esp8089_spi: fail_count = 2
[   31.544004] rx:[0xff],[0xff],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   32.156939] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1578
[   32.183120] rx:[0xff],[0xff],[0x01],[0x10],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   32.696237] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1591
[   32.720009] rx:[0xff],[0xff],[0x00],[0x90],[0xff],[0xff],[0x00],[0xff],[0xff],[0xff]
[   33.233082] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1603
[   33.256068] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   33.769136] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1617
[   33.798041] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   34.311085] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1630
[   34.336269] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   34.849278] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1643
[   34.871853] rx:[0xff],[0x00],[0x03],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   35.384918] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   35.408739] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   35.921814] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   35.946565] rx:[0xff],[0x00],[0x25],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   36.459598] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   36.482479] rx:[0xff],[0x00],[0x10],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   36.995567] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   37.018291] rx:[0xff],[0x00],[0x12],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   37.531328] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   37.556284] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   38.069304] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   38.091523] rx:[0xff],[0x00],[0x06],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   38.604536] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   38.628505] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   39.141610] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1655
[   39.170509] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   39.683582] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1668
[   39.707509] rx:[0xff],[0x00],[0x00],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   39.721477] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1681
[   39.744861] rx:[0xff],[0x00],[0x02],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   39.758847] esp8089_spi: /home/linux/桌面/ESP8089-SPI-master/spi_sif_esp.c, 1694
[   39.783486] rx:[0xff],[0x00],[0x01],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff],[0xff]
[   40.834921] esp8089_spi: esp_pub_init_all
[   40.843080] esp8089_spi: esp_download_fw
[   41.510166] esp8089_spi: sif_platform_irq_init enter
[   41.519470] <<<<<<<<<<sif_platform_irq_init>>>>>>>>>>>>>
[   41.528988] <<<<<<<<<<sif_platform_irq_init>>>>>>>>>>>>>
[   41.580848] esp8089_spi: esp_spi_probe EXIT
[   41.589537] esp8089_spi: esp_spi_init err 0
[   41.611632] esp_host:bdf5087c3deb
[   41.611632] esp_target: e826c2b3c9fd 57 18202
[   41.611632] 
# 
# 
# 
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 18:fe:34:00:00:00 brd ff:ff:ff:ff:ff:ff

离线

#201 2022-08-30 17:16:32

744219909
会员
注册时间: 2022-07-29
已发帖子: 31
积分: 124

Re: 众人拾柴-F1C200S通过SPI使用ESP8089或ESP8266做无线网卡

@黑蛋
可以了

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn