This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

pj talk
#5
Hi,


Try this to see the HEX values from cmd after string.char(0x01, 0x00, 0xA9, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x9A):

Code:
response_tbl['cmd']=lmcore.strtohex(cmd)


Are your commands processed? Sometimes you need to end a command like this:

Code:
res, err = sock:send(cmd .. '\r')


If you expect an answer from the socket after sending a command you need to switch to receive mode like this:


Code:
s, status, partial = sock:receive(1024) -- 1024 is expected response length and be sure to set socket timeout like this sock:settimeout(2) before sending a command


Good luck!

BR,

Erwin
Reply


Messages In This Thread
pj talk - by npinguin - 24.04.2016, 16:56
RE: pj talk - by admin - 24.04.2016, 17:09
RE: pj talk - by npinguin - 24.04.2016, 18:29
RE: pj talk - by npinguin - 24.04.2016, 19:44
RE: pj talk - by Erwin van der Zwart - 24.04.2016, 22:02
RE: pj talk - by npinguin - 25.04.2016, 17:13
RE: pj talk - by npinguin - 30.11.2017, 14:43
RE: pj talk - by admin - 30.11.2017, 18:38
RE: pj talk - by npinguin - 30.11.2017, 19:13

Forum Jump: