<div dir="ltr">I enabled telepathy-salut logs by adding these to /etc/environment (note that changing debug file does not work anymore):<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div>G_MESSAGES_DEBUG="all"</div></div></div><div><div><div>SALUT_DEBUG="all"</div></div></div><div><div><div>SALUT_LOGFILE=/home/olpc/salut.log</div></div></div><div><br></div></blockquote>I see a lot of activity when I connect to an access point (or to modified ad-hoc network), but I when connect to a normal Sugar ad-hoc network, I see this in the log:<div><br></div><div>             ...</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>(telepathy-salut:728): salut-DEBUG: gabble_capabilities_finalize: 0xab108</div><div>(telepathy-salut:728): salut-DEBUG: salut_connection_finalize: Finalizing connection</div><div>(telepathy-salut:728): tp-glib-DEBUG: no connections, and timed out</div><div>tp-glib-Message: Exiting </div><div><br></div></blockquote>There is when the salut exits. I tried forcing it to not exit by adding this to /etc/environment:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>SALUT_PERSIST=1</div></blockquote><div><div><br></div><div>In that case, when I connect to the normal Sugar ad-hoc network, I see the "time out" message and the process keeps running, but no activity is logged until I re-connect to an access point or modified ad-hoc.</div><div><br></div><div>So basically, even if the process keeps running the issue persist...</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 10:22 AM, Martin Abente <span dir="ltr"><<a href="mailto:martin.abente.lahaye@gmail.com" target="_blank">martin.abente.lahaye@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello James,<br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Sep 17, 2014 at 5:18 AM, James Cameron <span dir="ltr"><<a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On Tue, Sep 16, 2014 at 02:14:56PM -0400, Martin Abente wrote:<br>
> James, Gonzalo,<br>
><br>
> Regarding the IBSS/Ad-hoc scenario, if I set the address manually,<br>
> collaborations work just fine. So this must be related to network<br>
> discovery.<br>
<br>
</span>Thanks, that's interesting.  Can you tell me _how_ you set the address<br>
manually?  When I tried it there was no real difference:</blockquote><div><br></div></span><div>My bad, here is what  I am doing:</div><div><br></div><div>1. Used a XO with fc18 build to create the "Sugar Ad-hoc Network 2".</div><div>2. Then, from another XO with fc20 build, and before I connect to the Ad-hoc 2 network, I edit that connection using nm-connection-editor: (a)edit "IPv4 Settings" for the "Sugar Ad-hoc Network 2", (b) set the method to "manual", (c) set the (address,mask,gateway). and save.</div><div>3. Then, from the neighborhood, I connect to the ad-hoc 2 network and everything works.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<a href="http://wiki.laptop.org/go/User:Quozl/Fedora_20/Manual_network_configuration" target="_blank">http://wiki.laptop.org/go/User:Quozl/Fedora_20/Manual_network_configuration</a><br>
<span><br>
> My test goes like this:<br>
><br>
> * I use one XO with fc18+S0.100 to create an ad-hoc network network.<br>
> * From another XO, with fc20+S0.102, I connect to that ad-hoc network.<br>
><br>
> The second XO ip address does not match the first one's network.<br>
<br>
</span>Can you tell me how it does not match?  It always matches when I try<br>
it; a link-local address 169.254.x.x valid to RFC 3927 is always<br>
assigned, as shown by "ip addr" command.<br></blockquote><div><br></div></span><div>You are right, thanks for the clarifications. I might have been confused by previous tests.</div><div><br></div><div>I have no idea why changing the method from "local-link" to "manual", and manually assigning the address, mask and gateway makes such difference.</div><div><br></div><div>If you want to try this, set the address and mask to its original/same values, and for the gateway use the first XO address...</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<a href="http://en.wikipedia.org/wiki/Link-local_address" target="_blank">http://en.wikipedia.org/wiki/Link-local_address</a><br>
<span><br>
> But when I manually configure it, then buddy icons appears and<br>
> collaboration works... <br>
<br>
</span>When I enable Sugar debugging and use sugar-launch as before, a new<br>
interesting message is seen, "No active connection available" which is<br>
because neither Gabble nor Salut is running.<br>
<br>
        % SUGAR_LOGGER_LEVEL=debug sugar-launch org.laptop.Chat<br>
<br>
...<br>
1410934106.660510 DEBUG root: Requesting public share of activity 3b34e9d6ce9f294d12cd79314f7946a2f8845be5.<br>
1410934106.662832 DEBUG root: Share of activity 3b34e9d6ce9f294d12cd79314f7946a2f8845be5 failed: No active connection available.<br>
...<br>
<br>
The error is reported by the __share_cb method of the Activity class.<br>
<br>
/usr/lib/python2.7/site-packages/sugar3/activity/activity.py:<br>
<br>
    def __share_cb(self, ps, success, activity, err):<br>
        if not success:<br>
            logging.debug('Share of activity %s failed: %s.' %<br>
                          (self._activity_id, err))<br>
            return<br>
<br>
...<br>
<br>
    def share(self, private=False):<br>
...<br>
        pservice = presenceservice.get_instance()<br>
        pservice.connect('activity-shared', self.__share_cb)<br>
        pservice.share_activity(self, private=private)<br>
<br>
The error comes from the share_activity method of the PresenceService<br>
class.<br>
<br>
/usr/lib/python2.7/site-packages/sugar/presence/presenceservice.py<br>
<br>
    def share_activity(self, activity, properties=None, private=True):<br>
...<br>
        connection_manager = get_connection_manager()<br>
        account_path, connection = \<br>
                connection_manager.get_preferred_connection()<br>
<br>
        if connection is None:<br>
            self.emit('activity-shared', False, None,<br>
                      'No active connection available')<br>
            return<br>
<br>
/usr/lib/python2.7/site-packages/sugar/presence/connectionmanager.py<br>
<br>
    def get_preferred_connection(self):<br>
        best_connection = None, None<br>
        for account_path, connection in self._connections_per_account.items():<br>
            if 'salut' in account_path and connection.connected:<br>
                best_connection = account_path, connection.connection<br>
            elif 'gabble' in account_path and connection.connected:<br>
                best_connection = account_path, connection.connection<br>
                break<br>
        return best_connection<br></blockquote><div><br></div></div></div><div>I followed the same path yesterday, and could not figure it out.</div><div><br></div><div>Similarly in /usr/lib/python2.7/site-packages/jarabe/model/neighborhood.py:</div><div><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><div>    def _start_listening(self):</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>        bus = dbus.Bus()</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>        obj = bus.get_object(ACCOUNT_MANAGER_SERVICE, self.object_path)</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>        obj.Get(ACCOUNT, 'Connection',</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>                reply_handler=self.__got_connection_cb,</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>                error_handler=partial(self.__error_handler_cb,</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>                                      'Account.GetConnection'))</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>        obj.connect_to_signal(</div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div>            'AccountPropertyChanged', self.__account_property_changed_cb)</div></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>When connecting to ad-hoc, "AccountPropertyChanged" is never emitted, as it happens in other scenarios.</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
There is no /usr/libexec/telepathy-salut process.  The process does<br>
exist if an access point is used in place of IBSS ad-hoc.  The<br>
question becomes: why isn't Salut running?<br></blockquote><div><br></div></span><div>The process also exists when changing the "IPv4 Settings/Method"...</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
> On Tue, Sep 16, 2014 at 11:01 AM, Martin Abente <[1]<br>
<span>> <a href="mailto:martin.abente.lahaye@gmail.com" target="_blank">martin.abente.lahaye@gmail.com</a>> wrote:<br>
><br>
>     Hello James,<br>
><br>
>     I included the new kernel  (and reverted that commit) and now collaboration<br>
>     works even between fc20+S0.102 and F18+S0.100.<br>
><br>
>     I tested it using a wifi network (with DHCP enabled) and Chat activity.<br>
><br>
>     Really awesome work James!<br>
><br>
</span><span>>     On Tue, Sep 16, 2014 at 3:53 AM, James Cameron <[2]<a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a>> wrote:<br>
><br>
>         Summary: partially solved with new kernel.<br>
><br>
>         The Chat activity was run with debug logging in Terminal:<br>
><br>
>                 % SUGAR_LOGGER_LEVEL=debug sugar-launch org.laptop.Chat<br>
><br>
>         At the time the activity was shared, the log showed:<br>
><br>
>         1410842095.436535 DEBUG sugar3.presence.activity: <_ShareCommand object<br>
>         at 0x527dc8 (sugar3+presence+activity+_ShareCommand at 0x4f7c20)>: Join<br>
>         finished DBusException(dbus.String(u'Failed to connect to multicast<br>
>         group'),)<br>
><br>
>         Telepathy Salut was failing to setup the multicast group, because it<br>
>         was calling setsockopt with SO_REUSEPORT, because Fedora 20 header<br>
>         files define SO_REUSEPORT, but the OLPC kernel did not.<br>
><br>
>         (It is bad that the failure was not reported to the user or to the<br>
>         logs unless debug logging was turned on.  If someone cares, they can<br>
>         raise a bug.)<br>
><br>
>         Adding SO_REUSEPORT support to the kernel [2] solved for Salut over<br>
>         networks where DHCP is available; such as wired or wireless access<br>
>         points.  The new kernel is in the dropbox [3].  The previous change to<br>
>         avahi-daemon configuration is removed [4].<br>
><br>
>         A different problem occurs with Salut over link local addresses; IBSS<br>
>         ad-hoc wireless.  The buddy icons are missing.<br>
><br>
>                 # avahi-browse -t _presence._tcp # shows no output<br>
><br>
>         References:<br>
><br>
>         1.<br>
</span>>         [3]<a href="http://code.metager.de/source/xref/freedesktop/telepathy/salut/lib/" target="_blank">http://code.metager.de/source/xref/freedesktop/telepathy/salut/lib/</a><br>
>         gibber/gibber-multicast-transport.c<br>
><br>
>         2.<br>
>         [4]<a href="http://dev.laptop.org/git/olpc-kernel/log/?h=arm-3.5" target="_blank">http://dev.laptop.org/git/olpc-kernel/log/?h=arm-3.5</a><br>
><br>
>         3.<br>
>         [5]<a href="http://rpmdropbox.laptop.org/f20-xo4/" target="_blank">http://rpmdropbox.laptop.org/f20-xo4/</a><br>
>         kernel-3.5.7_xo4-20140916.0607.olpc.5196e01.armv7hl.rpm<br>
><br>
>         4.<br>
>         [6]<a href="http://dev.laptop.org/git/projects/olpc-os-builder/commit/?id=" target="_blank">http://dev.laptop.org/git/projects/olpc-os-builder/commit/?id=</a><br>
<span>>         f34ddb8b83ca6b9cb657e115df117ffa3704eea5<br>
><br>
>         On Thu, Sep 11, 2014 at 06:24:20PM +1000, James Cameron wrote:<br>
>         > G'day,<br>
>         ><br>
>         > Activities shared by Fedora 20 systems do not appear in Network<br>
>         > Neighbourhood on Fedora 18 or Fedora 20 systems.  Buddies appear.<br>
>         > Activities shared by Fedora 18 Sugar 0.98 systems appear.<br>
>         ><br>
>         > So this is a failure to announce sharing of activities on Sugar 0.102<br>
>         > on Fedora 20.<br>
>         ><br>
>         > tcpdump shows mDNS packets for every operation except when an<br>
>         activity<br>
>         > is shared on Fedora 20.<br>
>         ><br>
>         > avahi-browse output is consistent with Network Neighbourhood.<br>
>         ><br>
>         >       avahi-browse -t _presence._tcp # for buddies<br>
>         >       avahi-browse -t _clique._udp # for activities<br>
>         ><br>
>         > (avahi-daemon needed tweaking to compensate for lack of SO_REUSEPORT<br>
>         > support in 3.5 kernel; change /etc/avahi/avahi-daemon.conf to set<br>
>         > disallow-other-stacks=yes)<br>
>         ><br>
</span>>         > I have tried [7]<a href="http://wiki.sugarlabs.org/go/BugSquad/" target="_blank">http://wiki.sugarlabs.org/go/BugSquad/</a><br>
<span>>         Telepathy_Debugging<br>
>         > but there is no interesting output corresponding to the event.<br>
>         ><br>
>         > I have used strace and seen possible D-Bus activity relating to the<br>
>         > event.  sendmsg(11, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1<\0\0\0/\<br>
</span>>         0\0\0\252\0\0\0\1\1o\0?\0\0\0/org/fre"..., 192}, {"+\0\0\[8]<br>
<span>>         <a href="http://0org.freedesktop.Telepathy.Ch" target="_blank">0org.freedesktop.Telepathy.Ch</a>"..., 60}], msg_controllen=0, msg_flags=<br>
>         0}, MSG_NOSIGNAL) = 252<br>
>         ><br>
>         > I welcome any suggestions for further diagnosing this problem.<br>
>         ><br>
>         > --<br>
>         > James Cameron<br>
</span>>         > [9]<a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
><br>
>         --<br>
>         James Cameron<br>
>         [10]<a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
>         _______________________________________________<br>
>         Devel mailing list<br>
>         [11]<a href="mailto:Devel@lists.laptop.org" target="_blank">Devel@lists.laptop.org</a><br>
>         [12]<a href="http://lists.laptop.org/listinfo/devel" target="_blank">http://lists.laptop.org/listinfo/devel</a><br>
><br>
> References:<br>
><br>
> [1] mailto:<a href="mailto:martin.abente.lahaye@gmail.com" target="_blank">martin.abente.lahaye@gmail.com</a><br>
> [2] mailto:<a href="mailto:quozl@laptop.org" target="_blank">quozl@laptop.org</a><br>
> [3] <a href="http://code.metager.de/source/xref/freedesktop/telepathy/salut/lib/gibber/gibber-multicast-transport.c" target="_blank">http://code.metager.de/source/xref/freedesktop/telepathy/salut/lib/gibber/gibber-multicast-transport.c</a><br>
> [4] <a href="http://dev.laptop.org/git/olpc-kernel/log/?h=arm-3.5" target="_blank">http://dev.laptop.org/git/olpc-kernel/log/?h=arm-3.5</a><br>
> [5] <a href="http://rpmdropbox.laptop.org/f20-xo4/" target="_blank">http://rpmdropbox.laptop.org/f20-xo4/</a><br>
> [6] <a href="http://dev.laptop.org/git/projects/olpc-os-builder/commit/?id=f34ddb8b83ca6b9cb657e115df117ffa3704eea5" target="_blank">http://dev.laptop.org/git/projects/olpc-os-builder/commit/?id=f34ddb8b83ca6b9cb657e115df117ffa3704eea5</a><br>
> [7] <a href="http://wiki.sugarlabs.org/go/BugSquad/Telepathy_Debugging" target="_blank">http://wiki.sugarlabs.org/go/BugSquad/Telepathy_Debugging</a><br>
> [8] <a href="http://0org.freedesktop.telepathy.ch/" target="_blank">http://0org.freedesktop.telepathy.ch/</a><br>
> [9] <a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
> [10] <a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
> [11] mailto:<a href="mailto:Devel@lists.laptop.org" target="_blank">Devel@lists.laptop.org</a><br>
> [12] <a href="http://lists.laptop.org/listinfo/devel" target="_blank">http://lists.laptop.org/listinfo/devel</a><br>
<div><div><br>
--<br>
James Cameron<br>
<a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>