serial-port

how to merge C# code of two similar but separate programs?

孤街浪徒 提交于 2020-01-03 05:51:06
问题 ok so i have two programs. Code at end. one is a gmail notifier that outputs the number of unread mails over serial like: <02,> etc. then i have a program that gets system(pc) temps and outputs them to serial also like: <30,42,50,> etc they both output the same data and same format (<XX,>) at different time intervals(with different values each time). so the mail one checks every 5 minutes for mail, then outputs to serial the number of mails. but the temp program outputs the data over serial

Unable to get arduino serial communication working in wxpython GUI

房东的猫 提交于 2020-01-03 05:37:06
问题 This is the definition which is used to update the labels in the GUI: def updateV(self, event): """""" global v ser = serial.Serial( port='COM3', baudrate=9600) x = ser.read() # read one byte ser.close() print x if v>3: self.labelOne.SetBackgroundColour('red') self.labelOne.SetLabel('Battery Voltage : ' + x) else: self.labelOne.SetBackgroundColour('white') self.labelOne.SetLabel('Battery Voltage : ' + str(v)) self.Refresh() This is the simple arduino code i have been using: int a; void setup(

vb.net serial port character encoding

做~自己de王妃 提交于 2020-01-03 03:03:49
问题 I'm working with VB.NET and I need to send and receive bytes of data over serial. This is all well and good until I need to send something like 173. I'm using a Subroutine to send a byte that takes an input as an integer and just converts it to a character to print it. Private Sub PrintByte(ByVal input As Integer) serialPort.Write(Chr(input)) End Sub If i try PrintByte(173) Or really anything above 127 it sends 63. I thought that was a bit odd, so i looked up the ASCII table and it appears 63

rxtxSerial librxtx-java Ubuntu

戏子无情 提交于 2020-01-03 02:49:07
问题 I am getting the following error when I try to run my Java application: java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1878) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1087) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:123)

Using Linux pseudoterminal to test QSerialPort

戏子无情 提交于 2020-01-02 16:23:12
问题 I would like to test an application using Qt serial ports with a pseudoterminal. According to the man pages I implemented: // open master QSerialPort master("/dev/ptmx"); master.open(QSerialPort::ReadWrite); int master_fd = master.handle(); // get device name of slave pseudoterminal constexpr size_t PTSNAME_BUFFER_LENGTH = 128; char ptsname_buffer[PTSNAME_BUFFER_LENGTH]; if (ptsname_r(master_fd, ptsname_buffer, PTSNAME_BUFFER_LENGTH) != 0) return 0; // grant access to the slave if (grantpt

9 bits uart emulation with /dev/tty*

孤街醉人 提交于 2020-01-02 15:45:54
问题 I have a uncommon protocol, which requires 9600 baud, 9 bits and one stop bit. I can't find any driver, which can implement this sending/receiving. Can I send something to /dev/tty* for emulating these queries? What should I send? How can I emulate a 9600 baud rate? 回答1: You can use sticky parity, which is also called MARK and SPACE parity. termios.h supports this. However, you need to change the parity settings before sending address or data bytes accordingly and depending on the hardware,

USB-Serial communication giving strange output

馋奶兔 提交于 2020-01-02 11:44:27
问题 I'm trying to get data from a mercury analyzer (Seefelder-Messtechnik Hg Analyzer 3000) that gives output to a 9-pin R232 serial port to my OSX 10.10 laptop. I've followed the steps described here to install the PL-2303 driver: http://pbxbook.com/other/mac-tty.html The device manual (http://www.seefelder-messtechnik.com/V71-3-02-21e.pdf) lists the communication protocol as "9600 Baud, 8 data bit, 1 stop bit, no log, no parities". I attempt to read from the device by using the 'screen' command

USB-Serial communication giving strange output

梦想与她 提交于 2020-01-02 11:43:08
问题 I'm trying to get data from a mercury analyzer (Seefelder-Messtechnik Hg Analyzer 3000) that gives output to a 9-pin R232 serial port to my OSX 10.10 laptop. I've followed the steps described here to install the PL-2303 driver: http://pbxbook.com/other/mac-tty.html The device manual (http://www.seefelder-messtechnik.com/V71-3-02-21e.pdf) lists the communication protocol as "9600 Baud, 8 data bit, 1 stop bit, no log, no parities". I attempt to read from the device by using the 'screen' command

Discover serial ports in C#

半城伤御伤魂 提交于 2020-01-02 10:20:12
问题 I'm writing an application that communicates by sending bytes to the USB port. I'd like to allow the user to choose the port and to do that, I use SerialPort.GetPortNames() . Unfortunately, it returns an empty array. The method supposedly reads the registry for data (HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM), but the SERIALCOMM directory is missing. When I run the program on Linux, it lists my four USB ports, as expected. How can I fix the registry/discover the ports in a different

grabserial stops printing the log?

旧城冷巷雨未停 提交于 2020-01-02 10:00:12
问题 i tried Grabserial to measure the startup code of my embedded Linux device. It works somehow but after a while (that means a longer startup code - talking about > 26 s) it stops printing out the messages, but grabserial still is running - i have to hit the [CTRL-C] to retrieve control. I checked the serial port with putty and it's working so it's a problem with grabserial. But i can't think of what it is. I downloaded and installed with both of the 2 install-variants and it just changed the