Страница 1 из 1

WI-FI ESP8266 как подключить?

СообщениеДобавлено: 20 май 2018, 05:31
azec
Добрый день!
Пытаюсь подключить модуль esp8266 вместо официального wi-fi шилда.
https://github.com/al177/esp8089 - linux kernel module
https://hackaday.io/project/8678/instructions - инструкция для Rpi

В статье [url]wiki.virt2real.ru/w/Подключение_USB_Wi-Fi[/url] указано:
Для USB Wi-Fi свистков на базе других чипсетов потребуется сборка драйверов (модулей ядра) и загрузка firmware


На данный момент скачан SDK, успешно выполнена кросс-компиляция модуля ядра esp.
на попытку выполнить modprobe получаю ошибку:
Код: Выделить всё
$ modprobe esp8089
modprobe: ERROR: could not insert 'esp8089': No such device

dmesg сообщает, что система трижды пытается найти девайс, но не может.

Мне казалось, что этого будет достаточно, т.к. система уже должна быть настроена на wi-fi и производится только замена физического модуля.

В файле uEnv.txt
Код: Выделить всё
wifi=on


Посмотрел логическим анализатором что творится на SDIO шине: сигнал clk ~250 kHz генерируется постоянно. Сигнал сброса (gpio_60) падает в 0 на 200 мс (так и должно быть). Остальные линии не реагируют вовсе.

Единственное что могу предположить, что система при загрузке пытается найти официальный модуль, при неудаче - сбрасывает все, что связано с wi-fi (отключает sdio). И при попытке подгрузить модуль esp - системе чего-то не хватает.

Прошу подсказать в какую сторону смотреть, по возможности подробней, т.к. опыта в теме у меня очень мало.
Заранее спасибо!

[addInfo] ESP8266 припаян к плате v2r, официальный модуль wi-fi не установлен. ESP точно живой, проверен на rpi. reset пин назначен на gpio 60

Re: WI-FI ESP8266 как подключить?

СообщениеДобавлено: 21 май 2018, 11:07
h2oblackd2o
А какой в этом смысл ? вы получите крайне низкую среду передачи данных порядка 1.2 мб\с

Re: WI-FI ESP8266 как подключить?

СообщениеДобавлено: 27 май 2018, 18:25
azec
h2oblackd2o писал(а):А какой в этом смысл ? вы получите крайне низкую среду передачи данных порядка 1.2 мб\с

Извиняюсь за долгий ответ, свободное время бывает только в выходные, и то не всегда.

на счет скорости
копирую файл в 284МБ с ноутбука на Raspberry с esp8266 в качестве sdio WI-FI, средняя скорость 2.3МБ/с
Код: Выделить всё
___@xxx:~$ ls -lh Armbian_5.38_Orangepizeroplus2-h5_Debian_stretch_next_4.14.14.7z
-rw-rw-rw- 1 user user 284M янв 27 22:44 Armbian_5.38_Orangepizeroplus2-h5_Debian_stretch_next_4.14.14.7z

___@xxx:~$ time scp Armbian_5.38_Orangepizeroplus2-h5_Debian_stretch_next_4.14.14.7z pi@192.168.1.121:~
pi@192.168.1.121's password:
Armbian_5.38_Orangepizeroplus2-h5_Debian_stretch_next_4.14.14. 100%  283MB   2.3MB/s   02:04

real    2m9.995s
user    0m1.547s
sys     0m4.359s

замер "скорости интернета" через https://github.com/sivel/speedtest-cli/
результат плавающий 15-25 Мбит/с
Код: Выделить всё
pi@raspberrypi:~$ ./speedtest.py
Retrieving speedtest.net configuration...
Testing from Beeline Home (128.72.245.236)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Net By Net Holding LLC (Moscow) [0.18 km]: 24.436 ms
Testing download speed................................................................................
Download: 17.82 Mbit/s
Testing upload speed................................................................................................
Upload: 17.90 Mbit/s


теперь про virt2real
лог загрузки
Код: Выделить всё
DM36x initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = SD/MMC
Starting SDMMC Copy...
   DONE
Jumping to entry point at 0x82000000.


U-Boot 2011.03-00000-gb5521ce (Mar 12 2014 - 23:48:26)

Cores: ARM 297 MHz
DDR:   243 MHz
I2C:   ready
DRAM:  128 MiB
NAND:  256 MiB
MMC:   davinci: 0, davinci: 1
*** Warning - booting from SD, using default environment

Net:   Ethernet PHY: GENERIC @ 0x00
DaVinci-EMAC
Hit any key to stop autoboot:  0
reading uEnv.txt

616 bytes read
Importing environment from mmc ...
Running uenvcmd ...
reading uImage

2879080 bytes read
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.9.0-rc6-virt2real+
   Created:      2014-06-17  17:25:55 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2879016 Bytes = 2.7 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
No entry for the specified index 201
No entry for the specified index 202
AF Driver initialized
mmc1: error -22 whilst initialising SDIO card
mmc1: error -22 whilst initialising MMC card
mmc1: error -22 whilst initialising SDIO card
mmc1: error -22 whilst initialising MMC card
INIT: version 2.88 booting
virt2real
Starting logging: OK
done
Initializing random number generator... done.
Turn on USB devices...
Set OV2643 HD mode
Starting system message bus: Unknown username "pulse" in message bus configuration file
done
Loading coprocessors modules...
  Loading cmem from 0x86a00000 to 0x87900000
Starting GStreamer Daemon
Wi-Fi onboard module enabled
USB Wi-Fi module disabled
Starting onboard acces point...
Starting network...
ip: can't find device 'uap0'
ip: SIOCGIFFLAGS: No such device
ip: SIOCGIFFLAGS: No such device
ip: SIOCGIFFLAGS: No such device
ip: can't find device 'uap0'
No such device
ERR:UAPHOSTCMD is not supported by uap0
ERR:Command sending failed!
ip: SIOCGIFFLAGS: No such device
No such device
ERR:UAPHOSTCMD is not supported by uap0
ERR:Command sending failed!
Starting PHP FastCGI: php-cgi
No such device
ERR:UAPHOSTCMD is not supported by uap0
ERR:Command sending failed!
Starting nginx: No such device
ERR:UAPHOSTCMD is not supported by uap0
ERR:Command sending failed!
nginx.
No such device
ERR:UAPHOSTCMD is not supported by uap0
ERR:Command sending failed!
Getting initial time via ntp.
Starting network time protocol daemon: ntpd.
Starting dropbear sshd: No such device
ERR:UAPHOSTCMD is not supported by uap0
ERR:Command sending failed!
OK
Starting DHCP server: Internet Systems Consortium DHCP Server 4.1-ESV-R8
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
Listening on LPF/usb0/be:4c:87:3a:37:fa/192.168.3.0/24
Sending on   LPF/usb0/be:4c:87:3a:37:fa/192.168.3.0/24

No subnet declaration for wlan0 (no IPv4 addresses).
** Ignoring requests on wlan0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface wlan0 is attached. **


No subnet declaration for uap0 (no IPv4 addresses).
** Ignoring requests on uap0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface uap0 is attached. **

Sending on   Socket/fallback/fallback-net
.
Motorshield initialization
v2r_extpwm 1-0070: error reading PCA9685_MODE1
INIT: Entering runlevel: 1

Welcome to virt2real!
http://virt2real.ru

       .__           __  ________                         .__
___  __|__|_______ _/  |_\_____  \_______   ____  _____   |  |
\  \/ /|  |\_  __ \\   __\/  ____/\_  __ \_/ __ \ \__  \  |  |
 \   / |  | |  | \/ |  | /       \ |  | \/\  ___/  / __ \_|  |__
  \_/  |__| |__|    |__| \_______ \|__|    \___  >(____  /|____/
                                 \/            \/      \/

[root@virt2real ~]# ifconfig: SIOCSIFTXQLEN: No such device

dmesg
Код: Выделить всё
[root@virt2real ~]# dmesg

VPBE Encoder initialized



Setting output to Composite
Start of vpbe_encoder_setmode..


Start of vpbe_encoder_setmode..





VPBE Encoder Initialized
Advanced Linux Sound Architecture Driver Initialized.
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (2000 mBi, 0 mBm)
cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (2000 mBi, 0 mBm)
cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (2000 mBi, 0 mBm)
cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (2000 mBi, 0 mBm)
cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (2000 mBi, 0 mBm)
cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
Switching to clocksource timer0_1
FS-Cache: Loaded
CacheFiles: Loaded
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
NTFS driver 2.1.30 [Flags: R/W].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.21)
msgmni has been set to 168
io scheduler noop registered (default)






davincifb davincifb.0: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 1350KB
davincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 1224KB




davincifb davincifb.0: dm_osd1_fb: 0x0x8@0,0 with framebuffer size 810KB
davincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1224KB
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
DM365 IPIPEIF probed
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
davinci_voicecodec davinci_voicecodec: Runtime PM disabled, clock forced on.
ONFI param page 0 valid
ONFI flash detected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAH4), 256MiB, page size: 2048, OOB size: 64
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
Creating 3 MTD partitions on "davinci_nand.0":
0x000000000000-0x000000400000 : "bootloader"
0x000000400000-0x000000800000 : "kernel"
0x000000900000-0x000010000000 : "fs"
davinci_nand davinci_nand.0: controller rev. 2.3
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver cdc_wdm
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver cp210x
usbserial: USB Serial support registered for cp210x
usbcore: registered new interface driver digi_acceleport
usbserial: USB Serial support registered for Digi 2 port USB adapter
usbserial: USB Serial support registered for Digi 4 port USB adapter
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
rtc_davinci rtc_davinci.0: rtc core: registered rtc_davinci as rtc0
Setting 32 kHz output in RTC driver: start 0, fec69000
Setting 32 kHz output in RTC driver: finish 1
i2c /dev entries driver
Linux video capture interface: v2.00
vpfe_init
vpfe-capture: vpss clock vpss_master enabled
vpfe-capture vpfe-capture: v4l2 device registered
vpfe-capture vpfe-capture: video device registered
ov2643 1-0030: ov2643 1-0030 decoder driver registered !!
vpfe-capture vpfe-capture: v4l2 sub device ov2643 registered
PROBE CCDC
vpfe_register_ccdc_device: DM365 ISIF
No entry for the specified index 201
No entry for the specified index 202
CCDC_CONFIGURE BEFORE
CCDC CONFIGUREVPFE REG GAMMAWD = 11
DM365 ISIF is registered with vpfe.
af major#: 249, minor# 0
AF Driver initialized
aew major#: 248, minor# 0
AEW Driver initialized

Trying to register davinci display video device.
layer=4457fc00,layer->video_dev=4457fd64
Trying to register davinci display video device.
layer=44602000,layer->video_dev=44602164
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded

watchdog watchdog: Runtime PM disabled, clock forced on.
watchdog watchdog: heartbeat 60 sec
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
davinci_mmc dm365-mmc.0: Runtime PM disabled, clock forced on.
edma-dma-engine edma-dma-engine.0: allocated channel for 0:27
edma-dma-engine edma-dma-engine.0: allocated channel for 0:26
davinci_mmc dm365-mmc.0: Using DMA, 4-bit mode
davinci_mmc dm365-mmc.1: Runtime PM disabled, clock forced on.
edma-dma-engine edma-dma-engine.0: allocated channel for 0:31
edma-dma-engine edma-dma-engine.0: allocated channel for 0:30
davinci_mmc dm365-mmc.1: Using DMA, 4-bit mode
ledtrig-cpu: registered to indicate activity on CPUs
mmc0: Problem switching card into high-speed mode!
mmc0: new SDXC card at address 21af
hidraw: raw HID events driver (C) Jiri Kosina
mmcblk0: mmc0:21af APPSD 62.5 GiB
 mmcblk0: p1 p2
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Virt2real CON driver module version 0.3
v2r_pins: construct device:0
v2r_pins: device is created successfully
v2r_pins: init v2r CON & PWM clocks
v2r_pins: added all CON's into group
Virt2real GPIO Driver version 0.3
v2r_gpio: construct device:0
v2r_gpio: device is created successfully
v2r_gpio: added all GPIO's into group
v2r_adc: device is created successfully
v2r_adc: set one-shot mode
v2r_adc: new freq divider is 1
GPIO Event Monitor 0.1 Compiled: Jun 17 2014 at 21:25:33
mmc1: host doesn't support card's voltages
mmc1: error -22 whilst initialising SDIO card
mmc1: host doesn't support card's voltages
mmc1: error -22 whilst initialising MMC card
soc-audio soc-audio.0: ASoC: machine DaVinci DM365 EVM should use snd_soc_register_card()
soc-audio soc-audio.0:  cq93vc-hifi <-> davinci-vcif mapping ok
mmc1: host doesn't support card's voltages
mmc1: error -22 whilst initialising SDIO card
TCP: bic registered
TCP: westwood registered
TCP: highspeed registered
TCP: veno registered
TCP: lp registered
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
mmc1: host doesn't support card's voltages
mmc1: error -22 whilst initialising MMC card
VFP support v0.3: not present
rtc_davinci rtc_davinci.0: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
ALSA device list:
  #0: DaVinci DM365 EVM
kjournald starting.  Commit interval 5 seconds
EXT3-fs (mmcblk0p2): using internal journal
EXT3-fs (mmcblk0p2): recovery complete
EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing init memory: 160K
udevd[1251]: starting version 182
musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
musb-hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn)
musb-hdrc: MHDRC RTL version 1.500
musb-hdrc: setup fifo_mode 2
musb-hdrc: 7/9 max ep, 2624/4096 memory
 gadget: using random self ethernet address
 gadget: using random host ethernet address
usb0: MAC be:4c:87:3a:37:fa
usb0: HOST MAC 06:ef:ce:6d:d0:1b
 gadget: Ethernet Gadget, version: Memorial Day 2008
 gadget: g_ether ready
musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 3.9.0-rc6-virt2real+ musb-hcd
usb usb1: SerialNumber: musb-hdrc.0.auto
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
CMEMK module: built on Jun 17 2014 at 21:31:36
  Reference Linux version 3.9.0
  File /opt1/SDK6/dvsdk/linuxutils_2_26_03_06/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0x4b000000 of size 0xf00000
heap fallback enabled - will try heap if pool buffer is not available
CMEM Range Overlaps Kernel Physical - allowing overlap
CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x85b00000)
cmemk initialized
EDMAK module: built on Jun 17 2014 at 21:31:37
  Reference Linux version 3.9.0
  File /opt1/SDK6/dvsdk/linuxutils_2_26_03_06/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
IRQK module: built on Jun 17 2014 at 21:31:38
  Reference Linux version 3.9.0
  File /opt1/SDK6/dvsdk/linuxutils_2_26_03_06/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
irqk initialized
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
v2r_extpwm 1-0070: probe succeeded!
i2c i2c-1: new_device: Instantiated device v2r_extpwm at 0x70
v2r_extpwm 1-0070: error reading PCA9685_MODE1
[root@virt2real ~]#

из лога загрузки видно, что mmc1 не стартует вовсе, снова ошибка -22: 1 , 2
mmc1: error -22 whilst initialising SDIO card
mmc1: error -22 whilst initialising MMC card

Полагаю, проблема образовалась еще до загрузки модулей wi-fi.
На форуме техасов нашел похожее:
https://e2e.ti.com/support/embedded/linux/f/354/p/137079/508206
https://e2e.ti.com/support/embedded/linux/f/354/t/270922?Error-while-using-MMC2-for-wlan-in-Am335x-evm-based-board

советуют отключить NAND в menuconfig, т.к. мультиплексируются по пинам(?)
Еще не выполнял пересборку ядра, по результатам отпишусь.