This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Beaglebone Android ICS - Linux ethernet

Hi Guys!

We started playing with Ethernet interface on our beagle bone extended terminal which was previously mentioned in several threads by me.

At first we successfully integrated WIFI, but at some sub-models now we are trying to only Ethernet.

Everything is fine after boot, but we made some stability tests, and it seems that the link sensing is not working properly if you physically toggle plugging the ethernet cable.

The test environment was Gateway router ---- SWITCH ---- Beaglebone

The scenario was:

  1. Boot with cable plugged in - OK
  2. Plug out the cable, then plug it back - OK
  3. Plug out again - here was the first strange issue that after typing netcfg it listed eth0 UP   10.11.4.85/16  0x00001003 00:18:31:8c:9b:dd but the dmesg showed that PHY: 0:00 - Link is Down
  4. After this when I plugged back nothing happend, even the state indicatpor leds on the Ethernet interface remained blank, the haven't blinked
The dmesg output is not very verbose:

<6>[ 151.103668] PHY: 0:00 - Link is Down
<6>[ 182.103668] PHY: 0:00 - Link is Up - 100/Full
<6>[ 196.103637] PHY: 0:00 - Link is Down

I bet this is a low level issue around Linux and not Android. Could someone please give me some advice for example which driver's log verbosity should be raised or if this is a known issue.

I know that it is not a common scenario pluging in and out the cable physically like an idiot :) but I want to make the system as robust as possible.

Thanks  in advance,

sodjas

  • Update,  I also got these messages, probably during netcfg eth0 up commads

    <3>[ 5714.654205] CPSW phy found : id is : 0x7c0f1
    <3>[ 5714.660949] PHY 0:01 not found
    <6>[ 5714.667205] ADDRCONF(NETDEV_UP): eth0: link is not ready

    But before in the boot sequence I can spot this:

    <3>[ 22.096557] CPSW phy found : id is : 0x7c0f1
    <3>[ 22.103424] PHY 0:01 not found
    <6>[ 22.109558] ADDRCONF(NETDEV_UP): eth0: link is not ready
    <6>[ 22.320800] acc_open
    <6>[ 22.323211] acc_release
    <6>[ 25.093841] PHY: 0:00 - Link is Up - 100/Full
    <6>[ 25.103240] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

    Could this acc_open/acc_release be something that is connected with the proper sequence of ethernet triggering and re/enabling?

    Best regards,

    sodjas

  • Hi,

    As I understand, the issue is dhcp does not work when plugged in for the second time after boot.

    In JellyBean latest DevKit, we do not have UI support for ethernet, but have fixed all dhcp and static ip issues.

    Please  refer to

    https://gitorious.org/rowboat/frameworks-base/commit/57c762d71490d14cdd735d845b11731fe9120f5d

    https://gitorious.org/rowboat/frameworks-base/commit/8ad8cd36efa964a0093a25ca129b65c7c1a567c8

    https://gitorious.org/rowboat/frameworks-base/commit/abb35910ccc9e1a8a052b68f795b66a39478603a

    http://gitorious.org/rowboat/vendor-ti-am335xevm/commit/9664275b19d98d6ca355ccdd6fce3c179dc31bd2

    and

    http://gitorious.org/rowboat/vendor-ti-am335xevm/commit/1ff01e068a3afbc01a3013fc20369af72ea7c7a2

    and apply them to ICS sources

    With these changes, the device will get dynamic IP address anytime after the ethernet cable is connected.

    Regards,

    Arun

  • Hi Arun,

    Thanks for the quick answer. The situation is that dhcp is working and after boot I always got the ethernet link up and running.

    The problem comes in always after the second plug-out of the cable so practically:

    1. Boot everything is OK I got the link up, got IP address, DNS everything
    2. Plug out (but indicator leds on the RJ45 go blank), then plug in back and still everything is OK
    3. For the second time when I repeat step 2. then the RJ45 leds stay blank
    It seems that this alternating of plug in/out physically the network cable can bring the state machine to an undefined state. Again I know that this is kind of a "very weird" test because practically I'm emulating a cable or connector port with a failure. I just want to understand the non-deterministic way how this works....
    Sometimes it works for 4 or 5 plug in/outs sometimes the RJ45 leds remain blank and the network is down. Could this be a "feature" in the chip that it shuts itself down if a so called "floating" link is present?
    Best Regards,
    sodjas
  • Hi Sodjas,

    I suspect some issue with the physical link layer itself. Do the connector itself is not responding? Can we know if any interrupts are coming or not?

    Regards,

    Arun

  • Hi Arun,

    Honestly I don't have much experience with the low level stuff, what depends on the ethernet chip itself (the firmware in it) and on the linux drivers on top.

    What is strange for me that even if toggling from disconnected cable to connected cable work we only got

    [   41.953094] PHY: 0:00 - Link is Down

    and the netcfg output shows

    lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
    sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
    eth0 UP 10.11.4.117/16 0x00001003 00:18:31:8c:9b:dd

    I think in a perfect functioning netcfg output should also show that the eth0 link is down after the cable is disconnected.

    Sadly I cannot reproduce this always, for example a minute before I made up to 10 connect/disconnect sequences and it worked perfect.

    What do you mean interrupt? The kernel log is not really verbose it just tells me the stuff posted above.

    Could there be somewhere a guide telling how to integrate ethernet from linux level to android?

    Best regards,

    sodjas

  • Hi Guys!

    Further info is that if we play with it on software side netcfg down/up it works perfectly. I summarize this now as a very low level issue.

    I found this thread:

    http://circuitco.com/support/index.php?title=BeagleBone#Etherent_PHY_Default_Configuration_.5BA3.2CA4.2CA5.2CA6.5D 

    There are several open issues connected to Ethernet PHY and one for rev A6 too

    Should we debug the u-boot part too?

    Best regards,

    sodjas

  • Hi!

    I wondered there are so many issues with the Ethernet on beaglebone revs, I just read that beaglebone black has problems too, that maybe this is a common issue.

    Can someone having and ARM linux installed or similarly Android ICS installed confirm me they have the same issue after a few cable connect/disconnect togglings?

    Thanks, best regards,

    sodjas

  • HI Sodjas,

    There is a similar issue on the beaglebone forum https://groups.google.com/forum/#!searchin/beagleboard/ethernet/beagleboard/Vp4pxwHm8BU/zNt3CX-vwAoJ

    Can you try out with a static IP configuration?(Please note to apply the patches which I pointed earlier.)

    Regards,

    Arun

  • Hi Arun!

    We are currently testing your patches it is under progress.

    In the meantime could give me an ack what should be done in order to have a static ip config, I assume that the following is needed:

    1. comment out dhcpd service for eth0

    2. set properties ip, mask and DNS

    Is there any further thing to do? I want to set it on boot automatically. How and where should be the 2. point set exactly, do you have some snippet, is this a right sequence:

    netcfg eth0 up
    ifconfig eth0 <ip> netmask <mask>
    route add default gw <ip> dev eth0
    setprop net.dns1 <ip>

    I don't have ifconfig on the ti android system just ip addr, probably I should use it instead of ifconfig.

    Thanks,

    sodjas

  • Hi Sodjas,

     Can you just try configuring from the settings -> ethernet? That should work. The ifconfig or bootargs should also work.

  • Hi Arun,

    I just finished testing it and static ip configuration is working. However with you patches applied we still have the issue of cable reconnection. I read a lot of forum submissions yesterday and I'm afraid this is kind of a low level stuff.

    On the linked circuitco forum above they are also talking about some ethernet hw design issue at certain revs of Beaglebone.

    We are using REV A6.

    So summarizing, when the cable physically stays connected we do not have any problem. Reboot also works both on switch and bbone side.

    The only problem is that I can bring it in a state when after cable disconnect link goes down, and after reconnect it does not go up. The leds of the RJ45 stay blank. So I guess this could be somethin in the SMSC chip on low level. I'm afraid I can't do much.

    It would be great to get some hint or info from a TI employee whether this is known issue, or simply to say do not want to connect/disconnect cable because the chip can reset itself or something...

    Anyway thanks for your advices they were really useful

    sodjas