RomainQuidet / LELocation-framework-iOS

Bluetooth 4.0 Location & Navigation Service stream to CoreLocation iOS framework
Other
15 stars 4 forks source link

Provide nice exceptions/callbacks for errors #1

Closed capsicumDreams closed 7 years ago

capsicumDreams commented 7 years ago

When using LELocation, I get a crash when parsing data. Probably the data is formatted incorrectly, but it would be great to get some information about the problem. (And ideally, no crash!)

image

RomainQuidet commented 7 years ago

Hi, I mostly use this framework with my LE GPS app, so it might not be incorrect input proof ! Do you have any input sample that make it crashing ?

I'll update it to be more protect about wrong inputs ! thanks

capsicumDreams commented 7 years ago

Yep - sorry for the delay. Am working on getting some sample data to determine what the issue might be. Hang tight - and thanks for the reply.

RomainQuidet commented 7 years ago

Hi, I updated the framework, it should be more robust now. What GPS data streamer are you using ?

Romain

Le 7 sept. 2017 à 13:32, capsicumDreams notifications@github.com a écrit :

Yep - sorry for the delay. Am working on getting some sample data to determine what the issue might be. Hang tight - and thanks for the reply.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RomainQuidet/LELocation-framework-iOS/issues/1#issuecomment-327773211, or mute the thread https://github.com/notifications/unsubscribe-auth/AHzNfQ9z_DQv5x8sVDGlrQM2k3UW9v-7ks5sf9RLgaJpZM4PPXnp.

capsicumDreams commented 7 years ago

Here's a sample of the LocationAndSpeed (0x2A67) hex:

dd000000 fb68de1c 69b9220a dc3e0000 00e10709 090b0033

(This is after I've fixed a couple of minor issues with data sizes, so it may behave better). I'm writing my own transmitter - hence my assumption that it is a problem on my end!

Thanks for looking into it :)

RomainQuidet commented 7 years ago

Thanks I'll test it through the parser. Did you try this new 1.4 version ?

RomainQuidet commented 7 years ago

Hi, With this SDK version 1.4, your data is correct and the parser succeed with this data input

(lldb) po value
<dd000000 fb68de1c 69b9220a dc3e0000 00e10709 090b0033>

and the result

-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 424] enter with 24 bytes
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 445] has elevation YES
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 446] elevation source 0
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 447] has heading YES
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 448] heading source 0
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 449] has location YES
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 450] location status 1
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 451] has rolling time NO
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 452] speed and distance format 0
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 453] total distance present NO
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 454] has utc YES
-[LELocationManager parseLocationAndSpeed:fromNotification:] [Line 637] location updated : <+48.43379150,+17.00478490> +/- 1.00m (speed 0.00 mps / course 0.00) @ 09/09/2017 

It feels like your sample is located in Slovakia.

Can you confirm ?

capsicumDreams commented 7 years ago

Confirm sample was from Slovakia - everything seems fine. Thanks a lot! Nice job, and great library - thanks :)

RomainQuidet commented 7 years ago

Great, good news !