daniestevez / galileo-osnma

Galileo OSNMA (Open Service Navigation Message Authentication)
Apache License 2.0
50 stars 8 forks source link

SERIAL TEST: osnma-longan-nano-client > no ..... CuteCom app > YES! #5

Closed K4KDR closed 2 years ago

K4KDR commented 2 years ago

With the longan-nano connected to a proper 3.3v USB/UART adapter, it presented correctly to my computer as /dev/ttyUSB0.

However, upon running the osnma-longan-nano-client utility, there was no READY reply when I reset the nano and attempts to send your test strings to the device via serial resulted in:

k4kdr@3010i5:~/galileo-osnma/osnma-longan-nano-client/target/debug$ ./osnma-longan-nano-client /dev/ttyUSB0
19 1176 120939 2a2aaaaaaaaaaaaaaaaaa80327fd4618
Error: Custom { kind: InvalidData, error: "incorrect galmon magic value" }

... the result was the same whether the client app was built with the default cargo build or cargo build --release

However, if a standard serial comm app is used such as CuteCom, the code running on the nano works perfectly!!

cutecom-nano-both-test-strings

... so I was extremely pleased about that.

Any suggestions on what I should check to determine why the osnma-longan-nano-client app is not establishing a connection to the nano for me?

Many thanks!

daniestevez commented 2 years ago

You're not running osnma-longan-nano-client correctly. Rather than giving it 19 1176 120939 2a2aaaaaaaaaaaaaaaaaa80327fd4618 as parameters (or typing this), you should give it data in the Galmon protocol, in the same way you would do for galmon-osnma. So you can either

nc 86.82.68.237 10000 | ./osnma-longan-nano-client /dev/ttyUSB0

or

<data.pb ./osnma-longan-nano-client /dev/ttyUSB0

using this sample file or another one you have as data.pb.

daniestevez commented 2 years ago

Take a look at this part of the README, since maybe you have an idea about how it could be written more clearly.

K4KDR commented 2 years ago

Thank you! Oh my, this longan-nano is extremely fast. Using the 'nc' method to leverage the web data stream, the AUTH messages just fly by!

nano-running-from-nc-web-stream

... and yes, I will be glad to make suggestions ref. that README. I have forked the repository and will attempt to contribute once it is clear that I have done everything correct across the various test scenarios!

daniestevez commented 2 years ago

It depends on what you consider fast hahaha. I have a file with more than a week worth of data, and the longan-nano takes hours (maybe > 1 day) to go through that, while my laptop processes it in a few seconds. I think that the bottleneck is perhaps the UART. I'm curious how much time the actual computations take.

daniestevez commented 2 years ago

I'm trying to clean up the issues by closing what is already solved and moving to a discussion what has background information that could be interesting to others. I think this issue can be closed, since already we added more information to the README.

K4KDR commented 2 years ago

Agree!

Github doesn't have a button for the non-owner of the repository to move an ISSUE to a DISCUSSION, but please feel free.