DIY Project but app always show "No fix to satellites".

Hi everyone,
I try to implement a DIY project with Bluepill(STM32F103) + BLE(HM-11) + 10hz GPS(M8TLF).
Now I successfully bind BLE and GPS module to my mainboard and connect to RaceChrono but it always show "No fix to satellites.".

So I try to send the fake data to app but it is still not work (No fix to satellites.).
I am sure my UUID3 byte, index 4 have put the data (0x4A, GPS, 10 satellies).

Is there any un-document conditions caused this happen? (such as real time, valid altitude, UUID4 cannot read, etc.)
The packet will be
0x22 0x20 0xBA 0x4A 0x0E 0xC4 0x2D 0xD0 0x48 0x1F 0x31 0x80 0x13 0x88 0x00 0x00 0xFF 0xFF 0x00 0xFF

My fake data is here,
gps.hgps.year = 21;
gps.hgps.month = 2;
gps.hgps.date = 17;
gps.hgps.hours = 14;
gps.hgps.minutes = 4;
gps.hgps.seconds = 20;
gps.milliseconds += 100;
gps.hgps.latitude = 24.77377989286238;
gps.hgps.longitude = 121.00038602734459;
gps.hgps.speed = 0;
gps.hgps.fix_mode = 1;
gps.hgps.sats_in_use = 10;

And I use the BLE test tool to snap my packet.
image
image

Comments

  • aolaol
    edited February 2021
    Sorry, it might take some time for me to get around testing this (and verifying the GPS API still works). I will need to re-build my device first :)
  • Thanks for the reply, please let me know if your need my source code.
  • Hi Aol, would you have any idea about situation?
  • aolaol
    edited February 2021
    @lak Yes, sorry just got around to this.

    I rebuilt my device, which I had dismantled by mistake. I will now keep it as permanent test device for this API, so it's now much easier to confirm it is still working.

    The API still works so you must have a problem with the implementation.

    1st thing I look for is the byte 3, in your case 0x4A. It means your GPS has a fix (anything between 1 and 3) and locked to 10 satellites. So everything is good there.

    2nd thing I look, is you got the correct characteristics. The UUID 3 looks good, it has read and notify supported, and the read value seems correct in a quick glance. BUT, I see a problem with UUID4, it is write only. It should be readable, and should output a value according to the spec. No write access needed for UUID4, only read.

    Also make sure to look at the device status in RaceChrono, the one from the red/green button on bottom left. From there it's easy to see if there's a problem with only one value in the protocol. Or if it doesn't display anything for it, then you have a bigger problem, for example with the BLE characteristics.
  • @aol Have you seen https://github.com/timurrrr/arduino-CAN/tree/master/examples/FakeSubaruBRZ? You can "have" a Subaru BRZ in your garage for testing your DIY device with realistic looking data. Needs no fuel, just USB power :wink:
  • @timurrrr Haha, that's great! Now make it support OBD-II too... I already have a KTM 790 Duke simulator, and will add that BRZ to my test tools too! :)
  • @aol
    ok.. you mean my raw data looks good, the problem may be caused by the properties of characteristics, right? (So your app will not to check whether the data is correct, such as time, or something else.)
    Unfortunately, my BLE module (HM-11) don't let me to change the properties of characteristics, if the problem is caused by a mismatch of properties, then I need to change my BLE module. (Actually, I bought Bluefruit LE Friend today, hope to solve my problem...)

    And, my screenshot is below, it doesn't seem like to accept any data...
    image
    image
  • aolaol
    edited March 2021
    @aol As I said in earlier message, the UUID 4 on your device is not readable. It's an integral part of the protocol and you cannot skip doing it correctly. Your UUID 3 looks correct, so if you fix the UUID 4 it might work.
  • Got it, thanks.
    When I receive the new BLE module, I will update the progress, hope everything goes well.
  • aolaol
    edited March 2021
    The reason for using two UUIDs is that the default payload size is 20 bytes, and there's some complications when changing the MTU (= payload size). The GPS data just does not fit properly to 20 bytes.
  • laklak
    edited March 2021
    Hello @aol, I may need your help.
    I got the new BLE module (Adafruit Bluefruit LE UART Friend) and configured GATT perperties as the protocol defined.
    But RaceChrono still show "No fix to satellites".
    I patty sure I have notify the data via BLE because I try to use another GATT monitor app to check it again.. (I put the screenshot at the bottom)

    Would you please help me to check what is the problem?
    Or maybe you can provide a valid/verified raw data to help analyze this situation?

    image
    image
    image

  • One more screenshot, the BLE device is connected.
    image
  • aolaol
    edited March 2021
    1) Please allow notify on UUID 4 too. Should not be needed, but depending on your RC version it might.

    2) Yes, notify all your updates on both characteristics. It's up-to the connecting party to decide if to register to notifications or just read by polling.

    3) Your screenshots are not showing the current value on UUID 4, I find that disturbing as its value is integral for this protocol working.
  • laklak
    edited March 2021
    @aol cool!! It is work when I notify both UUID3 & UUID4.
    Now I can continue to develop my kit, thx man.

    BTW, report a document error, I marked on the screenshot below.
    image
  • Great to hear it works now. Fixed the docs.
Sign In or Register to comment.