Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error esp-hosted-release-ng-v1.0.2?????? #319

Open
kangz543g opened this issue Jan 22, 2024 · 17 comments
Open

error esp-hosted-release-ng-v1.0.2?????? #319

kangz543g opened this issue Jan 22, 2024 · 17 comments

Comments

@kangz543g
Copy link

kangz543g commented Jan 22, 2024

esp-hosted-release-ng-v1.0.2.zip

esp_hosted_ng/host/Makefile:$(MODULE_NAME)-y := esp_bt.o main.o esp_cmd.o esp_wpa_utils.o esp_cfg80211.o esp_stats.o $(module_objects)

error esp_cmd.o,esp_wpa_utils.o, esp_cfg80211.o

@kangz543g
Copy link
Author

kangz543g commented Jan 22, 2024

kkk@kkk-Lenovo-ideapad-100-15IBY:~/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host$ grep -r "cfg80211_auth_request"
esp_cmd.h: struct cfg80211_auth_request *req);
esp_cmd.c: struct cfg80211_auth_request *req)
esp_cfg80211.c: struct cfg80211_auth_request *req)

/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c: In function 'process_auth_event':
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:537:2: error: implicit declaration of function 'cfg80211_rx_mlme_mgmt' [-Werror=implicit-function-declaration]
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c: In function 'process_assoc_event':
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:573:2: error: implicit declaration of function 'cfg80211_rx_assoc_resp' [-Werror=implicit-function-declaration]
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c: In function 'cmd_auth_request':
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:912:45: error: 'struct cfg80211_auth_request' has no member named 'auth_data_len'
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:925:26: error: 'struct cfg80211_auth_request' has no member named 'auth_data_len'
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:926:28: error: 'struct cfg80211_auth_request' has no member named 'auth_data'
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:926:44: error: 'struct cfg80211_auth_request' has no member named 'auth_data_len'

grep -r "cfg80211_rx_mlme_mgmt"
esp_cmd.c: cfg80211_rx_mlme_mgmt(priv->ndev, event->frame, event->frame_len);

@mantriyogesh
Copy link
Collaborator

@kapilkedawat ++

@kapilkedawat
Copy link
Contributor

@kangz543g suggest to update to latest code and retry. Also please share your kernel version.

@kangz543g
Copy link
Author

root@openipc-t21:/mnt/mmcblk0p1# insmod esp32_sdio.ko
insmod: can't insert 'esp32_sdio.ko': unknown symbol in module, or unknown parameter

kk@kkk-Lenovo-ideapad-100-15IBY:/esp-idf/eps32_driver/esp32-linux$ ls
LICENSE esp32_sdio.ko esp_bt.c esp_rb.h main.o
Makefile esp32_sdio.mod.c esp_bt.o esp_serial.c modules.order
Module.symvers esp32_sdio.mod.o esp_bt_api.h esp_serial.h sdio
adapter.h esp32_sdio.o esp_if.h hci.h spi
esp.h esp_api.h esp_rb.c main.c
kkk@kkk-Lenovo-ideapad-100-15IBY:
/esp-idf/eps32_driver/esp32-linux$ modinfo esp32_sdio.ko
filename: /home/kkk/esp-idf/eps32_driver/esp32-linux/esp32_sdio.ko
depends:
vermagic: 3.10.14__isvp_turkey_1.0__ preempt mod_unload MIPS32_R1 32BIT
kkk@kkk-Lenovo-ideapad-100-15IBY:~/esp-idf/eps32_driver/esp32-linux$

@kangz543g
Copy link
Author

make
rm -rf .o sdio/.o spi/*.o *.ko
make ARCH=mips CROSS_COMPILE=/home/kkk/mips-gcc472-glibc216-64bit/bin/mips-linux-gnu- -C /home/kkk/Main/kernel M=/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host clean
make[1]: 디렉터리 '/home/kkk/Main/kernel' 들어감
CLEAN /home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/.tmp_versions
make[1]: 디렉터리 '/home/kkk/Main/kernel' 나감
make ARCH=mips CROSS_COMPILE=/home/kkk/mips-gcc472-glibc216-64bit/bin/mips-linux-gnu- -C /home/kkk/Main/kernel M=/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host modules # KERNEL을 KSRC로 수정
make[1]: 디렉터리 '/home/kkk/Main/kernel' 들어감
CC [M] /home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_bt.o
CC [M] /home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/main.o
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/main.c:315:8: warning: return type defaults to 'int' [-Wreturn-type]
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/main.c:315:8: warning: function declaration isn't a prototype [-Wstrict-prototypes]
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/main.c:315:8: warning: 'NDO_TX_TIMEOUT_PROTOTYPE' defined but not used [-Wunused-function]
CC [M] /home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.o
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c: In function 'process_scan_result_event':
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:517:44: error: macro "CFG80211_INFORM_BSS" requires 11 arguments, but only 10 given
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:514:9: error: 'CFG80211_INFORM_BSS' undeclared (first use in this function)
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:514:9: note: each undeclared identifier is reported only once for each function it appears in
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c: In function 'process_auth_event':
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:539:2: error: implicit declaration of function 'cfg80211_rx_mlme_mgmt' [-Werror=implicit-function-declaration]
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c: In function 'process_assoc_event':
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:575:2: error: implicit declaration of function 'cfg80211_rx_assoc_resp' [-Werror=implicit-function-declaration]
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c: In function 'cmd_auth_request':
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:914:45: error: 'struct cfg80211_auth_request' has no member named 'auth_data_len'
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:927:26: error: 'struct cfg80211_auth_request' has no member named 'auth_data_len'
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:928:28: error: 'struct cfg80211_auth_request' has no member named 'auth_data'
/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.c:928:44: error: 'struct cfg80211_auth_request' has no member named 'auth_data_len'
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:309: /home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host/esp_cmd.o] 오류 1
make[1]: *** [Makefile:1224: module/home/kkk/esp-hosted-release-ng-v1.0.2/esp_hosted_ng/host] 오류 2
make[1]: 디렉터리 '/home/kkk/Main/kernel' 나감

@mantriyogesh
Copy link
Collaborator

$ uname -a
output on target?

@kangz543g
Copy link
Author

uname -a
Linux openipc-t21 3.10.14__isvp_turkey_1.0__ #2 PREEMPT Sat Jan 6 15:49:53 UTC 2024 mips GNU/Linux

@mantriyogesh
Copy link
Collaborator

Is it possible to at least move to 4.x ot 5.x kernel?

This kernel is very old.

@kangz543g
Copy link
Author

uname -a
Linux kkk-Lenovo-ideapad-100-15IBY 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 x86_64 x86_64 x86_64 GNU/ use mips-gcc472-glibc216-64bit

@mantriyogesh
Copy link
Collaborator

#319 (comment)
This seems like your development environment.

#319 (comment)
Looks target kernel version.

Is that correct?
Don't bother much, wrt Development environment kernel version .
Target kernel version is important.

@mantriyogesh
Copy link
Collaborator

USB is not supported.
We support SPI or SDIO or UART as if now.

So you can see https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/rpi_esp32_c6_setup.jpg for reference.

The ESP (any supported) and Linux should have SPI/SDIO/UART connections as per documentation.
ESP connected in USB as serial port is needed to power the ESP and flashing ESP & get the UART logs of ESP.
But other than that, we do not have USB support yet for ESP-Hosted.

@mantriyogesh
Copy link
Collaborator

Above link is interesting.
But, for now, USB CDC for host communication is not yet supported in ESP-Hosted.
We support BLE over UART for Linux.

ESP <== 2 or 4 pins UART > ==> Linux

@kangz543g
Copy link
Author

kangz543g commented Jan 23, 2024

modinfo eps32c3_serial.ko
filename: /home/kkk/esp32c3/eps32c3_serial.ko
license: GPL
author: [email protected]
description: EPS32C3 USB to serial adaptor driver
alias: usb:v303Ap1001ddcdscdpiciscipin
depends:
vermagic: 3.10.14__isvp_turkey_1.0__ preempt mod_unload MIPS32_R1 32BIT

root@openipc-t21:
root@openipc-t21:/mnt/mmcblk0p1# lsusb
Bus 001 Device 003: ID 303a:1001
Bus 001 Device 001: ID 1d6b:0002

root@openipc-t21:/mnt/mmcblk0p1# insmod eps32c3_serial.ko
root@openipc-t21:/mnt/mmcblk0p1#

root@openipc-t21:/mnt/mmcblk0p1# lsmod | grep eps32c3_serial
eps32c3_serial 6812 0 [permanent]

root@openipc-t21:ls /dev/tty*
/dev/tty /dev/ttyp1 /dev/ttyp4 /dev/ttyp7 /dev/ttypa /dev/ttypd
/dev/ttyS1 /dev/ttyp2 /dev/ttyp5 /dev/ttyp8 /dev/ttypb /dev/ttype
/dev/ttyp0 /dev/ttyp3 /dev/ttyp6 /dev/ttyp9 /dev/ttypc /dev/ttypf

root@openipc-t21:dmesg | tail
[ 18.442363] wait stable.[288][cgu_cim]
[ 18.442385] set sensor gpio as PA-low-10bit
[ 18.442401] probe ok ------->jxf37
[ 18.780041] -----jxf37_detect: 623 ret = 0, v = 0x0f
[ 18.780461] -----jxf37_detect: 631 ret = 0, v = 0x37
[ 18.780473] jxf37 chip found @ 0x40 (i2c0)
[ 18.780482] sensor driver version H20200416a
[ 18.931111] jxf37 stream on
[ 134.429845] usb 1-1: USB disconnect, device number 2
[ 138.228618] usb 1-1: new full-speed USB device number 3 using dwc2

@kangz543g
Copy link
Author

not resolved.

@mantriyogesh
Copy link
Collaborator

We are still trying to understand exact issue you are facing.

@kangz543g
Copy link
Author

eps32c3_serial.ko is not supported.

root@openipc-t21:/mnt/mmcblk0p1# insmod cdcacm.ko

root@openipc-t21:/mnt/mmcblk0p1# ls /dev/tty*
/dev/tty /dev/ttyp1 /dev/ttyp5 /dev/ttyp9 /dev/ttypd
/dev/ttyACM1 /dev/ttyp2 /dev/ttyp6 /dev/ttypa /dev/ttype
/dev/ttyS1 /dev/ttyp3 /dev/ttyp7 /dev/ttypb /dev/ttypf
/dev/ttyp0 /dev/ttyp4 /dev/ttyp8 /dev/ttypc

root@openipc-t21:/mnt/mmcblk0p1# ls /dev/ttyA*
/dev/ttyACM1

root@openipc-t21:/mnt/mmcblk0p1# esp32c3 usb driver ok!!!! the end.

@mantriyogesh
Copy link
Collaborator

Do you have any GitHub repo to refer the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants