ledctrl demo (Arduino + openWrt)

asked 2014-04-14 06:44:50 -0700

alphaemmeo gravatar image

updated 2014-04-29 00:53:39 -0700

Hi folk,

I successfully done the ledctrl demo with Arduino due + ethernet shield (AJTC) and a PC (AJSC).

ivano@pata01:~/AllSeen-ALLIANCE/$ ./ledctrl
AllJoyn Library version: v14.2.0
AllJoyn Library build info: AllJoyn Library v14.2.0 (Built Tue Mar 18 15:15:09 UTC 2014 by ivano - Git branch: '(no branch)' tag: 'v14.02' (+2 changes) commit ref: fecc309b69eec9ae1c0ed9d66a5aca71c963de3c)
RequestCredentials for authenticating  using mechanism ALLJOYN_PIN_KEYX
NameOwnerChanged(:tMH5IN3L.3, null, :tMH5IN3L.3)
NameOwnerChanged(org.alljoyn.sample.ledservice, null, :tMH5IN3L.3)
FoundAdvertisedName(name=org.alljoyn.sample.ledservice, transport=0x1, prefix=org.alljoyn.sample.ledservice)
Joined Session 1506836989
>> on
>> off

I tried to do the same demo replacing the PC with an embedded system having a openwrt as OS, but on second device it happened the following error:

root@OpenWrt:~# ledctrl
AllJoyn Library version: v14.2.0
AllJoyn Library build info: AllJoyn Library v14.2.0 (Built Sat Apr 12 06:20:00 UTC 2014 by ivano - Git branch: 'master' tag: '<none>' commit ref: 33510d7335181221b7ebabcf1f868fac5986d11b)
   0.855 ****** ERROR ALLJOYN external          ...e/src/BusAttachment.cc:500 |  0x905d

Comparing the two output seems that the issue is on RequestCredentials for authenticating, but I not sure of this.

Does anyone have a suggestion?

Thanks, Ivano

edit retag flag offensive close merge delete


How do I have to read the log string? [0.855] = time; [****** ERROR ALLJOYN] = ?; [external] = ?; [...e/src/BusAttachment.cc:500] = file name where the errors is happened; [0x905d] = ?

alphaemmeo ( 2014-04-18 03:53:35 -0700 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-04-16 03:36:51 -0700

alphaemmeo gravatar image

updated 2014-04-28 07:55:29 -0700

Hi Brian,

the alljoyn-daemon was running, but the /etc/config/alljoyn file had option all_networks '0' as option line. So I fixed the file, then I restarted the /usr/bin/alljoyn-daemon --config-file=/var/etc/alljoyn.conf process, after It was killed.

the output is been:

root@OpenWrt:/#  /usr/bin/alljoyn-daemon --config-file=/var/etc/alljoyn.conf
root@OpenWrt:/#    0.714 ****** ERROR TCP     external          ...outer/TCPTransport.cc:3266 |  0x001d

(that I resolved replacing < property interfaces="br-lan"/> with < property interfaces="*"> line) but the ledctrl bin return the same issue of my first post:

root@OpenWrt:/usr/bin# ledctrl
AllJoyn Library version: v14.2.0
AllJoyn Library build info: AllJoyn Library v14.2.0 (Built Sat Apr 12 06:20:00 UTC 2014 by ivano - Git branch: 'master' tag: '<none>' commit ref: 33510d7335181221b7ebabcf1f868fac5986d11b)
   0.105 ****** ERROR ALLJOYN external          ...e/src/BusAttachment.cc:500 |  0x905d

At this point I tried to run AboutClient on openWrt distro and AboutService on my PC. This test had a successfull conclusion.

Do I have to check other config files?

Below the two config files:

vim /etc/config/alljoyn

config transport 'unix'
        option enable '1'
        option path 'alljoyn'
        option abstract '1'

config transport 'ip'
        option enable '1'
        option max_incomplete_conn '16'
        option max_complete_conn '96'
        option bus_port '9955'
        option auth_timeout '20000'
        option advertise_daemon '1'           
        option all_networks '1'
        list networks 'lan'

config transport 'slap'
        option enable '0'
        option path '/dev/ttyUSB0'
        option baud 115200
        option databits 8
        option parity 'none'
        option stopbits 1

vim /var/etc/alljoyn.conf


    <property router_advertisement_prefix="org.alljoyn.BusNode."/>
    <property interfaces="*"/>
  <limit max_incomplete_connections="16"/>
  <limit max_completed_connections="96"/>
  <limit auth_timeout="20000"/>
  <property restrict_untrusted_clients="false"/>
  <limit max_untrusted_clients="96"/>


I found the solution to this issue. I just replace qcc::String connectArgs = "null:"; with qcc::String connectArgs = "unix:abstract=alljoyn"; in the ledctrl.cc file.

Thanks to Brian and stevek for them suggestions.

edit flag offensive delete publish link more


Can you confirm you used "BR=off" when you compiled?

bspencer ( 2014-04-16 10:32:41 -0700 )edit

To compile all the packages for the openWrt OS, I used the instructions linked to this url: https://wiki.allseenalliance.org/develop/openwrt. Is there a place where I can put this scons option?

alphaemmeo ( 2014-04-17 01:35:13 -0700 )edit

You must restart the daemon using /etc/init.d/alljoyn. Otherwise, /var/etc/alljoyn.conf will not be regenerated from changes to /etc/config/alljoyn. Also, the package definition for alljoyn, always builds with "BR=off", but that is irrelevant for alljoyn-daemon; BR=on|off only affects client apps.

stevek ( 2014-04-17 13:43:14 -0700 )edit

why, with the same alljoyn-daemon instance, do I have apps as AboutClient, AboutService, ServerSample that work fine and ledctrl doesn't? I remind you I'm refering to openwrt os. Thanks a lot for your help.

alphaemmeo ( 2014-04-18 01:12:14 -0700 )edit

In these days I tried to solve the issue above mentioned but the issue is unsolved too. I also tried to set the "BR=off" options in .../feeds/alljoyn/alljoyn/Makefile, but nothing. Comparing PC (+ linux distro) and embedded-system (+ openwrt) I found the "transportSpec.compare(0, colonOff, trans->GetTransportName())" in .../alljoyn_core/src/TransportList.cc is equals to 0, because transportSpec=null: and trans->GetTransportName()=unix.

alphaemmeo ( 2014-04-28 06:05:18 -0700 )edit

answered 2014-04-14 10:34:01 -0700

bspencer gravatar image

Do you have the AllJoyn daemon already running on the Openwrt platform? I believe this is the case as 0x95d is:

<status name="ER_BUS_TRANSPORT_NOT_AVAILABLE" value="0x905d" comment="Transport cannot be used due to underlying mechanism disabled by OS"/>

The wireless transport can not be granted and as such you are unable to connect between the Thin Library and the AllJoyn Router. If you do have the alljoyn-daemon running on the openwrt software than you will need to compile the ledctl application with BR=off so that it will not try and start up its own instance. If that isn't the issue, then you need to look at /etc/config/alljoyn file and check that under the 'ip' transport the all_networks value is set to 1: option all_networks '1'

edit flag offensive delete publish link more


all_networks '1' should only be used on non-routers running OpenWrt. That setting will open up AllJoyn on the WAN interface as well as the LAN. Normally br-lan is the bridge interface for both WiFi and local Ethernet.

stevek ( 2014-04-17 13:45:48 -0700 )edit

thanks, it's a useful comment.

alphaemmeo ( 2014-04-18 01:17:39 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-04-14 06:44:50 -0700

Seen: 903 times

Last updated: Apr 29 '14