google / google/OpenSK

nRF52840 USB dongle can not work with source code from stable and develop branches

Open
#348 25 comments 0 reactions 1 assignee Claimed by @jmichelp View on GitHub
bug
Dominant language
Rust
Stars
3.4k
Forks
338
Avg merge
9m
Merged PRs (30d)
1

Description

## Expected Behavior
nRF52840 USB dongle should work with source code on stable branch or develop branch

## Actual Behavior
Neither stable nor develop branch work.

Following below steps
```
1. ./reset.sh
2. ./setup.sh
3. ./deploy.py --board=nrf52840_dongle_dfu --opensk --programmer=nordicdfu
Have switched nrf52840 usb dongle to bootloader mode.
4. ./tools/configure.py \
--certificate=crypto_data/opensk_cert.pem \
--private-key=crypto_data/opensk.key
```

If I use source code from `stable branch`, step 4 reports error 0xF2.
```
info: Private key is valid.
info: Certificate is valid.
DEBUG:fido2.hid.macos:Found CTAP device: 4295020873
DEBUG:fido2.hid:SEND: ffffffff8600084859dd5c0a590e2f
DEBUG:fido2.hid:RECV: ffffffff8600114859dd5c0a590e2f00000001020100000500000000000000000000000000000000000000000000000000000000000000000000000000000000
DEBUG:fido2.hid:SEND: 0000000190000104
DEBUG:fido2.hid:RECV: 00000001900001f20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Traceback (most recent call last):
File "./tools/configure.py", line 204, in
main(parser.parse_args())
File "./tools/configure.py", line 134, in main
for authenticator in tqdm(get_opensk_devices(args.batch)):
File "./tools/configure.py", line 72, in get_opensk_devices
return [ctap2.CTAP2(dev)]
File "/Users/gaofeng/.pyenv/versions/3.8.8/lib/python3.8/site-packages/fido2/ctap2/base.py", line 643, in __init__
self._info = self.get_info()
File "/Users/gaofeng/.pyenv/versions/3.8.8/lib/python3.8/site-packages/fido2/ctap2/base.py", line 695, in get_info
return self.send_cbor(Ctap2.CMD.GET_INFO, parse=Info)
File "/Users/gaofeng/.pyenv/versions/3.8.8/lib/python3.8/site-packages/fido2/ctap2/base.py", line 675, in send_cbor
raise CtapError(status)
fido2.ctap.CtapError: CTAP error: 0xF2 - UNKNOWN
```
If I checkout code to `develop branch`, after step 3, nrf52840 usb dongle behaves like

https://user-images.githubusercontent.com/10238809/126742034-fdf49cec-d0c0-4173-aeb3-64b33207f636.mp4

Even if I perform
`./deploy.py --board=nrf52840_dongle_dfu --erase_storage --programmer=nordicdfu`
before step 3, behavior is same.

What's the matter?

## Steps to Reproduce the Problem
```
1. ./reset.sh
2. ./setup.sh
3. ./deploy.py --board=nrf52840_dongle_dfu --opensk --programmer=nordicdfu
Have switched nrf52840 usb dongle to bootloader mode.
4. ./tools/configure.py \
--certificate=crypto_data/opensk_cert.pem \
--private-key=crypto_data/opensk.key
```
on either _stable_ or _develop_ branch.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.