Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

MangoES w/USB Ethernet Adapter


  • Looking for help configuring an ES with dual network interfaces.

    When using a MangoES with two network interfaces (eth0-onboard and eth1-USB) where is the appropriate place to make the changes to the network configuration that will survive a reboot? I am assigning a static IP/Sub/GW to each interface. I have made these changes via the 'old' UI (Mango ES Configuration) as well as editing /etc/network/interfaces, but the changes do not seem to survive reboot. Even looked at options via webmin.

    The 'old' UI seems to add another interface after reboot as well (eth3)

    Any help would be greatly appreciated.


  • @wingnut2-0
    I think you must know, although you have 2 network cards, you can only have one default gateway.
    You can SSH into MangoBox and use [ip route] to view the settings.

    If you need is, from which network card (eth0) the network packet comes in, need to go back from that network card(eth0). This is called policy routing.

    Is this the setting you need?


  • Hi Wingnut2.0,

    I wonder if the USB ethernet adapter is adding rules for each enumeration to /etc/udev/rules.d/70-persistent-net.rules and that's why you've seen eth3 show up. A little googling suggested you may be able to set up its static properties right there in the .rules file, but then it surely would not work to change it via the MangoES Configuration settings, if it appears. The ES Configuration module is modifying /etc/network/interfaces. Can you share the output of the .rules file?


  • Thank you both for you responses.

    I apologize, when I said survive reboot in my original post what I meant is that with a USB Ethernet adapter connected I am unable to reboot mango successfully. I can add a USB adapter after booting without issue and make the changes, but mango will not successfully reboot with USB adapter connected. This is with or without network cable being connected to USB adapter. I have also tried with USB adapter connected and set for DHCP while eth0 is disconnected and I was unable to boot. I have been testing this with multiple USB adapters all with the same results.

    Output of 70-persistent-net.rules

    # This file was automatically generated by the /lib/udev/write_net_rules
    # program, run by the persistent-net-generator.rules rules file.
    #
    # You can modify it, as long as you keep each rule on a single
    # line, and change only the value of the NAME= key.
    
    # USB device 0x:0x (r8712u)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", KERNEL=="wlan*", NAME="wlan0", RUN+="/opt/control/ensureHostapd.sh"
    
    # USB device 0x:0x (cdc_ether)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="18:a6:f7:0e:75:49", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
    
    # USB device 0x:0x (MOSCHIP usb-ethernet driver)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:3b:16:7c:bf", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
    

  • Ah, okay. Can you try launching Mango on the command line with the USB-ethernet adapter plugged in? Probably something is making it to stderr...


  • When testing via ssh using ./ma.sh stop followed by ./ma.sh start nothing seem to prevent the reboot and nothing appears out of ordinary in the log file. However, when power cycling with a connected monitor & keyboard to watch boot, I get the following error response CRC error sending SET_BLOCK_COUNT command, card status 0x900 everytime a USB adapter is connected and the boot process just stops there.


  • Huh. New one for me. Was there anything before that output on that line, like a device identifier? Looking at the Odroid forum, it seems mostly that message is coming from eMMCs that are either out of date or have issues.

    One thing that occurs to me is that one of the USB ports can have it's power switched from the OS level, via the GPIO pins. I wonder if there may be a solution of powering down the USB-ethernet output port during startup. I haven't looked at this in a while, but it's GPIO pin 31 that switches the USB port on / off (default on). You can see the /opt/control/esUsbUtility.sh script has pinon and pinoff methods, which gives a hint as to how to enable / use the GPIO pins. Perhaps this would work to bypass the issue. I believe it is the horizontal USB3 port that is switched by GPIO 31.


  • The device identifier at the beginning of the error line was mmcblk0:
    I wont be able to do any additional testing until tomorrow, but I did test this on another mangoES and received the same results. I believe both tests were using the vertical USB port next to the RJ45 Ethernet port.