[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: serial communication

From: iceyj21
Subject: Re: serial communication
Date: Thu, 22 Jun 2017 23:43:38 -0700 (PDT)

Andreas Weber-6 wrote
> I've also answered to your other, almost same question. I'll stick know
> on this thread.
> Am 22.06.2017 um 09:17 schrieb iceyj21:
>> Heres my code. Using cutecom to monitor the serial output of the rfid
>> reader
>> that I'm sending the hex values to I found that its receiving the
>> "auto_read" command and then sending hex values out. What I'm facing now
>> is
>> the inability to read those hex values with srl_read. the port is correct
>> and there is data that should be received but I'm not sure why octave
>> isn't.
>> When looking at the variable values "tag" isn't being assigned anything
>> form
>> the srl_write function.
>> ...
>> s3 = serial("/dev/cu.SLAB_USBtoUART",115200,2);
> Try to increase the timeout (2 -> 20)
>> set(s3, "dataterminalready", "off");
>> set(s3, "requesttosend", "off");
> Not needed since it's the default setting
>> pkt = [0xBB, 0x00, 0x08, 0x00, 0x00, 0x7E, 0x0B, 0x96];
> Does this include the correct CRC16?
>> srl_write(s3,uint8(pkt(i)));
> Just use srl_write(s3,uint8(pkt)); no need for the loop
>> srl_write(s3,uint8(auto_read(j)));
> Why do you send two commands?
>> [tag,n] = srl_read(s3,1000000);
> As I said in the other thread: make a hardware loopback between RX and
> TX (pin 2+3) and see if you receive the same string as you are sending.
> -- Andy
> _______________________________________________
> Help-octave mailing list

> Help-octave@


the crc is correct.The reason for the two commands are for two different
functions. The first one labeled "pkt" is to reset the reader, and the
second "auto_read" is to enable the auto read mode on the reader. Both
functions are working properly, when I connect to the reader using a serial
port utility program I'm able to receive the output so the transmission from
octave to the reader is functioning properly. the issue I'm facing now is
receiving data from the reader.

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]