Search Results

Search: Posts Made By: enaud
5,455
Posted By enaud
Convert hexadecimal value in decimal value
hi all,
this is my script:

#! /bin/sh

minutes=$( { i2cget -f -y 0 0x51 3; } 2>&1 )
minutes=${minutes:2}

hour=$( { i2cget -f -y 0 0x51 4; } 2>&1 )
hour=${hour:2}

day=$( { i2cget -f -y...
Forum: Programming 11-19-2012
9,763
Posted By enaud
Yes is RS232.
Yes is RS232.
Forum: Programming 11-19-2012
9,763
Posted By enaud
Corona, my function also work with IOCTL and...
Corona, my function also work with IOCTL and timer every 10 ms..

I can also try your method but in a while(1){ }? you can write your code pls?

thanks
Forum: Programming 11-19-2012
9,763
Posted By enaud
i've doing: every 2ms: ...
i've doing:


every 2ms:


ioctl(fd, FIONREAD, &bytes_avaiable);
static int i=0;
array[i]=bytes_avaiable;

if (bytes_avaiable<=310 && i>=10 && array[i]==array[i-1] &&...
Forum: Programming 11-19-2012
9,763
Posted By enaud
you say: unsigned char c='\0'; int i=0;...
you say:


unsigned char c='\0';
int i=0;
int flag=0;
while(1){
if(pfds[0].revents == POLLIN){
iIn = read(fd, c, 1);
if(c != 'm'){
...
Forum: Programming 11-17-2012
9,763
Posted By enaud
My protocol: M A M <-- header first 3 bytes ...
My protocol:

M A M <-- header first 3 bytes
len payload <-- 2 byte
payload <--1--300 byte
End Of Message='m' <--1 byte
checksum<--1 byte
Forum: Programming 11-16-2012
9,763
Posted By enaud
i have a packet of data very 50 ms without...
i have a packet of data very 50 ms without newlines
Forum: Programming 11-16-2012
9,763
Posted By enaud
I've checked all system call in open function and...
I've checked all system call in open function and i dont have errors!

Now how modified read function?

thanks
Forum: Programming 11-15-2012
9,763
Posted By enaud
and what i must use? how modified my READ...
and what i must use?
how modified my READ function? thanks
Forum: Programming 11-15-2012
9,763
Posted By enaud
But is correct use poll function or i must use...
But is correct use poll function or i must use IOCTL function?

i can use IOCTL every 2 ms with a TIMER (in Qt--> QTimer) and if for 5 time number of byte is the same then read!

Is correct ?
:D
Forum: Programming 11-15-2012
9,763
Posted By enaud
:D simply...but why i have error in my packet...
:D simply...but why i have error in my packet message? :(:confused:
Forum: Programming 11-15-2012
9,763
Posted By enaud
how checking the return values for my calls?...
how checking the return values for my calls? thanks?

I've modified my Read Function:

int cClassSerialLIB::ReadPort_poll(){

int iIn;
struct pollfd pfds[5];

pfds[0].fd =...
Forum: Programming 11-13-2012
9,763
Posted By enaud
Wrong data with Read from a serial port.
hi, I've a problem on my C/C++ program with Posix Library.

I have to read data from the serial but I have incorrect data, in fact I get a bunch of zeros:
"2953.3174, 2785.2126, 0.0, 0.0, 0.0,...
Forum: Programming 10-24-2012
19,600
Posted By enaud
ah ok tomorrow i try.. now good night and thanks
ah ok tomorrow i try.. now good night and thanks
Forum: Programming 10-24-2012
19,600
Posted By enaud
no, your code is very complicated!
no, your code is very complicated!
Forum: Programming 10-24-2012
19,600
Posted By enaud
why? it work correctly.. is a problem with FIFO...
why? it work correctly.. is a problem with FIFO memory...
Forum: Programming 10-23-2012
19,600
Posted By enaud
i write At command on serial port for connect...
i write At command on serial port for connect modem at server!
Forum: Programming 10-23-2012
19,600
Posted By enaud
[ERROR:Resource temporarily unavailable!] Serial writing by termios library
Hello,
I am using the termios library to write data that I get from a Bluetooth device to a modem via serial.
The data arrive from the Bluetooth device correctly every 50ms and I have to bypass...
1,799
Posted By enaud
PROBABLY cut -c 2- ?
PROBABLY cut -c 2- ?
1,799
Posted By enaud
ok i try ---------- Post updated at 04:44 AM...
ok i try

---------- Post updated at 04:44 AM ---------- Previous update was at 02:56 AM ----------

i have a problem because i not have a file.
But i have a result of a command for example:
...
1,799
Posted By enaud
Read value of a file, remove first 2 chars and put this value in a variable
Hi i have need of read a file value with cat command and remove first 2character for example cat /sys/class/rtc/day

0x12

Remove char

12

And put this value in a variable

is possible...
71,549
Posted By enaud
no i have same error.. AT!PADCONN=1 OK ...
no i have same error..
AT!PADCONN=1
OK

CONNECT PAD: 1,0
Unable to open socket
71,549
Posted By enaud
no chat wait answer for 60 sec so i think that...
no chat wait answer for 60 sec so i think that error is on answer of modem:

infact with minicom

at!padconn=1
i have
at!padconn=1 ...
71,549
Posted By enaud
It work ...
It work
giuseppe@ubuntu:~/Scrivania/SCRIPTMODEM$ ./modem2.sh
AT+CREG?
+CREG: 0,1

OK
AT!PADSETUP=1,2,82.91.28.127,0,9940,0,1
OK
AT+CGDCONT=1,"IP","web.omnitel.it"
OK
AT!PADCONN=1
OK
...
71,549
Posted By enaud
giuseppe@ubuntu:~/Scrivania/SCRIPTMODEM$...
giuseppe@ubuntu:~/Scrivania/SCRIPTMODEM$ ./modem2.sh
^C^CModem not registered

With -V only script is blocked and after i must do ^C for exit :(
Showing results 1 to 25 of 51

 
All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy