How to create a network over usb?

0

So I've got a device which is connected to my computer via usb. On the device end, the usb port is a classic usb port. On my computer end, the usb port is usb-c port. My computer holds a local server that I usually reach with localhost for testing. Now I want my device to connect to the server running on my computer to a local address it gives me. There is something I don't understand as my device is supposed to create a local network with my computer. What should I do to create/connect to that network?

The device is a ebee controller. This is used manage a charge point for electric vehicles. This is the url to the named controller spec. https://www.bender.de/fileadmin/content/Products/m/e/CC611_D00253_M_XXEN.pdf

I'm a complete noob in network btw. My computer OS is archlinux and I only have access to a config webpage (192.168.123.123) to the controller accessible when I branch a micro-usb/usb cable into between the computer and the controller.

Guillaume Geoffrey Attia

Posted 2019-01-29T18:09:27.530

Reputation: 3

Question was closed 2019-01-30T19:29:11.590

2What is this device? What is the brand and model? USB is not network, but can connect a network device to a computer. Please EDIT the question to add more information about the device you're working with. – music2myear – 2019-01-29T18:17:43.093

1Without your telling us the OS at each end of the link we can't suggest what software to use. Are you using the correct communication cable? – AFH – 2019-01-29T18:31:40.553

Answers

0

Your Bender/Ebee CC611 EV Charge Controller has two ways to make network connections via its two USB ports.

To make a network connection via the micro USB-B connector labeled "USB 2", look at section 6.1.1 on page 25 of that manual PDF you linked to.

When you connect a USB cable between your computer and the device's micro-USB port, the device acts like a USB Ethernet dongle. If your Arch Linux environment has the proper generic USB Ethernet device class drivers in place to support hot plugging of generic USB Ethernet dongles, then your computer should now think it has a new Ethernet interface.

The device gives itself the address 192.168.123.123, and it uses DHCP to assign your computer a different IP address on that same subnet. Use Arch Linux's GUI or command-line tools to see what IP address your computer was assigned on that new Ethernet interface.

Then when you tell the device what address to connect to, tell it to connect to the 192.168.123.x address that the device assigned to your computer (not the device's own 192.168.123.123 address).

To make a network connection via the normal-sized USB-A connector labeled "USB 1", look at section 7 on pages 37-38 of the manual you linked to.

Unlike the micro-B port, this full size USB-A port does NOT provide a way to act as an Ethernet interface itself. To use this port, you need to plug an external USB-A Ethernet dongle to connect to it. The doc says they support the Apple USB Ethernet Adapter, and also one from Digitus. I would guess they also support other USB Ethernet adapters that use the same chipsets as those two, or maybe they support the generic USB Ethernet device class drivers, but perhaps they've only tested their product extensively with Apple and Digitus adapters.

So you'd plug that Ethernet dongle into the "USB 1" port, and then use an Ethernet cable to connect the device to a LAN. Preferably a LAN with a DHCP server to give the device an IP address lease. Whether or not the device gets assigned an IP address via DHCP, it always gives itself the address 192.168.124.123/24 on that interface.

If you want to connect this port directly to your computer, you'd plug the other end of the Ethernet cable directly into an Ethernet port on your computer, and configure your computer to have an IP address in the 192.168.124.0/24 subnet on that Ethernet port. If your computer does not have a free Ethernet port, but as you say it does have a free USB-C port, you may need to get a USB-C to Ethernet dongle for your computer.

CC611 device "USB 1" USB-A port <--> USB-A Ethernet dongle <--> Ethernet cable (possibly a crossover cable) <--> USB-C Ethernet dongle <--> Computer's USB-C port  

Also note that there's a small chance that your Ethernet equipment cannot automatically handle being directly connected without an Ethernet switch in between. Ethernet switch ports are wired backwards from Ethernet device ports, so connecting directly device-to-device requires that one of the devices supports auto-crossover (also called "auto MDI-X"; I know the Apple dongle supports this). If neither end of your direct device-to-device Ethernet connection supports auto-crossover, you will need to use a cross-wired Ethernet cable known as a "crossover cable".

Spiff

Posted 2019-01-29T18:09:27.530

Reputation: 84 656

I use ifconfig and I get 192.168.123.220 IP address but that is only for the "config" port (micro-usb/usb-A). By reading the doc, it says that I should be using the other one (usb-A). I want to use it with the usb-C on my computer. Is it possible ? – Guillaume Geoffrey Attia – 2019-01-30T15:50:27.307

@GuillaumeGeoffreyAttia Ah, I see. I've updated my Answer to include an explanation of how to use the Type-A port. The short answer is that, for that port, you must use a USB Ethernet dongle and make an Ethernet connection. You cannot just plug a USB cable directly between your computer and the device using that port. – Spiff – 2019-01-30T17:01:39.097

Hey so I asked another question which is related to this one: https://superuser.com/questions/1400482/can-ping-but-cannot-telnet-to-a-local-network-computer

– Guillaume Geoffrey Attia – 2019-01-31T10:17:34.190