# HELP - GobiNet driver has undefineds - SOLVED

## Moriah

The Sprint Wireless AC341U cellular braodband modem uses the GobiSerial and GobiNet drivers to work with Linux.

Following the installation instructions amounts to making a couple of loadable driver modules: 

GobiSerial which communicates with the serial port for AT modem commands, and

GobiNet which implements the IP network interface, supposedly to look like an ethernet port.

When I compile the GobiSerial driver and install it, I have no problems.  It loads without complaint.

But when I compile the GobiNet driver, I get the following:

```

WARNING: "usbnet_resume" [/usr/src/GobiNet/GobiNet.ko] undefined!

WARNING: "usbnet_probe" [/usr/src/GobiNet/GobiNet.ko] undefined!

WARNING: "usbnet_disconnect" [/usr/src/GobiNet/GobiNet.ko] undefined!

WARNING: "usbnet_suspend" [/usr/src/GobiNet/GobiNet.ko] undefined!

```

And when I load it, I get:

```

Apr 25 17:17:53 onesimus kernel: GobiNet: Unknown symbol usbnet_suspend (err 0)

Apr 25 17:17:53 onesimus kernel: GobiNet: Unknown symbol usbnet_disconnect (err 0)

Apr 25 17:17:53 onesimus kernel: GobiNet: Unknown symbol usbnet_probe (err 0)

Apr 25 17:17:53 onesimus kernel: GobiNet: Unknown symbol usbnet_resume (err 0)

```

This is an unsupported driver from NetGear, the manufacturer of the AC341U, and it is based on the open source driver of the same name from QualComm, who makes the chip inside the AC341U.  The driver is dated 9-5-2014, so it is a bit old.  I am running the 3.12.21-gentoo-r1 kernel on an intel 8 core I7 laptop.

Does anyone have any ideas how to resolve the 4 undefined symbols  :Question: 

----------

## Moriah

A bit of additional sleuthing reveals that /usr/src/linux-3.12.21-gentoo-r1/include/linux/usb/usbnet.h contains:

```

/* Minidrivers are just drivers using the "usbnet" core as a powerful

 * network-specific subroutine library ... that happens to do pretty

 * much everything except custom framing and chip-specific stuff.

 */

extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *);

extern int usbnet_suspend(struct usb_interface *, pm_message_t);

extern int usbnet_resume(struct usb_interface *);

extern void usbnet_disconnect(struct usb_interface *);

```

So the problem must be one of missing file(s) at link time.

Unfortunately, I am not familiar with the process of building a loadable kernel module, so I am not sure how to proceed on this.  Since the symbols are defined in usbnet.h, one would assume that they are defined somewhere, and that they should be available to link with when building the module.

----------

## Moriah

I may have found the solution.  On: 

http://stackoverflow.com/questions/7812418/kernel-driver-external-modules-not-building-completely

It says:

 *Quote:*   

> 
> 
> That said, my "GobiNet" is looking for external symbols not present in my Kernel set-up. A few quick greps allowed me to find it needed "drivers/net/usb/usbnet.c". This required CONFIG_USBNET = y to be set in the ".config" file (set through "make xconfig"). Hope it can help someone else. 
> 
> 

 

I will not have a chance to try this until this evening.  I will post my results.

----------

## NeddySeagoon

Moriah,

Here's an example using your 

```
WARNING: "usbnet_resume" [/usr/src/GobiNet/GobiNet.ko] undefined! 
```

```
$ cd /usr/src/linux-4.5.1-gentoo/

roy@NeddySeagoon_Static /usr/src/linux-4.5.1-gentoo $ grep -R usbnet_probe ./

./drivers/net/wireless/rndis_wlan.c:   .probe =   usbnet_probe,

./drivers/net/usb/cdc_eem.c:   .probe =   usbnet_probe,

./drivers/net/usb/usbnet.c:usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)

./drivers/net/usb/usbnet.c:EXPORT_SYMBOL_GPL(usbnet_probe);

... snip ...
```

We see that usbnet_probe is EXPORTed from the kernel file ./drivers/net/usb/usbnet.c, so you need to rebuild your kernel with whatever option builds that file.

Rinse and repeat for other symbols.

The other hits are users of the symbol.

----------

## Moriah

Thanks Neddy!

I've been meaning to update the kernel on my road warrior laptop for a while now, but I've been applying the old saying "If it ain't broke, don't fix it."  Well, now its broke, as it won't work with my shiny new cellular broadband LXE modem, so I guess I'll have to fix it.     :Mr. Green: 

I thought I would get to it tonight, but sister-in-law had laptop problems.  After looking at it, I think its a memory problem, so its now running memtest86 overnight.     :Sad: 

----------

## Moriah

I did get a little time to play with this tonight.  I built and installed the module "usbnet".  After I did "modprobe usbnet", I was able to "modprobe GobiNet".   :Smile: 

I then plugged in the usb cellular modem and did "ifconfig -a" and the device showed up as eth1.   :Smile: 

Next, I tried to access the device with the web browser at 192.168.1.1, which is the default address of the web control interface for the device, but no luck.    :Evil or Very Mad: 

I then played with the serial interface on /dev/ttyUSB2, but saw nothing, although minicom did connect to it.

As it was getting late, I reverted back to my normal wired ethernet connection on eth0.

Then I looked at /var/log/messages    :Embarassed: 

There was some informative lines there.  Such as:

```

Apr 26 17:22:15 onesimus kernel: GobiNet: `Y' invalid for parameter `debug'

Apr 26 17:22:27 onesimus kernel: GobiNet: 2014-05-01/NTGR_2.25

Apr 26 17:22:27 onesimus kernel: usbcore: registered new interface driver GobiNet

Apr 26 17:23:28 onesimus kernel: usb 2-1.2: new high-speed USB device number 9 using ehci-pci

Apr 26 17:23:28 onesimus kernel: usb 2-1.2: config 1 has an invalid interface number: 9 but max is 0

Apr 26 17:23:28 onesimus kernel: usb 2-1.2: config 1 has no interface number 0

Apr 26 17:23:28 onesimus kernel: usb-storage 2-1.2:1.9: USB Mass Storage device detected

Apr 26 17:23:28 onesimus kernel: usb-storage: probe of 2-1.2:1.9 failed with error -5

Apr 26 17:23:31 onesimus kernel: usb 2-1.2: USB disconnect, device number 9

Apr 26 17:23:32 onesimus kernel: usb 2-1.2: new high-speed USB device number 10 using ehci-pci

Apr 26 17:23:32 onesimus kernel: usb 2-1.2: config 1 has an invalid interface number: 8 but max is 3

Apr 26 17:23:32 onesimus kernel: usb 2-1.2: config 1 has no interface number 1

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe 

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe Num Interfaces = 4

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe This Interface = 2

Apr 26 17:23:32 onesimus kernel: GobiSerial 2-1.2:1.2: GobiSerial converter detected

Apr 26 17:23:32 onesimus kernel: usb 2-1.2: GobiSerial converter now attached to ttyUSB0

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe 

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe Num Interfaces = 4

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe This Interface = 3

Apr 26 17:23:32 onesimus kernel: GobiSerial 2-1.2:1.3: GobiSerial converter detected

Apr 26 17:23:32 onesimus kernel: usb 2-1.2: GobiSerial converter now attached to ttyUSB1

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe 

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe Num Interfaces = 4

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe This Interface = 8

Apr 26 17:23:32 onesimus kernel: GobiSerial::GobiProbe Ignoring blacklisted interface #8

Apr 26 17:23:32 onesimus kernel: GobiNet 2-1.2:1.8 eth1: register 'GobiNet' at usb-0000:00:1d.0-1.2, GobiNet Ethernet Device, 2e:f8:ab:79:c5:28

Apr 26 17:23:34 onesimus kernel: creating qcqmi1

Apr 26 17:23:34 onesimus kernel: GobiSerial::GobiProbe 

Apr 26 17:23:34 onesimus kernel: GobiSerial::GobiProbe Num Interfaces = 4

Apr 26 17:23:34 onesimus kernel: GobiSerial::GobiProbe This Interface = 0

Apr 26 17:23:34 onesimus kernel: GobiSerial 2-1.2:1.0: GobiSerial converter detected

Apr 26 17:23:34 onesimus kernel: usb 2-1.2: GobiSerial converter now attached to ttyUSB2

Apr 26 17:44:25 onesimus kernel: e1000e 0000:00:19.0: irq 42 for MSI/MSI-X

Apr 26 17:44:25 onesimus kernel: e1000e 0000:00:19.0: irq 42 for MSI/MSI-X

Apr 26 17:44:27 onesimus kernel: e1000e: eth0 NIC Link is Up 100 Mbps Half Duplex, Flow Control: None

Apr 26 17:47:05 onesimus kernel: device eth1 entered promiscuous mode

Apr 26 17:48:27 onesimus kernel: device eth1 left promiscuous mode

Apr 26 17:48:50 onesimus kernel: device eth1 entered promiscuous mode

Apr 26 21:50:01 onesimus cron[22791]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons)

Apr 26 17:49:55 onesimus kernel: usb 2-1.2: USB disconnect, device number 10

Apr 26 17:49:55 onesimus kernel: GobiSerial driver ttyUSB0: GobiSerial converter now disconnected from ttyUSB0

Apr 26 17:49:55 onesimus kernel: GobiSerial 2-1.2:1.2: device disconnected

Apr 26 17:49:55 onesimus kernel: GobiSerial driver ttyUSB1: GobiSerial converter now disconnected from ttyUSB1

Apr 26 17:49:55 onesimus kernel: GobiSerial 2-1.2:1.3: device disconnected

Apr 26 17:49:55 onesimus kernel: GobiNet 2-1.2:1.8 eth1: unregister 'GobiNet' usb-0000:00:1d.0-1.2, GobiNet Ethernet Device

Apr 26 17:49:55 onesimus kernel: GobiSerial driver ttyUSB2: GobiSerial converter now disconnected from ttyUSB2

Apr 26 17:49:55 onesimus kernel: GobiSerial 2-1.2:1.0: device disconnected

```

So there seems to be a problem with the way the usb device is being enumerated.    :Confused: 

I will continue this experiment Thursday, which is the next time I will have to work on it.

----------

## NeddySeagoon

Moriah,

You might need usb-modeswitch.

```

$ eix modeswitch

* sys-apps/usb_modeswitch

     Available versions:  2.2.6 (~)2.3.0 {jimtcl}

     Homepage:            http://www.draisberghof.de/usb_modeswitch/ http://www.draisberghof.de/usb_modeswitch/device_reference.txt

     Description:         A tool for controlling 'flip flop' (multiple devices) USB gear like UMTS sticks
```

Its probably a modem/ubs-storage/cdrom in a stick.

Commonly the CDROM contains Windows drivers, you fit a microSD card and its a USB Stick ... oh and its a modem too.

I have one of these 'doofers' but it just works.

----------

## Moriah

Many things have happened to distract me from working on this, but I recently solved the problem.

First, you need to have the following drivers loaded:

usbserial

GobiSerial

These establish the serial link for AT commands, etc.

mii

usbnet

GobiNet

These establish the ethernet link for wireless cellular broadband internet data.

The AC341U runs in a NATting firewall mode with an internal DHCP server, so it looks pretty much like a typical DSL or cable modem at this point.

There is, however, one important difference: in this mode, it *REQUIRES* yu to connect with a DHCP client.  It will refuse to grant access to any ip address that it did not hand out.  This is where I was going wrong.  While experimenting with it, I took a shortcut, and assigned the ethernet port a static ip address in the 192.168.x.x range, and it just refused to work, puzzling me greatly.  I rebooted into w7 and connected and then assigned a static ip address and saw what was happening, since when I used the default w7 DHCP client, everything "just worked".  So I booted back into gentoo and tried it with dhcpcd, and viola!

I am quite pleased with the performance of this little gem.  It is quite fast in LTE mode.  I have been using G3 and EDGE for many years on various gentoo laptops, and this is a tremendous improvement.

----------

