I’m plugging a Librem 5 to a Librem 13 with a USB-C cord.
How, from the Librem 13 command line, do I connect to the Librem 5? I have no idea what the IP address of the phone is (and ip addr on the phone returns nothing useful).
How you actually do this depends less on the physical machine your connecting to and more on the OS you are running.
Out the box, the Librem 5 supports Ethernet over USB and by default it runs a DHCP client on the interface so is looking for IP configuration from a DHCP server, so the machine you are connecting to would need to support and be running connection sharing to provide the Librem 5 with an IP address.
How you setup connection sharing on your machine very much depends on your OS.
The OS I use uses NetworkManager to manage all network connections so I can use nmcli from the command line to setup connection sharing. There is a myriad of configuration setups, it really depends on your requirements, to setup a basic connection share using nmcli on single interface…
Determine the device/interface to enable connection sharing on by attaching the Librem 5 to a USB port of your machine and from the command line of the machine enter…
nmcli dev
This will produce an output similar to…
DEVICE TYPE STATE CONNECTION
enxe44b62d3acf5 ethernet connecting (getting IP configuration) Wired Connection N
lo loopback unmanaged
You are looking for the interface that is showing a state of getting IP configuration, in this case the device/interface the Librem 5 is connected to is enxe44b62d3acf5.
Enable connection sharing on the device/interface from the command line of your machine by entering…
nmcli con add type ethernet ifname <devicename> ipv4.method shared con-name NetShare
Bring up the new connection by entering…
nmcli con up NetShare
You should now be able to ping the Librem 5 from the command line of your machine (assuming the Librem 5 has the default pureos hostname) by entering…
ping pureos.local
If you don’t get a response, check the state of the USB interface from the terminal of the Librem 5 by entering…
nmcli dev
If you see the usb0 device showing as disconnected, you can bring that up from the terminal of the phone by entering…
nmcli dev connect usb0
It should now be the case that whenever you connect the Librem 5 to the same USB port of your machine then connection share will be automatically established.
Note that this enables connection sharing with the machine you are a connected to so this provides access to the internet to your Librem 5 through your machine.
Well, I’m screwed from the get-go apparently. My Librem 13 (running pureos) does not show anything on nmcli dev except for the wifi connection and loopback. No third option trying to connect that would be my phone.
If you haven’t done so already, try other USB ports on your Librem 13 if possible.
Also, while Librem 5 and Librem 13 are connected, check the output of nmcli dev from the Librem 5 terminal, does it show a usb0 device and if so what is showing for it’s “state”?
You could also check from the terminal of Librem 5 nmcli con show, is there a usb0 in the output of that command?
First thing: Do lsusb on the host computer before plugging in the Librem 5 and after.
If you don’t see any USB device appear then that’s a bad sign. Stop here.
Second thing: Do lsusb -v -sM:N where M is the bus number and N is the device number (numbers taken from the previous output).
While you may not understand all the output, from that output someone can tell what kind of device(s) the Librem 5 is offering.
However there are limited reasons why you would want to network via USB anyway - since if the WiFi on the Librem 5 is working, you can just access all network services via the existing local network. That in turn depends on what network services you want to use i.e. what you mean by connecting to the Librem 5. Access files on the Librem 5? Remote log in to the Librem 5? (both of which can be achieved using SSH)
Ideally I’d be able to log in to the Librem 5 and edit files there from the 13. Failing that, I can copy the file I want back and forth. All accomplishable via ssh provided, of course, the phone has an IP address seen from the Librem 13 and I know what it is. (From that point forward, I know how to use ssh and its relatives.)
I will try your other suggestions when I have time–I’m a bit pressed right now.
I’ve previously seen comments from a number of Librem 5 owners say that they have connectivity issues when connecting directly to a hosts USB-C port but that there is/was no such connectivity issues when connecting via a hosts USB-A port.
For me, there are a few reasons as to why I favour a localised network via Ethernet over USB rather than WiFi.
Firstly is performance and stability, I see a very significant increase in stability and performance with Ethernet over USB in comparison to WiFi. In terms of performance I see gains in the region of 500~1000+% depending on whether I’m working on the SD card or eMMC drive.
Secondly, there is a convenience factor for me, I have it setup as such that when the Librem 5 is attached to the desktop machines via Ethernet over USB, the Librem 5 gets auto-mounted. The Librem 5 essenially presents itself as having the convenience and functionality of simply plugging in a USB flash drive and immediately being able to drag files to/from the device.
Was a storage device disconnected from your system?
It’s been a long time since i’ve worked tech,18 years and I’m rusty with Linux, and I had trouble following this thread to here (but I should be getting my L5 soon so experience will refresh my faded memories :-), but this msg:
leads me to think a storage device was unplugged without using the “umount” command in a terminal or in a PureOS GUI; but dos wrote:
What were you doing before this message was displayed? Had a storage device been mounted and was it being used, then disconnected before this error message was displayed?
Note that if files or the file structure was modified and the device was disconnected without unmounting, then the file and/or file structure may need to be fixed (if possible).
@Sharon, With the phone connected to your desktop machine via USB cable, then from the terminal of the desktop machine can you post the output of the following 2 commands…
Command 1:
nmcli dev
Commad 2:
nmcli con show
If you post the output as plain text to the forum can you enclose the text within three back-ticks ( ```) either side of the text, this should retain the formatting of the copied text/output.
If I could chip in with a plug for Valent which @epinez pointed me to in my cry for help getting GSConnect going - it is a replacement for GSConnect with phosh clearly the target (iirc, the develper is running phosh on postmarkos). Valent offers a mount option, similar to GSConnect - but, it is one of the features that may be in need of further development. It is in alpha atm and I’m sure the more uptake there is the faster the development will be…
I installed it by downloading the nightly Flatpak, see Status here. Then running: sudo flatpak install ./valent.flatpakref
From the download directory.
hth. M