I am having the following problem. The following code works fine on my P.C. Ubuntu x64, and on a jetway mini-itx board with an atom processor. The problem is, the same code doesn't work on the intel equivalent of the jetway board. I thought the maybe, I didn't have the port configured right, so I turned on Hardware Flow control and also tried turning on the modem bits I needed with TIOCMBIS. Neither worked. Here is the code. There are two threads, one of them, respsponding to the client, and using the RTS and DTR pins to power two relays. The other, manages listening to CTS and DSR for input. Here is the class with the first thread.
Code:
/* * DigitalIOCore.cpp * * Created on: Nov 1, 2010 * Author: jonathan
I want to modify ioctl TIOCMWAIT to return the same thing that ioctl TIOCMGET returns. Currently wait returns an int of zero or -1 when a change in status occurs. Why not make it return the new status?
This will make the operation faster by not requiring another call to ioctl.The extra call requires 2 to 16 uSeconds to complete on my x64 laptop. How would I make this proposal to the kernal people?
In 10.04 I was using the following commands to mount an encrypted disk image:
Code: sudo losetup -f Which tells what loop back device block is available Then I'd type:
Code: sudo losetup -e aes /dev/loop0 /home/user/crypt.img and then enter the device's password
Code: sudo mount -t ext4 /dev/loop0 /media/crypt I've tried this in 10.10 and it hasn't been working (I can't remember if I did anything in 10.04 to make it work). I've installed the loop-aes-utils package and restarted my machine. Every time I try the 2nd step, after entering the password I get: Code: ioctl: LOOP_SET_STATUS: Invalid argument, requested cipher or key length (128 bits) not supported by kernel
i want to add a new system call.im following this guide [URL] in this step 6 he said add __NR_mycall to some number, in unistd.h. in include/asm/unistd.h there are are around 1079 calls for different hardwares. and the __NR_SYSCALLS is also defined many places. I don't know where to add my new system call. and another qn is. whether the number for syscall in unistd.h and arch/x86/syscall_32.s both should be same?or they can be different.
I want to test my system call that be goint to add to kernel, But when i finish compiling kernel, i found my system call code not work. the code i want to return the system time "struct timespec":
/*----------Start of mycall.c----------*/ #include <linux/linkage.h> #include <linux/time.h> #include <linux/kernel.h>
[code]....
so i want a method to test the new system call before compiling kernel.
In practice I have a script that call a java program that call a linux system command. The script if I run it, from a shell functions well,so it is not a java problem. The problem come out when i put this script in a crontab schedulation. The result in this case is that java do not execute the system command. I think it depends on crontab
'm trying to access remotely to my computer that is in my home with a VNC client. The problem is that from my company site, I'm behind a proxy and I must use this proxy to connect my computer.I'm new to the vnc programs, so I don't know how to define a connection to use the proxy. My laptop is well configured, the only problem is set a vnc client to use a defined proxy. 1 - I've installed VNC viewer or tightvnc viewer, but I can't find any option in it to define a proxy. How can I define a proxy in this program?2 - Is there any vnc client that allows to define a proxy?3 - Should I define a tunnel that redirects my connection to my remote PC? For example, if I define a tunnels that from localhost:5656 it connects to my remotePCort through the proxy will I hane any problem
On Linux, the Ctrl-[ key combination appears to be equivalent to hitting the Esc key. I would like to define Ctrl-[ as a shortcut in emacs but I am unable to because by the time the keystroke gets to emacs it looks like the Esc key was pressed. Is there anyway to disable this behavior so that Ctrl-[ simply means Ctrl-[?
how can I define file type for wget to download . for example I do not want to download *.html or I just want to download *.jpg files . or if it does not support any of them do you know any other suggestion ?
When installing Linux,sometimes i tried to install that on my second hard disk, which is set to be a dynamic disk(named hdb),but a message said that: root is not defined for hdb. -What does that mean? Does it mean that a Linux driver must be opened on that hard disk? if so:where do i find a linux driver
I have created a new user define chain # iptanles -N blacklistNormally when we add a new rule it automatically insert in the default iptable but when we create a user define chain then how can I add my rules in this chain ?
this seems like it should be a simple thing, but I can't find it. Is there a bash shell command that allows you to create a string of repeated characters? Like a string of 100 '*'?
I'm on Mageia Linux Cauldron (what will become Mageia 2), where Mageia Linux is a recent community fork of Mandriva Linux. this script gives me the Xkb layout that I need:
why do we have to define both Source/Destination AND Direction when building firewall.Isn't direction= source->destination? what would happen if source and destination were swapped?
defining keyboard layouts in linux (ubuntu 10.04 here). there does not seem to be any easy, graphical way to define keyboard mappings (except for keyboardlayouteditor, but frankly, i do not understand the installation description.i am using an apple aluminum keyboard with a german layout, but no matter what i do the (<>) and (^°) keys are always swapped (i did manage to change the default behavior for the f1...f12 keys from multimedia back to 'ordinary', application-centric... all you have to do is add the line echo 2 > /sys/module/hid_apple/parameters/fnmode to /etc/rc.local... this is so bloody obvious i am ashamed i had to search the web for this!).
adding to my distress, i find the chinese IMEs a horror (not a single one of the many i tried does anywhere come near google pinyin for windows), and have gotten neither ibus nor scime to work in a satisfactory way for me. i find linux keyboard handling a morass. i know this must be one of the hardest problems in computer science, since this subject gets so convoluted no matter whether its on windows or in-the-browser javascript. as a linguist i am well aware of the inherent complications proper text handling poses, but looking at descriptions how to configure xkb makes building interstellar spaceships look like a cakewalk.
find a place in the system where keystrokes are recorded;read out those codes (could be scan codes or character codes) using a daemon (implemented in python; i heard you have to listen to IOCTL or somesuch); when certain code combinations appear, switch them to do what you want;applications now get to see a X where formerly the got to see a U and vice versa;profit!
Is there a place, in ubuntu / linux systems that does allow reading out keyboard codes? Is there a way to block processing of such keyboard actions until an intercepting daemon has processed them? Would such an interceptor work for a broad range of use cases? like on the command line, in a gtk app, in wine, in firefox and so on? An alternative would actually be to grok keyboardlayouteditor, so if someone could post about a readable, complete installation instruction or point out installable packages, that'd be great, too.
I am able to retrieve IPv4 addresses with ioctl. But it is not returning IPv6 addresses. My requirement is to get both IPv4 and IPv6 addresses. I can not use getifaddrs() since it has to be common code between linux, solaris and aix. Solaris and AIX are not having getifaddrs(). Following code is returning only IPv4 addresses.
I'm creating a usb device driver that needs to be able to read from two different endpoints. I couldn't see any way of having two read functions in the driver, so I got round this by reading from one of the endpoints with read, and the other with ioctl.However this hasn't worked, the ioctl call from c returns -1. I added a printk command in the driver in the ioctl function, however looking at kern.log I can see that this function is never being called. Does anyone have any ideas as to what the problem called be, or a better method of being able to read from two different endpoints?
i want to know how to call the other file in linux. example i got this code that store into example1.sh and i want to store the data into other file like example2.