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
ADVERTISEMENT
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
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
Jun 24, 2011
is possible to configure NTP server to transmit time with COM (RS232) port ????
View 1 Replies
View Related
Feb 18, 2010
I want to do a simple port redirect, i.e. whatever comes trough whatever interface on port AAAA will get redirected to port BBBBI thought that iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport AAAA -j REDIRECT --to-ports BBBBhowever it doesn't work, e.g. nc -v -w2 -z localhost AAAA gives:
nc: connect to localhost port AAAA (tcp) failed: Connection refused
while
nc -v -w2 -z localhost BBBB
[code]....
View 10 Replies
View Related
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
May 1, 2010
I have some legitimate business needs for the U1 Windows client port. Is there an ETA for this project completion?
Also, I have a personal need for management of the Favorites synching via the web management interface. When will this be rolled out?
View 1 Replies
View Related
Jan 31, 2016
Is is possible, via iptables or something similar, to bind a service running on a specific port to a specific interface? My case: I use a VPN service for privacy. I would like to have all traffic except ftp and ssh to run over tun0. Ports 21 and 22 will need to be accessible to the outside world (eth0) while the VPN is running.
View 3 Replies
View Related
Aug 13, 2010
I have two NIC, one is ethernet and second is via modem. On the eth0, most of no standard ports are blocked, so I need to connect to specified port on some IP, through ppp0 (modem), to use ssh connection on non standard port to that IP. For other ports on that IP and all other IPs I want to use eth0.
View 1 Replies
View Related
Oct 29, 2010
I have a set up with a computer that has two network cards and is connected to two networks. Both networks connect to the internet via separate routers that have DHCP enabled. I can set one of the routers up to do port forwarding to the computer without any complications but if I want to do the same on the other router the port forwarding from it doesn't work and I can't reach the system.
I know for a fact that the services are accessible from both networks and both routers can forward ports to other computers in their network. The networks are 10.10.0.1/24 and 172.22.0.1/24. I've tried turning off iptables but that didn't change anything.
Is there any kind of setting that could prevent the interface on the computer to reject traffic using NAT or something?
If I disable the interface on the working network (ifdown eth1) then suddenly eth0 on the other networks starts accepting requests sent to it via the router that does the port forwarding. I do however want to emphasize that services work just fine as long as the requests originate from either of the networks they are on.
View 3 Replies
View Related
Feb 7, 2010
How to configure Port Forwarding using Webmin Web Interface? Example: 118.103.211.22:80 forward to 192.168.100.1:80
View 3 Replies
View Related
Apr 22, 2010
I am using RHEL 5. In my Linux Box I have two Lan cards (eth0 and eth1). "eth0" is connected with network 192.168.10.0 and "eth1" is connected with network 192.168.11.0. Both Network are inter connected via routing. Now I want a situation where, I want to dedicatedly assign some port numbers against a lan card. Like eth0 will be assigned for ssh (22) and eth1 is assigned for telnet (23). So that, when a user connect to 22 port then he/she is connected to the server through eth0 , and when a user connect 23 port then he/she is connected to the server through eth1. Is it possible to do using iptables or other?
View 2 Replies
View Related
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
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
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
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
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
View Related
Aug 20, 2010
there's a web-based administrative tool "Dialupadmin Interface" which is .tar.gz, but i want to run it on windows cz i'm noob in the linux/unix environement. is there a way to do that? any1 used this prog b4?
View 4 Replies
View Related
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
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
May 2, 2010
I have a mail server i need it to send message via port 587 not port 25, i make some changes to my postfix server which i use and it is already successed making a telnet to 587 port like it :
[Code]....
View 3 Replies
View Related
Feb 14, 2010
I just had an ATT Uverse RG installed. However my Smoothwall router that previously worked fine with the ADSL SpeedStream is no longer accepting an address assignment DHCP ip address from this new gateway. (3800HGV-B)Any thoughts ideas or experience working with this hardware? ATT only supports Windows and Mac
View 2 Replies
View Related
Jul 18, 2011
I have a ppp0 entry with post-up options like this
mapping ppp0
map none photon-plus motorola
map timeout: 12
[code]...
View 8 Replies
View Related
Apr 11, 2011
i am using windows 7 in my laptop and linux is installed on virtualBox but my problem is the screen is showing small in virtualbox is there any way to enalarge the screen to show like windows screen? i did before by using VGA setting but it made problem me i was not able to use GUI interface i meant graphics interface
it was just showing me Command Prompt.
View 8 Replies
View Related
Feb 26, 2011
When I do...# iptables -L...I see rules in my INPUT and OUTPUT chains that look scary:ACCEPT all -- anywhere anywhere...but these rules only apply to the loopback interface. I tested it and the server cannot be reached on open ports from the outside world. How can I make iptables show the interfaces that the rules apply to?Otherwise, every time I do iptables -L it will scare the crap out of me.
View 3 Replies
View Related
Apr 14, 2011
I found multiple sites explaining how to add IPs to a network interface as virtual interface like eth0:0. However I can add IPs to an interface as well using the ip command: ip a a 192.168.2.2/24 dev eth0 What I want to know is how I can make this persistent on rhel/centos.
View 2 Replies
View Related
Nov 1, 2010
sudo ssh -L 750:192.168.123.103:873 username@192.168.123.103It does exactly what it's supposed to do, but how do i edit / remove this rule?Is there some config file where i can alter the forwarding? How does it get stored?Im using Ubuntu 10.10Server Edition (allthough i recon it would be pretty much the same across all versions
View 5 Replies
View Related
Mar 28, 2010
I'm not that great with mailservers, and just been thrown a curveball with a MS Exchange environment for which there is apparently no solution... yeah, right. But is there a workaround?
The problem is that the site mail (SMTP) needs to be sent via port 26 instead of the commonly used 25. Port 25 is mapped to a mailfilter, which apparently causes havoc with some of the mail, and the techs that have been on site trying to coax the Exchange server to co-operate have said that the only way would be to get rid of the filter.
The problem is that there are number of apps that are unable to have the outgoing port changed and so keep sending mail out on port 25.
I look after the Unix/Linux side of things at work, and I was wondering if there was an easy way to set up a Ubuntu box to receive mail on port 25 and just forward it to the MS box on port 26? So, in other words (and I hope this makes sense): monitor port 25, and forward whatever comes in on port 25 to the server on port 26. Simple portforwarding, or is it? What steps do I need to take?
View 2 Replies
View Related
Aug 7, 2010
When I use the following command:
ssh user@ssh_server -L 5500:localhost:5500 -p 22
everything works fine. I can log in, and local port forwarding is done. Otherwise when I use the command:
ssh user@ssh_server -R 5500:localhost:5500 -p 22
I get an error "remote port forwarding failed for listen port 5500". However when I try remote port forwarding in WinXP by use of putty there is no problem...
View 2 Replies
View Related
Jul 14, 2011
I want to set my ip as static and port forward it through a specific port can anyone help me with this im using ubuntu 10 with 64 bit OS
View 1 Replies
View Related