Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE - need serial number for authenticity checker #1609

Closed
1 task
River-Mochi opened this issue Mar 7, 2023 · 9 comments · Fixed by #1666
Closed
1 task

BLE - need serial number for authenticity checker #1609

River-Mochi opened this issue Mar 7, 2023 · 9 comments · Fixed by #1666
Assignees
Labels
Enhancement New feature or additional function.
Milestone

Comments

@River-Mochi
Copy link
Contributor

River-Mochi commented Mar 7, 2023

Is your feature request related to a problem? Please describe.

There is an Authenticity checker for people who own pinecil V2 and want to check if it's legit.
Currently, we have to read and transfer the long and tiny numbers from ID and Serial number from a tiny pinecil screen to the checker webpage.
BLE already sends ID number, just need Serial number too.

Describe the solution you'd like

As soon as PineSAM starts getting the serial number on BLE, work can be started on how to integrate it to add the Checker feature for fun and convenience.

@River-Mochi River-Mochi added the Enhancement New feature or additional function. label Mar 7, 2023
@Ralim Ralim added this to the 2.22 milestone Mar 8, 2023
@ew1abz
Copy link
Contributor

ew1abz commented Mar 24, 2023

What is a Serial number, and what is ID?
According to https://pinecil.pine64.org/, the Serial number is the second, long string from the Debug menu.
If so, the FW already sends it via BLE

Although, in the FW we use the getDeviceID() function to get it. Very confusing.
I assume we need to send the getDeviceValidation() output.

Before any renaming or implementation, it maybe makes sense to have more information about them. Which is set by the uCU manufacturer, and which is set by the Pine64 factory?

@River-Mochi
Copy link
Contributor Author

River-Mochi commented Mar 24, 2023

If so, the FW already sends it via BLE

we are not currently seeing serial number in PineSAM
@builder555 could you please check this if you have time?

@gamelaster will know how the serial number is set but my understanding is it is a combination of what is done on eflash of the bl706 chip at the factory and also something that is done in IRONOS firmware.
gamelaster made the authentication webpage you linked and the BLISP flasher software.

@River-Mochi
Copy link
Contributor Author

Pinesam app is here if you want to check it out
https://github.com/builder555/PineSAM

@gamelaster
Copy link
Collaborator

@ew1abz Serial Number is set by chip manufacturer. Device validation is set by Pine Store factory.

@Ralim
Copy link
Owner

Ralim commented Mar 24, 2023

What is a Serial number, and what is ID?

Serial number is the ID burned by manufacturer that is the device MAC.
ID is a unique key Pine burns at the factory and records in their db.

Serial number is printed using getDeviceID();

uint64_t id = getDeviceID();

Meanwhile on the PinecilV2 we show the extra validation code from getDeviceValidation() Which returns the validation code in OTP.

According to https://pinecil.pine64.org/, the Serial number is the second, long string from the Debug menu. If so, the FW already sends it via BLE

Although, in the FW we use the getDeviceID() function to get it. Very confusing. I assume we need to send the getDeviceValidation() output.

Before any renaming or implementation, it maybe makes sense to have more information about them. Which is set by the uCU manufacturer, and which is set by the Pine64 factory?

Happy for us to add getDeviceValidation to the BLE data to allow for this.

@River-Mochi
Copy link
Contributor Author

River-Mochi commented Mar 24, 2023

I see it now, if I compare the serial number I see on the pinecil screen and my real BLE MAC address which pinsam terminal script shows me:
my serial number is padded with 4 zeros, and then it's the reverse of my ble MAC address, in sets of 2 characters.

@ew1abz
Copy link
Contributor

ew1abz commented Mar 24, 2023

Thanks, everybody. That reaffirms my suspicions about misnaming things.
Usually, serial number refers to a product SN. Here, on the device validation page and BLE GUI, it is used for naming chip unique ID. In the FW, though, all naming is OK.
Anyway, the output of the getDeviceValidation() function should be exposed via BLE.

@River-Mochi
Copy link
Contributor Author

River-Mochi commented Mar 24, 2023

Anyway, the output of the getDeviceValidation() function should be exposed via BLE.

@ew1abz

  • do you mean getDeviceValidation() = serial number exactly as seen on Pinecil screen
  • is already available over BLE?
  • or will you submit PR for this?
  • will it stay this misname or get a new name?
    thanks

@ew1abz
Copy link
Contributor

ew1abz commented Mar 25, 2023

Let's stick with @Ralim terminology:

Serial number is the ID burned by manufacturer that is the device MAC. It is printed using getDeviceID()
ID is a unique key Pine burns at the factory and records in their db. It is printed using getDeviceValidation()

do you mean getDeviceValidation() = serial number exactly as seen on Pinecil screen

No

is already available over BLE?

Yes, the Serial number is available over BLE. The ID is not.

or will you submit PR for this?

Yes, that's my intention.

will it stay this misname or get a new name?

Unfortunately, we have to keep the old naming. Otherwise, we need to change FW and Pinecil V2 Authenticity Checker. It'll not be backward compatible and will cause even more confusion at the user level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or additional function.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants