I wrote software which access and reads a serial device. I would like to test this software on my computer without loop-wiring or without a second computer.
How could I use pty's to simulate a serial device?
Actually I would like to temporary replace the /dev/ttyS1 file by one end of the pty. How could I do this? Is there a command to create a pty pair?
I want to simulate a serial protocol in user space program to test reception algorithm. The protocol is similar to UART protocol but frame format is different. The duration of 1 bit is 114,46 us. In my main function I'm creating two threads. Tx for simulating transmitting data and Rx for reception data. For measure time I use create_timer() function and signals. Each thread has its own timer and signal handler. Tx timer uses SIGUSR1 and Rx timer uses SIGUSR2. Tx thread sets the global variable and Rx reads it.
The timers are set to sample with 114,46 us period. When they reach this value signal handler should set the flag. Flag is check in thread and some operation are made. When I set the timers period for longer time (100 ms) everything works fine but when I change it to default value (114,46 us) the Rx thread doesn't receive the proper data. I am wondering if the 114,46 timer period is possible to simulate in user space? Whether the time will give me the proper resolution ? Theoretically it should provide 1 ns resolution.
[ 3635.194162] usb 3-1: new full speed USB device using uhci_hcd and address 2 [ 3635.338159] usb 3-1: New USB device found, idVendor=066f, idProduct=4200 [ 3635.338165] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
I have bought a so-called web'n'walk stick, which identifies itself as a "Globetrotter HSDPA Model". I managed to get it identified as a serial device (initially, it is detected as a USB drive), but I fail to get it working.
I am trying to get two way serial communications going between a Windows XP system and a Linux system (RHEL 5).I have /sbin/agetty -L 9600 ttyS0
in /etc/inittab. I am using a generic USB to serial adaptor on Windows (Unitek) and a null modem cable. I have putty configured for 9600 baud, 8 bits, no parity, one stop bit, no flow control.I get the login prompt from agetty in the putty window but input does not work; I see weird characters in the putty screen. I can echo output into the device from windows and see it, but
cat < /dev/ttyS0. just prints out weird characters from what I type.
On my CentOS 5.2 install I've installed a dual-port serial card based on the NetMOS 9835 chipset. I've followed the serial instructions, but everything they tell me to do is already done - see setserial outputs below. I've compared these values to the lspci output (below, NetMos card is at the bottom of the output) for the card and it appears right. Problem being, I can't use the serial ports. Oh and I did use search, and looked at every 9835-related article before posting this :)
I am hoping to be able to get an old serial-touchscreen to work with a usb/serial adapter. I had this touchscreen working some years ago on different hardware. I would like to hook it to the machine I am setting up as a multimedia host with mythtv among other things.
Following the instructions I left behind when I got this to work way back when does not work. See [URL] ....
This info is a work around to get the xserver to see the touchscreen. [URL] ....
I do know that the touchscreen works as I am able to get garbage on the screen as in the first part of my howto. But I have not had any success getting xorg to see it. I wish I had posted a copy of the xorg.conf at the time, but......
There is an issue with the current xserver in testing that I am hoping the next update (in unstable) will fix when it gets pushed to testing. That is that Code: Select all# X -configure fails with a segfault. So I am not able to generate the xorg.conf needed to get it to work. I was going to post a bugreport, that is when I found out there is an update in unstable, so I am waiting for it to get pushed at the moment.
Anyway I am hoping that I can link /dev/ttyUSB0 to /dev/tty0 and get it to work. I would like some kind of guess as to my chances of success before I go to all the work of getting the monitor hooked to the host.
I have a bit of a dilemma. I'm attempting to use a microcontroller to send MIDI messages over a virtual serial port. I want to (eventually) read them with Mixxx. I'm using an FTDI chip, so I get a /dev/ttyUSB0. I've tried spikenzielabs' Serial-Midi program, but it doesn't see any serial ports. NOTEMIDI looks really old and won't compile on my 10.04 LTS machine.
We have a new machine with RedHat enterprise 5 on it. I need to connect a serial cable to the serial port and talk to another system (old alpha system) instead of using a VT connected to the alpha.Does RedHat come with anything like Keaterm/hyperterm/etc etc?
How to get rid of the following error I've been receiving from Yum. I'm fairly new to Fedora. The following message appears when Add/Remove Software is launched. It also pops up periodically in the notification window.
could not do simulate: Traceback (most recent call last): File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 3270, in __init__ self.repos.confirm_func = self._repo_gpg_confirm File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 823, in <lambda> repos = property(fget=lambda self: self._getRepos(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 551, in _getRepos prerepoconf = self.prerepoconf AttributeError: 'PackageKitYumBase' object has no attribute 'prerepoconf'
When I drink tea, the water splashed on my keyboard. It didn't cause any problems until a few mins ago. Now my Enter and right hand side shift key don't function any more (The new line in this text is copied from other thread).
So I would like to know how can I simulate an enter key press so that e.g. a command can be executed in terminal. Because I have some source code uncommitted, I want them at least get committed first.
I'm trying to save the output of the script I wanna run but for some reason I cant manage to do it with "script.sh > Output_4.txt"
The thing is that the script was already run and it extracted some directories so when I try to run it again (to save the log to a Output_4.txt) bash says (see screen-capture) and of course the log's empty!!!!
For backup and pre-functionality purposes, I need to simulate a VirtualHost in my Fedora (14) machine. I found some interesting links to carry out that process but with an IP fix.So, how can I simulate a VH through a localhost with a dynamic IP?
I have ack-grep installed on my local machine, and find it indispensable for quickly 'acking' through a codebase when debugging. However, on my cheap shared hosting, there is no ack-grep. One of the testimonials on betterthangrep.com mentions a
Rube Goldberg mess of find/grep/xargs which sounds like what I need, but coming from the opposite direction.
I want to simulate a bad block or sector on a drive or even a virtual drive image to test my data recovery distro. I wish I would have bookmarked when I read about it before. It was some type of low level command, I remember something about scsi subsystem or kernel thingabob.
I have a G15v1. After going through hoops and loops to get it working only to discover that you only needed to install g15daemon through the Ubuntu Software Center, I found myself with one big problem. I migrated from windows just now, and there, I had my macro keys(the extra ones) bound to CTRL+W, CTRL+T and to a simulated mouse-wheel scroll so I could navigate the web more easily. How would I go about doing that? I figured, if I used the System->Preferences->Keyboard Shortcuts thingy and bound my key, in my case XF86Launch5, to a command similar to "simulate keypress CTRL+W"(I know it's totally wrong, just to give you an idea), I might be able to get it working again. Only problem is, I can't find anything like that. Any of you has any clue about it? I googled but I only find C++/Java/coding related results, which are not exactly what I need to do.
After some tests I found that some USB Bluetooth Dongles errors, only are recoverable if the USB is unplugged an then plugged again. Is there some way to simulate that a USB device is unplugged and re-plugged?
I need to simulate a 500Mbps link with a 100ms delay and a loss probability of 0.0001% on an ethernet link between two gigabit ethernet cards...I tryed to use these commands:
# tc qdisc add dev lo root handle 1:0 netem delay 100ms loss 0.0001 # tc qdisc add dev lo parent 1:1 handle 10: tbf rate 500Mbit buffer XXXX limit YYYYY
But during some simulation throughputs are very low ( 190Kbps....210Kbps....) for different values of XXXX and YYYY.... (I don't want that the loss probability is caused by the buffer and the limit value but only by the loss probability setted on netem...)
I can't use cron on server. But on the same server i can use screen. Is there any way (any program) to run something like cron in the screen session? Or any solution for that problem.
I have a program that receive user input. I want to run this program automatically without user interaction, and in order to do that I need to simulate key events. How can I do such a thing?
The program I am running is partly java and partly shell.
The shell part is easily done by using: ./prog.sh <parameters (Parameters being a file containing parameters) But the java doesn't work similarly.
I need to simulate dijsktra's algorithm using network animator of ns2. how to write a tcl script for my code. This tcl script runs the dijsktra code and simulates its running on network animator.
I have a computer with no floppy drive (x64 ubuntu lucid installed) I have a program (wine windows xp) that will only save data and export data from/to a floppy drive. I found information on setting up an emulated floppy drive. i.e.
I modified the winecfg to include under the drive section A: /media/floppy. Problem is I cannot write to the drive as a normal user. I have tried everything I know but only root can read write to the drive. Is there someway to set up this emulated floppy to allow me as a user to write and read contents.
Is there any way to simulate analogue and digital(DVB) cards during development with MythTV so I am able to do some basic testing on a separate computer without disturbing my real MythTV server ?