serial-port

How can I send data from a web page to a serial port?

廉价感情. 提交于 2019-12-17 20:58:21
问题 I have a web page which includes a basic content. I can chance its format but it is PHP now. I want to send this data to one of the serial ports of my computer (as a visitor of PHP page). I need a code for transferring this data from internet to one of the serial-ports. It can be C++, javascript, C# or anything else. I am using Windows (as a visitor of web page). So, I need to send datas to serial port of visitor's computer not server's. Reading is not necessary. Which program and process is

automatically changing RTS for RS-485 communication

我的梦境 提交于 2019-12-17 20:56:50
问题 I'm trying to setup half duplex communication in my program. I have my RS485 transceiver using the RTS flag (TIOCM_RTS) to toggle back and forth between transmit and receive. And to send/receive data I need to change RTS flag manually: Set RTS to High. Send data. Set RTS to low. int setRTS(int level) { int status; ioctl(ser_port, TIOCMGET, &status); if(level) { status |= TIOCM_RTS; } else { status &= ~TIOCM_RTS; } ioctl(ser_port, TIOCMSET, &status); return 1; } My question is: shouldn't the

Why characters received in serial connection only after pressing enter?

佐手、 提交于 2019-12-17 20:52:27
问题 I have a simple PC to board connection using serial (9600, no parity, 8 bits, no hw flow) I opened simple terminal *with teraterm) in PC and enter keys in teraterm and in board, I just do cat /dev/ttyO5 I see the pressed characters in scope, but I see the characters in the board console, only after pressing "enter" in teraterm (as if they are stored in some FIFO in Linux driver which only enter triggers out) why are the characters received in Linux driver only when pressing enter key ? Is

How to display weight from weighing scale into a textbox via serial port RS-232 or usb converter?

别说谁变了你拦得住时间么 提交于 2019-12-17 20:27:45
问题 I've been assigned to display weight from weighing scale (CAS CI-201A) into a textbox using C#. The weight will be sent via serial port RS-232 or USB converter. The scale is with me but I don't know where to start. How can I achieve my goal? 回答1: Have you tried anything yet? If you want to use the serial port it makes sense to first give the user a way to select which port to use. This can be done easily, by filling a combobox with all available ports. private void Form1_Load(object sender,

SerialPort Class issues

半世苍凉 提交于 2019-12-17 20:08:30
问题 I am having a lot of issues trying to get a serial port to receive the correct message. It keeps truncating the messages. Here is my code and I will try to elaborate after the code. public SerialComms(SerialPort sp) { this.sp = sp; this.sp.Open(); this.sp.DataReceived += new SerialDataReceivedEventHandler(sp_DataReceived); do { Console.WriteLine("port open waiting message"); Console.ReadKey(); } while(!_terminate); this.sp.Close(); } void sp_DataReceived(object sender,

How do I determine which process is using a serial port?

拥有回忆 提交于 2019-12-17 18:34:14
问题 The company I work for makes hardware that communicates to the computer though a serial port. Third party companies write software that communicates with our hardware. There are times when I need to diagnose our hardware. However, a third party software app connects to the serial port when Windows starts up, blocking any other connection. I don't know the name of this application/service and it's not always the same one. Is there any way to either: Find the name/pid of the app/service that is

Bluetooth SPP between Android and other device, UUID and PIN questions

为君一笑 提交于 2019-12-17 17:36:12
问题 I'm trying to implement an Android application to receive data from a medical device but I can't get through the discovery process and get the phone and the device paired or connected to each other. Describing the medical device: The device is using Service Discovery Protocol (SDP) and Serial Port Profile (SPP). It starts an inquiry procedure to discover (up to 10) surrounding access points with matched COD Filter and Service Name. Then it sequentially establishes a connection (using Page

Working with linux serial port in C, Not able to get full data

五迷三道 提交于 2019-12-17 17:15:55
问题 I am working with Linux Serial port written in C. Below is my UART settings int fd; struct termios tty_attributes; fd = open(comport, O_RDWR | O_NOCTTY | O_SYNC | O_NONBLOCK ); if(fd < 0) { perror("open comport error.\n"); exit(EXIT_FAILURE); } else { if(tcgetattr(fd, &tty_attributes) == -1) { perror("tcgetattr termios function error.\n"); exit(EXIT_FAILURE); } tty_attributes.c_lflag = 0; tty_attributes.c_oflag = 0; tty_attributes.c_iflag = 0; tty_attributes.c_cflag &= ~(IGNBRK|BRKINT|PARMRK

How do I get the friendly name of a COM port in Windows?

泄露秘密 提交于 2019-12-17 16:07:24
问题 I have a GSM modem connected via USB. The modem creates 2 serial ports. The first is automatically attached to the modem, the second shows in Device Manager as "HUAWEI Mobile Connect - 3G PC UI Interface (COM6)" The second port is used to get vital information from the modem, such as signal quality; to send and receive text messages; and a whole host of other functions. I am writing an application that will wrap up some of the features provided by the second port. What I need is a sure fire

I/O exception error when using serialport.open()

China☆狼群 提交于 2019-12-17 15:46:25
问题 FINAL UPDATE It was our firmware the whole time. Embarrassing to a degree, but I'm happy we can move forward and I can put learning Java off for another day. My answer is below. UPDATE So I have more or less given up on this. I think it is a bug that goes down to the API, but I have neither the time, resources nor skill-set to get to the bottom of it. I think there exists some hardware to whom Windows just gives the middle finger. I have downloaded Eclipse, switched to Java and will try to