GlobalBroadcast in SignalEmitter not working on ARM-JavaBinding.

asked 2015-08-26 08:59:36 -0700

boehlefeld gravatar image


I'm facing problems on a Raspberry PI when emitting global signals using the Java binding. For the first step I decided to send out signals in broadcasts, instead of using multipoint or multi unicast to interested/connected peers. Because I'm not sure about one client-application, what options they use. But that would be n option to bypass the problem, I think.

Everything is compiled well i guess, because, cpp or Java (e.g. JavaSDKDocSignalService.jar) bundled samples working properly and even the biggest part of the project too. Basically the same source runs like a charm on Ubuntu 14.04 LTS 64Bit machine, where the problem is not present, which also makes debugging difficult.

The project has several actions and events, whereas actions can be triggered without problems. Whenever I try to emit a signal on the pi a BusException gets thrown. (see bash output)

I tried following combinations of emitter options, each of them with the same result:

protected SignalEmitter emitter = new SignalEmitter(AlljoynService.getBusObject(),SignalEmitter.GlobalBroadcast.On);
//  protected SignalEmitter emitter = new SignalEmitter(AlljoynService.getBusObject(),BusAttachment.SESSION_ID_ALL_HOSTED, SignalEmitter.GlobalBroadcast.On);
//  protected SignalEmitter emitter = new SignalEmitter(AlljoynService.getBusObject(),BusAttachment.SESSION_ID_ANY, SignalEmitter.GlobalBroadcast.On); 
IBusInterfaceAJ test = emitter.getInterface(IBusInterfaceAJ.class);

Extract of my interface description:

@BusInterface (name = "eu.example.test",
description="Test Appliances")
public interface IBusInterfaceAJ {
    @BusSignal(description="Test released", sessionless=true)
    public void testReleased() throws BusException;

Error output from bash:

152.986 ****** ERROR ALLJOYN external          ..._core/src/BusObject.cc:650 | Attempt to send a global broadcast signal when testReleased is not global broadcast: ER_INVALID_SIGNAL_EMISSION_TYPE 152.987 ****** ERROR ALLJOYN_JAVA external     .../jni/alljoyn_java.cc:11907 | SignalEmitter_signal(): Exception: ER_FAIL org.alljoyn.bus.BusException: ER_INVALID_SIGNAL_EMISSION_TYPE
at org.alljoyn.bus.SignalEmitter.signal(Native Method)
at org.alljoyn.bus.SignalEmitter.access$600(SignalEmitter.java:30)
at org.alljoyn.bus.SignalEmitter$Emitter.invoke(SignalEmitter.java:129)
at com.sun.proxy.$Proxy2.testReleased(Unknown Source)
at java.lang.Thread.run(Thread.java:744)

Does anybody know how to deal with that?

Besides that, how can I apply for this document : https://allseenalliance.org/docs-and-...

I have not enough permission...

Thanks in advance.

edit retag flag offensive close merge delete


you might try on the core mailing list. https://lists.allseenalliance.org/mailman/listinfo/allseen-core

ry.jones ( 2015-08-26 10:01:32 -0700 )edit

The document has been moved to a new location see: https://allseenalliance.org/developers/develop/api-guide/core/java (for some reason the auto link is adding extra characters to the link. you may have to copy paste the url)

georgen ( 2015-08-27 09:23:12 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-08-27 09:46:10 -0700

georgen gravatar image

updated 2015-08-27 09:46:44 -0700

I pulled up the code specified in the error BusObject.cc. You are getting this error because you have specified the signal is a sessionless signal.

@BusSignal(description="Test released", sessionless=true)

Then you are sending the signal out as a GlobalBroadcast signal

protected SignalEmitter emitter = new SignalEmitter(AlljoynService.getBusObject(),SignalEmitter.GlobalBroadcast.On);

Sessionless signals and GloabalBroadcast signals are different types of signals.

A sessionless signal is a signal delivered to a routing node. The routing node stores the signal and will forward that signal to other nodes that have the correct match rules for the signal. Sessionless signals are good for infrequent updates. Sessionless signals remain on the routing node so can be seen even if you did not have a connection to that routing node when the signal was sent.

GloabalBroadcast signals are sent to all peers connected to the routing node. Any peer that has the correct match rules will see the signal when it is sent. Generally GloabalBroadcast signals are discouraged because the create large spikes in network traffic as the signal tries to propagate through the system. If the peers are not connected when the signal is sent they will not get the signal.

To fix your error you will need to change your signal so its not sessionless or only emit the signal as a sessionless signal.

I would encourage you to try to figure out session based signals emitters.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-08-26 08:59:36 -0700

Seen: 200 times

Last updated: Aug 27 '15