{"action":"created","issue":{"url":"https://api.github.com/repos/johnlauer/serial-port-json-server/issues/38","repository_url":"https://api.github.com/repos/johnlauer/serial-port-json-server","labels_url":"https://api.github.com/repos/johnlauer/serial-port-json-server/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/johnlauer/serial-port-json-server/issues/38/comments","events_url":"https://api.github.com/repos/johnlauer/serial-port-json-server/issues/38/events","html_url":"https://github.com/johnlauer/serial-port-json-server/issues/38","id":131282231,"number":38,"title":"How to","user":{"login":"osvikvi","id":15084394,"avatar_url":"https://avatars.githubusercontent.com/u/15084394?v=3","gravatar_id":"","url":"https://api.github.com/users/osvikvi","html_url":"https://github.com/osvikvi","followers_url":"https://api.github.com/users/osvikvi/followers","following_url":"https://api.github.com/users/osvikvi/following{/other_user}","gists_url":"https://api.github.com/users/osvikvi/gists{/gist_id}","starred_url":"https://api.github.com/users/osvikvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osvikvi/subscriptions","organizations_url":"https://api.github.com/users/osvikvi/orgs","repos_url":"https://api.github.com/users/osvikvi/repos","events_url":"https://api.github.com/users/osvikvi/events{/privacy}","received_events_url":"https://api.github.com/users/osvikvi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-04T08:57:08Z","updated_at":"2016-02-06T06:42:42Z","closed_at":null,"body":"First of all, Sorry for asking a dumb question.\r\n\r\nI'm wondering how I should formulate the string to send.\r\nI've installed SPJS on a windows machine, where I have a samsung monitor connected to the COM3 port. My intention is to be able to control this monitor remotely (ie from the webserver). \r\nCurrently I can control the monitor from the machine locally by a batch that I've written using [Serialsend.exe](https://github.com/tedburke/SerialSend) The batch looks like this:\r\n`@echo  off\r\nserialsend /baudrate 9600 /devnum 3 /hex \"\\xAA\\x11\\xFE\\x01\\x00\\x10\"\r\nexit`\r\nrunning this script will turn the screen off.\r\n\r\nNow for my question, How do I formulate this command into SPJS?\r\n\r\nI've successfully opened the correct port using 'open com3 9600' and tried to send various combinations of what I think the string could be, but untill now the screen has never responded.\r\nHere's the major strings I've tried, with the response from SPJS:\r\n```\r\nsend COM3 \"AA 11 FE 01 00 10\"\r\n{\"Cmd\":\"Queued\",\"QCnt\":1,\"Ids\":[\"\"],\"D\":[\"\\\"AA 11 FE 01 00 10\\\"\\n\"],\"Port\":\"com3\"}\r\n{\"Cmd\":\"Write\",\"QCnt\":0,\"Id\":\"\",\"P\":\"com3\"}\r\n{\"Cmd\":\"CompleteFake\",\"Id\":\"\",\"P\":\"com3\"}\r\n```\r\n```\r\nsendjson {\"P\":\"COM3\",\"Data\":[{\"D\": \"AA 11 FE 01 00 10\\n\", \"Id\":\"123\"}]}\r\n{\"Cmd\":\"Queued\",\"QCnt\":1,\"P\":\"com3\",\"Data\":[{\"D\":\"AA 11 FE 01 00 10\\n\",\"Id\":\"123\",\"Pause\":0}]}\r\n{\"Cmd\":\"Write\",\"QCnt\":0,\"Id\":\"123\",\"P\":\"com3\"}\r\n{\"Cmd\":\"CompleteFake\",\"Id\":\"123\",\"P\":\"com3\"}\r\n```\r\n\r\nI'm really lost here, I don't see what I'm doing wrong, any suggestions are appreciated.\r\n\r\nthanks, \r\nosvikv"},"comment":{"url":"https://api.github.com/repos/johnlauer/serial-port-json-server/issues/comments/180706560","html_url":"https://github.com/johnlauer/serial-port-json-server/issues/38#issuecomment-180706560","issue_url":"https://api.github.com/repos/johnlauer/serial-port-json-server/issues/38","id":180706560,"user":{"login":"osvikvi","id":15084394,"avatar_url":"https://avatars.githubusercontent.com/u/15084394?v=3","gravatar_id":"","url":"https://api.github.com/users/osvikvi","html_url":"https://github.com/osvikvi","followers_url":"https://api.github.com/users/osvikvi/followers","following_url":"https://api.github.com/users/osvikvi/following{/other_user}","gists_url":"https://api.github.com/users/osvikvi/gists{/gist_id}","starred_url":"https://api.github.com/users/osvikvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osvikvi/subscriptions","organizations_url":"https://api.github.com/users/osvikvi/orgs","repos_url":"https://api.github.com/users/osvikvi/repos","events_url":"https://api.github.com/users/osvikvi/events{/privacy}","received_events_url":"https://api.github.com/users/osvikvi/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T06:42:42Z","updated_at":"2016-02-06T06:42:42Z","body":"Than I just don't understand what I 'm doing wrong.  Can you confirm I need\nto send nothing more than \"open com3 9600\" and \"send com3 + commandstring\"\nActually it's hexadecimals that need to be received by the device connected\nto the serial port.\nMy server is running on XP without firewalls, the clients are on W7.\nOpening the port is working,  only the commands are not being (received /\nunderstood) is there a debugging or logging option on the server side? So I\ncan at least figure out where the problem lies.\n\nThanks\nOn 5 Feb 2016 5:55 pm, \"John Lauer\" <notifications@github.com> wrote:\n\n> Serial Port JSON Server was made for exactly what you said “All I want to\n> do is send a simple command through a webinterface so that I can control a\n> serial device”.\n>\n> You previously said you need to send binary values to your device. Sending\n> digits is still text.\n>\n> From: osvikvi [mailto:notifications@github.com]\n> Sent: Friday, February 5, 2016 4:51 AM\n> To: johnlauer/serial-port-json-server <\n> serial-port-json-server@noreply.github.com>\n> Subject: Re: [serial-port-json-server] How to (#38)\n>\n>\n> Thanks for the tip,\n> So I've converted my Hxadecimals to decimal values and sent that to SPJS\n> send COM3 170 17 254 1 0 16\\n\n> {\"Cmd\":\"Queued\",\"QCnt\":1,\"Ids\":[\"\"],\"D\":[\"170 17 254 1 0\n> 16\\\\n\\n\"],\"Port\":\"com3\"}\n> {\"Cmd\":\"Write\",\"QCnt\":0,\"Id\":\"\",\"P\":\"com3\"}\n> {\"Cmd\":\"CompleteFake\",\"Id\":\"\",\"P\":\"com3\"}\n> send COM3 170 17 254 1 0 16\n> {\"Cmd\":\"Queued\",\"QCnt\":1,\"Ids\":[\"\"],\"D\":[\"170 17 254 1 0\n> 16\\n\"],\"Port\":\"com3\"}\n> {\"Cmd\":\"Write\",\"QCnt\":0,\"Id\":\"\",\"P\":\"com3\"}\n> {\"Cmd\":\"CompleteFake\",\"Id\":\"\",\"P\":\"com3\"}\n>\n> But still no response from the screen.\n> Excuse me for my ignorance but I have no knowledge of what arduino, IoT or\n> fork is. n Wikipedia tells me it has something to do with Linux (what I\n> don't have).\n>\n> All I want to do is send a simple command through a webinterface so that I\n> can control a serial device from a remote computer, preferably with a\n> single url or button on a webpage.\n> Please tell me if this is possible with SPJS or not.\n>\n> Thanks and once more, excuse me for my ignorance.\n>\n> —\n> Reply to this email directly or view it on GitHub<\n> https://github.com/johnlauer/serial-port-json-server/issues/38#issuecomment-180340730>.\n>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/johnlauer/serial-port-json-server/issues/38#issuecomment-180438510>\n> .\n>\n"}}