Search Results

Search found 1627 results on 66 pages for 'serial'.

Page 10/66 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Garbage data from serial port.

    - by sasayins
    Hi I wrote a code in Linux platform that read the data in serial port, my code below: int fd; char *rbuff=NULL; struct termios new_opt, old_opt; int ret; fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY); if( fd == -1 ) { printf("Can't open file: %s\n", strerror(errno)); return -1; } tcgetattr(fd, &old_opt); new_opt.c_cflag = B115200 | CS8 | CLOCAL | CREAD; new_opt.c_iflag = IGNPAR /*| ICRNL*/; new_opt.c_oflag = 0; new_opt.c_lflag = ICANON; tcsetattr(fd, TCSANOW, &new_opt); rbuff = malloc(NBUFF); printf("reading..\n"); memset(rbuff,0x00,NBUFF); ret = read(fd, rbuff, NBUFF); printf("value:%s",rbuff); if(ret == -1) { printf("Read error:%s\n",strerror(errno)); return -1; } tcsetattr(fd, TCSANOW, &old_opt); close(fd); My problem is the code above doesn't read the first data that was transmitted, then the second transmission the data is garbage, then the third is the normal data. Did I missed a setting in the serial port? Thanks.

    Read the article

  • access DLLs with java script

    - by Caio Garcia
    I need to read the serial port as an input for a web based applicaton. I know that the browser can't do it, but if I build an DLL and send it to my client, can I access this DLL and read de serial port with an java script or i will need something like ActiveX?

    Read the article

  • Oracle parameter array binding from c# executed parallel and serial on different servers

    - by redir_dev_nut
    I have two Oracle 9i 64 bit servers, dev and prod. Calling a procedure from a c# app with parameter array binding, prod executes the procedure simultaneously for each value in the parameter array, but dev executes for each value serially. So, if the sproc does: select count(*) into cnt from mytable where id = 123; if cnt = 0 then insert into mytable (id) values (123); end if; Assuming the table initially does not have an id = 123 row. Dev gets cnt = 0 for the first array parameter value, then 1 for each of the subsequent. Prod gets cnt = 0 for all array parameter values and inserts id 123 for each. Is this a configuration difference, an illusion due to speed difference, something else?

    Read the article

  • Dual-boot two instances of the same copy of Vista using same serial number

    - by fred.bear
    I have a single Vista OEM registration number which has been registered to the current hardware (single partition only), and I want to use it for two instances of dual-booted Vista... Because both Vistas will be running on the same hardware, (and obviously only one at any one time), will they both be recognized as genuine to Windows Update etc... ie will they both pass the Windows Genuine Advantage requirements? .. The only difference between the hardware involved will be the partition. Also, are there any special issues with dual (tripple?) booting two instances of Vista and also one Ubuntu OS?

    Read the article

  • How to generate Serial Keys? [closed]

    - by vincent mathew
    Which software can I use to generate Product keys if I have the GroupId, KeyId, Secret and Hash for the generation? Edit: I had seen a post which generated Product Keys using this information. [Additional Key Details/Activation Decryption*: GroupId = 86f 2159 KeyId = ed46 60742 Secret = e0cdc320ba048 3954789545910344 Hash = 5f 95 ] So I was wondering if there is any software which could generate keys using this information? Thanks.

    Read the article

  • How to group a serial of objects according to timestamp

    - by Benny
    I have a serial of object defined as: public class Foo { public DateTime Time {get;set;} } now I want to group objects(IEnumerable<Foo>) according to the time, e.g. I want to group them according to hour or day or month. for example (group into hour): group 1(13:00-14:00) : foo1, foo2, foo3 group 2(14:00-15:00): foo4, foo5 How to write LINQ? hope I made myself clear.

    Read the article

  • git difftool, open all diff files immediately, not in serial

    - by Seba Illingworth
    The default git diff behavior is to open each diff file in serial (wait for previous file to be closed before opening next file). I'm looking for a way to open all the files at once - in BeyondCompare for example this would open all the files in tabs within the same BC window. This would make it easier to review a complex set of changes; flick back and forwards between the diff files and ignore unimportant files.

    Read the article

  • virtual serial port on Arch linux

    - by Milan
    Hello, I am using Arch linux and I need to create virtual serial port on it. I tried everything but it seems doesnt work. All I want is to connect that virtual port to another virtual port over TCP and after that to use it in my python application to communicate with python application to other side. Is that posible? Please help me. Thanx

    Read the article

  • Update the Progress bar using winforms c#

    - by karthik
    There is a functionality in my module, where the user can scan the number of serial ports in the system and when the user clicks "Auto scan" button, the code will have to go through each serial port and send a test message and wait for the reply. I am using Progress bar control to show process of autoscan. For which i need to pass the value to "x" and "Y" in my code to update the bar. How can i pass the value since my code is already in a foreach loop for getting the serialports. Y = should pass the value of total number of serial ports X = should iterate through each port and pass the value Hope i am clear with req. private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { string strAckData = ""; foreach (SerialPort sp in comPortsList) { sp.Open(); string sendData = "Auto scan"; sp.Write(sendData); strAckData += "Connection live on port " + sp.ReadExisting() + "\n"; sp.Close(); double dIndex = (double)x; **//How to pass the value here ?** double dTotal = (double)y; **//How to pass the value here ?** double dProgressPercentage = (dIndex / dTotal); int iProgressPercentage = (int)(dProgressPercentage * 100); // update the progress bar backgroundWorker1.ReportProgress(iProgressPercentage); } richTextBox1.Invoke(new MethodInvoker(delegate { richTextBox1.Text = strAckData; })); } private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e) { ProgressBar.Value = e.ProgressPercentage; } private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { StatusLabel.Text = "Auto Scan completed"; }

    Read the article

  • Android 3.1+ USB as virtual COM port

    - by ZachMc
    I have a third party usb device, that when plugged into a Windows machine, is recognized as a serial device and assigned to the COM 4 port. I can communicate with the device just like I would with a device connected via a serial port. For instance, I can write "abc" serially to the device via the USB connection. I have been searching for a way to do a similar thing in Android. If I try the Usb Host method, and use a UsbManager to open the UsbDevice, I can get one interface, with 2 endpoints. I have tried sending control messages using the method in UsbDeviceConnection, but the method returns -1 for everything (though I don't know what I should use for the parameters of that method). Is there a way to get an OutputStream that I can write to that will send bytes to the USB device? Right now I am looking at recompiling the kernel to include a virtual COM port driver and write some native code to be able to do this. Thanks! Edit: I am using the FTDI serial to USB converter circuit. Is this compatible with Android?

    Read the article

  • How do I Connect a 30yr-old Tandy 1400LT laptop to the internet?

    - by Clemens Bergmann
    Just for the fun of it, I want to get an old Tandy 1400LT laptop: small monochrome display two floppy drives rs-232c connector "printer" connector connect the thing the internet and use it as an ssh terminal. How would I connect it to the internet? The software should be no problem as it is a 386 hardware. There should be a small linux distribution which can be run on it. But how would I phisically connect the hardware? It has no ethernet port. Has someone experience with Serial/Paralel-to-ethernet converters?

    Read the article

  • Can't communicate using PuTTY, but can with Termite

    - by SharpHawk
    I'm trying to establish a serial connection to a peripheral from my PC's RS-232 port. Pretty simple stuff, and I've had not trouble doing it with countless peripherals before. And yet when I configure PuTTY to the right baud rate, stop bits, etc. I'll type in "*IDN?", press enter, and the unit won't reply. After going over my settings over and over again, I decided to try another terminal program, Termite. This time it worked like a charm. What puzzles me, and what I'm trying to figure out by posting this question, is why Termite would work when PuTTY did not despite the fact that they both have the same settings. PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Termite: http://www.compuphase.com/software_termite.htm EDIT: I now tried Tera Term as well, and it works. So PuTTY is the odd one out.

    Read the article

  • Is there a way to identify the device data is being received from? (python)

    - by Ed Prince
    Summary I have an MT4000 device connected to my computer using the serial port ttyS0. This is broadcasting data which is being received and read by a udp listener written in Python. I am also sending data manually through the terminal using a bash script I wrote. The Goal Is it possible to identify the device being used? The aim is for a web-page to allow the user to select which device they wish to see the data being sent. I would rather achieve this by directly identifying the device rather than saying anything from ttyS0, in case a different device is plugged in on that port. The Answer Is this possible, and if so, how? Everything I have found so far, is on identifying through a specific port.

    Read the article

  • How can I accurately determine the age of a hard drive?

    - by Todd Stout
    Yes, if it's large, heavy, and only 65 Meg in capacity, you can assume it's ancient. An RLL controller would positively indicate the drive is from antiquity. What about drives that are only 3 or 4 years old? If I know the serial number, make and model is there a public database that indicates a manufacturing date? Update: As trite as this question might seem to some, the hard drive I was looking at that precipitated this question had no obvious manufacturing date stamped on it. I realize that most do. I think the answers given are very useful to myself and others.

    Read the article

  • Text on Cisco ASA console is garbled/missing letters

    - by Some Linux Nerd
    I've actually looked up a number of solutions for this problem and none of them work. There's this Cisco ASA 5505 that I'd like to use, that outputs mildly garbled text with missing characters. I did some googling and found that the most likely problem is a bad baud rate, so I tried all the baud rates, 7N1, 8N2... basically every possibility minicom had. Then I figured (since I can type ok, just not read) that if I factory reset it that it would fix whatever is set wrong with the terminal. That didn't work either. This usb-db9 adapter and console cable work fine on the catalyst switch in our office. My serial settings are 9600 8N1 with no flow control. Anyone know how to fix this? I have an example of the text on pastebin: http://pastebin.com/MAJF0mVU - it's just lots of "Dfaut cnfiuraionfil cotais 1enty." instead of "Default configuration blah blah"

    Read the article

  • How do I find the Serial Number of a USB Drive?

    - by jamuraa
    I'm trying to re-enable USB Autoplay in a secure way, by installing a program on each of the computers that I use so that I can run my launcher (PStart in this case) whenever I plug in my specific USB drive. The tool that I'm using to enable this - AutoRunGuard - needs the serial number of the USB drive that I am using. I can't figure out where to find this in Windows. Ideally I would not need to install and run a separate program to do this (seemingly) simple task. Since this is a pretty easy question, bonus points if you also tell me how to discover it in Linux as well. What steps do I need to take to retrieve a USB Drive's serial number? UPDATE: Just incase people come here looking for the answer for AutoRunGuard, I discovered that they don't want the USB device serial number, but the volume serial number. The drive serial can be found by going into the command line, navigating to the drive, and executing dir. The volume serial number is found in the top two lines - use it without the dash.

    Read the article

  • Problem receving in RXTX

    - by drhorrible
    I've been using RXTX for about a year now, without too many problems. I just started a new program to interact with a new piece of hardware, so I reused the connect() method I've used on my other projects, but I have a weird problem I've never seen before. The Problem The device works fine, because when I connect with hyperterminal, I send things and receive what I expect, and Serial Port Monitor(SPM) reflects this. However, when I run the simple hyperterminal-clone I wrote to diagnose the problem I'm having with my main app, bytes are sent, according to SPM, but nothing is received, and my SerialPortEventListener never fires. Even when I check for available data in the main loop, reader.ready() returns false. If I ignore this check, then I get an exception, details below. Relevant section of connect() method // Configure and open port port = (SerialPort) CommPortIdentifier.getPortIdentifier(name) .open(owner,1000) port.setSerialPortParams(baud, databits, stopbits, parity); port.setFlowControlMode(fc_mode); final BufferedReader br = new BufferedReader( new InputStreamReader( port.getInputStream(), "US-ASCII")); // Add listener to print received characters to screen port.addEventListener(new SerialPortEventListener(){ public void serialEvent(SerialPortEvent ev) { try { System.out.println("Received: "+br.readLine()); } catch (IOException e) { e.printStackTrace(); } } }); port.notifyOnDataAvailable(); Exception java.io.IOException: Underlying input stream returned zero bytes at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:268) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.fill(BufferedReader.java:136) at java.io.BufferedReader.read(BufferedReader.java:157) at <my code> The big question (again) I think I've eliminated all possible hardware problems, so what could be wrong with my code, or the RXTX library? Edit: something interesting When I open hyperterminal after sending a bunch of commands from java that should have gotten responses, all of the responses appear immediately, as if they had been put in the buffer somewhere, but unavailable. Edit 2: Tried something new, same results I ran the code example found here, with the same results. No data came in, but when I switched to a new program, it came all at once. Edit 3 The hardware is fine, and even a different computer has the same problem. I am not using any sort of USB adapter. I've started using PortMon, too, and it's giving me some interesting results. Hyperterminal and RXTX are not using the same settings, and RXTX always polls the port, unlike HyperTerminal, but I still can't see what settings would affect this. As soon as I can isolate the configuration from the constant polling, I'll post my PortMon logs. Edit 4 Is it possible that some sort of Windows update in the last 3 months could have caused this? It has screwed up one of my MATLAB mex-based programs once. Edit 5 I've also noticed some things that are different between HyperTerminal, RXTX, and a separate program I found that communicates with the device (but doesn't do what I want, which is why I'm rolling my own program) HyperTerminal - set to no flow control, but Serial Port Monitor's RTS and DTR indicators are green Other program - not sure what settings it thinks it's using, but only SPM's RTS indicator is green RXTX - no matter what flow control I set, only SPM's CTS and DTR indicators are on. From Serial Port Monitor's help files (paraphrased): the indicators display the state of the serial control lines RTS - Request To Send CTS - Clear To Send DTR - Data Terminal Ready

    Read the article

  • Binary data from a serial port in linux using c

    - by user1680393
    I am reading binary data from a serial port on Phidget sbc using Linux to get a command from an application running on a PC. I wrote a test program in VB to read the data into a byte array and convert it to decimal to use it but can’t figure out how to do it in c. I am unable to come up with anything with the research I have done on the internet. Command sent from PC is 0x0F. To check if I am getting correct data I read the data and send it back. Here is what I get back. Returned data has a carriage return added to it. Hex Display 0F00 0000 0D ‘\’ Display \0F\00\00\00\r Normal display just display a strange character. This tells me that the data is there that I can use, but can’t figure out to extract the value 0F or 15. How can I convert the incoming data to use it? I tried converting the received data using strtol, but it returns 0. I also tried setting the port to raw but it did not make any difference. unsigned char buffer1[1]; int ReadPort1() { int result; result = read(file1, &buffer1,1); if(result > 0) { WritePort1(buffer1); sprintf(tempstr, "Port1 data %s %d", buffer1, result); DisplayText(2,tempstr); } return result; } Port Open/Setup void OpenPort1() { //file1 = open("/dev/ttyUSB1", O_RDWR | O_NOCTTY | O_NONBLOCK); file1 = open("/dev/ttyUSB1", O_RDWR | O_NOCTTY | O_NODELAY); if(file1 < 0) printf("Error opening serial port1.\n"); else { SetPort(file1, 115200, 8, 1, 0, 1); port1open = 1; } } void SetPort(int fd, int Baud_Rate, int Data_Bits, int Stop_Bits, int Parity, int raw) { long BAUD; // derived baud rate from command line long DATABITS; long STOPBITS; long PARITYON; long PARITY; struct termios newtio; switch (Baud_Rate) { case 115200: BAUD = B115200; break; case 38400: BAUD = B38400; break; case 19200: BAUD = B19200; break; case 9600: BAUD = B9600; break; } //end of switch baud_rate switch (Data_Bits) { case 8: default: DATABITS = CS8; break; case 7: DATABITS = CS7; break; case 6: DATABITS = CS6; break; case 5: DATABITS = CS5; break; } //end of switch data_bits switch (Stop_Bits) { case 1: default: STOPBITS = 0; break; case 2: STOPBITS = CSTOPB; break; } //end of switch stop bits switch (Parity) { case 0: default: //none PARITYON = 0; PARITY = 0; break; case 1: //odd PARITYON = PARENB; PARITY = PARODD; break; case 2: //even PARITYON = PARENB; PARITY = 0; break; } //end of switch parity newtio.c_cflag = BAUD | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD; newtio.c_iflag = IGNPAR; if(raw == 1) { newtio.c_oflag &= ~OPOST; newtio.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); } else { newtio.c_lflag = 0; //ICANON; newtio.c_oflag = 0; } newtio.c_cc[VMIN]=1; newtio.c_cc[VTIME]=0; tcflush(fd, TCIFLUSH); tcsetattr(fd,TCSANOW,&newtio); }

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >