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

A mini webserver to bridge your Jolla and your computer

asked 2014-08-04 19:52:55 +0200

updated 2014-08-04 20:14:11 +0200

Hi everybody,

I was trying to create a playlist on my Jolla and quite frustrated when I had this idea. I guess that I'm not the first to have it, but I wanted to expose it with the community so that there can be a debate on how to implement it and bring this awesome feature to our awesome device :)

Today, we have a very limited user-friendly way to interact with our Jolla. Of course, we have SSH, but the fact is that we don't have mass storange, and that MTP is quite buggy. Moreover, even if we had better connection protocol, we won't have all fancy integration that other mobile OS have. For example, with iTunes, you can reorder the applications on your iPhone, send and download photos and videos, and create playlists. On Android, you have some very nice web applications (GMail, GDrive etc.) to manage data on your Android, and same for Windows phone.

Fact is that Jolla users might trust the cloud less, and their device more. Still, it's not a reason not to give them nice integration with other devices (like a computer). There have been initiatives in the open-source world, like KDE-connect, that allows an Android phone to push notifications, calls and sms on your KDE desktop. But this thread is not really about KDE connect. It is about something that could technically work everywhere.

To make it available to all type of computers (and maybe phones / tablets ?), I'm thinking of a mini webserver that could be accessed only when plugged on USB. This webserver would host some webapps that are bridged to your Jolla system. For those who have used the Sailfish SDK, it ressembles a lot to the target manager. On Qt Creator's side, you have a webpage that allows controlling the target, like installing new packages.

A webserver could unlock many capabilities:

  • Managing files (drag files from desktop directly on the web app to upload to Jolla)
  • Managing music (moving them around to create playlist)
  • Viewing or organizing photos
  • Sending SMS
  • Maybe even answering calls
  • Provide API to allow other apps to connect to it

What do you think about this idea ? Feel free to discuss in comments and answers, to add new ideas, and provide hints on how to do it (I don't know how neither how to restrict a webserver to USB only, nor which technology to use, so please contribute :))

edit retag flag offensive close delete

Comments

Personally, I won't go PHP. I'm eager to learn ruby on rails, as IIRC it's the same platform used in Sailfish SDK.

Sfiet_Konstantin ( 2014-08-04 20:07:59 +0200 )edit

I like the webserver idea, it is something that is not host platform dependent. (or is it client in this case) No need to install additional stuff on your PC. Limiting it totally to USB... nah... need to have option to use it also over wireless.

so +1 for this.

kimmoli ( 2014-08-04 20:09:59 +0200 )edit
1

The exact goal of the webserver is to be platform independant, exactly :)

I think that limiting to USB gives you security. What if you forgot to disable it and kept wifi on. Someone else could enter in your phone. You could add a password, but it makes the feature less easy to use (one more logging step).

Or we could provide both, a configurable switch to enable either weireless or USB or both.

Sfiet_Konstantin ( 2014-08-04 20:12:48 +0200 )edit
2

When using USB, you need a cable. For allowing wireless access to "starboard", just show a popup on device to grant access. Same "effort" for lazy people like me, but no passwords to remember, and IMO same level of security.

kimmoli ( 2014-08-04 20:20:00 +0200 )edit
1

https://together.jolla.com/question/42078/jolla-radar-an-unlike-suite-to-get-rid-of-mtp/https://together.jolla.com/question/25222/poll-what-technology-would-you-prefer-for-a-pc-suite/

The whole over the air (or alternative to MTP) phone management thing has been asked by many from the start. Up to now we have sailserver but it offers very limited functionality. And probably will never feature advanced functionality.

SSH SFTP and stuff is useless for the joe average user. He won't even bother. So we need someone to write an app like that.

I'll add here that an app like this can easily be monetized. People will pay for convenience. And if it can be combined with something like accessing you phone (send sms) over the internet (ie you forgot it at home) possibilities of offering/selling services are greater than just paying for an app.

ApB ( 2014-08-04 21:02:44 +0200 )edit

3 Answers

Sort by » oldest newest most voted
3

answered 2014-08-05 15:38:05 +0200

titilambert gravatar image

updated 2014-08-05 16:30:24 +0200

Hello ! I developed a small app for send and receive sms for N900 a few years ago. I porting this app to sailfish right now. - Openrepos: https://openrepos.net/content/titilambert/squilla - Sources: https://github.com/titilambert/harbour-squilla

This Python app, use only XMPP for now. But I can add a micro web server (Bottlepy) and do what you said ;) What do you think about this ?

Edit: Some precisions : I see a Python/Pyotherside app which launch a webserver using bottlepy. The webserver will provide an JSON API which will be used by html pages with angularJS. With this architecture, the load will be client-side (you computer) and the webserver will only run command and collect data...

edit flag offensive delete publish link more

Comments

1

We need a complete solution. Not 10 applications that implement only 2 or 3 of the features we need.

ApB ( 2014-08-05 16:03:51 +0200 )edit
2

answered 2014-08-04 22:13:10 +0200

Fuzzillogic gravatar image

It's not new. First of this kind I'm aware of is Nokia's mobile web server, which ran on N95 and other Symbians. It provided a web interface to PIM, SMS's, photos, ... but it was severely hampered due to the lack of memory. That's not really an issue anymore. HTC had (has?) something similar.

But, there was (and is) the issue of locating and connecting to your device, be it on LAN as over cellular. Nokia had a proxy service for that, which of course would translate to todays ""cloud""-cr@p, which we're trying to avoid.

As said, localizing the device still is an issue, even after all these years, which is absurd. There are however some improvements: on the LAN, there's zeroconf/bonjour/mdns. Just enter http://jolla.local in your browser and presto, it works. Well, at least in Linux and on the Mac, I guess. However, when not on own LAN but a (untrusted) WLAN, or no LAN at all, that won't work. A distributed DNS might solve that, e.g. Ethereum. IPv6-connected clients might be accessible from the outside. STUN might be a way to go through NAT and firewalls.

Alas, a lot of maybes, but I think the ease and simplicity to connect to your device without configuration on any network is paramount for success. E.g. it should work at home, at work, at the MacDonalds and even on-the-go, using a borrowed laptop.

edit flag offensive delete publish link more
0

answered 2014-08-06 11:57:14 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2014-08-06 11:57:14 +0200

Some initial thought, feel free to reply to check what I'm doing wrong (I'm not a web-developer).

  • NodeJS (Packaged in Mer Tools, known to work)
  • Jolla application to control the server and provide informations via DBus
  • Each connection opens a websocket to check if connection is alive by pinging the client, also allows displaying a list of connections on the Jolla.
  • Accept connections on Jolla, a bit like Bluetooth
  • NodeJS DBus to integrate with Jolla
  • Web applications built with HTML5 + jQuery to have a modern look and feel
edit flag offensive delete publish link more

Comments

1

Could you make the interface look somehow like this? http://i.imgur.com/iOWdrIm.png

And when deleting something from the interface be able to have a remorse timer?

ApB ( 2014-08-06 18:57:57 +0200 )edit

I will see, this design might look good, but a list of files don't suit on a large screen. We have space for grids, so we should use grids instead (IMO)

Sfiet_Konstantin ( 2014-08-06 20:07:02 +0200 )edit

I think i understand what you mean. A "mixed view" ie list for files and thumbnail for media might also work i think. >> http://imgur.com/x9MoaHE (awfully rough fast and ugly mockup).

If we also can have some kind of animations for when uploading files (progress bar) and other "blink" stuff will be nice i think.

If you want me to expand on the above ideas and provide some mock ups (fast or pixel perfectish) for the UI i have in mind just ask. However i am not a programmer so you have to find someone to implement them if you like them.

ApB ( 2014-08-06 21:47:56 +0200 )edit

@ApB, actually I'm just the reverse, I'm a programmer, but not that much a designer (I don't know how to design nice things, but know at least some UI pitfalls). Feel free to share here mockups, I will check what I can do with it.

Trying to learn backbonejs at the moment. Sound nice and promising to do this stuff.

Sfiet_Konstantin ( 2014-08-07 11:06:10 +0200 )edit
1

Well the basic interface is what you see in the first pic. (http://i.imgur.com/iOWdrIm.png) This is where you are after typing whatever is needed in the webbrowser to connect to the server. You drag and drop on the grey area to upload to that dir or on a red area for uploading in the folder. Progress bar on upload would be appreciated. If you click on a folder you get something like >> http://imgur.com/me9d6Ti .Next to the x (delete) you can add more functions depending on what you want to do with the file. Ie play a music file, add to a playlist, or rename something. For SMS functionality >> http://imgur.com/4tYFMR0 and in conversation mode >> http://imgur.com/NI51wsU

Those mockups are for the two basic functions (file management, SMS). Other functionality can be added to the black column. Some stuff might be missing because i haver thoroughly thought of all the usecases but we can built on those i think. Colours of course can change.

ApB ( 2014-08-07 13:07:55 +0200 )edit
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2014-08-04 19:52:55 +0200

Seen: 1,613 times

Last updated: Aug 06 '14