I'm not able to set vid and pid

Mike Tsao mike at sowbug.com
Thu Apr 12 20:24:18 CEST 2018


You didn't say whether you read the prior couple messages to this group, so
apologies if you did and that's still not working. Did you? (
https://lists.gnupg.org/pipermail/gnuk-users/2018-April/000026.html)

By the way, I don't see a target called "all" in the makefile my system
generated at gnuk/src/Makefile. Why are you using a different method to
build from the one specified in the README file?

On Thu, Apr 12, 2018 at 11:10 AM Lovro Orešković <lovro at oreskovic.me> wrote:

> So let me start from the end
>
> I can see the FST01 with gnuk firmware on it with lsusb, you can see the
> verbose output at the end of the email [1].
> The problem is the vid and pid are set to 0000:0000
>
> I tried building the binary a couple of ways, but it is also the same when
> I use docker (versions of programs installed on my machine should not be a
> problem this way)
> I am using this command to build it:
> env GNUK_CONFIG="--target=FST_01 --vidpid=234b:0000" make all
>
> I can see the gnuk when I start gpg --card-status as root. [2]
>
> I am using stlinkv2 (chinese clone) (both with  2.17.4 and  2.30.7
> firmware versions)
>
> Let me just add to unlock the rom I first need to run this command
> sudo openocd -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg
> -f /usr/local/share/openocd/scripts/target/stm32f1x.cfg -c "init; reset
> halt; shutdown"
> while pulling reset to ground then letting it go half way through the
> command, if I do not do that I get ValueError('Status of core is not
> halt.', 128) when trying to run sudo python2 ../tool/stlinkv2.py -u
>
> I have tried a lot of combinations but in the end all of them end up with
> the FST01 having vid and pid set to 0000:0000.
>
> So, thnx in advance,
> does anybody have any pointers?
>
> Lovro
>
> [1]
> Bus 002 Device 096: ID 0000:0000
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x0000
>   idProduct          0x0000
>   bcdDevice            0.00
>   iManufacturer           1 Free Software Initiative of Japan
>   iProduct                2 Gnuk Token
>   iSerial                 3 FSIJ-1.2.9-87022328
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           93
>     bNumInterfaces          1
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0x80
>       (Bus Powered)
>     MaxPower              100mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass        11 Chip/SmartCard
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              0
>       ChipCard Interface Descriptor:
>         bLength                54
>         bDescriptorType        33
>         bcdCCID              1.10  (Warning: Only accurate for version 1.0)
>         nMaxSlotIndex           0
>         bVoltageSupport         1  5.0V
>         dwProtocols             2  T=1
>         dwDefaultClock       4000
>         dwMaxiumumClock      4000
>         bNumClockSupported      0
>         dwDataRate           9600 bps
>         dwMaxDataRate        9600 bps
>         bNumDataRatesSupp.      0
>         dwMaxIFSD             254
>         dwSyncProtocols  00000000
>         dwMechanical     00000000
>         dwFeatures       0002047A
>           Auto configuration based on ATR
>           Auto voltage selection
>           Auto clock change
>           Auto baud rate change
>           Auto parameter negotation made by CCID
>           Auto IFSD exchange
>           Short APDU level exchange
>         dwMaxCCIDMsgLen       271
>         bClassGetResponse    echo
>         bClassEnvelope         FF
>         wlcdLayout           none
>         bPINSupport             0
>         bMaxCCIDBusySlots       1
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x01  EP 1 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x82  EP 2 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0004  1x 4 bytes
>         bInterval             255
> Device Status:     0x0000
>   (Bus Powered)
>
> [2]
> Reader ...........: 0000:0000:FSIJ-1.2.9-87022328:0
> Application ID ...: D276000124010200FFFE870223280000
> Version ..........: 2.0
> Manufacturer .....: unmanaged S/N range
> Serial number ....: 87022328
> Name of cardholder: [not set]
> Language prefs ...: [not set]
> Sex ..............: unspecified
> URL of public key : [not set]
> Login data .......: [not set]
> Signature PIN ....: forced
> Key attributes ...: rsa2048 rsa2048 rsa2048
> Max. PIN lengths .: 127 127 127
> PIN retry counter : 3 3 3
> Signature counter : 0
> Signature key ....: [none]
> Encryption key....: [none]
> Authentication key: [none]
> General key info..: [none]
>
> --
> http://lovro.oreskovic.me
>
> _______________________________________________
> Gnuk-users mailing list
> Gnuk-users at gnupg.org
> https://lists.gnupg.org/mailman/listinfo/gnuk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnuk-users/attachments/20180412/d10b02ae/attachment.html>


More information about the Gnuk-users mailing list