We have moved to a new Sailfish OS Forum. Please start new discussions there.
79

Why is Jolla/sailfish so hard to connect to linux?

asked 2014-05-06 11:18:21 +0300

Mr.Thumb gravatar image

updated 2015-05-14 08:52:03 +0300

rdmo gravatar image

tldr; Please don't mistake mitigating workarounds for solutions to this problem. Simple connection with another Linux computer is tough or problematic for many users of Sailfish devices.

Why is a Linux/open-source phone so hard to sync/connect to a Linux computer? It should be easier than a walk in the park! What is missing? Why is it so important to force Linux users through circuitous MITM-style hubris just to connect?

Update : Ok, I see this issue still is hot and not solved in an nativ jolla app. So here is what I do at the moment.

Update (not OP): Ten step workarounds vs. plug and play? I should be able to connect and set up a read-only connection without device root or deference any third party (yes, even Jolla) ssh/root permission monitor/authenticator. For Read-only, this should be a user level permissions/connection fix. Write/Execute are distinct problems. Is the wireless/USB technology/security standard that bad, or is this a user auditability/security management issue?

  1. I have to be root - set under settings -> system ->developer mode . Set USB LAN to 192.168.1.11 set a SSH password
  2. make a script on my /home/(your user) f.eks. 'mountjolla'
  3. Script :

#!/usr/bin/bash
localIp='192.168.1.10/24'
localBroadcast='192.168.1.255' 
netAdp=$1
mountPath='/home/(your user)/jolla'
user='nemo'
jollaIp='192.168.1.11'

sudo ip addr add $localIp broadcast $localBroadcast dev $netAdp
# First umount if all ready mounted
fusermount -u $mountPath
sleep 2
sshfs $user@$jollaIp:/home/$user -p 22 $mountPath

  1. do a "mkdir /home/(your user)/jolla . If it is not there allready

  2. do chmod 755 to your script "chmod 755 ~/mountjolla"

  3. plug usb cable in phone & computer

  4. if not check usbnet module is loaded with "lsmod"

  5. do "ip link" ( on Archlinux ) and I guess others Linux OS's

  6. notice what net device pop up ( f.eks. enp0s29u1u2u1u3 )

  7. run your script "mountjolla enp0s29u1u2u1u3"

And you have you jolle "nemo" dir mounted at /home/(your user)/jolla !

  1. umount it with "fusermount -u /home/(your user)/jolla"

Still not an "easy way" tough :-/ but it works

Another way is using firefox with "FireFTP" extention: , after setup ssh settings + password etc , connect USB cable, get usbnet setup with "ip link" and "sudo ip addr add (localIP) broadcast (localBrodcast) dev (jollaIP)" and point browser to "sftp://(jollaIP)/". Then you get a nice "mc" like interface :P (thanks coderus for the hint)

edit retag flag offensive close delete

Comments

1

Please provide some details, how were you trying to sync? Sailfish OS uses the MTP Protocol - https://en.wikipedia.org/wiki/Media_Transfer_Protocol Depending on your derivative there should be MTP support installable, please check the wikipedia page or post your exact operating system (example Ubuntu 12.04 LTS).

Otherwise you could enable SSH and build yourself a little bash script that connects and sync's.

I know its a bit inconvenient, but if you are using Gnu\Linux and a Jolla, you are probably a person that likes to hack their own stuff ;)

ozzi ( 2014-05-06 11:34:11 +0300 )edit
3

I find the use of the MTP Protocol problematic, at least for older Linux systems. If I connect my Jolla to my Ubuntu (11.10) laptop, it is recognized as digital camera, but no transfer is possible. I wonder about the reason why that protocol was chosen. Never mind, I decided to disable USB connectivity on my Jolla, and I now use ssh to connect to the phone.

barral ( 2014-05-06 11:59:08 +0300 )edit
2

I just think it is abit of a pain(and something to make better working ) to just plug the phone (USB) and transfeer some files to it. (MPT do not work under Archlinux at the moment) And I had no problems with my old "shitty" HTC on Linux ? So why can a Jolla just work on Linux with USB ? Now I run Bittorrent sync (andriod) to sync the phone but then I have to move stuff around and is not able to "browser" the dirs ? SSH sounds nice but my WiFi is not connected to my intranet so I have to lock in on the WIfi router to login on the Jolla !?

Mr.Thumb ( 2014-05-06 12:37:17 +0300 )edit
1

My system is Ubuntu 10.04 LTS, and has no support for MTP neither.

Macilaci457 ( 2014-05-06 14:06:09 +0300 )edit
3

Jolla connects well with Ubuntu 13.10 and 14.04. Already transfered many files to my phone and barely ever had a problem.

molan ( 2014-05-06 14:29:00 +0300 )edit

28 Answers

Sort by » oldest newest most voted
3

answered 2015-06-03 20:21:55 +0300

haasn gravatar image

This is how I got it to work on Gentoo Linux. It should transfer to most other distros.

  1. Enable developer mode on the phone and either set it as the default USB mode or select it manually when prompted.

  2. Enable usbnet, rndis_host and usb_f_rndis support in the kernel. This is where I had to configure them on linux 4.0.0:

    Device Drivers --->
      [*] Network device support --->
        USB Network Adapters --->
          [M] Multi-purpose USB Networking Framework
            <M> CDC Ethernet support
            <M> CDC EEM support
            <M> Host for RNDIS and ActiveSync devices
            <M> Simple USB Network Links (CDC Ethernet subset)
              [*] Embedded ARM Linux links
    
      [*] USB Support --->
        <*> USB Modem (CDC ACM) support
        <*> USB Wireless Device Management support
        <*> USB Gadget Support  --->
          <M> USB Gadget Drivers
            <M> Ethernet Gadget (with CDC Ethernet support)
              [*] RNDIS support
    
  3. Plug the device in. You should see something like this inside dmesg: [166495.570786] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-1, RNDIS device, ea:57:53:46:e8:42. If you don't, you may need to make sure the above modules are loaded. (I had to run modprobe usb_f_rndis manually)

  4. You should have a usb0 device (check ifconfig -a to confirm). At this point, all I needed to do was run dhcpcd usb0 to get it to set itself up correctly. I'm sure there are also ways to make it do this automatically, but I just run it manually whenever I need to access it for some reason.

Now you can access the phone via ssh over high-speed USB, rather than over the slow wireless network. Forget MTP and all that broken nonsense.

edit flag offensive delete publish link more
1

answered 2015-08-14 20:12:50 +0300

cg gravatar image

I'm on OpenSuse and since the following 2 options have not yet been mentioned here...

  1. very easy but with MTP and thus i.e. timestamps are not transferred: I use a filemanager called "Krusader" all the time - after connecting my Jolla via USB I simply enter "camera://" in its adress line and navigate through the directories on the phone

  2. using SSH and WLAN (i.e. timestamps a preserved): connect your Jolla to the same network as the linux PC, on the Jolla activate developer mode, set password for SSH connection and take a note of the IP address. There is another nice filemanager called "gftp" - make a connection to the IP of your Jolla, username "nemo", protocol "SSH2". If transfer seems stuck, wake up your Jolla.

Both filemanagers have the ability to store bookmarks, so next time your connected it's almost just about clicking that bookmark.

edit flag offensive delete publish link more
0

answered 2017-01-17 16:14:19 +0300

deloptes gravatar image

Have a look into this workaround and let me know if it works for you.

https://together.jolla.com/question/154318/intex-aquafish-linux-file-browsing-via-usb/

edit flag offensive delete publish link more
0

answered 2017-01-17 17:25:28 +0300

cemoi71 gravatar image

updated 2017-01-20 12:14:01 +0300

by me On elementary OS (ubuntu LTS 14.04) worked with MTP really easy, just by installing gmtp and/or mtpfs
don't know exactly any more (did for a while), but that's quite easy to test both i think..

edit flag offensive delete publish link more
0

answered 2017-01-18 17:06:57 +0300

johanh gravatar image

Works fine on Fedora 25 with gvfs-mtp.

edit flag offensive delete publish link more
0

answered 2017-01-22 12:03:13 +0300

tapio gravatar image

IMHO the Jolla connects well with ssh:

  1. on the Jolla, activate developer mode and ssh give the Jolla a name and static IP address in your WLAN network;

  2. provide Jolla's IP in /etc/hosts on your main Linux box;

  3. connect to the Jolla through a file manager, type ssh://nemo@<jolla_device_name> OR ssh://nemo@<jolla_static_ip_address> in the address-bar, provide the password when asked. in case ssh doesn't work properly, use sftp://;</jolla_static_ip_address></jolla_device_name>

  4. browse/exchange files between your Linux box and the Jolla;

  5. use a tool like unison to sync between Jolla and your main computer. first time sync can take some time with a lot of (large) files, but following syncs are very fast since only changes are transferred between devices.

//tapio

edit flag offensive delete publish link more

Comments

I downgrade your answer, because first it was already mentioned and second one should not be in developers mode to do whatever for file transfer to and from the phone.

deloptes ( 2017-02-02 12:53:56 +0300 )edit
0

answered 2017-01-23 16:50:41 +0300

Moo-Crumpus gravatar image

Hard to connect? By how? My Jolla phone mounts my nfs shares without any issues or complications...

edit flag offensive delete publish link more
0

answered 2017-08-23 13:47:43 +0300

tanakian gravatar image

on the modern linuxes you might need to use enp0s20u2, or somethnig like that. check dmesg.

rndis_host 1-2:1.0 enp0s20u2: renamed from usb0

something like that.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
25 followers

Stats

Asked: 2014-05-06 11:18:21 +0300

Seen: 16,658 times

Last updated: Aug 23 '17