It worked! Thanks a lot!
Type: Posts; User: sombrancelha
It worked! Thanks a lot!
%02x did the trick for the 0, but I'm still intrigued on why 0x80 get's printed ffffff80 - is that just a printing problem or is there something deeper? If it's just printing I don't care, as I will...
%0x still outputted 0 instead of 00
Regarding flow control: I don't use any hardware flow control, and I haven't set any software flow control either (maybe there's something - from the OS -, but...
Thanks!
I used CuteCom and saw that it got the communication working nicely, so I saw what options it used (with stty -a -F /dev/ttyS0) and set them accordingly. What I miss-setting were INPCK,...
I don't use any flow control.
This is what I am doing:
char aux[8];
unsigned char readRequest[5] = {0x80, 0x00, 0x7F, 0x6F, 0xFF};
while (1)
{
I got it, I hadn't set the c_cc[VTIME] and c_cc[VMIN] parameters correctly. I was sending the bytes in the correct order - and the 3 extra bytes was due to my distraction (I was sending a 8 bytes...
Hello,
I am trying to write to device connected via a serial port. It uses 8 data bits, 1 stop bit, even parity and a communication rate of 2400bps. I am developing in Linux.
I need to send...
Stupid me. I was reading a different number of bytes inside the function (on the read() call), once I changed it I got the right result.
Hello,
I am developing an application that reads data from a serial port (on Ubuntu), and below is the relevant code used.
int fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY | O_NDELAY);...
Hello,
I think my problem is a little common, but I searched the forum and couldn't find a solution that worked for me.
I have something like this
while (scanf("%d", &i)){
switch(i){
Hello,
I'm trying to dynamically create an array whose contents are pointers to a struct.
Statically, I have something like this:
typedef struct {
...
Should I use fgets to grab the first line? In that case, I'd have to set a max size for a line, right? Although I could set a big max size, this has it's obvious problems.
Hello,
I have to read a file, line by line, and do different things depending on what's in each line.
The input consists of one command, some arguments (0, 1 or 2) and comments (everything...
Yeah, I was thinking in automatically operating the GUI. :( Too complex?
Well, converting the files would suit my needs. It is SQL based.
Hello,
I have an excel file which is being used as a database. A new software was developed to replace this excel file and I want to avoid typing all the information again. So I want to make a...
so i suppose there's no simple solution to that, right?
even if it won't solve my problem, how do I print the unicode characters?
is it possible to print a character using unicode?
If so, how?
thanks for the help
it worked perfectly
however, i'll consider using ordinary ASCII characters, because it is a lot simpler, even though the output does not look as nice as with the other...
dwks,
i'm not sure I've understood your solution.. are you suggesting that the file should be read at a command-line program?
And I didn't understand about the batch file.. what exactly is it?...
the problem is that someone else is going to correct my program (I'm making it for a University course).
If I use this solution, the person will have to change theirs font.
Is there any solution...
I'm Brazilian, so I give my variables names in portuguese. I don't use exit as a variable name, it was just for an example.
for (i = 0; i < m; i++){
for (j = 0; j < n; j++)
...
printf("%c", 176);
fprintf(exit, "%c", 176);
Hello,
I'm trying to print non-ascii symbols on a file, using
fprintf(file_name, "%c", xxx), where xxx is the symbol number
I'm trying to print symbols 176, 177, 178 and 219 from...