Programming :: RS232 Configuration Is Not Doing Do Wanted Operation

Nov 29, 2010

I am writing a program to send data over serial port but the sending and reading operation is not occurring as desired to be... Below you can see the read and write parts. Could you please help me to find where I am doing wrong...

Reading Part:

Code:

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>

[code]....

When I compile and run the above programs Reading part does not read the 13 bytes once it first reads 8 byte then 8 again then 2 and so on. It always divides the sent data...

View 8 Replies


ADVERTISEMENT

Programming :: Rs232 Serial Port Programming?

Jun 1, 2010

I have been working on writing a small rs232 driver like minicom for months. I am almost there, I have the interrupt service routine running, I can read() ok. However when I write(), it returns the number of characters written, 1, but nothing is actually written out the port. I researched termios, and they say that serial port programming is really messy in linux/unix.

I am probably not setting up the port parameters correctly, or my write() function is not doing what it is supposed to. As I said, write() is returning successful. Other comm programs run ok (picocom & gtkterm) on my hardware. I am running knoppix/debian on an ancient computer. I saw other guys using slackware.

View 14 Replies View Related

Programming :: Communicate To RS232 Using Fstream?

Apr 1, 2009

I'm trying to attach an fstream to serial port for reading and writing with the following code:

Code:

#include <iostream>
#include <fstream>
#include <string>

[code]....

The code compiles without errors, but doesn't catch any input text from the device attached to RS232. I have tried it with Rx and Tx connected, but didn't receive my text back. It works OK if I substitute /dev/ttyS0 with an ordinary file, but any attempt to use /dev/ttyS0 seems to lead to an empty answer string. I tried this on a PC under Ubuntu Linux 7.10.

View 3 Replies View Related

Programming :: Transferring A Program Across Rs232?

Dec 16, 2009

I've started development on a ARM board. The ARM board displays it's command prompt through it's rs232 output. So I open putty/minicom (rs232 display) and can see and interact with the ARM linux system through my PC. The ARM root fs is on a USB pen, So I cross compile on my PC, then plug the pen into my PC copy the exe into the home/usr etc folder. Then unplug. plug it into the ARM boot the ARM and from my PC rs232 window can run the code. However plugging/unplugging is taking an age, I'm sure there must be a way to transfer the exe across the rs232. I've tried to use putty minicom to do so throught various methods xmodem etc but don't seem to be able to. I think I must have to do something on the ARM end but am unsure what?

View 7 Replies View Related

Programming :: Streamout Command To RS232 - Send Something Through Serial Port?

Aug 5, 2010

I want to send something through the serial port, for example

[code]...

the point here is send some numbers to a couple of 7 seg displays, so I will wire a RS232 chip on a protoboard, the logic after the RS232 is not an issue, but how can I assure the data is being sent right from my linux box to the RS232 chip, the one on the protoboard? Do I have to write a C program to read the strings and then send them to the serial port?For example if I wanted to send this to the displays:

[code]...

So I guess the simplest way is (Supposing I can deal with the stream so it is filtered and only display the number array) $ ifstat > /dev/ttyS0 But, how do I know if the RS232 will take them as the right characters?

View 3 Replies View Related

Programming :: How To Remove Un-wanted Text?

Dec 16, 2010

I am trying to parse some information from a webpage and store the output into an array. Basically i have found using HTML::TokeParser to be useful at stripping out all the html tags, i have one problem with the output though there is 2 occurances of the same "item" within the output.

View 1 Replies View Related

Programming :: Create A RS232 C Program That Executes A Series Of Commands Down The Line To A Robot?

Jan 5, 2011

I am trying to create a RS232 C program that executes a series of commands down the line to a robot. Everything seems to work fine, except any sequential write to the serial port. At first I thought it was the UART's buffer being filled too fast, but even with a 50 uS delay it still throws the error.

Here is my code:

Code:
#include <termios.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/signal.h>
#include <sys/types.h>

[Code]...

View 1 Replies View Related

Debian Configuration :: Failed To Get D-Bus Connection - Operation Not Permitted

Aug 17, 2015

After upgrading to Debian 8, I'm having a bit of trouble with systemd, since I'm not used to it (seeing as it was all init when I started). I tried to use a tutorial to create a new service and one step in it was to run

Code: Select allsystemctl enable xxx.service

Unfortunately, every time I run systemctl - even without parameters - I get this error:

Code: Select allFailed to get D-Bus connection: Operation not permitted

View 5 Replies View Related

Debian Configuration :: LDAP Auth Newgrp Setgid - Operation Not Permitted?

Jun 10, 2010

LDAP authentication problem on debian squeeze? To my knowledge, I have everything setup properly to do ldap authentication + local authentication on a host. I can login as a local user. I can login as an LDAP user.

When I log in as an LDAP user, my primary group is set properly. It is an LDAP group. I can change the group ownership of files to LDAP groups using chgrp. So far so good. This all works as expected. The commands getent passwd and getent group work wondefully, and generate the expected results. I can newgrp to any *local* group, but if I try to newgrp to an ldap group, I get the following error:

setgid: Operation not permitted. I've tried googling and asked on #debian on irc.debian.org. No luck.

View 2 Replies View Related

Programming :: FTP Error - 550 Operation Not Complete

Apr 5, 2010

i am having problem with the following code(trying to updoad a file):

Code:

HINTERNET internet;
HINTERNET ftp;
internet = InternetOpen(NULL , INTERNET_OPEN_TYPE_DIRECT , NULL , NULL , 0);
ftp = InternetConnect(internet , "127.0.0.1" , INTERNET_DEFAULT_FTP_PORT , NULL , NULL , INTERNET_SERVICE_FTP , 0 , 0);

[code]...

so FtpPutFile returns the following error:

Code:

12003
200 Type set to I.
200 PORT Command successful.
550 Operation not complete

View 2 Replies View Related

Programming :: Perform The Operation In Script On Such Directories?

Dec 24, 2010

I have mounted remote Windows share using CIFS and writing bash script for those files. However being a windows share since there is a space between directory names like "Program Files" and hence I am not able to parse it through bash script and script exits with error.

Does any one have any idea about how to perform the operation in script on such directories?

e.g.
cd /tmp/temp/Program
Error: No such File or Directory
cd Files/
Error: No such File or Directory

View 3 Replies View Related

Programming :: Operation Canceled - Error [G_IO_ERROR_CANCELED' Will Be Returned

Sep 18, 2010

I do not get what this method is seeking for? Where do i put a string or somethig that its sopposed to find.

[code]...

Seeks in the stream by the given offset, modified by type. If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

[code]...

TRUE if successful. If an error has occurred, this function will return FALSE and set error appropriately if present [URL]...

View 2 Replies View Related

Programming :: Simple Linked List C Progrom For Push And Pop Operation

Apr 23, 2011

Any simple linked list c progrom for push and pop operation. I googled for that but i didnt get any simple program.

View 5 Replies View Related

Programming :: What Are The Series Of Files That Are Called When A User Make Copy Operation From Usb Mass Storage To Hard Disk

Mar 20, 2010

what are the series of files that are called when a user make copy operation from usb mass storage to hard disk?i have reached the code of the usb mass storage in linux kernel 2.6.33 and i want the exact code the make the copy how can i do that?

View 2 Replies View Related

Ubuntu :: How To Interface With RS232 Port

May 13, 2010

I am trying to interface a machine (lock in amplifier) with Ubuntu using a RS 232(25pin) to USB cable. I wrote a program in c to interact with the machine. I think the machine is detected (after connecting the machine a file is created in folder /dev with name ttyusb1. I heard that ubuntu has all the header files required to interface with the port. with the help of a person i wrote this program (please see the attachment below.) but i don't know whether the commands are right or wrong. the program is compiled. but when i run the program it is getting stuck. i have to stop the program using Ctrl+z. if anyone knows these commands (how to write to or read from the port) please help me with this program.

View 6 Replies View Related

General :: Use A Rs232 Device That Uses The Usb Port?

May 18, 2010

been trying to use a rs232 device that uses the usb port. it calls for a virtual com port to be created. i am running on ubuntu 10 and get hella confused with the search results i have come across.some call for the usbdevfs which apparently doesn't exist under lucid. another had me do use some "magic" in getting it to work.they provided a script mountusbfs.sh

Code:

#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs

[code]....

of course when i tried it the domount command doesn't exist so i modified the above script replacing the domount with mount and it seemed to do something things. usbview is specified as the determining factor whether or not you have the usbfs mounted properly. it wants to use proc bus and ubuntu doesn't use that anymore apparenlty. i have read that i need to enable a usbmon (flag?option?) in the kernel to be set. which it isn't when i followed the steps to check.

View 3 Replies View Related

OpenSUSE :: Rs232 (usb To Serial) Cable Not Detected

Feb 9, 2011

a few day ago i have checked my application and make rs232 cable converter to communicated it. And not detected, why? FYI, this is my lsusb command, but in my dmesg, was not found. check this out, (usualy there is another rows, just like ".....converted to ttyUSB0....")

View 1 Replies View Related

Hardware :: Reset RS232 Buffer On Device?

Aug 6, 2010

I was able to write a script on Linux Shell for send and read data to a serial port. But I�m facing a problem now. If by any mean I send to de device anything else than the predefined strings, stated by the manufacturer, the device ceases to respond. The only way I found its to turn off and then turn on the thing again. Which its very impractical. Its there any way to "reset de UART chip on the device" or send some string based on the RS232 standard that clean the device buffer?

View 2 Replies View Related

Programming :: Netbeans And Permissions - "ioperm Error: Operation Not Permitted"

Aug 2, 2010

I am developing a java application that deals with the parallel port I used the parport library, I have the following problem: I am using netbeans 6.9 and linux redhat, when I run the code (java code that controls parallel port) from netbeans I get: "ioperm error: Operation not permitted" I used the "clean and build" function in Netbeans to create the jar file (test.jar) then I changed the permission of the test.jar to root using this command "chmod 4777 test.jar" and the test.jar file worked just fine as a stand alone file, but I still get the same error message when I try to run the program from Netbeans

View 1 Replies View Related

General :: Access Serialport (RS232) Data Using OpenGL?

Apr 27, 2010

how to access serialport(RS232) data using OpenGL.Heard about SDL(Simple DirectMedia Layer),but didn't get how to use SDL and OpenGL to access RS232 data.

View 8 Replies View Related

CentOS 5 :: Configure NTP Server To Transmit Time With COM (RS232) Port?

Jun 24, 2011

is possible to configure NTP server to transmit time with COM (RS232) port ????

View 1 Replies View Related

Programming :: Atomic Variable Versus Atomic Operation

May 19, 2010

have two shared variables a,b which are related to each other.When multiple applications share these shared variables, access to them needs to be an atomic operation, otherwise the relation may break. So to ensure mutual exclusion, I'll put their modification under a critical section protected by lock.

Code:

critical_code
{
P(mutex)
a := something
b := something
V(mutex)
}

Lets say my hardware/OS/compiler supports atomic variables. Then I modified my above code as follows.

Code:

code
{
atomic a := something
atomic b := something
}

Can this code ensure mutual exclusion, when accessed by multiple applications?

View 2 Replies View Related

Programming :: Setsockopt : Socket Operation On Non-socket Getting Error?

Mar 30, 2009

im getting that error in my code for some reason. I compiled my code, and when i try to run this server it throws me an error on my call to setsocketopt(). The only way it can reach that part of my loop is if it succeeds when it calls sock() so I dont understand why the error says its an operation on a non-socket. Im just trying to set up a server to pass messages from a client to it a viceversa. Here is the code:

Code:
int main()
{
int socket_fd, new_socket_fd, k;
struct addrinfo hints, *server_info, *p;
struct sockaddr_storage peer_address;
code....

View 7 Replies View Related

Software :: Sound For Pno Keyboard Wanted

Jan 6, 2011

I have an Alesis q25 usb music keyboard. I want to plug it into my pc and get a piano sound out. Such sw as Rosegarden dose respond to the keyboard as far as the gui is concerned, -but no sound. And it's proving a nightmare to navigate!

Jack seems to be working ok and fluidsynth is installed

View 1 Replies View Related

Ubuntu :: Volume Control Wanted, Not Mixer?

Jun 4, 2010

I just installed Xubuntu on a new computer.One problem i came across, was the volume control at the top panel (near the clock).Unlike Ubuntu's volume control, it just opens up a sound mixer instead of being able to adjust the volume right away with one left-click. Is there anyway to get that to happen? Even my keyboard's volume control doesn't work in Xubuntu, but it worked perfectly fine in Ubuntu.

If i try to add a new applet into the panel, there is ONLY the MIxer, which is not what i want. There are no options to add regular volume controls anywhere that i can just left-click and adjust right away.

*Specs:
Dell Dimension 5280
Intel P4 2.53ghz
256mb RAM
60gb HDD
Xubuntu 10.4 (or the latest)
Generic Keyboard w/volume control

View 3 Replies View Related

Ubuntu :: Install Mint 9 And Wanted To Write It Over 9.10?

Jul 21, 2010

Is it safe to use the update from ubuntu 9.10 to 10.04? I have done this once before and it was terrible. There were just too many things that either didnt work or it was slow as heck. I then decided to just do a fresh install and 10.04 worked beautifully, but I recently wanted to install Mint 9 and wanted to write it over 9.10 since I didn't use it much after installing 10.04. but when I was in GParted, somehow I thought i had chosen the partition with 9.10, I wound up installing it over 10.04. So my question remains, if i just do the upgrade will it work like the fresh install?

View 4 Replies View Related

Ubuntu :: Files On Desktop And Wanted To Put Them In A Hidden Folder?

Jul 23, 2010

I have a sort of strange dilemma.I had all these files on my desktop and I wanted to put them in a hidden folder. I put them all in a folder, then renamed that folder ".desktop" and tried to hide/unhide it with ctrl+h. It didn't work. So I moved it to my home folder. Didn't work there either, and I accidentally deleted it. Moved it out of the trash and back onto the desktop, but now it's no longer a folder. Now it's a file. I can't open it, since when I do, it says "Cannot display .desktop [return] The file is of an unknown type.

View 1 Replies View Related

General :: Wanted Safe Way To Fsck (mounted) LVM Partition

Jan 10, 2010

I have two ext3 lv's of 4GB and 10GB in my hda8 partition, and they are automounted by /dev/mapper/ in my /etc/mtab files in each of the four distros (Suse9.3, OpenSuse10.2, kubuntu7.04 and Debian Lenny 5.0.3). Since ext3 is a journalled fs I feel I ought to fsck their integrity every 3 months or so, however I don't know

a) whether they must be unmounted before running fsck,
b) whether I should use a live CD such as knoppix to run the fsck command, and
c) whether I can and/or should run fsck /dev/hda8, or whether I should somehow fsck each lv seperately?

View 5 Replies View Related

General :: Wanted Window Restore Feature In Nautilus?

Aug 10, 2010

suppose an Ubuntu or Linux user is using GNOME and he/she has opened too many folders , suddenly he/she has to shutdown/ switch off machine due to power failure or some other unexpected reasons , now when he/she reboots the machine he/she can't remember the folders he/she had opened earlier so there should be a window restore feature for nautilus in Ubuntu or Linux in general Ubuntu or Linux should implement the same window restore feature in nautilus similar to the one existing in Mozilla firefox see the screen shot here:- [URL]

View 1 Replies View Related

Networking :: Wanted: A Bot That Logs In And Clicks On Settings Of A Router?

Jan 17, 2011

It has been found that a certain isp changes my ip if a certain sequence of buttons is clicked upon in the adsl router's web page.Is there any bot smart enough to log into the router, go to the right page, and click upon certain buttons when F9 is pressed?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved