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

[BUG]Device Fails to clear credentials and connect to Pelion #125

Open
PatrickMillar opened this issue Apr 7, 2020 · 5 comments
Open

[BUG]Device Fails to clear credentials and connect to Pelion #125

PatrickMillar opened this issue Apr 7, 2020 · 5 comments

Comments

@PatrickMillar
Copy link

PatrickMillar commented Apr 7, 2020

Describe the bug
While working with this example on an ST Discovery Kit I run into a problem where the device fails to retrieve the Account ID and Endpoint name. This persists through erasing the credentials and reflashing the board.

The output can be seen here:

Device Output

To Reproduce
Steps to reproduce the behavior:

  1. Program a previously used board that contains different credentials / applications
  2. See error
  3. Clear credentials and/or Re-flash
  4. See error

Logs
Disco Failure Log Pelion Example.txt

Additional context
I have seen this issue on multiple different Disco Boards. I have only had success clearing this example by programming deprecated examples and clearing the credentials using them.

@cvasilak

@ciarmcom
Copy link
Member

ciarmcom commented Apr 7, 2020

Internal Jira reference: https://jira.arm.com/browse/IOTPART-9151

@PatrickMillar
Copy link
Author

As an additional comment I am able to resolve this issue by loading a deprecated example: https://os.mbed.com/teams/ST/code/pelion-example-disco-iot01/ and clearing the credentials using it. Then if I reload this example I am able to connect to the platform.

@teetak01
Copy link
Contributor

teetak01 commented Apr 9, 2020

HI @PatrickMillar thanks for the report. We need to check this later.

As a simple workaround there are ways to erase the board without flashing old applications.

  1. use pyocd
    pyocd erase --mass-erase

  2. truncate the binary (linux example)
    truncate --size 1024K mbed-os-example-pelion.bin

Although normal Drag & Drop flashing of .bin image should also erase any pre-existing KVstore data as that is located in the first bank of the board, between bootloader and application image.

Are you perhaps using some other method for flashing that might preserve those sections that are empty in the image?

@PatrickMillar
Copy link
Author

@teetak01

I attempted the mass erase today and it did not solve my problem. I am flashing the device using the command: mbed compile -m auto --flash

Erase Log.txt

@teetak01
Copy link
Contributor

Hi, just wanted to update that we have not had time to look in to this issue yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants