User avatar
topguy
Posts: 5681
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Thu Jul 06, 2017 7:47 pm

Stiller wrote:Really embarrassing actually...
Wow. Are you really trying to guilt someone into spending a few hours creating a cookie-cutter-recipe for you to follow ? :shock: :? :lol:
We are more than willing to help as long as the recipient shows a minimum of effort and are capable to assimilate new information.

Stiller
Posts: 206
Joined: Fri Oct 14, 2016 9:03 am

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Fri Jul 07, 2017 8:53 am

topguy wrote:
Stiller wrote:Really embarrassing actually...
Wow. Are you really trying to guilt someone into spending a few hours creating a cookie-cutter-recipe for you to follow ? :shock: :? :lol:
We are more than willing to help as long as the recipient shows a minimum of effort and are capable to assimilate new information.
guilt someone? who talks about guilt someone? The embarrassing thing is simply that lots of device driver libs for Arduinos are availble and no single one which is actually working from the start for the Pi, and that's even easier if one took an additional Arduino to interface it in between to make this thing work out of the box (provided that the Serial to Serial communication via UART will work, but we'll see...).

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Fri Jul 07, 2017 9:41 am

Stiller wrote: no single one which is actually working from the start for the Pi
I mean, it's a ASCII text file, why C need a lib or driver to work with that?

And there is pigpio, wiringpi and gpsd. I think they all work.

Android uses gpsd. What's so wrong with it?

Edit: after a second thought, I think it worth to add the Unix philosophy: everything is a file. You don't need a driver nor a lib to read from UART. It's a text file at /dev/serial0

Stiller
Posts: 206
Joined: Fri Oct 14, 2016 9:03 am

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Fri Jul 07, 2017 4:04 pm

perhaps yes. But the values are unsorted, in a repetetive perpetual loop, no double or float or inch values actually sorted, structered and assigend, no start and no end, all messed up - nothing useable for beginners. And now I am meanwhile quite unsure if not even my uart is broken on the pi - without proven code impossible to fix this issue.

User avatar
bensimmo
Posts: 4152
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Fri Jul 07, 2017 4:12 pm

Send a string from one to the other and vice versa?
Check it is correct.
(Oh back on the GPS one here)

Take some pictures of your setup one that pins. I know it just 4 wires but quite a few mix them up and it's worth a double check.
Post 20 odd lines of your output.

Once you have a fix
Does
gpsmon
or
gpsmon /dev/serial0
work?

Stiller
Posts: 206
Joined: Fri Oct 14, 2016 9:03 am

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Fri Jul 07, 2017 4:20 pm

I have no idea what to do here. Of course I know how to wire to RX, TX (cross-over), 3v3, GND, on the Arduino with tinyGPS++ np problem, on the Pi: no clue.

Stiller
Posts: 206
Joined: Fri Oct 14, 2016 9:03 am

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Mon Jul 10, 2017 3:21 pm

update: Because everything failed trying to access the GPS sensor directly at the Pi, I have now plugged it to an Arduino, polling all values by tinyGPS++, and interfaced the Arduino to the Pi - now I can easily read the values also on the Pi, works like a charm. As stated, really a pity and a dissappointment that there is not a fundus of libs for the Pi like it's available for Arduinos.

User avatar
topguy
Posts: 5681
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Mon Jul 10, 2017 9:28 pm

The reason noone wrote a special GPS library for RaspPi is because most people don't need such a library, and the person who did and made something that fulfill your requirements might not read this forum.

The RasPI is just another Linux computer so you just use the libraries/programs that is used by other Linux users, normally that is GPSD. Since GPSD is the most popular program then more people supply patches to it and therefore it should be the program with best support for different GPS models. Therefore it is usually superior to any other random NMEA parsing library, the same might be the case for tinyGPS for Arduino for all I know.

TL:DR
The Arduino need quite specialized code, the Pi doesnt. Which is why few here is especially embarrassed about anything.

Stiller
Posts: 206
Joined: Fri Oct 14, 2016 9:03 am

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Sat Jul 15, 2017 11:13 pm

thank you, but as there are some broken or unfinished libs just for position but without providing time, course, and speed, I thought there must exist also complete libraries for all the values, just like for Arduino tinyGPS++, just by UART (serial0) and dispensing with USB and dGPS (I actually hate using demons).

User avatar
bensimmo
Posts: 4152
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Sun Jul 16, 2017 6:29 am

There may well be, just nobody replying knows of one, you may need to search under debian repositories or search git etc.
The Pi is more Python based, by default, for users as that was its initial goal.
Adafruit may well have something or adapt the Arduino code and put it out there for others to use.

Stiller
Posts: 206
Joined: Fri Oct 14, 2016 9:03 am

Re: Ublox GY-NEO-6M: C code (e.g. wiringPI) via UART, no dae

Sun Jul 16, 2017 6:57 am

bensimmo wrote:There may well be, just nobody replying knows of one, you may need to search under debian repositories or search git etc.
The Pi is more Python based, by default, for users as that was its initial goal.
Adafruit may well have something or adapt the Arduino code and put it out there for others to use.
yes, it seems you are right, but nothing to find, and Adafruit never provides C code for the Pi for either of their devices, just Python.
I think I stay with the hooked-up Arduino, and I even can easily plug then some more sensors to the Arduino additionally.

Return to “C/C++”