Revision history [back]

click to hide/show revision 1
initial version

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

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) <node name="/BundledService"> <interface name="org.alljoyn.bus.bundle.tests.BundledService"> <method name="Ping"> <arg name="inStr" type="s" direction="in"/> <arg name="outStr" type="s" direction="out"/> </method> <method name="ON"> </method> <method name="OFF"> </method> <method name="brightness"> <arg name="inPercent" type="i" direction="in"/> </method> <method name="temperature"> <arg name="inVoltage" type="i" direction="in"/> </method> </interface> </node> 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 AJ_Net_SendTo(): SendTo write 30 028.006 aj_net.cpp:263 AJ_Net_SendTo(): status=AJ_OK 028.010 aj_disco.cpp:255 AJ_Discover(): status=AJ_OK 028.015 aj_net.cpp:269 AJ_Net_RecvFrom(buf=0x0x20087ec8, len=1454., timeout=1000.) 028.022 aj_net.cpp:276 AJ_Net_RecvFrom(): len 1454, rx 1454, timeout 1000 029.029 aj_net.cpp:283 AJ_Net_RecvFrom(): millis 29031, Last_call 28024, timeout 1000, Avail 0 029.037 aj_net.cpp:285 AJ_Net_RecvFrom(): read() returns -1, rx 1454 029.043 aj_net.cpp:288 AJ_Net_RecvFrom(): read() fails. status=AJ_ERR_READ 029.050 aj_net.cpp:298 AJ_Net_RecvFrom(): status=AJ_ERR_READ

I think g_clientUDP.parsePacket() is didn't work. so g_clientUDP.available() is zero.

How can i connect Thin client?

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

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

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

First I create a WIFI control implementation in arduino sketch. sketch.

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

but But the arduino cannot connect. connect.

this is my log. log.

Attempting to connect to open SSID: IoT_NETWORKING IoT_NETWORKING
Connected: 192.168.0.47 Hello 192.168.0.47
Hello
026.665 aj_creds.cpp:151 AJ_GetLocalGUID(localGuid=0x0x20087fb0) AJ_GetLocalGUID(localGuid=0x0x20087fb0)
026.671 aj_nvram.cpp:298 AJ_NVRAM_Exist(id=1.) AJ_NVRAM_Exist(id=1.)
026.675 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.) AJ_FindNVEntry(id=1.)
026.679 aj_nvram.cpp:88 AJ_FindNVEntry(): data=NULL data=NULL
026.683 aj_nvram.cpp:149 AJ_NVRAM_Open(id=1., mode="w", capacity=16.) capacity=16.)
026.689 aj_nvram.cpp:298 AJ_NVRAM_Exist(id=1.) AJ_NVRAM_Exist(id=1.)
026.693 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.) AJ_FindNVEntry(id=1.)
026.697 aj_nvram.cpp:88 AJ_FindNVEntry(): data=NULL data=NULL
026.702 aj_nvram.cpp:99 AJ_NVRAM_Create(id=1., capacity=16.) capacity=16.)
026.707 aj_nvram.cpp:298 AJ_NVRAM_Exist(id=1.) AJ_NVRAM_Exist(id=1.)
026.711 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.) AJ_FindNVEntry(id=1.)
026.715 aj_nvram.cpp:88 AJ_FindNVEntry(): data=NULL data=NULL
026.719 aj_nvram.cpp:74 AJ_FindNVEntry(id=65535.) AJ_FindNVEntry(id=65535.)
026.724 aj_nvram.cpp:84 AJ_FindNVEntry(): data=0x0x200714c8 data=0x0x200714c8
026.729 aj_nvram.cpp:74 AJ_FindNVEntry(id=1.) AJ_FindNVEntry(id=1.)
026.733 aj_nvram.cpp:84 AJ_FindNVEntry(): data=0x0x200714c8 data=0x0x200714c8
026.738 aj_nvram.cpp:227 AJ_NVRAM_Write(ptr=0x0x20087fb0, size=16., handle=0x0x20072988) handle=0x0x20072988)
026.746 aj_nvram.cpp:284 AJ_NVRAM_Close(handle=0x0x20072988) <node name="/BundledService"> <interface name="org.alljoyn.bus.bundle.tests.BundledService"> <method name="Ping"> <arg name="inStr" type="s" direction="in"/> <arg name="outStr" type="s" direction="out"/> </method> <method name="ON"> </method> <method name="OFF"> </method> <method name="brightness"> <arg name="inPercent" type="i" direction="in"/> </method> <method name="temperature"> <arg name="inVoltage" type="i" direction="in"/> </method> </interface> </node> 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) opts=0x0x0)
026.855 aj_helper.cpp:282 AJ_StartService2(): AJ_FindBusAndConnect() AJ_FindBusAndConnect()
026.861 aj_connect.cpp:362 AJ_Connect(bus=0x0x200705c4, serviceName="org.alljoyn.bus.daemon", timeout=60000.) timeout=60000.)
026.870 aj_guid.cpp:125 AJ_GUID_ClearNameMap() AJ_GUID_ClearNameMap()
026.874 aj_disco.cpp:236 AJ_Discover(prefix="org.alljoyn.bus.daemon", service=0x0x20087f1c, timeout=60000.) timeout=60000.)
026.884 aj_net.cpp:312 AJ_Net_MCastUp(nexSock=0x0x20087eb0) AJ_Net_MCastUp(nexSock=0x0x20087eb0)
026.889 aj_net.cpp:332 AJ_Net_MCastUp(): status=AJ_OK status=AJ_OK
026.894 aj_disco.cpp:252 AJ_Discover(): WHO-HAS "org.alljoyn.bus.daemon" "org.alljoyn.bus.daemon"
026.900 aj_disco.cpp:78 ComposeWhoHas(txbuf=0x0x20087eb0, prefix="org.alljoyn.bus.daemon") prefix="org.alljoyn.bus.daemon")
026.908 aj_net.cpp:231 AJ_Net_SendTo(buf=0x0x20087eb0) AJ_Net_SendTo(buf=0x0x20087eb0)
026.913 aj_net.cpp:241 AJ_Net_SendTo(): beginPacket to 192.168.0.255, result = 1 1
026.921 aj_net.cpp:247 AJ_Net_SendTo(): SendTo write 30 30
026.926 aj_net.cpp:263 AJ_Net_SendTo(): status=AJ_OK status=AJ_OK
026.930 aj_disco.cpp:255 AJ_Discover(): status=AJ_OK status=AJ_OK
026.935 aj_net.cpp:269 AJ_Net_RecvFrom(buf=0x0x20087ec8, len=1454., timeout=1000.) timeout=1000.)
026.942 aj_net.cpp:276 AJ_Net_RecvFrom(): len 1454, rx 1454, timeout 1000 1000
027.948 aj_net.cpp:283 AJ_Net_RecvFrom(): millis 27950, Last_call 26944, timeout 1000, Avail 0 0
027.956 aj_net.cpp:285 AJ_Net_RecvFrom(): read() returns -1, rx 1454 1454
027.962 aj_net.cpp:288 AJ_Net_RecvFrom(): read() fails. status=AJ_ERR_READ status=AJ_ERR_READ
027.969 aj_net.cpp:298 AJ_Net_RecvFrom(): status=AJ_ERR_READ status=AJ_ERR_READ
027.974 aj_disco.cpp:252 AJ_Discover(): WHO-HAS "org.alljoyn.bus.daemon" "org.alljoyn.bus.daemon"
027.980 aj_disco.cpp:78 ComposeWhoHas(txbuf=0x0x20087eb0, prefix="org.alljoyn.bus.daemon") prefix="org.alljoyn.bus.daemon")
027.988 aj_net.cpp:231 AJ_Net_SendTo(buf=0x0x20087eb0) AJ_Net_SendTo(buf=0x0x20087eb0)
027.994 aj_net.cpp:241 AJ_Net_SendTo(): beginPacket to 192.168.0.255, result = 1 1
028.001 aj_net.cpp:247 AJ_Net_SendTo(): SendTo write 30 30
028.006 aj_net.cpp:263 AJ_Net_SendTo(): status=AJ_OK status=AJ_OK
028.010 aj_disco.cpp:255 AJ_Discover(): status=AJ_OK status=AJ_OK
028.015 aj_net.cpp:269 AJ_Net_RecvFrom(buf=0x0x20087ec8, len=1454., timeout=1000.) timeout=1000.)
028.022 aj_net.cpp:276 AJ_Net_RecvFrom(): len 1454, rx 1454, timeout 1000 1000
029.029 aj_net.cpp:283 AJ_Net_RecvFrom(): millis 29031, Last_call 28024, timeout 1000, Avail 0 0
029.037 aj_net.cpp:285 AJ_Net_RecvFrom(): read() returns -1, rx 1454 1454
029.043 aj_net.cpp:288 AJ_Net_RecvFrom(): read() fails. status=AJ_ERR_READ status=AJ_ERR_READ
029.050 aj_net.cpp:298 AJ_Net_RecvFrom(): status=AJ_ERR_READ

I think g_clientUDP.parsePacket() is didn't work. so g_clientUDP.available() is zero.

How can i connect Thin client?