Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

LAN7800 stuff unclear #42

Closed
monokinetic opened this issue Apr 25, 2023 · 11 comments
Closed

LAN7800 stuff unclear #42

monokinetic opened this issue Apr 25, 2023 · 11 comments
Labels
bug Something isn't working seeed-linux-openwrt Label for seeed-linux-openwrt UAY Unassigned yet

Comments

@monokinetic
Copy link

It's pretty unclear how to check if my second ethernet port, the LAN7800 based one, is working correctly. It seems like your builds include some .ko which should be loaded.
FWIW my LAN7800 based port is behaving really weirdly and I have a discussion thread here:
https://forum.openwrt.org/t/seeed-rerouter-lan78xx-always-negotiates-to-100mbs/157844

I'm running a recent 22.03 build from your OneDrive I'd like to know how to check if your .ko file is being properly loaded. If it helps, here's what I know so far:
The module seems to load:
root@OpenWrt:~# modinfo lan78xx module: /lib/modules/5.10.161/lan78xx.ko license: GPL depends: intree: Y name: lan78xx vermagic: 5.10.161 SMP mod_unload aarch64

dmesg | grep lan7* [ 7.859733] lan78xx.napi20201111 2-3:1.0 (unnamed net_device) (uninitialized): USB_CFG0 0x60768164

Does that look like it's expected? If you have any input on the forum thread I'd also really need some help to get this port to run at 1000Mb/s :)

@LynnL4
Copy link
Member

LynnL4 commented May 6, 2023

According to the content on the forum, my understanding is

  • Mode1: ETH1 (LAN78XX) is connected to a PC e.g. MacOS and it works at 1000mbps
  • Mode2: ETH1 (LAN78XX) is connected to DLINK and negotiates at 100mbps

In previous tests, I have tested in Mode1, I will try to verify your issues in Mode2

@monokinetic
Copy link
Author

Thanks for your reply @LynnL4
You are generally correct, yes. But note in Mode1 that it is only one client which negotiates 1000Mbps. I have also tried other clients (2 Linux desktops using built in Gigabyte motherboard's ethernet port running Ubuntu and Arch, Apple official USB2 to ethernet adapter on Macbook Pro) and all of them negotiate 100Mbps only. Tried lots of cables, including cross over. It always runs slow, the only time it ever ran at 1000MBps was my macOS desktop.

So please yes if you could check I'd really like to get this working as advertised.

@monokinetic
Copy link
Author

monokinetic commented May 10, 2023

@LynnL4 just to follow up, I'm only attempting the modes you described above to try and troubleshoot. On the OpenWRT forum they recommended reversing the ports (i.e. swap Lan and Wan functionality) to verify the hardware.
Today I've tried again from scratch, connections per Seeed wiki page i.e. eth0 to single client eth1 to modem. Still exactly the same problem. To try and show what I'm doing, my precise steps:
Downloaded latest 22.03.3 entertainment version from Seeed onedrive. Filename: openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz

Flashed using Balena etcher, boots fine. But I note that there is not a wan interface configured by default, seems weird. The Seeed wiki page claims both interfaces set up out of the box.

To get internet access, I used Luci to add a Wan interface. Output of uci network show:

network.wan=interface
network.wan.proto='dhcp'
network.wan.device='eth1'

Reboot.
Now we have Wan, in Luci used System>Software to update packages and install ethtool-full. Resulting ethtool output:

root@OpenWrt:~# ethtool eth1
Settings for eth1:
	Supported ports: [ TP	 MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full
	                                     100baseT/Half 100baseT/Full
	Link partner advertised pause frame use: Symmetric Receive-only
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 100Mb/s
	Duplex: Full
	Auto-negotiation: on
	master-slave cfg: preferred slave
	master-slave status: master
	Port: Twisted Pair
	PHYAD: 1
	Transceiver: internal
	MDI-X: Unknown
	Supports Wake-on: pumbag
	Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
	Link detected: yes

So this is straight out of the box config per Seeed wiki page using Seeed image and clearly not working.
Any suggestions please what to test next. My gut feeling is that the port has a weird hardware problem, it's been like this since I purchased it and for quite a long time now trying to get it to work using your vanilla images and always hitting this problem.

Is there a known working earlier image I could test to verify? And why does the image I used not provide both ports configured out of the box? Isn't that a possible sign something isn't right in the images you're building?

@LynnL4
Copy link
Member

LynnL4 commented May 12, 2023

HI, I need next week to get the Carried Board and start debugging, this is the latest time I tested to the situation. I noticed that there is a driver update for LAN78XX, I will try to update the driver and then follow your steps and give a reply as soon as possible
image

@LynnL4
Copy link
Member

LynnL4 commented May 17, 2023

Hi,
Have you tried the firmware at bcm-minimal-22.03-05-16?
I tested three diffrent routers and two switches and all got the following states, I noticed a parameter here Link Partner advertised link modes
The 22.03.3entertainment version was missing some files when it was packaged, I am repackaging it.

16842898888320

@LynnL4
Copy link
Member

LynnL4 commented May 18, 2023

Hi, @monokinetic 22.03.3 entertainment version had been updated.
image

@monokinetic
Copy link
Author

Thanks for the builds @LynnL4 and your attempts to help :)

I have been trying them over the last week. But I'm afraid still the same problem :(

Here's dmesg:
https://gist.github.com/monokinetic/dbd3b0bb654ef947db58afff22a1c5e0

That's updated with running the 2023-06-06 minimal build.

and here's ethtool:

`BusyBox v1.35.0 (2023-05-09 22:07:15 UTC) built-in shell (ash)


| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

OpenWrt 22.03-SNAPSHOT, r0-695a22a

root@OpenWrt:# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: master
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
root@OpenWrt:
# ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: master
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
MDI-X: Unknown
Supports Wake-on: pumbag
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes`

Would you take one last look to see if there's anything obviously different in the dmesg between my system and yours? If there's any other info that might help troubleshoot please let me know. Otherwise I think it might be time to send this for hardware check?

@LynnL4
Copy link
Member

LynnL4 commented Jun 9, 2023

Hi, Could you tell me what switch or router you are using? I'll try to see if I can find a similar device. As I mentioned before, I tested 3 devices that I could get and they all negotiated up to 1000M

@LynnL4 LynnL4 added the bug Something isn't working label Jun 9, 2023
@monokinetic
Copy link
Author

Hey @LynnL4, I have tried these router / modems:

  • Vodafone Station (Arris tg3442)
  • Technicolor 7200

And for completeness, I have tried them both in router mode (testing each physical port), and bridge mode. Always the same problem. Both modems can connect to other devices at 1000MB/s using the same cabling.

@MatthewJeffson MatthewJeffson added UAY Unassigned yet seeed-linux-openwrt Label for seeed-linux-openwrt labels Oct 9, 2024
github-actions bot pushed a commit that referenced this issue Oct 21, 2024
fix permission for uploaded files
Copy link

github-actions bot commented Jan 8, 2025

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added Stale and removed Stale labels Jan 8, 2025
@baorepo
Copy link
Member

baorepo commented Jan 8, 2025

https://wiki.seeedstudio.com/OpenWrt-Getting-Started/#run-r235-openwrt This issue has been fixed in the latest Openwrt according to user feedback, and it is recommended to use the latest Openwrt.

@Lesords Lesords closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working seeed-linux-openwrt Label for seeed-linux-openwrt UAY Unassigned yet
Projects
None yet
Development

No branches or pull requests

5 participants