Help getting Ethernet configuration correct [resolved]
Jeff Seese last edited by Jeff Seese
Hello, I am using an Omega2+
BusyBox version 1.26.2
I am trying to use the ethernet expansion port and configure the Omega 2 as a DHCP client, not an ethernet to WiFi bridge.
I have checked/verified my ethernet cable is good and the router is working, lots of other devices hooked up here via hardwired ethernet.
I have changed the config at etc/config/network to look like this.
config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd1d:48c4:7633::/48' #config interface 'wlan' # option type 'bridge' # option ifname 'eth0.1' # option proto 'static' # option ipaddr '192.168.3.1' # option netmask '255.255.255.0' # option ip6assign '60' config interface 'wan' option ifname 'eth0' option proto 'dhcp' option hostname 'K200Omega' # was eth0.2 config interface 'wwan' option ifname 'apcli0' option proto 'dhcp'
Per the docs here.
When the Omega 2+ Powers on I see the link LED on the router for that port blink a few times, but then stops.
The Omega 2 never gets and IP address.
Ifconfig looks like this.
apcli0 Link encap:Ethernet HWaddr 42:A3:6B:00:38:E5 inet addr:192.168.0.35 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::40a3:6bff:fe00:38e5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12967 errors:0 dropped:0 overruns:0 frame:0 TX packets:7923 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:5178879 (4.9 MiB) TX bytes:641716 (626.6 KiB) eth0 Link encap:Ethernet HWaddr 40:A3:6B:C0:38:E7 inet6 addr: fe80::42a3:6bff:fec0:38e7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:272 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:88078 (86.0 KiB) Interrupt:5 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:180 errors:0 dropped:0 overruns:0 frame:0 TX packets:180 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:12674 (12.3 KiB) TX bytes:12674 (12.3 KiB) ra0 Link encap:Ethernet HWaddr 40:A3:6B:C0:38:E5 inet6 addr: fe80::42a3:6bff:fec0:38e5/64 Scope:Link UP BROADCAST RUNNING 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) Interrupt:6
Any ideas what I might be doing wrong?
Jeff Seese last edited by Jeff Seese
Update, I performed a factory reset on my Omega2+ since it comes pre-configured as an ethernet to WiFi bridge.
Went through the Omega setup, connecting it to Wi-Fi via the Web configuration.
Verified Wi-Fi connection is working correctly.
Then I plugged my desktop computer ethernet into the Omega2+ Ethernet port, but the Omega2 did not issue an IP address to the desktop
When I plug the Ethernet cable into the router an IP address is correctly issued to the desktop so the desktop and Ethernet cable are fine.
I also checked the voltage at Pin 25 of the Omega, (3.3Vout). It's 0V. My understanding is that Vout is turned on when the Omega enables Ethernet. The Schematic shows that pin going to the NET_POW of the ethernet doc which supplies power to the center tap of the RJ45 Magnetics.
I think I need to resolve the 0V issue at Pin 25 before I can expect anything to work.
So it appears that either.
The Omega 2 is still not configured correctly.
There is something wrong with my Ethernet bridge
Any ideas on next steps to help identify the source of the issue?
On networking side:
Try to hardcode eth0 on Omega2 to be 192.168.101.1 and also set PC side Ethernet to be 192.168.101.2.
Then try to ping each other.
This avoid any type dhcpd mess up.
On hardware side, note that Omega 1 (core IC AR9331) is quite different than
Omega 2's MT7688AN.
At least, their Ethernet MAC/PHY driver is different.
For former, the required bias is 1.8V and on Omega 1's Net_Power pin, the
AR9331 itself supplies 1.8V (has an internal regulator for that) and this voltage through
Ethernet magnetics to back feed as the driver's DC bias.
There has never been a document disclosed on MT9688's required DC bias on its Ethernet MAC/PHY driver.
(May be the other brand has it, but I don't know...)
Note that although some said for Omega 2, the Net_Power out should be 3.3V and thus MT7688 Ethernet MAC should use that as its DC bias.
I am not sure about it. Quite likely it just need to be no DC bias supplied that way. (MT7688 IC does not supply 1.8V or 2V output at all.)
I have traced that Net_Power pin in the past. In PCB, it is led to be on two "un-populated 0-ohm" resistor pads.
If soldering one 0-ohm, it got patched in one circuit and if on the other position, connect to another circuit.
Currently, it is not populated. I am guessing Onion had figured out no DC bias is needed thus no 0-ohm jumper is used.
Thanks for the pointers.
I tried setting static IP on Omega2+, then restarted with
Pin from 101.1 to 101.2 times out and the same for the reverse.
I think the problem is more physical right now, or atleast a config that is not enabling the physical ethernet port to work.
The reason I say this is my Mac says this with ethernet cable pluged in between the Omega2+ and the Mac.
In one version of the MT7688KN datasheet, it showed its pin 35 EPHY_VRT is the voltage regulator output lead which supplies current thru an external resistor to Ethernet Magnetics. No additional info is available.
I checked "the other" board's documentation, it appears that:
EPHY_VRT (for MT7688KN, it's pin 35; 7688AN is 39) is thru a 24K resistor to tie to the ground.
This signal and pin voltage is not exposed to the outside world. It seems to be just for DC bias fine-tuning.
Both Ethernet magnetics' RX and Tx center-taps are tied together, then thru 104n to be grounded.
HOWEVER VERY IMPORTANTLY, there is no DC bias supplying voltage to the center tap.
I.e., Omega2's net_power (current N.C.) is fine, since no 3.3V is provided on this pin.
I will have to hand-build a test module to verify if it can work.
Okay so the fact that there is no voltage at Omega2+ Pin #25 NET_POW is normal - got it.
The Ethernet doc schematic does show that it has the RX and TX center taps tied to ground through a 49.9 ohm resistor and 100 nf cap.
So that should all be physically wired correctly.
certainly the Ethernet Dock wouldn't be sold if it didn't work so it seems that this has to be a configuration issue right?
Finally got time to wire it up.
Electrically, it is working. However, if I have both WiFi and Ethernet plugged in at the same time during booting,
neither WiFi nor Ethernet will get IP address assigned by my (same) home cable router.
If I unplugged the Ethernet cable then boot, just by WiFi itself, WiFi will acquire an IP address (e.g., 192.168.10.10.)
I can then plug in the Ethernet cable and use web interface thru Terminal to assign it an IP address;
e.g., ifconfig eth0 192.168.10.20. It will be fine either way to connect to my home network.
I did not spend any time to troubleshoot. Just to validate the circuitry.
BTW, my specific brand of Ethernet magnetics (a.k.a. EasyJack) is Bel 0810-1XX1-02.
Pin 1: Tx C.T., 2: Tx+, 3 Tx-, 4 Rx+, 5 Rx-, and 6 Rx C.T.
Pin 1 and 6 tied together then thru 100nF to Gnd.
Pin 2 and 3 each thru 50 Ohm termination resistors to reach a 100nF capacitor. 100nF's other end tied to Gnd.
Pin 4 and 5 each thru 50 Ohm termination resistors to reach a 100nF capacitor. 100nF's other end tied to Gnd.
P.S. a low cost method is to buy a "HLK-RM04 Test Board". It's approx. $5 shipped and has a few parts to be re- purposed.
See https://www.aliexpress.com/item/Free-Shipping-Uart-WIFI-module-serial-ports-WIFI-MCU-WIFI-HLK-RM04-SCM-wifi-test-board/729142578.html or http://www.ebay.com/itm/HLK-RM04-UART-to-WIFI-Serial-Port-to-Wifi-Module-Test-Base-Board-/112318260620
That was it. My mistake was I had the center tap to Vcc through .1uf Cap instead of to ground.
I thought I saw it to Vcc in schematics... Oh well, thank you very much!
I am able to use ethernet as bridge now with default firmware config or as ethernet client with my initial config.
@ccs-hello Do you connect then directly Tx+ and Tx- to the pins with the same name on your Omega2 (same for Rx+ or Rx-) or you rather use a cross-over?
According to the Ethernet expansion dock schematic, it should be crossed-over, but my logic dictates me it should be straight (that is: TX+- on Omega2 to wires 1 and 2 on the eth cable, RX+- to wires 3 and 6 on the eth cable).
I have made my own Ethernet expansion board on which I have placed an Ethernet switch, so that I can have more than 1 Phy. I have connected it straight there and it works perfectly. I must also mention that the switch is Auto-MDIX capable. Now I want to design a smaller version of my Ethernet expansion board (without the switch) and I really have doubt about how to connect the pins.
It is a straight through connection.
@Jeff-Seese Not on the Ethernet shield from Onion: they connect omega2 pins Tx+ and Tx- to eth cable pins 3 and 6 and Rx+ and Rx- to 1 and 2.
Omega2's Tx pair goes to Ethernet magnetic's TX leads
and O's RX to magnetic's Rx.
@ccs-hello Thanks for the replies, but sorry to insist. This is the Ethernet Expansion Dock schematic:
As you can see, TX+ and TX- are connected to the pair 3-6 on the cable. Rx+ and Rx- are connected to 1-2. This is what I dont get. Shouldn't it be the other way around?
I saw that Omega 1 schematic diagram before.
It was a surprise since it's different than all those Ethernet MagicJack's diagrams from several mfgs. The standard design is Tx out goes to RJ45's pin 1/2 (the Tx pair) and Rx out goes to 3/6 (Rx) pair.
Guess the diagram you've cited is built for "naturally cross-over" for unknown reasons.