Go to advanced search

by gauravsharma0190
Tue Jan 06, 2015 4:45 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: serial communication with xbee problem

Really strange that you have the $ character at the begining? Do you really have exactly that string or you short it out? Look at a typo in the code. Put your full code back. Something you never did anyway. I will check for typo. Daniel sorry perron $ is not present in data but receive same string ...
by gauravsharma0190
Mon Jan 05, 2015 12:11 pm
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: serial communication with xbee problem

danjperron wrote:gcc -o gps -lpthread gps.c
hello perron
i run your code which u gives me
but instead of all parameters in GPGGA string it only tells time.
$GPGGA 113115.03211.....M.......
something like this.
by gauravsharma0190
Wed Dec 31, 2014 4:46 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

Your code doesn't work because , 1 - String are not of fixed lengh. You need to read the full line otherwise your serial information are out of sync. 2- If you have a wrong character you are screwed. What append if you connect the GPS when it has already sent half of a string. 3- In reality it coul...
by gauravsharma0190
Tue Dec 30, 2014 6:18 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

Then just strip out the array of char and just return the full string. If you can't figure it out I will send you the modification to my code. I didn't received any code from you ????? Daniel E: SELECT ALL #include<stdio.h> #include<errno.h> #include<wiringPi.h> #include<string.h> #include<wiringSe...
by gauravsharma0190
Mon Dec 29, 2014 10:50 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

you made an error on my name it is Daniel! I thought what I gave you was your problem. Does My code works??? This GPS, I hope it is the correct one, send a string with a cariage return and line feed at the end. This is good because you could use standard linux stdio to read the line with fgets. Als...
by gauravsharma0190
Thu Dec 25, 2014 1:18 pm
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

denial
i sent to my source code ......now tell me where is the problem in logic
thanx sir
by gauravsharma0190
Thu Dec 25, 2014 1:14 pm
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

thanx denial
Mary chrism's to all.
have you any solution to my problem....
if any one have any logic to take a limited string from gps
i only need that arr[200].
by gauravsharma0190
Wed Dec 24, 2014 11:26 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

thanks to all for solving my problem but now my problem is that when the code runs and data is received ,,,,it continuous received the data not only 65 char but regular data.... here is small code. while(1) { for(i=0;i<=65;i++) { gps =serialGetchar(fd); } if(i==65) break; } printf("the data is\n");...
by gauravsharma0190
Wed Dec 24, 2014 11:12 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

Nice one Joan ;) Think about it! 1 - How do you know that the first character is a new data ? You are checking for 'A' after reading 65 characters. Are you sure that the first character is really the first or you didn't miss any? 2 - Do you have a checksum, a CRC, a carriage return or a way to veri...
by gauravsharma0190
Wed Dec 24, 2014 10:43 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

thanks ame
but why it is happening that pi receives the continuous data from gps with this code.
i do same as wrote above posts but nothing happens
by gauravsharma0190
Wed Dec 24, 2014 7:24 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

my gps model number is royaltek 1315s4.
by gauravsharma0190
Wed Dec 24, 2014 6:53 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

hello everyone i am very thankfull to all who helped me...with many efforts i am able to access the gps .... i can read data from gps... works well.... now my new problems is see this old code E: SELECT ALL #include<stdio.h> #include<errno.h> #include<wiringPi.h> #include<string.h> #include<wiringSe...
by gauravsharma0190
Wed Dec 17, 2014 6:33 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

thanks to all for solving my problem but now my problem is that when the code runs and data is received ,,,,it continuous received the data not only 65 char but regular data.... here is small code. while(1) { for(i=0;i<=65;i++) { gps =serialGetchar(fd); } if(i==65) break; } printf("the data is\n"); ...
by gauravsharma0190
Mon Dec 15, 2014 10:05 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

i tried minicom...
i configure it like /dev/ttyAMAO
baud rate 9600 8N1
now save it with gps
but error occurs like"""cannot save to /etc/minicom/minirc.gps

what is the problem..i googled and follow the steps to starts the minicom..
by gauravsharma0190
Mon Dec 15, 2014 4:55 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

hello DougieLawson The only way to get stuck in that loop is if serialGetchar() blocks waiting for more data from the device it's reading. You're making an assumption that there are always 66 bytes of data sent on the serial interface. Each time round the loop you need to test whether serialGetchar(...
by gauravsharma0190
Thu Dec 11, 2014 4:16 am
Forum: Beginners
Topic: Regarding gps module
Replies: 9
Views: 8503

Re: Regarding gps module

yes
gps voltage level is 3v3....
if i checked what does it mean
cat /dev/ttyAMA0
mean to see the ttyAMA0 file (serial port driver)
by gauravsharma0190
Wed Dec 10, 2014 12:09 pm
Forum: C/C++
Topic: code for GPS data reading
Replies: 8
Views: 7123

Re: code for GPS data reading

hello
i am using gpsd.
first i want to know ,does it use net for work
second how to use it by writting the code.....

or is it like software which capture the gps data
by gauravsharma0190
Wed Dec 10, 2014 11:48 am
Forum: Networking and servers
Topic: unknown hostname
Replies: 8
Views: 1405

Re: unknown hostname

In the host name
raspberry

is written
and in the hosts
nothing is written
by gauravsharma0190
Wed Dec 10, 2014 11:43 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

hello ame
i am using ttyAMA0 for my serial port by using fd
and i configured the serial comm. by /boot/cmdline.txt
/etc/inittab
by gauravsharma0190
Wed Dec 10, 2014 8:54 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

int serialGetchar (int fd) ;
[*]
Returns the next character available on the serial device. This call will block for up to 10 seconds if no data is available (when it will return -1)[*]
i did as you told me but nothing happened
by gauravsharma0190
Wed Dec 10, 2014 8:30 am
Forum: Networking and servers
Topic: unknown hostname
Replies: 8
Views: 1405

Re: unknown hostname

hello ame
thanks for some kind reply
i googled and try dns setting
where i saw /etc/resolv.conf
to edit i edited with my dns server as 192.168.2.1 and save it
after that i tried ping the site but again it say unknown host name.
by gauravsharma0190
Wed Dec 10, 2014 6:19 am
Forum: Networking and servers
Topic: unknown hostname
Replies: 8
Views: 1405

Re: unknown hostname

no i don't know how to configure to dsn
please tell me
by gauravsharma0190
Wed Dec 10, 2014 5:03 am
Forum: Networking and servers
Topic: unknown hostname
Replies: 8
Views: 1405

unknown hostname

hello everyone i also have the same problem i set my pi using using following commands sudo nano/etc/network/interfaces then edit " iface eth0 inet static address 192.168.2.280 netmask 255.255.255.0 gateway 192.101.2.2 " after that by checking command ifconfig i see all the configuration which i mad...
by gauravsharma0190
Wed Dec 10, 2014 4:31 am
Forum: Beginners
Topic: (SOLVED)Connect pi to internet through ethernet cable
Replies: 12
Views: 54605

Re: (SOLVED)Connect pi to internet through ethernet cable

hello everyone i also have the same problem i set my pi using using following commands sudo nano/etc/network/interfaces then edit [b] iface eth0 inet static[/b] [b]address 192.168.2.280[/b] [b]netmask 255.255.255.0[/b] [b]gateway 192.101.2.2[/b] after that by checking command ifconfig i see all the ...
by gauravsharma0190
Mon Dec 08, 2014 5:47 am
Forum: C/C++
Topic: serial communication with xbee problem
Replies: 73
Views: 20124

Re: For serial communication

sir
i tried it but nothing happens......don't know what's happening???
it stucks in the loop

Go to advanced search