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
0

answered 2015-04-08 07:34:40 +0300

Check this link to connect with Ubuntu : http://www.jollausers.com/2015/04/jolla-communicator-an-easy-way-to-communicate-between-ubuntu-desktop-sailfish-os/

edit flag offensive delete publish link more
0

answered 2015-04-24 20:59:13 +0300

corsarium gravatar image

updated 2015-04-24 21:12:25 +0300

Hi all.

Im my linux system (Archlinux) im able to connect my jolla phone using simple-mtpfs. The usage is quite simple.

  • For mounting: simple-mtpfs <device> mountpoint [options]</device>
  • For unmounting: fusermount -u <mountpoint></mountpoint>

Now recently i managed via udev to at least trigger some rules:

vim  /lib/udev/rules.d/52-jolla.rules

And add the following content

# Skip this section below if this device is not connected by USB
SUBSYSTEM!="usb", GOTO="jolla_usb_rules_end"

#LABEL="jolla_usb_rules_begin"
ACTION=="add", ATTR{idVendor}=="2931", ATTR{idProduct}=="0a05", SYMLINK+="Jolla" RUN+="/usr/bin/jollaMounter.sh -a ", OPTIONS="last_rule"

ACTION=="remove", ATTR{idVendor}=="2931", ATTR{idProduct}=="0a05", SYMLINK+="Jolla" RUN+="/usr/bin/jollaMounter.sh -r", OPTIONS="last_rule"


LABEL="jolla_usb_rules_end"

And this are the contents of /usr/bin/jollaMounter.sh (don't forget to add execution rights )

#!/bin/bash

usage() { echo "Usage: $0 [-a ] [-r ]" 1>&2; exit 1;}

########
#vars
userName=`whoami`
deviceName=`simple-mtpfs -l | grep -in jolla | awk '{print $2}'`

#if its unpluging theres no device so... deviceName=JollaSailfish
if [ -z $deviceName ]; then
    deviceName="JollaSailfish"
fi

mountPath="/home/${userName}/Desktop/${deviceName}"
desktopPath="/home/${userName}/Desktop/${deviceName}"

#now its not used becuse mountPath is no equal at desktopPath

########
#chech arguments

if [ $# -ne 1 ]
then
        usage
        exit 1
fi

while getopts ":ar" o; do
    case "${o}" in
        a)
        echo "simple-mtpfs ${mountPath}"
        mkdir -p ${mountPath}
        simple-mtpfs ${deviceName} ${mountPath}
        #ln -s ${desktopPath} ${mountPath}
            ;;
        r)
        echo "fusermount -u ${mountPath}"
        fusermount -u ${mountPath}
        #rm ${desktopPath}
            ;;
        *)
            usage
            ;;
    esac
done

Usage: Plug your JP and set it to PC Suite (udev will do the rest)

Usage jollaMounter.sh (if udev does not work): Plug your JP and set it to PC Suite

to mount it on $mountPath:

/usr/bin/jollaMounter.sh -a

To umount the JP:

/usr/bin/jollaMounter.sh -r

If none of the above work connect th JP via ssh/sftp see previous posts

Issues: (2015/04/24): the remove rule is not triggered

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,659 times

Last updated: Aug 23 '17