0

Thin Client(Arduino + WiFi Shield) cannot connect to the Daemon

asked 2014-04-08 00:51:36 -0700

hj.yang gravatar image

updated 2014-04-08 00:54:34 -0700

I can connect Thin Client(Arduino + Ethernet Shield) to the Daemon

but, I cannot connect Thin Client(Arduino + WiFi Shield) to the Daemon(Android)

First I create a WIFI control implementation in arduino sketch.

Next I change ajtcl\target\arduino\aj_net.c file for WiFiUdp.

but But the arduino cannot connect.

this is my log.

Attempting to connect to open SSID: IoT_NETWORKING
Connected: 192.168.0.47
Hello
026.665 aj_creds.cpp:151 AJ_GetLocalGUID(localGuid=0x0x20087fb0)
026.671 aj_nvram.cpp:298 AJ_NVRAM_Exist(id=1.)
026.675 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.)
026.679 aj_nvram.cpp:88 AJ_FindNVEntry(): data=NULL
026.683 aj_nvram.cpp:149 AJ_NVRAM_Open(id=1., mode="w", capacity=16.)
026.689 aj_nvram.cpp:298 AJ_NVRAM_Exist(id=1.)
026.693 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.)
026.697 aj_nvram.cpp:88 AJ_FindNVEntry(): data=NULL
026.702 aj_nvram.cpp:99 AJ_NVRAM_Create(id=1., capacity=16.)
026.707 aj_nvram.cpp:298 AJ_NVRAM_Exist(id=1.)
026.711 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.)
026.715 aj_nvram.cpp:88 AJ_FindNVEntry(): data=NULL
026.719 aj_nvram.cpp:74 AJ_FindNVEntry(id=65535.)
026.724 aj_nvram.cpp:84 AJ_FindNVEntry(): data=0x0x200714c8
026.729 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.)
026.733 aj_nvram.cpp:84 AJ_FindNVEntry(): data=0x0x200714c8
026.738 aj_nvram.cpp:227 AJ_NVRAM_Write(ptr=0x0x20087fb0, size=16., handle=0x0x20072988)
026.746 aj_nvram.cpp:284 AJ_NVRAM_Close(handle=0x0x20072988)

026.837 aj_helper.cpp:273 AJ_StartService2(bus=0x0x200705c4, daemonName="org.alljoyn.bus.daemon", timeout=10000., connected=0., port=42., name="org.alljoyn.bus.bundle.tests.ping", flags=0x4, opts=0x0x0)
026.855 aj_helper.cpp:282 AJ_StartService2(): AJ_FindBusAndConnect()
026.861 aj_connect.cpp:362 AJ_Connect(bus=0x0x200705c4, serviceName="org.alljoyn.bus.daemon", timeout=60000.)
026.870 aj_guid.cpp:125 AJ_GUID_ClearNameMap()
026.874 aj_disco.cpp:236 AJ_Discover(prefix="org.alljoyn.bus.daemon", service=0x0x20087f1c, timeout=60000.)
026.884 aj_net.cpp:312 AJ_Net_MCastUp(nexSock=0x0x20087eb0)
026.889 aj_net.cpp:332 AJ_Net_MCastUp(): status=AJ_OK
026.894 aj_disco.cpp:252 AJ_Discover(): WHO-HAS "org.alljoyn.bus.daemon"
026.900 aj_disco.cpp:78 ComposeWhoHas(txbuf=0x0x20087eb0, prefix="org.alljoyn.bus.daemon")
026.908 aj_net.cpp:231 AJ_Net_SendTo(buf=0x0x20087eb0)
026.913 aj_net.cpp:241 AJ_Net_SendTo(): beginPacket to 192.168.0.255, result = 1
026.921 aj_net.cpp:247 AJ_Net_SendTo(): SendTo write 30
026.926 aj_net.cpp:263 AJ_Net_SendTo(): status=AJ_OK
026.930 aj_disco.cpp:255 AJ_Discover(): status=AJ_OK
026.935 aj_net.cpp:269 AJ_Net_RecvFrom(buf=0x0x20087ec8, len=1454., timeout=1000.)
026.942 aj_net.cpp:276 AJ_Net_RecvFrom(): len 1454, rx 1454, timeout 1000
027.948 aj_net.cpp:283 AJ_Net_RecvFrom(): millis 27950, Last_call 26944, timeout 1000, Avail 0
027.956 aj_net.cpp:285 AJ_Net_RecvFrom(): read() returns -1, rx 1454
027.962 aj_net.cpp:288 AJ_Net_RecvFrom(): read() fails. status=AJ_ERR_READ
027.969 aj_net.cpp:298 AJ_Net_RecvFrom(): status=AJ_ERR_READ
027.974 aj_disco.cpp:252 AJ_Discover(): WHO-HAS "org.alljoyn.bus.daemon"
027.980 aj_disco.cpp:78 ComposeWhoHas(txbuf=0x0x20087eb0, prefix="org.alljoyn.bus.daemon")
027.988 aj_net.cpp:231 AJ_Net_SendTo(buf=0x0x20087eb0)
027.994 aj_net.cpp:241 AJ_Net_SendTo(): beginPacket to 192.168.0.255, result = 1
028.001 aj_net.cpp:247 ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-04-08 20:58:59 -0700

mitchw gravatar image

It seems that the Arduino WiFi shield does not fully support UDP out of the box. AllJoyn uses UDP, which is why you're running into this issue. You may be able to update the firmware on the Arduino WiFi shield to support UDP, you would need to check with the manufacturer and/or development team on that.

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

Question Tools

Follow
1 follower

Stats

Asked: 2014-04-08 00:51:36 -0700

Seen: 639 times

Last updated: Apr 08 '14