SG-1000 & USB NIC



  • I'm trying to get the SG-1000 to come up with an LTE USB network interface for the WAN (ue0 - if_urndis.ko).  It initially comes up then I see a message where it just disconnects.  Any ideas on why this happens?

    urndis0: at uhub0, port 1, addr 2 (disconnected)
    umodem0: at uhub0, port 1, addr 2 (disconnected)
    umodem1: at uhub0, port 1, addr 2 (disconnected)
    umodem2: at uhub0, port 1, addr 2 (disconnected)
    ugen0.2: <wnc>at usbus0 (disconnected)
    ugen0.2: <unknown>at usbus0 (disconnected)

    –------------- BOOTLOG FOLLOWS ---------------

    U-Boot SPL 2016.03 (Dec 28 2016 - 14:33:36)
    Trying to boot from MMC
    Card doesn't support part_switch
    MMC partition switch failed
    *** Warning - MMC partition switch failed, using default environment

    reading u-boot.img
    reading u-boot.img

    U-Boot 2016.03 (Dec 28 2016 - 14:33:36 +0000)

    Watchdog enabled
    I2C:  ready
    DRAM:  512 MiB
    MMC:  OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading u-boot.env

    ** Unable to read "u-boot.env" from mmc0:1 **
    Using default environment

    Net:  <ethaddr>not set. Validating first E-fuse MAC
    cpsw, usb_ether
    starting USB...
    USB0:  scanning bus 0 for devices... 1 USB Device(s) found
          scanning usb for storage devices... 0 Storage Device(s) found
    ** Bad device usb 0 **
    Hit any key to stop autoboot:  2  1  0
    Booting from: mmc 1 ubldr.bin
    reading ubldr.bin
    217364 bytes read in 19 ms (10.9 MiB/s)

    Starting application at 0x88000000 ...

    Consoles: U-Boot console 
    Compatible U-Boot API signature found @0x9ef3ab58

    FreeBSD/armv6 U-Boot loader, Revision 1.2
    (root@buildbot2.netgate.com, Sat Apr 29 02:38:04 CDT 2017)

    DRAM: 512MB
    Number of U-Boot devices: 3
    U-Boot env: loaderdev='mmc 1'
    Found U-Boot device: disk
      Checking unit=1 slice= <auto>partition=<auto>... good.
    Booting from disk1s2a:
    |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\console comconsole is invalid!
    console vidconsole is invalid!
    no valid consoles!
    Available consoles:
        uboot
    |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-/boot/kernel/kernel data=0x11de424+0x51bdc \|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\syms=[0x4+0xad770|/-\|+0x4+0xc70dc/-\|/-\]

    Hit [Enter] to boot immediately, or any other key for command prompt.
    Booting [/boot/kernel/kernel] in 2 seconds… Booting [/boot/kernel/kernel] in 1 second… Booting [/boot/kernel/kernel]…             
    |/-\|/-\|/-\|/-\|/-/boot/dtb/ufw.dtb size=0x79f4
    Loaded DTB from file 'ufw.dtb'.
    \|/-\Kernel entry at 0x0x88200100...
    Kernel args: (null)
    Copyright (c) 1992-2016 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
    FreeBSD is a registered trademark of The FreeBSD Foundation.
    FreeBSD 11.0-RELEASE-p8 #0 1b380dbbb0d(RELENG_2_4): Sat Apr 29 02:40:37 CDT 2017
        root@buildbot2.netgate.com:/xbuilder/crossbuild/work/obj-ufw-armv6/arm.armv6/builder/factory/tmp/FreeBSD-src/sys/pfSense-uFW arm
    FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
    CPU: Cortex A8-r3 rev 2 (Cortex-A core)
    Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
    WB enabled LABT branch prediction disabled
    LoUU:2 LoC:3 LoUIS:1
    Cache level 1:
    32KB/64B 4-way data cache WT WB Read-Alloc
    32KB/64B 4-way instruction cache Read-Alloc
    Cache level 2:
    256KB/64B 8-way unified cache WT WB Read-Alloc Write-Alloc
    real memory  = 536870912 (512 MB)
    avail memory = 503078912 (479 MB)
    Texas Instruments AM335x Processor, Revision ES1.2
    ipw_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
    ipw_bss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (ipw_bss_fw, 0xc031a6b4, 0) error 1
    ipw_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
    ipw_ibss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (ipw_ibss_fw, 0xc031a764, 0) error 1
    ipw_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
    ipw_monitor: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (ipw_monitor_fw, 0xc031a814, 0) error 1
    iwi_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
    iwi_bss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (iwi_bss_fw, 0xc032452c, 0) error 1
    iwi_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
    iwi_ibss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (iwi_ibss_fw, 0xc03245dc, 0) error 1
    iwi_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
    iwi_monitor: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
    module_register_init: MOD_LOAD (iwi_monitor_fw, 0xc032468c, 0) error 1
    wlan: mac acl policy registered
    random: entropy device external interface
    ofwbus0: <open firmware="" device="" tree="">simplebus0: <flattened device="" tree="" simple="" bus="">on ofwbus0
    simplebus1: <flattened device="" tree="" simple="" bus="">on simplebus0
    simplebus2: <flattened device="" tree="" simple="" bus="">mem 0x210000-0x211fff on simplebus1
    ti_scm0: <ti control="" module="">mem 0-0x7ff on simplebus2
    aintc0: <ti aintc="" interrupt="" controller="">mem 0x48200000-0x48200fff on simplebus0
    aintc0: Revision 5.0
    cpulist0: <open firmware="" cpu="" group="">on ofwbus0
    cpu0: <open firmware="" cpu="">on cpulist0
    pmu0: <performance monitoring="" unit="">on ofwbus0
    am335x_prcm0: <am335x power="" and="" clock="" management="">mem 0x200000-0x203fff on simplebus1
    am335x_prcm0: Clocks: System 24.0 MHz, CPU 550 MHz
    ti_pinmux0: <ti pinmux="" module="">mem 0x800-0xa37 on simplebus2
    am335x_scm0: <am335x control="" module="" extension="">on ti_scm0
    gpio0: <ti am335x="" general="" purpose="" i="" o="" (gpio)="">mem 0x44e07000-0x44e07fff on simplebus0
    gpiobus0: <ofw gpio="" bus="">on gpio0
    gpioc0: <gpio controller="">on gpio0
    gpio1: <ti am335x="" general="" purpose="" i="" o="" (gpio)="">mem 0x4804c000-0x4804cfff on simplebus0
    gpiobus1: <ofw gpio="" bus="">on gpio1
    gpioc1: <gpio controller="">on gpio1
    gpio2: <ti am335x="" general="" purpose="" i="" o="" (gpio)="">mem 0x481ac000-0x481acfff on simplebus0
    gpiobus2: <ofw gpio="" bus="">on gpio2
    gpioc2: <gpio controller="">on gpio2
    gpio3: <ti am335x="" general="" purpose="" i="" o="" (gpio)="">mem 0x481ae000-0x481aefff on simplebus0
    gpiobus3: <ofw gpio="" bus="">on gpio3
    gpioc3: <gpio controller="">on gpio3
    uart0: <ti uart="" (16550="" compatible)="">mem 0x44e09000-0x44e0afff on simplebus0
    uart0: console (115384,n,8,1)
    iichb0: <ti i2c="" controller="">mem 0x44e0b000-0x44e0bfff on simplebus0
    iichb0: I2C revision 4.0 FIFO size: 32 bytes
    iicbus0: <ofw i2c="" bus="">on iichb0
    iic0: <i2c generic="" i="" o="">on iicbus0
    icee0: <at24c02>at addr 0xa0 on iicbus0
    iichb1: <ti i2c="" controller="">mem 0x4802a000-0x4802afff on simplebus0
    iichb1: I2C revision 4.0 FIFO size: 32 bytes
    iicbus1: <ofw i2c="" bus="">on iichb1
    iic1: <i2c generic="" i="" o="">on iicbus1
    sdhci_ti0: <ti mmchs="" (sdhci="" 2.0)="">mem 0x48060000-0x48060fff on simplebus0
    mmc0: <mmc sd="" bus="">on sdhci_ti0
    sdhci_ti1: <ti mmchs="" (sdhci="" 2.0)="">mem 0x481d8000-0x481d8fff on simplebus0
    mmc1: <mmc sd="" bus="">on sdhci_ti1
    ti_wdt0: <ti watchdog="" timer="">mem 0x44e35000-0x44e35fff on simplebus0
    ti_mbox0: <ti system="" mailbox="">mem 0x480c8000-0x480c81ff on simplebus0
    ti_mbox0: revision 4.0
    am335x_dmtimer0: <am335x dmtimer2="">mem 0x48040000-0x480403ff on simplebus0
    Event timer "DMTimer2" frequency 24000000 Hz quality 500
    am335x_dmtimer1: <am335x dmtimer3="">mem 0x48042000-0x480423ff on simplebus0
    Timecounter "DMTimer3" frequency 24000000 Hz quality 500
    usbss0: <ti am33xx="" integrated="" usb="" otg="" controller="">mem 0x47400000-0x47400fff on simplebus0
    usbss0: TI AM335X USBSS v0.0.13
    musbotg0: <ti am33xx="" integrated="" usb="" otg="" controller="">mem 0x47401400-0x474017ff,0x47401000-0x474011ff on usbss0
    usbus0: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
    usbus0 on musbotg0
    musbotg1: <ti am33xx="" integrated="" usb="" otg="" controller="">mem 0x47401c00-0x47401fff,0x47401800-0x474019ff on usbss0
    usbus1: Dynamic FIFO sizing detected, assuming 16Kbytes of FIFO RAM
    usbus1 on musbotg1
    cpswss0: <3-port Switch Ethernet Subsystem> mem 0x4a100000-0x4a1007ff,0x4a101200-0x4a1012ff on simplebus0
    cpswss0: CPSW SS Version 1.12 (0)
    cpswss0: Initial queue size TX=128 RX=384
    cpsw0: <ethernet switch="" port="">on cpswss0
    miibus0: <mii bus="">on cpsw0
    micphy0: <micrel 10="" 100="" 1000="" ksz9031="" phy="">PHY 1 on miibus0
    micphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
    cpsw0: Ethernet address: 68:9e:19:9c:7b:97
    cpsw1: <ethernet switch="" port="">on cpswss0
    miibus1: <mii bus="">on cpsw1
    micphy1: <micrel 10="" 100="" 1000="" ksz9031="" phy="">PHY 2 on miibus1
    micphy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
    cpsw1: Ethernet address: 68:9e:19:9c:7b:99
    etherswitch0: <switch controller="">on cpswss0
    ti_adc0: <ti adc="" controller="">mem 0x44e0d000-0x44e0dfff disabled on simplebus0
    ti_adc0: scheme: 0x1 func: 0x730 rtl: 0 rev: 0.1 custom rev: 0
    cryptosoft0: <software crypto="">Timecounters tick every 10.000 msec
    usbus1: 480Mbps High Speed USB v2.0
    usbus0: 480Mbps High Speed USB v2.0
    ugen0.1: <mentor graphics="">at usbus0
    uhub0: <mentor 1="" 9="" graphics="" otg="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">on usbus0
    ugen1.1: <mentor graphics="">at usbus1
    uhub1: <mentor 1="" 9="" graphics="" otg="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">on usbus1
    mmcsd0: 32GB <sdhc 3="" 2016="" se32g="" 8.0="" sn="" d40d1f15="" mfg="" 09="" by="" sd="">at mmc0 48.0MHz/4bit/65535-block
    uhub1: 1 port with 1 removable, self powered
    uhub0: 1 port with 1 removable, self powered
    ugen0.2: <wnc>at usbus0
    umodem0: <cdc abstract="" control="" model="" acm="">on usbus0
    umodem0: data interface 3, has no CM over data, has no break
    umodem1: <cdc abstract="" control="" model="" acm="">on usbus0
    umodem1: data interface 5, has no CM over data, has no break
    umodem2: <cdc abstract="" control="" model="" acm="">on usbus0
    umodem2: data interface 7, has no CM over data, has no break
    mmcsd1: 4GB <mmchc 112="" 2000="" m62704="" 0.1="" sn="" 0baa9ffd="" mfg="" 07="" by="" 0x0000="">at mmc1 48.0MHz/8bit/65535-block
    Trying to mount root from ufs:/dev/ufsid/58480ee2a77beec6 [rw,noatime]…
    WARNING: / was not properly dismounted
    WARNING: /: mount pending error: blocks 8 files 3
    warning: no time-of-day clock registered, system time will not be set accurately
    Configuring crash dumps...
    No suitable dump device was found.
    ** SU+J Recovering /dev/ufsid/58480ee2a77beec6
    ** Reading 7503872 byte journal from inode 4.
    ** Building recovery table.
    ** Resolving unreferenced inode list.
    ** Processing journal entries.
    ** 183 journal records in 28160 bytes for 20.80% utilization
    ** Freed 9 inodes (3 dirs) 3 blocks, and 6 frags.

    ***** FILE SYSTEM MARKED CLEAN *****
    Filesystems are clean, continuing...
    Mounting filesystems...
    random: unblocking device.

    ___
    / f
    / p _
    / Sense
    _

        _
    _/

    Welcome to pfSense 2.4.0-BETA...

    Dump device does not exist.  Savecore not run.
    ...ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/ipsec /usr/local/lib/perl5/5.24/mach/CORE
    Soft Float compatibility ldconfig path:
    done.
    pkg: Repository pfSense-core missing. 'pkg update' required
    External config loader 1.0 is now starting... mmcsd1s1 mmcsd1s2 mmcsd1s2a mmcsd0s1
    Launching the init system....... done.
    Initializing.................. done.
    Starting device manager (devd)...done.
    Loading configuration......done.
    Updating configuration...done.
    Cleaning backup cache.................................done.
    Setting up extended sysctls...done.
    Setting timezone...done.
    Configuring loopback interface...done.
    Starting syslog...done.
    Starting Secure Shell Services...done.
    Setting up interfaces microcode...done.
    Configuring loopback interface...done.
    Creating wireless clone interfaces...done.
    Configuring LAGG interfaces...done.
    Configuring VLAN interfaces...done.
    Configuring QinQ interfaces...done.
    Configuring WAN interface...done.
    Configuring LAN interface...done.
    Configuring CARP settings...done.
    Syncing OpenVPN settings...done.
    Configuring firewall......done.
    Starting PFLOG...done.
    Setting up gateway monitors...done.
    Starting DNS Resolver...done.
    Synchronizing user settings...done.
    Starting webConfigurator...done.
    Configuring CRON...done.
    Starting NTP time client...done.
    Starting DHCP service...done.
    Starting DHCPv6 service...done.
    Configuring firewall......done.
    Generating RRD graphs...done.
    Starting watchdog daemon...done.
    Starting syslog...done.
    Starting CRON... done.
    Jun  6 12:45:24 php-fpm[305]: /rc.start_packages: Restarting/Starting all packages.
    pkg: Repository pfSense-core missing. 'pkg update' required
    pfSense 2.4.0-BETA arm Sat Apr 29 02:05:40 CDT 2017
    Bootup complete

    FreeBSD/arm (pfSense.localdomain) (ttyu0)

    Netgate SG-1000 - Serial: 1149161520

    *** Welcome to pfSense 2.4.0-BETA (arm) on pfSense ***

    WAN (wan)      -> ue0        -> v4/DHCP4: 10.55.34.232/28
    LAN (lan)      -> cpsw1      -> v4: 192.168.1.1/24

    1. Logout (SSH only)                  9) pfTop
    2. Assign Interfaces                10) Filter Logs
    3. Set interface(s) IP address      11) Restart webConfigurator
    4. Reset webConfigurator password    12) PHP shell + pfSense tools
    5. Reset to factory defaults        13) Update from console
    6. Reboot system                    14) Enable Secure Shell (sshd)
    7. Halt system                      15) Restore recent configuration
    8. Ping host                        16) Restart PHP-FPM
    9. Shell

    Enter an option: urndis0: at uhub0, port 1, addr 2 (disconnected)
    umodem0: at uhub0, port 1, addr 2 (disconnected)
    umodem1: at uhub0, port 1, addr 2 (disconnected)
    umodem2: at uhub0, port 1, addr 2 (disconnected)
    ugen0.2: <wnc>at usbus0 (disconnected)
    ugen0.2: <unknown>at usbus0 (disconnected)

    FreeBSD/arm (pfSense.localdomain) (ttyu0)

    Netgate SG-1000 - Serial: 1149161520

    *** Welcome to pfSense 2.4.0-BETA (arm) on pfSense ***

    WAN (wan)      -> ue0        ->
    LAN (lan)      -> cpsw1      -> v4: 192.168.1.1/24

    1. Logout (SSH only)                  9) pfTop
    2. Assign Interfaces                10) Filter Logs
    3. Set interface(s) IP address      11) Restart webConfigurator
    4. Reset webConfigurator password    12) PHP shell + pfSense tools
    5. Reset to factory defaults        13) Update from console
    6. Reboot system                    14) Enable Secure Shell (sshd)
    7. Halt system                      15) Restore recent configuration
    8. Ping host                        16) Restart PHP-FPM
    9. Shell

    Enter an option: kldstatus

    Netgate SG-1000 - Serial: 1149161520

    *** Welcome to pfSense 2.4.0-BETA (arm) on pfSense ***

    WAN (wan)      -> ue0        ->
    LAN (lan)      -> cpsw1      -> v4: 192.168.1.1/24

    1. Logout (SSH only)                  9) pfTop
    2. Assign Interfaces                10) Filter Logs
    3. Set interface(s) IP address      11) Restart webConfigurator
    4. Reset webConfigurator password    12) PHP shell + pfSense tools
    5. Reset to factory defaults        13) Update from console
    6. Reboot system                    14) Enable Secure Shell (sshd)
    7. Halt system                      15) Restore recent configuration
    8. Ping host                        16) Restart PHP-FPM
    9. Shell

    Enter an option: 8

    [2.4.0-BETA][root@pfSense.localdomain]/root: kldstatus
    kldstatus: Command not found.
    [2.4.0-BETA][root@pfSense.localdomain]/root: kld
    kldconfig kldload  kldstat  kldunload kldxref 
    [2.4.0-BETA][root@pfSense.localdomain]/root: kld
    kldconfig kldload  kldstat  kldunload kldxref 
    [2.4.0-BETA][root@pfSense.localdomain]/root: kldstat
    Id Refs Address    Size    Name
    1  10 0xc0200000 13a4854  kernel
    2    1 0xc3852000 b000    if_urndis.ko
    3    1 0xc3a35000 c000    cryptodev.ko
    [2.4.0-BETA][root@pfSense.localdomain]/root:
    [2.4.0-BETA][root@pfSense.localdomain]/root:
    [2.4.0-BETA][root@pfSense.localdomain]/root: kldstat
    Id Refs Address    Size    Name
    1  10 0xc0200000 13a4854  kernel
    2    1 0xc3852000 b000    if_urndis.ko
    3    1 0xc3a35000 c000    cryptodev.ko</unknown></wnc></mmchc></cdc></cdc></cdc></wnc></sdhc></mentor></mentor></mentor></mentor></software></ti></switch></micrel></mii></ethernet></micrel></mii></ethernet></ti></ti></ti></am335x></am335x></ti></ti></mmc></ti></mmc></ti></i2c></ofw></ti></at24c02></i2c></ofw></ti></ti></gpio></ofw></ti></gpio></ofw></ti></gpio></ofw></ti></gpio></ofw></ti></am335x></ti></am335x></performance></open></open></ti></ti></flattened></flattened></flattened></open></auto></auto></ethaddr></unknown></wnc>



  • Here's a pic of the setup.



  • Rebel Alliance Developer Netgate

    Odds are, it's the USB device going to sleep or into some kind of power saving mode. There may not be anything that pfSense can do for that. But you might be able to access a configuration page on the modem to see if it has a way to configure that.

    How long between when it's up and running and when you see the disconnect messages?



  • @jimp:

    How long between when it's up and running and when you see the disconnect messages?

    Probably about 10 seconds.  I can plug the same board in to a Raspberry or Desktop and it stays up and can do I/O.



  • Turns out it's something to do with the on-board Ethernet interfaces.  Once you connect cpsw0 or cpsw1 to the computer the SG-1000 USB hub disconnects.

    Any thoughts on why this might be happening?



  • I finally figured out the sequence that gets it to work properly but not across boots if the cellular interface is not fully up.

    • Connect the USB Remote NDIS Ethernet device (USB cellular modem that shows up as an Ethernet interface) once pfSense has booted.
    • Run through the set interfaces section and use ue0 for the wan and cpsw1 as the lan.

    Both will come up just fine.  If you reboot and the cellular modem looses power then the interface won't come back up.  It turn out that the interface won't be fully only until ~20 after power is applied and pfSense/FreeBSD will never retry the interface.

    For those of you interested here is the kit I now have working on the SG-1000:

    https://starterkit.att.com/kits

    https://www.adafruit.com/product/1099

    https://www.amazon.com/C2G-Cables-27367-Micro-USB-Adapter/dp/B004FNS7DA

    https://www.adafruit.com/product/1197

    I'm also using a micro USB splitter out of the SG-1000 to the data and power ports on the cellular board.

    It seems like  promising IoT gateway that I'm going to deploy on my getvera.com home automation bridge.


  • Netgate Administrator

    You may be better off configuring it as a PPP device if it has that option. pfSense will try to connect that after boot.

    Steve


Log in to reply