Author Topic: Connect to Jolla Phone from Linux via USB or ssh??  (Read 19207 times)

0 Members and 1 Guest are viewing this topic.

Offline hansen99

  • Newbie
  • *
  • Posts: 3
    • View Profile
  • Phone model: n900, n9, iPhone
Connect to Jolla Phone from Linux via USB or ssh??
« on: December 18, 2013, 08:28:42 AM »
Hi,
I am trying to access the phone from my laptop with debian (testing - KDE).

What I want to do is

1. Transfer files using USB cable
2. ssh from konsole or filemanager to play with the terminal, transfer files, mount folder etc.

However, I can't find a way to do this.

USB connection is based on MTP and I do not know how to make this work in Linux/Debian (I have the mtp-tools installed)

For ssh I can not find the root password and/or nemo user password.

Any help is appreciated.
Thanks,
Martin


Offline hansen99

  • Newbie
  • *
  • Posts: 3
    • View Profile
  • Phone model: n900, n9, iPhone
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #1 on: December 18, 2013, 10:06:38 AM »
I manage to find a solution to the ssh connection. It just didn't work at first.

1) Enable Developer Mode,
2) Generate or write password
3) ssh using the password

Very easy.

Still have to find a solution for the USB though ...

Btw. Check this one out that I have copied from this thread .. : http://talk.maemo.org/showthread.php?t=92036

1) Jolla file manager, use Terminal to install using pkcon :
$ pkcon install jolla-fileman
This file manager seems to be in alpha/beta state until now (15/12/2013).

This is a really cool file manager

Offline Whippler

  • Full Member
  • ***
  • Posts: 215
    • View Profile
  • Phone model: Jolla
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #2 on: December 18, 2013, 10:44:45 AM »
for the ssh connection, user name is "nemo"
Jolla
Nokia 6630 2004/12->2008/8 and 5310 2008/8 ->2010/12
HTC Desire Z 2010/12 -> 2013/12

Offline lh

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • Phone model: Jolla
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #3 on: December 18, 2013, 04:09:48 PM »
The Jolla phone uses MTP as the protocol for transferring files. I don't know the exact debian package, but I suppose you will need "mtp-tools".

Connect your phone via USB and select the PC connection. Fire up a terminal and use mtp-detect to confirm if the device is recognised.

If you want to mount it into your filesystem you can use tools like mtpfs, jmtpfs or go-mtpfs (I tried mtpfs and it doesn't really work so well, haven't tried the others jet). If you use a filemanager that supports gvfs, like nautilus or PCManFM you might want to install "gvfs-backends". If you're a KDE user "kio-mtp" is the right choice.

Offline peksi

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #4 on: December 18, 2013, 08:24:21 PM »
you can use usb in developer mode so your os will see phone as an ip address 192.168.2.15 and usb as an ethetnet adapter. just give the adapter an addess from the same space, for example 192.168.2.16/255.255.255.0, and you can access your jolla with usb. and with good speeds too.

Offline hansen99

  • Newbie
  • *
  • Posts: 3
    • View Profile
  • Phone model: n900, n9, iPhone
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #5 on: December 18, 2013, 09:16:22 PM »
Thanks for the suggestions. Definitely somethung to try out tomorrow....

Offline Markkyboy

  • Newbie
  • *
  • Posts: 6
  • You can't make an omelette without breaking eggs.
    • View Profile
  • Phone model: Jolla
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #6 on: January 03, 2014, 11:45:00 PM »
Hi guys,
I'm a newbie where using Terminal is concerned, but I want to learn!
So far, the information above has lead me to resetting my phone after trying to SSH to my PC via USB.
Could someone just type out what's required in terminal?
I know about devel-su and password to get into #, but after that, I'm a bit lost!
Any help much appreciated.
Regards

Offline jabgoe

  • Newbie
  • *
  • Posts: 6
    • View Profile
  • Phone model: n900, samsung galaxy II
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #7 on: January 05, 2014, 03:20:40 PM »
@Markkyboy:

I had to do 2 things:
1) enabling ssh login to the jolla
2) setting up usb networking on my debian

1)
- enable developer mode on the jolla, permit remote connection and set a password for the root access.
- set an ip address in the field for usb-ssh-connection (i chose one from a network i didn't use at home)
- you'll find a new app : terminal . klick on that, become root with devel-su and set a password for the sailfish standard user nemo via commandline: type in
 passwd nemo
and follow instructions

2)
- setting up usb-networking on my debian wheezy was editing the /etc/network/interfaces file and adding:

Code: [Select]
allow-hotplug usb0
iface usb0 inet static
       address 192.168.2.1
       netmask 255.255.255.0

you should adapt the address according to the ip address you chose for the usb-ssh login on the jolla, ie if it's 192.168.10.2 on the jolla it could be 192.168.10.3 in the usb-network config

some more infos about usb-network-setup can be found here: http://maemo.org/community/oldwiki/howtosetupusbnetworkingdebian/

When I now connect my jolla to my computer via usb I have to choose developermode and then can connect to the jolla via ssh from my pc:
          ssh nemo@selected-jolla-usb-net-ip-address 
« Last Edit: January 05, 2014, 03:36:30 PM by jabgoe »

Offline rm-680

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • Phone model: N950 / Jolla
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #8 on: January 12, 2014, 09:04:08 AM »
or:

sftp://nemo@192.168.2.111/

via Dolphin file manager

« Last Edit: January 12, 2014, 09:07:09 AM by rm-680 »

Offline Pieter W. E. Mars

  • Sr. Member
  • ****
  • Posts: 379
  • "Pigbrother"
    • View Profile
  • Phone model: Jolla + Nokia N9/N900
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #9 on: January 12, 2014, 03:34:59 PM »
or:

sftp://nemo@192.168.2.111/

via Dolphin file manager



Great post THX !!! :)
Kudo's & what else... ;)
(1995) Siemens S4 | Ericsson T68 | Siemens Xelibri 4 | Ericsson R380 |  Nokia N95 | Nokia N900 | Nokia N9 | Jolla/Sailfish (2013)

Offline paw

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #10 on: January 19, 2014, 08:55:48 PM »
or:

sftp://nemo@192.168.2.111/

via Dolphin file manager



Great post THX !!! :)
Kudo's & what else... ;)

The used IP address is here the IP address of the Jolla smartphone in your local wlan.
You can get your IP address o your smartphone via settings > system settings > developer mode > WLAN IP address.

To sum up:
1.) Activate developer mode (settings > systems settings > developer mode)
2.) Enable remote connection and set an SSH password
3.) Change the password of the nemo account, via terminal
Code: [Select]
# su-develYou have to enter the password you set as your SSH password (see 2.)).
Code: [Select]
passwd nemoHere you have to set a new password for user nemo.
4.) Connect your Jolla to your WLAN, if not connected already
5.) Check your WLAN IP address (settings > system settings > developer mode > WLAN IP address)
6.) Connect to the sftp server of your smartphone, by using the IP address and nemo as user, for example with Dolphin. You have to authenticate by using the passwd you set for your nemo user (see 3.)).

Offline human19

  • Newbie
  • *
  • Posts: 14
    • View Profile
  • Phone model: Jolla,SE P900,Nokia C5-03
Re: Connect to Jolla Phone from Linux via USB or ssh??
« Reply #11 on: January 19, 2014, 11:11:05 PM »
for anyone new to the terminal, note that instead of having to retype commands, you can use the up and down arrows to cycle through previous commands you used.

you will have 2 different lists depending on whether you are root  or not.

By the way, I am on KDE in Arch and I only needed to install kio-mtp to connect to the PC

« Last Edit: January 19, 2014, 11:12:50 PM by human19 »