gtxaspec / wz_mini_hacks

wz camera mods... make your camera better.
1.3k stars 110 forks source link

support for LAN - Realtek RTL8153 #5

Closed Vendo232 closed 2 years ago

Vendo232 commented 2 years ago

adding this info just in case it might be possible to add support for Realtek RTL8153

Bus 001 Device 006: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Eth ernet Adapter Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.10 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0bda Realtek Semiconductor Corp. idProduct 0x8153 RTL8153 Gigabit Ethernet Adapter bcdDevice 30.00 iManufacturer 1 Realtek iProduct 2 USB 10/100/1000 LAN iSerial 6 000000 bNumConfigurations 2 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0027 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 350mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 8 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0050 bNumInterfaces 2 bConfigurationValue 2 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 350mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 6 Ethernet Networking bInterfaceProtocol 0 iInterface 5 CDC Header: bcdCDC 1.10 CDC Union: bMasterInterface 0 bSlaveInterface 1 CDC Ethernet: iMacAddress 3 (??) bmEthernetStatistics 0x00000000 wMaxSegmentSize 1514 wNumberMCFilters 0x0000 bNumberPowerFilters 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 8 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 4 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0

gtxaspec commented 2 years ago

sure, let me see.

gtxaspec commented 2 years ago

the built in rtl8152 driver should support this already in the wz_mini_hacks kernel.

Vendo232 commented 2 years ago

cant get it to work, Im on RTSP 4.61.0.3, the cam has this IP on WIFI 192.168.1.56, do you get the same IP ( MAC ) when you connect over LAN ?

ordered this guy in the meantime, it has 50% coupon btw : https://www.amazon.com/dp/B09H19TK6B?psc=1&smid=A3MSS5ZN97PBY3&ref_=chk_typ_imgToDp

gtxaspec commented 2 years ago

if you can SSH into the camera, plug the usb adapter in, and then do:

dmesg

then lsusb

then ifconfig eth0

and paste the output here i can try to find out why it doesnt work.

Vendo232 commented 2 years ago

flashed standard FW: demo_wcv3_4.36.8.32 when ETH enabled via ENABLE_USB_ETH="true" the cam would not connect so no SSH when ETH set to false and USB dongle connected I was able to SSH via WIFI and this is the output, while RTL8153 in USB

dmesg [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.10.14isvp_swan_1.0 (root@5997f1cc9594) (gcc version 4.7.4 (Buildroot 2016.02) ) #28 PREEMPT Wed Apr 13 06:47:11 UTC 2022 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU0 RESET ERROR PC:00521C25 [ 0.000000] CPU0 revision is: 00d00100 (Ingenic Xburst) [ 0.000000] FPU revision is: 00b70000 [ 0.000000] cgu_get_rate, parent = 1392000000, rate = 0, m = 0, n = 0, reg val = 0x081000ff [ 0.000000] cgu_get_rate, parent = 1392000000, rate = 0, m = 0, n = 0, reg val = 0x081000ff [ 0.000000] CCLK:1392MHz L2CLK:696Mhz H0CLK:200MHz H2CLK:200Mhz PCLK:100Mhz [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 005c5000 @ 00010000 (usable) [ 0.000000] memory: 0007b000 @ 005d5000 (usable after init) [ 0.000000] User-defined physical RAM map: [ 0.000000] memory: 05000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000-0x04ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000-0x04ffffff] [ 0.000000] On node 0 totalpages: 20480 [ 0.000000] free_area_init_node: node 0, pgdat 805d1a00, node_mem_map 81000000 [ 0.000000] Normal zone: 160 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 20480 pages, LIFO batch:3 [ 0.000000] Primary instruction cache 32kB, 8-way, VIPT, linesize 32 bytes. [ 0.000000] Primary data cache 32kB, 8-way, VIPT, no aliases, linesize 32 bytes [ 0.000000] pls check processor_id[0x00d00100],sc_jz not support! [ 0.000000] MIPS secondary cache 128kB, 8-way, linesize 32 bytes. [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping off. Total pages: 20320 [ 0.000000] Kernel command line: console=ttyS1,115200n8 mem=80M@0x0 rmem=48M@0x5000000 rdinit=/init mtdparts=jz_sfc:256K(boot),1984K(kernel),3904K(rootfs),3904K(app),1984K(kback),3904K(aback),384K(cfg),64K(para) [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Memory: 72860k/81920k available (4584k kernel code, 9060k reserved, 1321k data, 492k init, 0k highmem) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] NR_IRQS:358 [ 0.000000] clockevents_config_and_register success. [ 0.000014] Calibrating delay loop... 1391.00 BogoMIPS (lpj=6955008) [ 0.087830] pid_max: default: 32768 minimum: 301 [ 0.092689] Mount-cache hash table entries: 512 [ 0.097606] Initializing cgroup subsys debug [ 0.101863] Initializing cgroup subsys freezer [ 0.107310] devtmpfs: initialized [ 0.111472] regulator-dummy: no parameters [ 0.115719] NET: Registered protocol family 16 [ 0.131156] bio: create slab at 0 [ 0.136649] jz-dma jz-dma: JZ SoC DMA initialized [ 0.141568] usbcore: registered new interface driver usbfs [ 0.147154] usbcore: registered new interface driver hub [ 0.152551] usbcore: registered new device driver usb [ 0.157718] (null): set:249 hold:250 dev=100000000 h=500 l=500 [ 0.163802] media: Linux media interface: v0.10 [ 0.168369] Linux video capture interface: v2.00 [ 0.173176] Advanced Linux Sound Architecture Driver Initialized. [ 0.180503] Switching to clocksource jz_clocksource [ 0.185431] cfg80211: Calling CRDA to update world regulatory domain [ 0.192481] dwc2 otg probe start [ 0.192506] jz-dwc2 jz-dwc2: cgu clk gate get error [ 0.197426] DWC IN OTG MODE [ 0.200823] dwc2 dwc2: Keep PHY ON [ 0.204201] dwc2 dwc2: Using Buffer DMA mode [ 0.208515] dwc2 dwc2: Core Release: 3.00a [ 0.212706] dwc2 dwc2: DesignWare USB2.0 High-Speed Host Controller [ 0.219032] dwc2 dwc2: new USB bus registered, assigned bus number 1 [ 0.226188] hub 1-0:1.0: USB hub found [ 0.229920] hub 1-0:1.0: 1 port detected [ 0.234021] dwc2 dwc2: DWC2 Host Initialized [ 0.238306] dwc2 otg probe success [ 0.238435] NET: Registered protocol family 2 [ 0.243218] TCP established hash table entries: 1024 (order: 1, 8192 bytes) [ 0.250227] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.256726] TCP: Hash tables configured (established 1024 bind 1024) [ 0.263154] TCP: reno registered [ 0.266367] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.272310] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.278833] NET: Registered protocol family 1 [ 0.283441] RPC: Registered named UNIX socket transport module. [ 0.289369] RPC: Registered udp transport module. [ 0.294186] RPC: Registered tcp transport module. [ 0.298904] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.312704] dwc2 dwc2: ID PIN CHANGED! [ 0.503670] freq_udelay_jiffys[0].max_num = 10 [ 0.508096] cpufreq udelay loops_per_jiffy [ 0.512583] 12000 59956 59956 [ 0.515778] 24000 119913 119913 [ 0.519221] 60000 299784 299784 [ 0.522685] 120000 599569 599569 [ 0.526196] 200000 999282 999282 [ 0.529728] 300000 1498924 1498924 [ 0.533515] 600000 2997848 2997848 [ 0.537144] 792000 3957159 3957159 [ 0.540852] 1008000 5036385 5036385 [ 0.544687] 1200000 5995696 5995696 [ 0.552620] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.559123] jffs2: version 2.2. © 2001-2006 Red Hat, Inc. [ 0.564954] msgmni has been set to 142 [ 0.569612] io scheduler noop registered [ 0.573618] io scheduler cfq registered (default) [ 0.580087] jz-uart.1: ttyS1 at MMIO 0x10031000 (irq = 58) is a uart1 [ 0.587743] console [ttyS1] enabled, bootconsole disabled [ 0.602047] brd: module loaded [ 0.606871] loop: module loaded [ 0.610599] zram: Created 2 device(s) ... [ 0.614928] logger: created 256K log 'log_main' [ 0.620020] jz TCU driver register completed [ 0.624778] the id code = 1c7018, the flash name is EN25QH128A [ 0.630794] JZ SFC Controller for SFC channel 0 driver register [ 0.636964] 8 cmdlinepart partitions found on MTD device jz_sfc [ 0.643094] Creating 8 MTD partitions on "jz_sfc": [ 0.648032] 0x000000000000-0x000000040000 : "boot" [ 0.653499] 0x000000040000-0x000000230000 : "kernel" [ 0.659086] 0x000000230000-0x000000600000 : "rootfs" [ 0.664688] 0x000000600000-0x0000009d0000 : "app" [ 0.669969] 0x0000009d0000-0x000000bc0000 : "kback" [ 0.675508] 0x000000bc0000-0x000000f90000 : "aback" [ 0.680992] 0x000000f90000-0x000000ff0000 : "cfg" [ 0.686357] 0x000000ff0000-0x000001000000 : "para" [ 0.691731] SPI NOR MTD LOAD OK [ 0.695062] tun: Universal TUN/TAP device driver, 1.6 [ 0.700272] tun: (C) 1999-2004 Max Krasnyansky maxk@qualcomm.com [ 0.706808] usbcore: registered new interface driver zd1201 [ 0.712643] usbcore: registered new interface driver r8152 [ 0.718344] usbcore: registered new interface driver asix [ 0.723985] usbcore: registered new interface driver ax88179_178a [ 0.730387] usbcore: registered new interface driver usbserial [ 0.736485] usbcore: registered new interface driver pl2303 [ 0.742269] usbserial: USB Serial support registered for pl2303 [ 0.748679] wait stable.[289][cgu_msc0] [ 0.752678] jzmmc_v1.2 jzmmc_v1.2.0: vmmc regulator missing [ 0.758660] jzmmc_v1.2 jzmmc_v1.2.0: register success! [ 0.763993] jzmmc_v1.2 jzmmc_v1.2.0: card inserted, state=0 [ 0.769831] jzmmc_v1.2 jzmmc_v1.2.1: vmmc regulator missing [ 0.775624] usb 1-1: new high-speed USB device number 2 using dwc2 [ 0.782229] jzmmc_v1.2 jzmmc_v1.2.1: register success! [ 0.789692] wireguard: WireGuard 1.0.20200712 loaded. See www.wireguard.com for information. [ 0.798469] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld Jason@zx2c4.com. All Rights Reserved. [ 0.808514] TCP: cubic registered [ 0.812292] NET: Registered protocol family 10 [ 0.817506] sit: IPv6 over IPv4 tunneling driver [ 0.822761] NET: Registered protocol family 17 [ 0.828031] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 0.835202] drivers/rtc/hctosys.c: unable to open rtc device (rtc0) [ 0.841722] ALSA device list: [ 0.844844] #0: Loopback 1 [ 0.849727] Freeing unused kernel memory: 492K (805d5000 - 80650000) [ 1.021877] mmc0: new high speed SDHC card at address 0001 [ 1.027756] mmcblk0: mmc0:0001 SD 29.1 GiB [ 1.033199] mmcblk0: p1 [ 1.866024] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. [ 2.621187] @@@@ tx-isp-probe ok(version H20200506a), compiler date=May 6 2020 @@@@@ [ 2.661753] exFAT: Version 1.2.9 [ 2.690881] jz_codec_register: probe() successful! [ 2.697552] cgu_set_rate, parent = 1392000000, rate = 2048000, n = 10875, reg val = 0x01002a7b [ 2.697565] cgu_enable,cgu_i2s_spk reg val = 0x21002a7b [ 2.697585] cgu_set_rate, parent = 1392000000, rate = 2048000, n = 10875, reg val = 0x01002a7b [ 2.697592] cgu_enable,cgu_i2s_mic reg val = 0x21002a7b [ 3.102164] dma dma0chan24: Channel 24 have been requested.(phy id 7,type 0x06 desc a23b1000) [ 3.111259] dma dma0chan25: Channel 25 have been requested.(phy id 6,type 0x06 desc a244b000) [ 3.120489] dma dma0chan26: Channel 26 have been requested.(phy id 5,type 0x04 desc a244a000) [ 3.142676] __init [ 3.149038] jz_pwm_probe[255] d_name = tcu_chn0 [ 3.155620] The version of PWM driver is H20180309a [ 3.167086] request pwm channel 0 successfully [ 3.173883] pwm-jz pwm-jz: jz_pwm_probe register ok ! [ 3.187763] mmc1: card claims to support voltages below the defined range. These will be ignored. [ 3.216894] mmc1: new SDIO card at address 0001 [ 3.223556] usbcore: registered new interface driver usb_ch34x [ 3.229570] ch34x: USB to serial driver for USB to serial chip ch340, ch341, etc. [ 3.243076] ch34x: V1.16 On 2020.12.23 [ 3.522903] RTL871X: module init start [ 3.526780] RTL871X: rtl8189ftv v4.3.24.7_21113.20170208.nova.1.02 [ 3.534779] RTL871X: build time: Dec 18 2020 16:40:08 [ 3.539993] wlan power on by hualai [ 3.562015] RTL871X: ++++++++rtw_drv_init: vendor=0x024c device=0xf179 class=0x07 [ 3.597891] RTL871X: HW EFUSE [ 3.600973] RTL871X: hal_com_config_channel_plan chplan:0x20 [ 3.692464] RTL871X: rtw_regsty_chk_target_tx_power_valid return _FALSE for band:0, path:0, rs:0, t:-1 [ 3.703076] RTL871X: rtw_ndev_init(wlan0) if1 mac_addr=78:f2:35:6c:b6:9c [ 3.721814] RTL871X: module init ret=0 [ 6.467815] name : i2c0 nr : 0 [ 6.552031] i2c i2c-0: i2c_jz_irq 441, I2C transfer error, ABORT interrupt [ 6.559148] i2c i2c-0: --I2C txabrt: [ 6.562854] i2c i2c-0: --I2C TXABRT[0]=I2C_TXABRT_ABRT_7B_ADDR_NOACK [ 6.569568] error: sensor_read,285 ret = -5 [ 6.573939] sensor_read: addr=0x3107 value = 0x0 [ 6.578787] err sensor read addr = 0x3107, value = 0x0 [ 6.672365] sensor_read: addr=0xf0 value = 0x20 [ 6.677633] sensor_read: addr=0xf1 value = 0x53 [ 6.682431] info: success sensor find : gc2053 [ 6.687034] misc sinfo_release [ 6.780221] set sensor gpio as PA-low-10bit [ 6.786216] probe ok ------->gc2053 [ 6.862358] -----gc2053_detect: 832 ret = 0, v = 0x20 [ 6.862849] -----gc2053_detect: 838 ret = 0, v = 0x53 [ 6.862857] gc2053 chip found @ 0x37 (i2c0) [ 7.079531] gc2053 stream on [ 7.169457] Err [VIC_INT] : hor err ch3 !!!!! [ 7.296706] cgu_set_rate, parent = 1392000000, rate = 4096000, n = 10875, reg val = 0x22002a7b [ 7.296717] codec_codec_ctl: set sample rate... [ 7.297280] codec_codec_ctl: set device... [ 7.711871] codec_set_device: set device: MIC... [ 7.755581] codec_codec_ctl: set repaly channel... [ 7.755629] cgu_set_rate, parent = 1392000000, rate = 4096000, n = 10875, reg val = 0x22002a7b [ 7.755635] codec_codec_ctl: set sample rate... [ 7.755953] codec_codec_ctl: set device... [ 7.991897] codec_set_device: set device: speaker... [ 8.004132] SPEAKER CTL MODE3 ! [ 9.395413] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 10.866262] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 13.399223] RTL871X: rtw_set_802_11_connect(wlan0) fw_state=0x00000008 [ 13.935578] RTL871X: start auth [ 13.948265] RTL871X: auth success, start assoc [ 13.957474] RTL871X: assoc success [ 13.961114] RTL871X: recv eapol packet [ 13.965100] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 13.977530] RTL871X: send eapol packet [ 14.001378] RTL871X: recv eapol packet [ 14.012094] RTL871X: send eapol packet [ 14.017752] RTL871X: set pairwise key camid:4, addr:14:cc:20:da:4b:89, kid:0, type:AES [ 14.028860] RTL871X: set group key camid:5, addr:14:cc:20:da:4b:89, kid:2, type:AES [ 32.242203] run_mmc.sh start lsusb Bus 001 Device 002: ID 0bda:8153 Bus 001 Device 001: ID 1d6b:0002 ifconfig eth0 ifconfig: eth0: error fetching interface information: Device not found

gtxaspec commented 2 years ago

is this dmesg log with your usb adapter connected to the camera?

Vendo232 commented 2 years ago

yes 'Bus 001 Device 002: ID 0bda:8153'

but I have this one comming in tomorrow, it should work based on your read.me

Zettaguard USB Ethernet Adapter USB 3.0 [AX88179] to 10/100/1000 Fast LAN Wired Network (MacBook, Chromebook, Win 10, Compatible for Nintendo Switch,...) for Online Meeting, Games.

Vendo232 commented 2 years ago

tried the 4/14 version, but cam will not connect using RTL8153 when ENABLE_USB_ETH="true" , time to move to a different dongle :-)

image