how if no... can it be more simple than that?
Type: Posts; User: carlyn
how if no... can it be more simple than that?
yes... actually i have this device that go under testing. so each time, i will need to manually change the time and date of that device to syn. with my pc local time. but indeed of using local pc...
let say now I have a pc that connecting to a server. my pc's time is 10 Jan 2008 whereas the server's time is 12 Jan 2008. So now I want to read the time from server.
how can a system that connected to server can be set to the same exactly same as the server? normally that a program run at the local system, we would be able to read from local system (the time we...
if i have a file conatains 1,000 samples of a waveform (10,000* 0.1 =1,000)samples. And i am supposed to perform FFT on this waveform and plot its frequency domain. I have no idea where i should...
if i was reading from a text file, and would want to save the word in to array. how should i do this?
char *buffer[]={"aa", "bb", "cc", "dd", "ee", "ff"};
this is hard coded in the program,...
i understand that it just a cable. but imagine, i have this pc which connected to a server through cat 5 cable and my program will be running in that particular pc to detect when the server is down....
hi,
does anyone know how i could detect the bit (ie tx and rx) on cat5 cable? or any other ways that i could detect the connection to a sever?
thanks
i'm not quite sure that whether this can check the power...
ioctl(ups_fd, TIOCMBIS, &dtr_bit);
while(1){
ioctl(ups_fd, TIOCMGET, &flags);
if( flags & TIOCM_CAR) //DCD
{
...
how about linux?
previously i was writting a code to ping a websever to check if the server was down. and now from the program i will need to check if the power supply to a server is down, if it was, the UPS will be...
i'm now writing a program to ping a website
if((he=gethostbyname("www.yahoo.com"))==NULL)
{
call();
}]
and i'm using the code above to get the host ip and then send icmp to with another...
if i ping a website and the web server is down, i will get a response like the above. however, it took like 16 seconds to get the message, anyone know why?
it works properly now. i guess i need to set the serial port each time i reset the modem or restart the pc. :)
thanks everyone
#include <stdio.h>
int main(){
char sen[20];
int i=0;
for(i=0; i<20; i++){
scanf("%c",&sen[i]);
}
while (i<=20 && i>=0){
...
bzero (buffer, sizeof(buffer));
read(fd, buffer, sizeof(buffer));
strcpy(buffer, "AT+CMGS =\"+60125649001\"\r\nhello\n");
buffer[strlen(buffer)+1] = '\0';
...
i have get the modem to sms out, but some coding that i not really understand why after i off the modem n reset it, the 1st command that i sent through will not be responsed?
strcpy(buffer,...
thanks thanks... i've got it to work!!!
i need a <ctrl-z> to send the message out :)
i am actually writing AT commands to gsm, like the following
write (fd, "AT+CMGS =\"+60125649001\"\r\nhello\n" ,40);
and i need <ctrl-z> to send out the message. however i need to hardcode this...
fd= open(MODEM_DEV, PARAMS);
i am connecting to gsm modem
so basically i write to fd, but how i could send ascii number as ascii number and not string?
any command or function that i need to use?
does anyone know how i could send ascii to terminate my moderm?
i want to hard code <ctrl-Z> and i have found the ASCII of Ctrl-z, but how could i write this ASCII to the modem socket?
Thanks for pointing out the feof.
the file is containing all the printable char and is saved in openoffice writer. and my program trying to read the contain, but couldn't.
How can i read file in other format
so far i could only read *.txt, *.dat with file pointer
file = fopen("test.txt","rb"); /*this is how i open the file...
while(!feof(file))...