Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 10 2008 at 15:57 | IP Logged
|
|
|
I've played with this for a while now and can't make any progress.
I need to send something this...
ph_sendsocketdata1( "192.168.0.102", 51721, 2, "®B®®C®EH_HA_CNTRL®P®imgAlbArt$$PIC_SET$$http://192.168.0.10 1/wuradar.gif®E®")
But something is throwing it off.
I've tried versions escaping the (R)'s as \174, the /'s as \047, and the $'s as \036 with no luck.
|
Back to Top |
|
|
eHomeCreations Groupie
Joined: February 02 2007 Location: Ukraine
Online Status: Offline Posts: 64
|
Posted: February 11 2008 at 03:18 | IP Logged
|
|
|
Tony
Use...
?B? for ppCMD_PARSER_JOB_BEGIN
?E? for ppCMD_PARSER_JOB_END
?P? for ppCMD_PARSER_PARAMS
?C? for ppCMD_PARSER_CMD
Pocket PC have the same problem. (at least the 2003 compact framework does) I will let you explain what you are trying to do...
__________________ --Steve http://www. ehomecreations.com
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 11 2008 at 07:54 | IP Logged
|
|
|
Thanks, but that didn't help. I keep getting this error...
An error occurred while processing the execution queue. Resetting execution queue and trying again.
I'll explain in a bit.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 14 2008 at 17:17 | IP Logged
|
|
|
Dave? Does anything jump out on this?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 19 2008 at 10:01 | IP Logged
|
|
|
Tony,
Im looking at this and comparing against the sourcecode and it looks as if everything should work. Does the function return a value? Or is the received data not correct?
I ran a test by using the ph_sendsocketdata1 function to structure the call into a valid SocketServer request to make sure that the encoding was being handled properly:
Code:
ph_sendsocketdata1("127.0.0.1",8500,0,"FORMULA~nAuthorizatio n: Basic YOUR_BASE64_USER_AND_PASS~nContent-Length: 98~n~nph_msgbox('Test','®B®®C®EH_HA_CNTRL®P®imgAlbArt$$PIC_S ET$$http://192.168.0.101/wuradar.gif®E®',30)")
|
|
|
The resulting messagebox displayed the data string perfectly. I was unable to get the execution queue error. Do you get this from the multi-editor or is is coming from within a macro? I did all of my testing from the multi-editor.
Let me know,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 19 2008 at 13:35 | IP Logged
|
|
|
No return data. It grinds for a bit and then throws that error in the log.
I believe I tried both in the multi-editor and in a macro.
Umm... Could this happen if, say, another app grabbed the port just before this executed?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 22 2008 at 22:17 | IP Logged
|
|
|
Could my db be hosed a bit?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 23 2008 at 20:50 | IP Logged
|
|
|
Tony,
I wouldnt think your database is hosed. Anything's possible, but I wouldnt expect that behaviour. I also wouldnt think another app merely grabbing the socket beforehand would cause the failure. If the socket couldnt be opened, it should fail gracefully with a return code.
With nothing else running, and just trying the code straight in the multi-editor, does it still fail? Another thing you may want to just give a try to is the ph_socket plugin. This gives the same functionality as ph_sendsocketdata (and then some) but runs in a separate thread.
If nothing else, perhaps a remote-control session and I might spot something.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 23 2008 at 23:33 | IP Logged
|
|
|
Running this simplified code...
ph_sendsocketdata("192.168.0.102",51721,"test")
...in the multi-editor yields nothing at all. Nothing in the lower pane, no error, nothing in the log.
Wait, this just came up:
Execution time: 22.281 seconds.
The formula evaluates to: *ERROR* - TIMEOUT WHILE CONNECTING
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 24 2008 at 00:10 | IP Logged
|
|
|
Tony,
That would be an indication that PowerHome was unable to open the socket at that IP address. Usually, this would mean that the port is already open by another device.
What kind of program is listening on the other end? I assume it's expecting TCP instead of UDP data but it almost seems like the listening port is not spawning other connections. What is typically done is a single listening socket accepts incoming connection requests that are handed off to another spawned socket connection. This is so multiple clients can connect simultaneously.
Let me know and Im sure we'll get it working.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 25 2008 at 16:12 | IP Logged
|
|
|
I tried using the ph_socket plugin, but I guess I was too tired to follow the docs. I'll try again soon.
Until then, I buckled and started using the command-line app that Steve includes and it works to send that string via sockets.
|
Back to Top |
|
|