I'm having some trouble getting an Arduino Due + Arduino Ethernet shield talking to a service running on a Linux VM. Here are the details.
I downloaded the alljoyn-suite-14.06.00a-src.tar.gz release from the allseenalliance.org/source-code web page and unpacked it on my Linux VM (running Debian 3.2.60-1+deb7u3 x86_64 in a VirtualBox VM on a OS X 10.9.5 host). I installed all the prerequisites and built the Linux code with
$ scons BINDINGS="cpp,c" SERVICES="about,config,onboarding"
According to "scons -h", the remaining default settings looked correct to me.
For the Arduino Due library, I built the "arduino" target in the "ajtcl" directory and copied the resulting AllJoyn library into my ~/Documents/Arduino/libraries folder on my MacBook.
I built the "AJ_basic_client" sample sketch for the Due board with the Arduino 1.5.8 IDE and uploaded it to the board.
On my Linux VM, I ran the "basic_service" binary from the ".../cpp/bin/samples" directory.
The result is that on the Arduino IDE console, I see this:
621.652 aj_net.cpp:209 AJ_Net_Connect(): connect() success: status=AJ_OK 621.710 aj_helper.cpp:409 AJ_StartClient(): Failed to connect to bus, sleeping for 10 seconds
and on the Linux console, I see this:
549.411 ****** ERROR ALLJOYN iodisp ...e/src/Message_Parse.cc:862 | Message header has invalid endian flag 0: ER_BUS_BAD_HEADER_FIELD 549.411 ****** ERROR ALLJOYN iodisp .../src/Message_Parse.cc:1048 | Failed to read message on :tVsDA7V1.7: ER_BUS_BAD_HEADER_FIELD
Before I dive into debugging this, I'd like to know if these sample apps as released in the 14.06.00a release should work as-is? Or is it possible they haven't been updated to the latest alljoyn core code?
UPDATE: Actually, it looks like the very first time the AJ_Main function is called in the AJ_basic_client sketch, everything works as it should. The next time, it fails in the AJ_Authenticate function because g_client.connected() (in AJ_Net_Recv) returns false. Then every second attempt to connect to the bus fails. (I.e. one success, one failure, one success, etc.)
Any suggestions for how to start debugging or fixing this?
Thanks for any advice.