What is the use of `addr` in alljoyn.conf?

asked 2015-06-24 03:14:47 -0700

trandatnh gravatar image

updated 2015-06-28 18:51:51 -0700

In Openwrt, the alljoyn config file is generated to /tmp/etc/alljoyn.conf. I find that if my OpenWrt device is under DHCP client then the tcp:addr field will be empty.

  • lan static ip address is


  • lan dhcp ip


What is the use of addr? Can alljoyn work normally with empty addr?


I see this error The r4addr "" is not a legal IPv4 address.: ER_BUS_BAD_TRANSPORT_ARGS when I use dhcp client.

Bus has been disconnected
Initializing application.
  17.426 ****** ERROR ALLJOYN external          ...e/src/BusAttachment.cc:512 | BusAttachment::Connect failed: ER_BUS_TRANSPORT_NOT_AVAILABLE
Could not initialize BusAttachment. Retrying
root@dat:~#    0.162 ****** ERROR TCP     external          ...outer/TCPTransport.cc:2486 | TCPTransport::NormalizeListenSpec(): The r4addr "" is not a legal IPv4 address.: ER_BUS_BAD_TRANSPORT_ARGS
   0.163 ****** ERROR TCP     external          ...outer/TCPTransport.cc:3092 | TCPTransport::StartListen(): Invalid TCP listen spec "tcp:addr=,port=9955": ER_BUS_BAD_TRANSPORT_ARGS


The reason is Alljoyn read the network information from /var/state/network. However, the board I am using didn't update the ipaddr field when it is dhcp client. If I update the ipaddr manually and run alljoyn again, alljoyn works.

edit retag flag offensive close merge delete


What version of AllJoyn are you using?

stevek ( 2015-06-26 10:05:02 -0700 )edit

I'm using v14.06.00a

trandatnh ( 2015-06-26 20:00:12 -0700 )edit

trandatnh, Do you still see this problem with a newer release viz. 14.12 or 15.04?

praveenb ( 2015-06-29 00:59:17 -0700 )edit

I only tested on v14.06.00a, if 14.12 and 15.04 are using the same method with 14.06 then it will have the same problem. I did a work around fix for this issue by adding a loop in /etc/init.d/alljoyn to wait until my device get the IP from DHCP Server.

trandatnh ( 2015-06-29 01:06:40 -0700 )edit

14.12 and 15.04 use a different method as compared to 14.06.

praveenb ( 2015-06-29 01:19:39 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-06-30 11:45:33 -0700

stevek gravatar image

Newer versions of AllJoyn use the network interface name rather than an IP address. This allows AllJoyn to continue working even in the case of DHCP. If you are stuck with 14.06 and you don't mind AllJoyn listening on ALL interfaces, including the WAN (public Internet), you could set all_networks to 1 inside of /etc/config/alljoyn. Be aware that listening for incoming connections on the WAN interface could pose a security hole, especially if you don't also add a firewall rule to block incoming connections to port 9955 and 9956 on the WAN interface.

edit flag offensive delete publish link more


Thanks for clearing my doubt

trandatnh ( 2015-06-30 19:16:37 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-06-24 03:14:47 -0700

Seen: 122 times

Last updated: Jun 30 '15