serial-port

Any pins on rs232 which can be used to detect voltage as input

﹥>﹥吖頭↗ 提交于 2020-01-14 05:53:53
问题 Is there a way i can get a voltage input using rs232? What i am doing now is i have 2 pc hooked up to rs232 to communicate using gnd, tx and rx pin. Ive also connect DTR to a switch and when the switch is pressed im able to get a voltage output to drive a LED. What i want to do now is that when the led lights up, i will somehow get a input and change some stuffs in m programming. Is it possible to do that? Thanks in advance. P.S. Im doing C# programming 回答1: Not directly. Your port RS323

Any pins on rs232 which can be used to detect voltage as input

断了今生、忘了曾经 提交于 2020-01-14 05:53:48
问题 Is there a way i can get a voltage input using rs232? What i am doing now is i have 2 pc hooked up to rs232 to communicate using gnd, tx and rx pin. Ive also connect DTR to a switch and when the switch is pressed im able to get a voltage output to drive a LED. What i want to do now is that when the led lights up, i will somehow get a input and change some stuffs in m programming. Is it possible to do that? Thanks in advance. P.S. Im doing C# programming 回答1: Not directly. Your port RS323

CRC Reverse Engineer (Checksum from Machine / PC)

喜欢而已 提交于 2020-01-14 05:29:07
问题 I'm currently looking for on how to determine the CRC produced from the machine to PC (and vice-versa). The devices are communicating using serial communication or RS232 cable. I do only have data to be able for us to create a program to be used for both devices. The data given was from my boss and the program was corrupted. So we are trying for it to work out. I hope everyone can help. Thanks :) 回答1: The sequence to use for the CRC calculation in your protocol is the ASCII string starting

Missing flow control data (0x13) from reading device data stream

青春壹個敷衍的年華 提交于 2020-01-14 03:40:08
问题 I have written a Linux app to read & write binary data to a remote device over a USB port that is emulating a serial port. When I read data from the device, I have a USB sniffer that shows a binary data stream like this (0x01, 0x0A......0x13), but when my program reads the bytes, the 0x13 is not in the byte stream - this is the XOFF char, but I am not using XON/XOFF flow control (I think). Tried both open read and write, as well as fopen fread and fwrite in binary mode, same result. Any ideas

Reading from serial port in a Ruby on Rails application hangs

不羁的心 提交于 2020-01-13 10:54:09
问题 I'm using the serialport gem to read from the serial port in my Ruby on Rails 3.2 application. The serial port itself is used to write data from an Arduino board. The gem is added to Gemfile . The port is initialized in application.rb : config.serial_port = SerialPort.new "/devttyACM0", 9600 config.serial_port.read_timeout = 100 The problem appears when I try to read from this port. @sp = ProjectName::Application::config.serial_port @sp.read The application hangs deadly. I've tried to perform

Reading from serial port in a Ruby on Rails application hangs

大城市里の小女人 提交于 2020-01-13 10:53:26
问题 I'm using the serialport gem to read from the serial port in my Ruby on Rails 3.2 application. The serial port itself is used to write data from an Arduino board. The gem is added to Gemfile . The port is initialized in application.rb : config.serial_port = SerialPort.new "/devttyACM0", 9600 config.serial_port.read_timeout = 100 The problem appears when I try to read from this port. @sp = ProjectName::Application::config.serial_port @sp.read The application hangs deadly. I've tried to perform

Reading from serial port in a Ruby on Rails application hangs

。_饼干妹妹 提交于 2020-01-13 10:53:15
问题 I'm using the serialport gem to read from the serial port in my Ruby on Rails 3.2 application. The serial port itself is used to write data from an Arduino board. The gem is added to Gemfile . The port is initialized in application.rb : config.serial_port = SerialPort.new "/devttyACM0", 9600 config.serial_port.read_timeout = 100 The problem appears when I try to read from this port. @sp = ProjectName::Application::config.serial_port @sp.read The application hangs deadly. I've tried to perform

using serial port in python3 asyncio

♀尐吖头ヾ 提交于 2020-01-13 08:18:31
问题 i'm trying and, so far, failing to use python asyncio to access a serial port. i'd really appreciate any tips on using the new python async framework on a simple fd. Cheers! James 回答1: It's other way using FD import asyncio import serial s = serial.Serial('/dev/pts/13', 9600) def test_serial(): ''' read a line and print. ''' text = "" msg = s.read().decode() while (msg != '\n'): text += msg msg = s.read().decode() print(text) loop.call_soon(s.write, "ok\n".encode()) loop = asyncio.get_event

Is it possible to know the connection status of a RS232 port?

丶灬走出姿态 提交于 2020-01-12 10:48:15
问题 In a 9-pin cable, which signal/pin would you guys recommend to check the connection status? So far I'm using the DSR signal because, in the hardware I'm testing, if the cable is properly connected the DSR signal is 1 if it gets disconnected DSR goes to 0 . However with another drivers and/or operating systems DSR varies during message transmission or is always 0. So I don't find this DSR signal that reliable unless in controlled conditions at 25ºC in a sunny day. So how can I know at a given

Is it possible to know the connection status of a RS232 port?

北城余情 提交于 2020-01-12 10:48:00
问题 In a 9-pin cable, which signal/pin would you guys recommend to check the connection status? So far I'm using the DSR signal because, in the hardware I'm testing, if the cable is properly connected the DSR signal is 1 if it gets disconnected DSR goes to 0 . However with another drivers and/or operating systems DSR varies during message transmission or is always 0. So I don't find this DSR signal that reliable unless in controlled conditions at 25ºC in a sunny day. So how can I know at a given