Advertisement
Tritonio

How do I configure a U-blox7 USB GPS in Linux?

Jan 8th, 2025
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.16 KB | None | 0 0
  1.  
  2. A friend and I recently purchased a white USB GPS/GLONASS U-blox7 GPS.
  3.  
  4. While it does work, it only seems to show GPS satellites and we would like to see GLONASS also.
  5.  
  6. Googling for help we have found no answers, but now have several questions.
  7.  
  8. 1. cat /dev/ttyACM0 | grep GPTXT shows
  9.  
  10. HW UBX-G70xx 00070000 *77
  11.  
  12. ROM CORE 1.00 (59842) Jun 27 2012
  13.  
  14. PROTVER 14.00*1E
  15.  
  16. And we've seen some claim that only one GNSS can be selected using FW ver 1.00 and that updating to FW 1.01 allows multiple GNSS to be viewed simultaneously.
  17.  
  18. Can a FW update be applied to our device? Searching for how, we've been told it cannot by some and can only by using u-connect by others.
  19.  
  20. 2. We would like to avoid installing wine and u-connect and instead work with a linux script to control our GPS device, and have been trying to use 'gpsctl' to disable GPS and enable GLONASS instead.
  21.  
  22. gpsctl -D 5 -x "\x06\x3E\x24\x00\x00\x00\x20\x04\x00\x08\x10\x00\x01\x00\x01\x01\x01\x01\x03\x00\x01\x00\x01\x01\x05\x00\x03\x00\x01\x00\x01\x01\x06\x08\x0E\x00\x01\x00\x01\x01" /dev/ttyACM0
  23.  
  24. As best we can tell, this is supposed to disable all but GLONASS but doesn't seem to have any effect.
  25.  
  26. Has anyone else found a way to work with 'gpsctl' which recognizes ublox inserting "b562" in front of our string adding the "ff21" checksum at the end automatically?
  27.  
  28. 3. We also notice that our 2 identical computers show quite different results from our GPS satellite reception, one having no fixes while the other may have 7 or more, and after hours of watching they never seem to become more similar in reception.
  29. glonass
  30. gpsctl
  31. fw
  32. +3 more
  33. Share
  34. 11 answers
  35. 28.26K views
  36. unbiased likes this.
  37.  
  38. grampy (Customer)
  39.  
  40. 7 years ago
  41. U-blox 7 can receive only one of GPS or GLONASS at a time.
  42. Refer to the u-blox 7 Receiver Description and Protocol Specification document downloadable from the documents and resources tab.
  43. The specific command is UBX-CFG-GNSS. To enable GLONASS, turn off all other systems - no GPS, no SBAS, no QZSS.
  44.  
  45. Try it out with u-center.on a PC first, then incorporate the command into your code. u-center will also display the complete hex command string in the command pop-up window which you can then copy into your code.
  46.  
  47. Can't help you with gpsctl: I use my own software for GNSS. But see the comment above about how to form the command correctly, from start-of-message through to checksum bytes.
  48.  
  49. Regarding two receivers, can't troubleshoot remotely but it sounds.like the antenna on the non-performing one is hosed or the non-performing one is being jammed by noise from your PC. Use the u-center signal strength bar graph or examine the contents of $GPGSV messages using gpsc, or even a terminal program, which show signal strength. To get a fix from a cold start, you need at least 3 satellites, and ideally.more than 8, with C/N0 signal levels above 33 or so.
  50. Expand Post
  51.  
  52. RobZ (Customer)
  53.  
  54. 7 years ago
  55. Thank you for confirming some of what we already know.
  56. As I said we run a linux OS and u-connect does not run under linux. I have consulted the manual and created a hex string per the manual and when I send the string with the command:
  57. gpsctl -D 5 -x "\x06\x3E\x24\x00\x00\x00\x20\x04\x00\x08\x10\x00\x01\x00\x01\x01\x01\x01\x03\x00\x01\x00\x01\x01\x05\x00\x03\x00\x01\x00\x01\x01\x06\x08\x0E\x00\x01\x00\x01\x01" /dev/ttyACM0
  58. the last line of the debug output shows what was sent by gpsctl to be:
  59. gpsctl:IO: => GPS: b562063e260024000000200400081000010001010101030001000101050003000100010106080e0001000101ff21
  60.  
  61. As we don't run windows perhaps a linux user might have a solution?
  62.  
  63. As to the two receivers, there is no non-performing one, simply one or the other seems to work very well when the other seems to not see any usable signals at all, and not even the same satellites although they are no more than a meter apart, and swapping their locations has no effect. Even tried taking them outside .
  64. Expand Post
  65.  
  66. grampy (Customer)
  67.  
  68. 7 years ago
  69. The software tool is "u-center", not "u-connect".
  70.  
  71. Your NEO-7 is ROM-based so it could not accept a firmware update even if there was one, and NEO-7 has only one RF chain which can be switched to either GPS band or GLONASS band but cannot use both concurrently. Under GPS, you can get information from other constellations like SBAS, QZSS but not GLONASS.
  72.  
  73. I agree that someone else more familiar with linux and gpsctl might have much better advice and might have the time to examine your command line for correctness.
  74. Expand Post
  75.  
  76. RobZ (Customer)
  77.  
  78. 7 years ago
  79. Thank you for confirming some of what we already know.
  80. As I said we run a linux OS and u-connect does not run under linux. I have consulted the manual and created a hex string per the manual and when I send the string with the command:
  81. gpsctl -D 5 -x "\x06\x3E\x24\x00\x00\x00\x20\x04\x00\x08\x10\x00\x01\x00\x01\x01\x01\x01\x03\x00\x01\x00\x01\x01\x05\x00\x03\x00\x01\x00\x01\x01\x06\x08\x0E\x00\x01\x00\x01\x01" /dev/ttyACM0
  82. the last line of the debug output shows what was sent by gpsctl to be:
  83. gpsctl:IO: => GPS: b562063e260024000000200400081000010001010101030001000101050003000100010106080e0001000101ff21
  84.  
  85. As we don't run windows perhaps a linux user might have a solution?
  86.  
  87. As to the two receivers, there is no non-performing one, simply one or the other seems to work very well when the other seems to not see any usable signals at all, and not even the same satellites although they are no more than a meter apart, and swapping their locations has no effect. Even tried taking them outside .
  88.  
  89. Sorry for misnaming the application, but regardless of the correct name it is a windows application and as noted in the title line we run a Linux OS.
  90. As a side note, the command I created was based upon a display from a u-center display posted by someone using a ublox8 chip which we compared to the documents relative to the ublox7 and ublox8 to determine what the bits were doing.
  91. Expand Post
  92.  
  93. Tofurkey (Customer)
  94.  
  95. 7 years ago
  96. Rob, I am running u-center under wine with no problems. You need to create (using ln -s) links to the /dev/ttyXXX (typically /dev/ttyUSB0 and /dev/ttyUSB1) in your "dosdevices" directory named "com1" and "com2" Then use (sudo) dmesg to determine which tty your device has grabbed so you can select the right port. Or just look for the flashing green.
  97.  
  98. u-center works fine for me so far. (however, not in updating the module, but I suspect that is not Linux's fault, its the module's - as ive updated lots of other devices firmware via wine, under Linux, in any case, its unrelated to your issue.)
  99. Expand Post
  100.  
  101. RobZ (Customer)
  102.  
  103. 7 years ago
  104. We have no interest in running a windows app (u-center) under wine, and have used wine in the past, We only wish to use the tools available in Linux. So far we have made progress using gpsctl, and it appears the ublox 7 USB device is not as sensitive as our phone GPS even when taken outside. Perhaps we will end up using bluetooth to pass data from the phone GPS. We notice that rotating the notebook a few degrees left or right can have a noticeable effect on satellite reception, and a piece of tin foil underneath also seems to help reception.
  105.  
  106. Note: gpsctl inserts the b5 62 header at the beginning, also the length, and the checksum, requiring only the Class/ID and payload to be provided in the control string to be sent.
  107. Expand Post
  108.  
  109. trong (Customer)
  110.  
  111. 6 years ago
  112. Hi RobZ,
  113.  
  114. So, did the gpsctl command work in your case ?
  115.  
  116. Thanks,
  117.  
  118. Trong
  119. Expand Post
  120.  
  121. MASHtm (Customer)
  122.  
  123. 6 years ago
  124. In case somebody still seeks for the answer how to use gpsctl...
  125.  
  126.  
  127. MASHtm (Customer)
  128.  
  129. 6 years ago
  130. you need to remove byte 3 and 4 from the hexstring because gpsctl inserts them as well (length). For example if you want to send a GNSS CFG sentence copied from u-control save file like:
  131.  
  132. 063E3C00002020070008100001000101010103000000010102060A000100010103081000000001010400080000000103050003000000010506080E0001000101
  133. you need to remove "3C00" as well resulting in
  134.  
  135. 063E002020070008100001000101010103000000010102060A000100010103081000000001010400080000000103050003000000010506080E0001000101
  136. Then the u-blox accepts it.
  137.  
  138. Expand Post
  139.  
  140. unbiased (Customer)
  141.  
  142. 4 years ago
  143. thanks to do gps/glonass u-blox7 in ubunt.
  144.  
  145. this is no driver in linux
  146.  
  147. you are so ​beautiful.
  148.  
  149.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement