RetroShare Client for Android

Android specific usage questions

RetroShare Client for Android

Postby defnax » Tue Oct 02, 2012 9:18 am

RetroShare Client for Android

A Client for retroshare-nogui(ssh), for remote control of RS.

Project Page:
https://github.com/electron128/RetroSha ... oid-Client
User avatar
defnax
Site Admin
 
Posts: 446
Joined: Fri Oct 24, 2008 10:28 pm

Re: RetroShare Client for Android

Postby arglebargle » Mon Oct 08, 2012 10:31 pm

How do you locate all information needed to log in to the RS app?
THanks :)
arglebargle
 
Posts: 42
Joined: Mon Mar 05, 2012 2:38 pm

Re: RetroShare Client for Android

Postby jasio » Mon Dec 03, 2012 9:55 am

I would also like to know how to connect with the Android client. How do I configure the port and user credentials?

I have RetroShareRemote3.apk on my tablet and I am running retroshare-nogui (from SVN) on a Raspberry Pi.

Thanks
jasio
 

Re: RetroShare Client for Android

Postby apoapo » Mon Dec 03, 2012 9:56 pm

You connect with your ssh credentials. Your server must run the no-gui version of RS.

I just managed to connect to my no-gui version but all tabs of the remote client stay cleared :(
apoapo
 
Posts: 189
Joined: Sun Jan 10, 2010 12:55 pm

Re: RetroShare Client for Android

Postby jasio » Tue Dec 04, 2012 11:54 am

I realised after posting that I was using the trunk version of retroshare-nogui and not the v0.5-gsx-b1 branch. So the SSH server was not enabled.

I moved to the branch but so far I have not managed to compile it on the RasPi. libretroshare fails to build on the UPnP code. I used miniupnp 1.5 from the Debian repository at first. Then I installed version 1.3 to be on the same version as in the readme. But the errors are the same. I'll try again later, see if I can spot what is wrong.
jasio
 

Re: RetroShare Client for Android

Postby electron » Wed Dec 05, 2012 7:10 am

jasio wrote:I would also like to know how to connect with the Android client. How do I configure the port and user credentials?

port is still hardcoded to "7022" and user to "user" on the server side.

apoapo wrote:I just managed to connect to my no-gui version but all tabs of the remote client stay cleared

looks like you didn't use the -C option.

@jasio:
the UPnP problem is known and solved - but only in the trunk.
someone posted this patch on the internal forum (i didn't test it):

[PATCH] Building the gxs branch r5936 on Debian Sid
Code: Select all

Index: libretroshare/src/upnp/UPnPBase.cpp
===================================================================
--- libretroshare/src/upnp/UPnPBase.cpp   (Revision 5936)
+++ libretroshare/src/upnp/UPnPBase.cpp   (Arbeitskopie)
@@ -1477,7 +1477,11 @@
       int TimeOut = 1801;
       int ret = UpnpSubscribe(
          upnpCP->m_UPnPClientHandle,
+#ifdef PATCHED_LIBUPNP
+         UpnpString_get_String(es_event->PublisherUrl),
+#else
          es_event->PublisherUrl,
+#endif
          &TimeOut,
          newSID);
       if (ret != UPNP_E_SUCCESS) {
@@ -1486,17 +1490,23 @@
             msg, es_event->ErrCode, NULL, NULL);
       } else {
          ServiceMap::iterator it =
+#ifdef PATCHED_LIBUPNP
+            upnpCP->m_ServiceMap.find(UpnpString_get_String(es_event->PublisherUrl));
+#else
             upnpCP->m_ServiceMap.find(es_event->PublisherUrl);
+#endif
          if (it != upnpCP->m_ServiceMap.end()) {
             CUPnPService &service = *(it->second);
             service.SetTimeout(TimeOut);
             service.SetSID(newSID);
-#ifdef UPNP_DEBUG
             std::cerr << "CUPnPControlPoint::Callback() Re-subscribed to EventURL '" <<
+#ifdef PATCHED_LIBUPNP
+               UpnpString_get_String(es_event->PublisherUrl) <<
+#else
                es_event->PublisherUrl <<
+#endif
                "' with SID == '" <<
                newSID << "'." << std::endl;
-#endif
             // In principle, we should test to see if the
             // service is the same. But here we only have one
             // service, so...
Index: libretroshare/src/gxs/rsdataservice.cc
===================================================================
--- libretroshare/src/gxs/rsdataservice.cc   (Revision 5936)
+++ libretroshare/src/gxs/rsdataservice.cc   (Arbeitskopie)
@@ -25,6 +25,7 @@
  */
+#include <unistd.h>
 #include <fstream>
 #include "rsdataservice.h"
Index: libretroshare/src/gxs/rsgxsdata.cc
===================================================================
--- libretroshare/src/gxs/rsgxsdata.cc   (Revision 5936)
+++ libretroshare/src/gxs/rsgxsdata.cc   (Arbeitskopie)
@@ -24,6 +24,7 @@
  *
  */
+#include <unistd.h>
 #include "rsgxsdata.h"
 #include "serialiser/rsbaseserial.h"
 #include "serialiser/rstlvbase.h"
Index: libretroshare/src/gxs/rsgxsifaceimpl.cc
===================================================================
--- libretroshare/src/gxs/rsgxsifaceimpl.cc   (Revision 5936)
+++ libretroshare/src/gxs/rsgxsifaceimpl.cc   (Arbeitskopie)
@@ -24,6 +24,7 @@
  *
  */
+#include <unistd.h>
 #include "rsgxsifaceimpl.h"
 #include "gxs/rsgxs.h"
 #include "gxs/rsgxsflags.h"
Index: libretroshare/src/gxs/gxssecurity.cc
===================================================================
--- libretroshare/src/gxs/gxssecurity.cc   (Revision 5936)
+++ libretroshare/src/gxs/gxssecurity.cc   (Arbeitskopie)
@@ -24,6 +24,7 @@
  *
  */
+#include <unistd.h>
 #include "gxssecurity.h"
 #include "pqi/authgpg.h"
 #include "retroshare/rspeers.h"
Index: libretroshare/src/gxs/rsgenexchange.cc
===================================================================
--- libretroshare/src/gxs/rsgenexchange.cc   (Revision 5936)
+++ libretroshare/src/gxs/rsgenexchange.cc   (Arbeitskopie)
@@ -24,6 +24,7 @@
  *
  */
+#include <unistd.h>
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 #include <openssl/evp.h>
Index: libretroshare/src/gxs/rsgxsdataaccess.cc
===================================================================
--- libretroshare/src/gxs/rsgxsdataaccess.cc   (Revision 5936)
+++ libretroshare/src/gxs/rsgxsdataaccess.cc   (Arbeitskopie)
@@ -23,6 +23,7 @@
  *
  */
+#include <unistd.h>
 #include "rsgxsdataaccess.h"
 // This bit will be filled out over time.
Index: libretroshare/src/gxs/rsgxsnetservice.cc
===================================================================
--- libretroshare/src/gxs/rsgxsnetservice.cc   (Revision 5936)
+++ libretroshare/src/gxs/rsgxsnetservice.cc   (Arbeitskopie)
@@ -24,6 +24,7 @@
  *
  */
+#include <unistd.h>
 #include "rsgxsnetservice.h"
 #include "rsgxsflags.h"
Index: libretroshare/src/gxs/gxscoreserver.cc
===================================================================
--- libretroshare/src/gxs/gxscoreserver.cc   (Revision 5936)
+++ libretroshare/src/gxs/gxscoreserver.cc   (Arbeitskopie)
@@ -25,6 +25,7 @@
  */
+#include <unistd.h>
 #include "gxscoreserver.h"
 GxsCoreServer::GxsCoreServer()
Index: libretroshare/src/gxs/gxstokenqueue.cc
===================================================================
--- libretroshare/src/gxs/gxstokenqueue.cc   (Revision 5936)
+++ libretroshare/src/gxs/gxstokenqueue.cc   (Arbeitskopie)
@@ -23,6 +23,7 @@
  *
  */
+#include <unistd.h>
 #include "gxs/gxstokenqueue.h"
 bool GxsTokenQueue::queueRequest(uint32_t token, uint32_t req_type)
Index: libretroshare/src/services/p3posted.cc
===================================================================
--- libretroshare/src/services/p3posted.cc   (Revision 5936)
+++ libretroshare/src/services/p3posted.cc   (Arbeitskopie)
@@ -1,4 +1,5 @@
+#include <stdio.h>
 #include <algorithm>
 #include <math.h>
Index: libretroshare/src/libretroshare.pro
===================================================================
--- libretroshare/src/libretroshare.pro   (Revision 5936)
+++ libretroshare/src/libretroshare.pro   (Arbeitskopie)
@@ -172,6 +172,14 @@
             DEFINES *= UBUNTU
         }
+
+   # Check if the system's libupnp has been Debian-patched
+   system(grep -E 'char[[:space:]]+PublisherUrl' $${UPNP_DIR}/upnp.h >/dev/null 2>&1) {
+      # Normal libupnp
+   } else {
+      # Patched libupnp or new unreleased version
+      DEFINES *= PATCHED_LIBUPNP
+   }
         # ################### Cross compilation for windows under Linux ####################
         win32-x-g++ {

electron
 
Posts: 96
Joined: Sun Aug 12, 2012 9:39 am

Re: RetroShare Client for Android

Postby apoapo » Sun Dec 16, 2012 9:35 pm

Still not working here. With svn 5996 gxs branch was merged into trunk retroshare.

What do you mean by -C option? nogui does not have such a parameter here.

Whuch username do i have to enter into the app? My ssh server's username? RSusername?

Thanks
apo
apoapo
 
Posts: 189
Joined: Sun Jan 10, 2010 12:55 pm

Re: RetroShare Client for Android

Postby electron » Mon Dec 17, 2012 6:47 pm

apoapo wrote:What do you mean by -C option? nogui does not have such a parameter here.

you have to enable the ssh server in retroshare-nogui.pro

apoapo wrote:Whuch username do i have to enter into the app? My ssh server's username? RSusername?

Retroshare has it's own ssh server listening on port 7022. The username is still hardcoded to "user", so don't trust the help without looking at the source.

the command should look like this:
Code: Select all
retroshare-nogui -S 7022 -L user -P <somehash> -C
electron
 
Posts: 96
Joined: Sun Aug 12, 2012 9:39 am

Re: RetroShare Client for Android

Postby handsomefella » Wed Apr 02, 2014 8:46 pm

I've gotten pretty far with the port of libretroshare, I'm not even going to touch the GUI (Qt based one) but am going to replace it with a nice Java/androidy based one

Here are my notes and how far I got... the main show stopper right now is the difficult of getting Avahi (a free replacement for crapples craptastic bonjour) going

~/RetroShare/jni$ ndk-build
Android NDK: WARNING:/home/crow/androidworkspace/RetroShare/jni/Android.mk:RetroShare: non-system libraries in linker flags: -lcrypto -lbz2
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi] Compile++ thumb: RetroShare <= rsdataservice.cc
[armeabi] Compile++ thumb: RetroShare <= rsgenexchange.cc
[armeabi] Compile++ thumb: RetroShare <= rsgxsutil.cc
[armeabi] Compile++ thumb: RetroShare <= rsgxsnetservice.cc
[armeabi] Compile++ thumb: RetroShare <= rsgxsdata.cc
[armeabi] Compile++ thumb: RetroShare <= gxstokenqueue.cc
[armeabi] Compile++ thumb: RetroShare <= rsgxsnetutils.cc
[armeabi] Compile++ thumb: RetroShare <= rsgxsdataaccess.cc
[armeabi] Compile++ thumb: RetroShare <= gxssecurity.cc
[armeabi] Compile++ thumb: RetroShare <= p3distribsecurity.cc
[armeabi] Compile++ thumb: RetroShare <= p3distrib.cc
[armeabi] Compile++ thumb: RetroShare <= pgphandler.cc
[armeabi] Compile++ thumb: RetroShare <= pgpkeyutil.cc
[armeabi] Compile++ thumb: RetroShare <= rscertificate.cc
[armeabi] Compile++ thumb: RetroShare <= p3zeroconf.cc
In file included from /home/zzz/androidworkspace/RetroShare/jni/libretroshare/zeroconf/p3zeroconf.cc:27:0:
/home/zzz/androidworkspace/RetroShare/jni/libretroshare/zeroconf/p3zeroconf.h:42:20: fatal error: dns_sd.h: No such file or directory
compilation terminated.
make: *** [/home/zzz/androidworkspace/RetroShare/obj/local/armeabi/objs/RetroShare//home/zzz/androidworkspace/RetroShare/jni/libretroshare/zeroconf/p3zeroconf.o] Error 1


:~/RetroShare$ cat README.Android
1. openssl

The openssl library that comes with the android ndk doesn't have cast.h included, so, grab it from

https://github.com/bmiklautz/android-ex ... atic/trunk

then apply

android-openssl-cast.patch

then build it with ndk-build and copy the contents of the lib and include directories over the contents
of the respect directories in the platforms subdirectory of the android ndk

2. bzip

install bzip for android from https://github.com/crystax/cosp-android-bzip2


TODO:
* build avahi for android
handsomefella
 
Posts: 8
Joined: Wed Apr 02, 2014 8:41 pm

Re: RetroShare Client for Android

Postby electron » Fri Apr 04, 2014 5:22 pm

handsomefella wrote:I'm not even going to touch the GUI (Qt based one) but am going to replace it with a nice Java/androidy based one

Can i recommend you a better way?
Qt 5.2 has nice Android support, so we just need to modify the existing GUI to fit on small screens.
We could port Retroshare to any Platform with Qt support, without doing everything from scratch again.

I just uploaded my android branch to github:
https://github.com/electron128/retrosha ... .5-android
electron
 
Posts: 96
Joined: Sun Aug 12, 2012 9:39 am

Next

Return to RetroShare for Android

Who is online

Users browsing this forum: No registered users and 1 guest

cron