[Android] write/invoke API is not working in ChipTool

Reproduction steps

Commission ad device using Chiptool.
go to wild card
select write option
enter endpoint, cluster and attribute ids.
In the next screen enter value to write and click write.
Operation failing with 136 error

Platform
android
Platform Version(s)
Latest
Type
Manually tested with SDK
(Optional) If manually tested please explain why this is only manually tested
No response
Anything else?
I am trying to write on off control (Cluster id 6 with endpoint 1) tried to write onoff attribute with value 1/0 and also tried with true/false but no success.
Here is the logs.
FindOrEstablishSession: PeerId = [1:0000000000000008]
FindOrEstablishSession: No existing OperationalSessionSetup instance found
Found an existing secure session to [1:0000000000000008]!
OperationalSessionSetup[1:0000000000000008]: State change 1 --> 5
2023Got connected device pointer
IM write() called
WriteClient moving to [AddAttribu]
<<< [E:52443i S:47351 M:52662903] (S) Msg TX to 1:0000000000000008 [B4B4] --- Type 0001:06 (IM:WriteRequest)
(S) Sending msg 52662903 on secure session with LSID: 47351
WriteClient moving to [AwaitingRe]
2023-endAllActiveAnimators on 0xb40000760b7f0860 (RippleDrawable) with handle 0xb40000751b6e9da0
2023-Ime callback not found. Ignoring unregisterReceivedCallback. callbackId: 237035715
2023show(ime(), fromIme=true)

[E:52443i S:47351 M:215402175 (Ack:52662903)] (S) Msg RX from 1:0000000000000008 [B4B4] --- Type 0001:07 (IM:WriteResponse)
Found matching exchange: 52443i, Delegate: 0xb4000075cb6e95a0
Rxd Ack; Removing MessageCounter:52662903 from Retrans Table on exchange 52443i
WriteClient moving to [ResponseRe]
WriteResponseMessage =
{
AttributeStatusIBs =
[
AttributeStatusIB =
{
AttributePathIB =
{
Endpoint = 0x1,
Cluster = 0x6,
Attribute = 0x0000_0000,
}
StatusIB =
{
status = 0x88,
},
},
],
InteractionModelRevision = 1
}
WriteClient moving to [AwaitingDe]
WriteAttributesCallback ReportError is called
2023Report error for Endpoint 1, cluster 6, attribute 0: java.lang.IllegalStateException: IM Status: 136
2023write attribute Done
<<< [E:52443i S:47351 M:52662904 (Ack:215402175)] (S) Msg TX to 1:0000000000000008 [B4B4] --- Type 0000:10 (SecureChannel:StandaloneAck)
(S) Sending msg 52662904 on secure session with LSID: 47351
Flushed pending ack for MessageCounter:215402175 on exchange 52443i

Not sure if i am missing something here, Please suggest on the right way to do it.

0x88 is UNSUPPORTED_WRITE.
That's because the OnOff attribute of the On/Off cluster is readonly; you can't write it.  Its value is changed via the various commands the cluster defines.

The write operation in Android ChipTool has code below which requires endpoint, cluster id and attribute id, passing attributeid as 0 which is onoff. Is something else required to pass here, I am not finding the right way to do it and is not described anywhere.
val writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlvWriter.getEncoded(), version)
deviceController.write(writeAttributeCallback,
ChipClient.getConnectedDevicePointer(requireContext(),
addressUpdateFragment.deviceId),
listOf(writeRequest),
timedRequestTimeoutMs,
imTimeoutMs)

Again: the OnOff attribute is not writable, per spec.  You cannot change its value with an AttributeWriteRequest.


Cap the resource used by each connection

it's important for gnet to cap per connection resource usage as other systems do, for example Linux kernal has options for per connection send/recv buffer size. In gnet's case, per connection's send buf size and async tasks number should be capped.
Suggestion: to expose per conn options MaxPendingWriteTasksPerConn and MaxWriteBuffSizePerConn
When client calls AsyncWrite:

The conn's NumPendingTasks is checked, returns error if it reaches the limit
The conn's write buf size is checked (TotalWriteBuffSizeInPendingTasks + len(c.outboundBuffer) < `MaxWriteBuffSizePerConn), returns error if the write buf size reaches the limit

With this change, the caller is aware of the error immediately when one of the two limits is reached. I am not sure how difficult to do the buf size check within AsyncWrite in a lock-free fashion though.

With this change, the caller is aware of the error immediately when one of the two limits is reached. I am not sure how difficult to do the buf size check within AsyncWrite in a lock-free fashion though.

Maybe consider not doing it in a synchronous way but asynchronous approach: callback or channel, I don't want this change to cause any data race or introduce a mutex.


Question: is there a filter that routes based on grpc request message value?

I am experimenting with gRpc apis via envoy and figured that routing based on paths is pretty rigid because grpc always sets the path to packagename.servicename/methodname.
Header metadata matching is something I could use, but is there a way to specify matching routes based on some string matching (regex or equals or prefix) to a field value in the message format of the body in the request?
If not, would it be a simple filter to add in mainline if it sounds like something useful?

Routing on the message contents requires having access to the message descriptor. This is a general topic that we do want to start figuring out for a variety of different use cases (tap, envoy mobile, etc.) but there is no easy answer here.

Doesn't the proto descriptor set already have the message description? We provide that as an input the transcoder. Isn't it a similar mechanism?
Or the other idea was to convert the incoming message to json and route based on the key value matching. I can see how this is not efficient though.

The grpc-json transcoder has the descriptor loaded into it. So yes, if you have the descriptor, it would be possible to do this. See https://github.com/envoyproxy/envoy/issues/6109


add badges to readme

add badges to the readme so its less empty, can add more things later :)

Codecov Report

Merging #26 (df4b2bd) into main (3aa266d) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main     #26   +/-   ##
=====================================
  Coverage   0.00%   0.00%
=====================================
  Files          7       7
  Lines        321     321
=====================================
  Misses       321     321

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3aa266d...df4b2bd. Read the comment docs.


R-T3.4-12: The Defect Prediction Framework must have a gui to crawl software projects

ID
R-T3.4-12

Section
WP3: Methodology and Quality Assurance Requirements

Type
FUNCTIONAL_SUITABILITY

User Story
As an Operations Engineer/QoS Engineer/Release Manager, I want a graphical user interface to allow me to crawl software projects on which train defect prediction models

Requirement
The Defect Prediction Framework must provide a graphical user interface to crawl software publicly available projects from GitHub.

Extended Description
The user could have the opportunity to crawl private projects after providing his credential.

Priority
Must have

Affected Tools
DEFECT_PRED_TOOL

Means of Verification
Direct implementation on IDE, feature checklist, case-study

@dardin88 do you mean "to mine" private repositories?

@dardin88 do you mean "to mine" private repositories?

First to crawl, then to mine.


feat: add Arthera Mainnet and LESS Warp Route

Description
Type: New Network and new Warp Route
Network: Arthera
Warp Route: LESS
Other notes
Backward compatibility
Yes
Testing
The new metadata configs and deployment addresses have been generated by Hyperlane CLI.

please run yarn prettier

Thanks @paulbalaji for spotting these small fixes, I've accepted commited the suggestions and run prettier.
But in the same way than for the missing of alphabetical order, I don't remember to have added this extra line at the top which was then removed by prettier so it may be caused by empty prefix when the CLI has written these files.
I will check later by trying to add other testnet for more tests.


chore(ci): Replace deprecated command with environment file

Summary
Update .github/workflows/autodocs.yml to use environment file instead of deprecated set-output command.
For more information, see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
I found the workflow files that use set-output command through the following command:
$ find . -name '*.yml' -o -name '*.yaml' | xargs egrep '\bset-output\b'

AS-IS
echo "::set-output name=name::$output"

TO-BE
echo "name=$output" >> $GITHUB_OUTPUT

Checklist

[ ] The Pull Request has tests
[ ] There's an entry in the CHANGELOG
[ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference
Resolve #10551

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


[AMBARI-25093] "Spark2 Thrift Server alert does not work with HTTPS/SSL (apappu)

What changes were proposed in this pull request?
Modified alert code to use Truststore and TrusTstore password in beeline command if there is SSL enabled.
(Please fill in changes proposed in this fix)
How was this patch tested?
Have deployed the changes in ambari server with SSL and without SSL and both times it has worked fine.
(Please explain how this patch was tested. Ex: unit tests, manual tests)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
Please review Ambari Contributing Guide before opening a pull request.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5035/
Test FAILed.
Test FAILured.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5034/
Test PASSed.

cc @vbrodetskyi

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/5069/
Test FAILed.
Test FAILured.


Date rules after and after_or_equal incorrect parameter handling

after and after_or_equal rules expect params val and req. They actually receive val1, val2 and req.
Date comparisons should be based on val1 and val2.
https://github.com/skaterdav85/validatorjs/blob/master/src/rules.js

@sebeynott thank you for the report, I will have a look at this and get it corrected.

@mikeerickson welcome. We are using this validator on a large project and are now overriding these rules. We like the use of Laravel style rules as we have a Laravel backend.

I will get it worked out :)

@mikeerickson I am trying to use the after_or_equal and before_or_equal. I took a peek into the rules.js file and spotted the issue. I'd love to contribute or is this issue currently been sorted out?

Any update on above issue??

Author when you can fix?

Register custom rule with same name, it overrides builtin rule:
const Validator = require('validatorjs');
const isValid = require('date-fns/isValid');
const parseISO = require('date-fns/parseISO');

const isValidDate = date => typeof date === 'string' && isValid(parseISO(date));

// register custom rule
Validator.register('after_or_equal', function (date, params) {
  const val1 = date;
  const val2 = params.split(',')[0];

  if (!isValidDate(val1) || !isValidDate(val2)) return false;

  const inputDate = parseISO(val1)
  const afterDate = parseISO(val2)

  return inputDate.getTime() >= afterDate.getTime();
});

// --------------------------- USAGE ---------------------------------------------

const validator = new Validator({ // data
  date: '2019-11-20'
}, { // rules
  date: 'required|string|date|after_or_equal:2019-11-27'
});

validator.passes(); // false, because '2019-11-20' is early than '2019-11-27'
validator.fails(); // true


Add eduil domain

Institution/School Name
EDUIL
Instiution/School Website
https://www.u-btech.com/products/education-portal
Email Users
<EMAIL_ADDRESS>Please place an x between the square brackets if yes

[x] Students
[ ] Academic/Teaching Staff
[ ] Other/Support Staff
[ ] Alumni

Education Levels
Please place an x between the square brackets if yes

[ ] Post-graduate research
[ ] Graduate School
[ ] College (University) or Undergraduate School or equivalent
[ ] Community College or equivalent
[x] High School or equivalent
[ ] Elementary School or equivalent

Please Add eduil school domain


[DPP-07] Printed URLs are all the same

Issue:
In the out file the printed url for all entries is always the first one in the list.

Actually the algorithm was always using the last and not the first in the list, changed it so that urls and availability results are zipped and then printed


Avoids visiting unexported struct fields. Closes #2

Proposal for https://github.com/mitchellh/hashstructure/issues/2

Whoops I saw #2 before I saw this. I just merged a fix. Pretty close though! Thanks!


Black screen on trimming and enquiry for min duration

For some videos, if it is trimmed from the beginning to length 3sec(min), then the video contains only black frames(fully) but the voice plays.
There is no option to set min duration limit(default is 3 secs but if I use video with length less then 3secs then the trimmer gives error that video shorter than 3sec, can't proceed)
version: latest(1.0.16)
device : android (multiple versions) , both of the issues are not there in iOS

is it possible for you to provide your input video for me to test?
also provide your code

Sure, here it is https://drive.google.com/file/d/1xC-irLvaRgOA174TzSp2ujZFTUcMj8DD/view?usp=sharing
Code:
const handleTrim = async () => {
        if (selectedMediaObj) {
            setIsLoading(true);
            await showEditor(selectedMediaObj?.uri, {
                maxDuration: maxAllowedVideoLength,
                saveToPhoto: false,
            });
        }
    };

useEffect(() => {
        const eventEmitter = new NativeEventEmitter(NativeModules.VideoTrim);
        const subscription = eventEmitter.addListener(
            'VideoTrim',
            async event => {
                switch (event.name) {
                    case 'onShow': {
                        break;
                    }
                    case 'onHide': {
                        break;
                    }
                    case 'onStartTrimming': {
                        break;
                    }
                    case 'onFinishTrimming': {
                        if (mediaObj?.uri) {
                            const obj = { ...mediaObj };
                            obj.uri = `file://${event?.outputPath}`;
                            setMediaObj(obj);

                            setIsLoading(false);
                        } else {
                            onClose();
                        }

                        break;
                    }
                    case 'onCancelTrimming': {
                        setIsLoading(false);
                        break;
                    }
                    case 'onError': {
                        onClose();
                        break;
                    }
                }
            },
        );

        return () => {
            subscription.remove();
        };
    }, [mediaObj]);

@amosaxe can I confirm that your issue happened on Android only.
iOS works fine?

yes iOS works fine.

Hi, I'm trying to reproduce your issue but it's working fine, video saved to Gallery (Photos) with video + audio

Yes it is getting saved but using react-native-video player the video frames remains blank….can it be react-native-video issue, or anything else you are aware of?

yes, high chance.
You can do this to test:

do trimming again with same video
open the output video in rn-video-trim, it uses VideoView on Android, if it shows okay then I think no issue at all :)

btw, pls upgrade to 1.0.17, I added support for minDuration

Hmm, I tried out the steps as you mentioned, that works. The issue occurs only with those video that are trimmed to 3 second, also that too not with all videos, will look in RN-video side. Thanks
Thanks for the update and support for minDuration, but after the update it comes like below (with or without the usage of the minDuration prop), seems like its a bug.

Hi @maitrungduc1410 , can you help with this?

Hmm, I tried out the steps as you mentioned, that works. The issue occurs only with those video that are trimmed to 3 second, also that too not with all videos, will look in RN-video side. Thanks

Thanks for the update and support for minDuration, but after the update it comes like below (with or without the usage of the minDuration prop, i tried with minDuration > 0), seems like its a bug.

for this issue, what's your code + input video can I get?

hi @amosaxe pls upgrade to v2, Android UI is completely revamped, synced with iOS

Hi @maitrungduc1410, thanks for the update and apologies for not reverting last time, had missed this. Will check it out today. Kudos!


[Bug]: Page Not found Error when clicking on Check Documentation

What happened?
I found a BUG 🐞
When we are clicking on "Check Documentation" under the Project section it is showing us this error. We can fix this.
Please assign this issue to me under Gssoc'23 @priyankarpal
Thankyou
Add screenshots
Add screenshots

What browsers are you seeing the problem on?
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

it seems like this issue has already been raised before. We kindly request you review the existing issues and, if necessary, create a new one accordingly. https://github.com/priyankarpal/ProjectsHut/issues/484


[WIP] Consistency in API response for live brokers

Resolves #11841

This change can be risky because it changes the response format which can break client. A safer option would be to enhance the /tables/livebrokers API to take an optional tableName as the query parameter. We may annotate /tables/{tableName}/livebrokers as deprecated and suggest people to use the new API

This will break our production from what I understand. @tibrewalpratik17 can you also take a look?

Yes! @Jackie-Jiang's suggestion sounds good to me!
We can mark this API as deprecated and add an optional param in /tables/livebrokers.
In our production, we are making 2 calls per table to get list of broker host:port to query, having a single API to give us broker host:port will reduce one-hop for us.

Codecov Report

Merging #11850 (555b357) into master (878f613) will decrease coverage by 0.12%.
Report is 516 commits behind head on master.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master   #11850      +/-   ##
============================================
- Coverage      0.11%    0.00%   -0.12%
- Complexity        0        6       +6
============================================
  Files          2200     2291      +91
  Lines        118822   124224    +5402
  Branches      18002    19188    +1186
============================================
- Hits            137        6     -131
- Misses       118665   124218    +5553
+ Partials         20        0      -20

Flag
Coverage Δ

integration
<0.01% <0.00%> (?)

integration1
<0.01% <0.00%> (?)

integration1temurin11
?

integration1temurin17
?

integration1temurin20
?

integration2temurin11
?

integration2temurin17
?

integration2temurin20
?

java-21
<0.01% <0.00%> (?)

skip-bytebuffers-false
<0.01% <0.00%> (?)

temurin
<0.01% <0.00%> (?)

unittests1temurin11
?

unittests1temurin17
?

unittests1temurin20
?

unittests2temurin11
?

unittests2temurin17
?

unittests2temurin20
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files
Coverage Δ

.../controller/api/resources/PinotTableInstances.java
0.00% <ø> (ø)

...ntroller/helix/core/PinotHelixResourceManager.java
0.00% <0.00%> (ø)

... and 797 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Closing this to address all comments in a new PR and opening #12201


Restore danger local behaviour to use Github #trivial

Previously, Github would be used for danger local runs.
Since 5f505b9 however danger local would crash because the
github ci source wouldn't "validate_as_api_source". Fixes #454

Crash fix! Not trivial - it's a great fix, worthy of a point release, wanna add in a CHANGELOG and I'll ship it?


[vcpkg] Fix bootstrap on VS2015

What does your PR fix? Fixes #11567

Remove use of C++17 constexpr lambdas.

Thanks Billy!


Add Lentner Python 201 material

This adds the nice tutorial from Geoffrey Lentner.  It covers a lot of material/topics so I've pulled out a few to tag...in the future we may need to review to see if other tags make more sense.

https://36-293151248-gh.circle-artifacts.com/0/intersect-training.github.io/training-links/index.html


Asset Idea: Pixar's "HumanFemale" UsdSkel example

Is it possible to host that example here, in addition to hosting it on the Pixar website?

Along those lines, there's such a great community around unity-chan, it would be cool to host a USD conversion! https://unity-chan.com


unchained client - generate cosmos

It also looks like we need to update circle to generate the swagger in the go coinstacks. Let me take a look at that.


use of Fontawesome not possible

if you have fontawesome included in your page and create nodes with fontawesome classes instead of glyphicons (removed in later Bootstrap versions) it either displays nothing, squares or ignores the classes
entirely and creates the nodes with standard glyphicon classes instead.

@MaggiWuerze can you please provide a working reproducer on codepen or jsfiddle? Thanks

can do, but i just tried to do it via the $('#tree').treeview() method instead of node json data and the classes are accepted from there. only the icons for collapse and expand are not switching, it always shows the expand icon.

fas fa-caret-down -> fa-caret-down


Regression: Wrong credentials result in "AttributeError: 'DAVClient' object has no attribute 'password'"

This is on the "master" branch.
If the DAVClient  constructor is called with wrong credentials, then a subsequent call to principal() results in an attribute error AttributeError: 'DAVClient' object has no attribute 'password'  in line https://github.com/python-caldav/caldav/blob/cbca28592a4ccbf9f06601fdbbf2656e4afff17f/caldav/davclient.py#L536
Test case:
import caldav

client =  caldav.DAVClient("https://example.com/some/path", username="some_user", password="some_secret")
user_principal = client.principal()

This was introduce by commit 164f88d8 and is caused by lines https://github.com/python-caldav/caldav/blob/cbca28592a4ccbf9f06601fdbbf2656e4afff17f/caldav/davclient.py#L548-L549 which should read instead:
            self.username = None
            self.password = None

I found this while debugging another authorization problem for which a PR is coming soon and will fix this too, plus the other problem I was actually investigating.

Sorry the slow response ... I've been knocked out by a booster vaccine shot today (I do wonder a bit if the booster shot really helps against Omikron or if the push to give everyone booster doses is just some panic kneejerk reaction by the government ... I would not take it if I had known it would knock me out for a full day ... but I digress).
The suggestion to set it to None seems good.

Don't worry, I sometimes have much longer response times - even without Corona vaccination. (Got my third today, let's see how tomorrow will workout ...)


Add markdown documentation for unique faker

This PR will add documentation for the unique faker in the main README.md as well as a separate markdown file detailing its usage. Let me know if everything written sounds okay.

@snuyanzin Seems we still have concurrency issues.

Great work @giunto , thanks. Would it be possible to add this page also to the mkdocs.yml file, so it's part of the index/navigation?

Added. Thanks for letting me know.

Thanks!

Added. Thanks for letting me know.

No worries at all. Thanks for providing the documentation, it's live now: https://www.datafaker.net/documentation/unique-values/


Update to the latest version of libuiohook

The current version of libuiohook has some bugs, for example:

https://github.com/wilix-team/iohook/issues/244
https://github.com/SnosMe/uiohook-napi/issues/9

So, I hope you can upgrade libuiohook to the latest version, thanks.

I have confirmed that none of these issues exist anymore in<EMAIL_ADDRESS>Thank you for your work!


Allow specifying a different folder than /tmp for temp work

Currently /tmp is used for checking out everything, and it seems docker trips on it when having to do builds.

While it turned out docker was not tripping on using the /tmp folder, allow changing the folder regardless.


Pattern type serialisation error

Checks

[X] I added a descriptive title to this issue
[X] I have searched (google, github) for similar issues and couldn't find anything
[X] I have read and followed the docs and still think this is a bug

Bug
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.7
            pydantic compiled: True
                 install path: /root/.local/lib/python3.8/site-packages/pydantic
               python version: 3.8.6 (default, Oct 13 2020, 20:49:19)  [GCC 8.3.0]
                     platform: Linux-3.10.0-1127.19.1.el7.x86_64-x86_64-with-glibc2.2.5
     optional deps. installed: ['email-validator']

from typing import Pattern
from pydantic import BaseModel

class Model(BaseModel):
    filter: Pattern

Model(filter="^regex$").json()

This produce an error :
TypeError: Object of type 'Pattern' is not JSON serializable
I had to write a custom encoder to be able to serialize properly a Pattern type :
from typing import Pattern
from pydantic import BaseModel
import re

class Model(BaseModel):
    filter: Pattern
    class Config:
        json_encoders = {
            re.Pattern: lambda v: v.pattern,
        }

Model(filter="^regex$").json()

@PrettyWood @samuelcolvin
Although this resolve the problem with the code provided in this issue, I have now a problem with FastAPI, when returning an object which contains a field of Pattern type.

<EMAIL_ADDRESS>  | [2021-03-01 15:49:42 +0000] [11] [ERROR] Exception in ASGI application
<EMAIL_ADDRESS>  | Traceback (most recent call last):
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py", line 398, in run_asgi
<EMAIL_ADDRESS>  |     result = await app(self.scope, self.receive, self.send)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in call
<EMAIL_ADDRESS>  |     return await self.app(scope, receive, send)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/applications.py", line 199, in call
<EMAIL_ADDRESS>  |     await super().call(scope, receive, send)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/applications.py", line 111, in call
<EMAIL_ADDRESS>  |     await self.middleware_stack(scope, receive, send)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in call
<EMAIL_ADDRESS>  |     raise exc from None
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in call
<EMAIL_ADDRESS>  |     await self.app(scope, receive, _send)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in call
<EMAIL_ADDRESS>  |     raise exc from None
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in call
<EMAIL_ADDRESS>  |     await self.app(scope, receive, sender)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/routing.py", line 566, in call
<EMAIL_ADDRESS>  |     await route.handle(scope, receive, send)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/routing.py", line 227, in handle
<EMAIL_ADDRESS>  |     await self.app(scope, receive, send)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
<EMAIL_ADDRESS>  |     response = await func(request)
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/routing.py", line 209, in app
<EMAIL_ADDRESS>  |     response_data = await serialize_response(
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/routing.py", line 127, in serialize_response
<EMAIL_ADDRESS>  |     return jsonable_encoder(
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 57, in jsonable_encoder
<EMAIL_ADDRESS>  |     return jsonable_encoder(
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 90, in jsonable_encoder
<EMAIL_ADDRESS>  |     encoded_value = jsonable_encoder(
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 104, in jsonable_encoder
<EMAIL_ADDRESS>  |     jsonable_encoder(
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 90, in jsonable_encoder
<EMAIL_ADDRESS>  |     encoded_value = jsonable_encoder(
<EMAIL_ADDRESS>  |   File "/root/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 141, in jsonable_encoder
<EMAIL_ADDRESS>  |     raise ValueError(errors)
<EMAIL_ADDRESS>  | ValueError: [TypeError("'re.Pattern' object is not iterable"), TypeError('vars() argument must have dict attribute')]

When I put back my workaround in my code, it works :
json_encoders = {
            re.Pattern: lambda v: v.pattern,
        }

Well fastapi uses its own json encoder and reuses ENCODERS_BY_TYPE from pydantic here
https://github.com/tiangolo/fastapi/blob/5614b94ccc9f72f1de2f63aae63f5fe90b86c8b5/fastapi/encoders.py#L126-L127
We could maybe add Pattern directly in ENCODERS_BY_TYPE to make it work

@PrettyWood
I installed pydantic from your branch (https://github.com/PrettyWood/pydantic/archive/pattern-fastapi.zip) and it works.
Well done 👍


Update pip_examples.ado, pip.sthlp, and make.do files

Hi @randrescastaneda ,
I have updated pip_examples.ado, pip.sthlp, and make.do files.
Tefera

Hi Andres,
I noticed that pip_drop frame won't dropped internal frames as the frame prefix in the pip_drop.ado file was initialized as pip_. So, I have edited the prefix as _pip.
Tefera


use six for string checking

use python compatibility library instead of cheating with types

Thanks for including Six, I've seen this module before but wasn't very familiar with it yet.

np .)


SCL, SDA, RST configuration

I am also following #34 to test a working example azure-optga-trust-m provision_test_certificate. I was able to successfully build the code for esp32-s2 but I could not figure out where to provide GPIO numbers for SCL, SDA and RST as I have different GPIOs allocated for I2C.
Originally posted by @markandpathak in https://github.com/Infineon/optiga-trust-m/issues/64#issuecomment-867866280

if you have the components folder with optiga in place (the respo is cloned recusivly) then you should be able to see an extra menu under the "components" menu when you execute idf.py menuconfig
Do you see it there? For instance a new certificate creation is describe in this menu with screenshots

I selected the certificate slot as given in the screenshots but there is no option to change the hardware pins in the menuconfig.

you are right, becasue it is prepared for a specific board, could you try this Kconfig.zip (you need to unzip it) and place it here and replace the original file. You should now see the new menu under the same component.

Ok. I will check with the new Kconfig. I will not be having access to the hardware this weekend. I'll test it and update it here on monday.

Hello, I tried as you suggested. I have set the SCL, SDA and RST pins.  Although I am getting some I2C frequency error. The error is before pal_i2c_init successful message.
And then I think it is going into some loop depriving other tasks of CPU time hence watch-dog timer gets triggered. I also tried on a clean pull from repo, same error.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: 2947ce8b4c88197179d5ec8c64f0c29dfad2b322e4eae0bb6a37a24d5c643ae3
Expected: d4c2f6ffac54f5c6e7382590e317dd1f4bb7493a3174122667d86dd7c1108686
Attempting to boot anyway...
entry 0x4004c1ec
I (40) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (40) boot: compile time 15:29:58
I (40) boot: chip revision: 0
I (43) boot.esp32s2: SPI Speed      : 80MHz
I (47) boot.esp32s2: SPI Mode       : DIO
I (52) boot.esp32s2: SPI Flash Size : 4MB
I (57) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (66) boot: ## Label            Usage          Type ST Offset   Length
I (73) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (81) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (88) boot:  2 factory          factory app      00 00 00010000 00100000
I (95) boot: End of partition table
I (100) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=08d60h ( 36192) map
I (116) esp_image: segment 1: paddr=00018d88 vaddr=3ffbe430 size=02cd4h ( 11476) load
I (119) esp_image: segment 2: paddr=0001ba64 vaddr=40022000 size=045b4h ( 17844) load
I (130) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=1b910h (112912) map
I (158) esp_image: segment 4: paddr=0003b938 vaddr=400265b4 size=07e74h ( 32372) load
I (167) esp_image: segment 5: paddr=000437b4 vaddr=50000000 size=00010h (    16) load
I (174) boot: Loaded app from partition at offset 0x10000
I (174) boot: Disabling RNG early entropy source...
I (189) cac��f<��3?����f],]Z�
                             �V�,ZY�B��size 8KB, 4Ways, cache line size 32Byte
I (189) cpu_start: Pro cpu up.
I (200) cpu_start: Pro cpu start user code
I (200) cpu_start: cpu freq: 160000000
I (201) cpu_start: Application information:
I (205) cpu_start: Project name:     provision_test_certificate
I (212) cpu_start: App version:      202005.00-3-g722bb54-dirty
I (218) cpu_start: Compile time:     Jun 28 2021 15:29:52
I (224) cpu_start: ELF file SHA256:  e8bc9c780a21f3e0...
I (230) cpu_start: ESP-IDF:          v4.3-dirty
I (236) heap_init: Initializing. RAM available for dynamic allocation:
I (243) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (249) heap_init: At 3FFC20D8 len 00039F28 (231 KiB): DRAM
I (255) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (262) spi_flash: detected chip: generic
I (266) spi_flash: flash io: dio
I (271) cpu_start: Starting scheduler on PRO CPU.
I (476) pal_os_event: Init : Create Timer
I (476) pal_os_event: Init : Create Timer successful
I (546) pal_i2c: Initialize pal_i2c_init
E (546) i2c: i2c_param_config(645): i2c clock choice is invalid, please check flag and frequency
I (546) pal_i2c: init successful
E (5456) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (5456) task_wdt:  - IDLE (CPU 0)
E (5456) task_wdt: Tasks currently running:
E (5456) task_wdt: CPU 0: main
E (5456) task_wdt: Print CPU 0 (current core) backtrace

Backtrace:0x4008CC66:0x3FFBEBD0 0x400240EE:0x3FFBEBF0 0x40086B6D:0x3FFC3730 0x40086AC7:0x3FFC3750 0x4009B75E:0x3FFC3770 0x4002A61D:0x3FFC3790
0x4008cc66: task_wdt_isr at /home/invesun/esp/esp-idf/components/esp_common/src/task_wdt.c:189

0x400240ee: _xt_lowint1 at /home/invesun/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1105

0x40086b6d: optiga_trust_init at /home/invesun/UNITGRID/optiga/azure-optiga-trust-m/components/optiga/optiga-trust-m/examples/utilities/optiga_trust.c:599

0x40086ac7: app_main at /home/invesun/UNITGRID/optiga/azure-optiga-trust-m/examples/provision_test_certificate/build/../main/main.c:409

0x4009b75e: main_task at /home/invesun/esp/esp-idf/components/freertos/port/port_common.c:133 (discriminator 2)

0x4002a61d: vPortTaskWrapper at /home/invesun/esp/esp-idf/components/freertos/port/xtensa/port.c:168

E (10456) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (10456) task_wdt:  - IDLE (CPU 0)
E (10456) task_wdt: Tasks currently running:
E (10456) task_wdt: CPU 0: main
E (10456) task_wdt: Print CPU 0 (current core) backtrace

Backtrace:0x4008CC66:0x3FFBEBD0 0x400240EE:0x3FFBEBF0 0x40086B6D:0x3FFC3730 0x40086AC7:0x3FFC3750 0x4009B75E:0x3FFC3770 0x4002A61D:0x3FFC3790
0x4008cc66: task_wdt_isr at /home/invesun/esp/esp-idf/components/esp_common/src/task_wdt.c:189

0x400240ee: _xt_lowint1 at /home/invesun/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1105

0x40086b6d: optiga_trust_init at /home/invesun/UNITGRID/optiga/azure-optiga-trust-m/components/optiga/optiga-trust-m/examples/utilities/optiga_trust.c:599

0x40086ac7: app_main at /home/invesun/UNITGRID/optiga/azure-optiga-trust-m/examples/provision_test_certificate/build/../main/main.c:409

0x4009b75e: main_task at /home/invesun/esp/esp-idf/components/freertos/port/port_common.c:133 (discriminator 2)

0x4002a61d: vPortTaskWrapper at /home/invesun/esp/esp-idf/components/freertos/port/xtensa/port.c:168

@ayushev I tried the code with different I2C speeds but no luck. Same error.

@markandpathak I noticed you use a different from mentioned here ESP IDF version, in the 4.3 the i2c driver is abit different, could you please return back the original settings and add this line conf.clk_flags = 0; somewhere here

Yes, I also referred to same clk_flags settings after some research. I modified in pal_i2c.c and it worked. Now it's stuck at Writing to Oid  : E0E1. I tried to reset several times but same it gets stuck at the same point.

I also tried to uncomment this line.
https://github.com/Infineon/optiga-trust-m/blob/d57dd0a8a858c11c7754c6aac83b8e560756db60/pal/esp32_freertos/pal_i2c.c#L151
After this I received a stream of w-failure in the output. Can it be some issue?

it looks like you have it working already, please revert back you changes done recently ("with oneShot: 1000").
What will happen if you remove this certificaite and put "" instead there.
You should be able to see a new keypair to be generated.

As per your suggestion I tried that. Here is the output.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
I (21) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (21) boot: compile time 12:10:18
I (21) boot: chip revision: 0
I (25) boot.esp32s2: SPI Speed      : 80MHz
I (29) boot.esp32s2: SPI Mode       : DIO
I (34) boot.esp32s2: SPI Flash Size : 4MB
I (38) boot: Enabling RNG early entropy source...
I (44) boot: Partition Table:
I (47) boot: ## Label            Usage          Type ST Offset   Length
I (55) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (62) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (70) boot:  2 factory          factory app      00 00 00010000 00100000
I (77) boot: End of partition table
I (81) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=08e90h ( 36496) map
I (98) esp_image: segment 1: paddr=00018eb8 vaddr=3ffbe590 size=02cd4h ( 11476) load
I (101) esp_image: segment 2: paddr=0001bb94 vaddr=40022000 size=04484h ( 17540) load
I (111) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=1ef84h (126852) map
I (142) esp_image: segment 4: paddr=0003efac vaddr=40026484 size=08108h ( 33032) load
I (151) esp_image: segment 5: paddr=000470bc vaddr=50000000 size=00010h (    16) load
I (158) boot: Loaded app from partition at offset 0x10000
I (159) boot: Disabling RNG early entropy source...
I (173) cac��f<��3?����,W��
                           �V�,ZY�B��size 8KB, 4Ways, cache line size 32Byte
I (173) cpu_start: Pro cpu up.
I (185) cpu_start: Pro cpu start user code
I (185) cpu_start: cpu freq: 160000000
I (185) cpu_start: Application information:
I (190) cpu_start: Project name:     provision_test_certificate
I (196) cpu_start: App version:      202005.00-3-g722bb54-dirty
I (203) cpu_start: Compile time:     Jul  2 2021 14:11:58
I (209) cpu_start: ELF file SHA256:  cf023454a7bea382...
I (215) cpu_start: ESP-IDF:          v4.3-dirty
I (220) heap_init: Initializing. RAM available for dynamic allocation:
I (227) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (233) heap_init: At 3FFC2238 len 00039DC8 (231 KiB): DRAM
I (240) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (246) spi_flash: detected chip: generic
I (251) spi_flash: flash io: dio
I (255) cpu_start: Starting scheduler on PRO CPU.
vTaskCallbackHandler
I (460) pal_os_event: Init : Create Timer
I (460) pal_os_event: Init : Create Timer successful
I (530) pal_i2c: Initialize pal_i2c_init
I (530) pal_i2c: I2C SDA:33 SCL34 Bitrate:400000
I (530) pal_i2c: init successful

Write certficate failed

Sorry, my bad, the value should be 0
#define CERTIFICATE	(0)

That's also failing. I selected NIST P-256 curve certificate generation.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
I (21) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (21) boot: compile time 12:10:18
I (21) boot: chip revision: 0
I (24) boot.esp32s2: SPI Speed      : 80MHz
I (29) boot.esp32s2: SPI Mode       : DIO
I (34) boot.esp32s2: SPI Flash Size : 4MB
I (38) boot: Enabling RNG early entropy source...
I (44) boot: Partition Table:
I (47) boot: ## Label            Usage          Type ST Offset   Length
I (55) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (62) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (70) boot:  2 factory          factory app      00 00 00010000 00100000
I (77) boot: End of partition table
I (81) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=08ff8h ( 36856) map
I (98) esp_image: segment 1: paddr=00019020 vaddr=3ffbe590 size=02cd4h ( 11476) load
I (101) esp_image: segment 2: paddr=0001bcfc vaddr=40022000 size=0431ch ( 17180) load
I (111) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=1f4ech (128236) map
I (143) esp_image: segment 4: paddr=0003f514 vaddr=4002631c size=08270h ( 33392) load
I (152) esp_image: segment 5: paddr=0004778c vaddr=50000000 size=00010h (    16) load
I (159) boot: Loaded app from partition at offset 0x10000
I (159) boot: Disabling RNG early entropy source...
I (173) ca��fÆ~
               ��3?����Սѥ��������J���镁�Z%�     ��U��.KH�X,ZY��ine size 32Byte
I (173) cpu_start: Pro cpu up.
I (185) cpu_start: Pro cpu start user code
I (185) cpu_start: cpu freq: 160000000
I (185) cpu_start: Application information:
I (190) cpu_start: Project name:     provision_test_certificate
I (196) cpu_start: App version:      202005.00-3-g722bb54-dirty
I (203) cpu_start: Compile time:     Jul  2 2021 14:11:58
I (209) cpu_start: ELF file SHA256:<PHONE_NUMBER>874eeb...
I (215) cpu_start: ESP-IDF:          v4.3-dirty
I (220) heap_init: Initializing. RAM available for dynamic allocation:
I (228) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (234) heap_init: At 3FFC2238 len 00039DC8 (231 KiB): DRAM
I (240) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (247) spi_flash: detected chip: generic
I (251) spi_flash: flash io: dio
I (255) cpu_start: Starting scheduler on PRO CPU.
vTaskCallbackHandler
I (460) pal_os_event: Init : Create Timer
I (460) pal_os_event: Init : Create Timer successful
I (530) pal_i2c: Initialize pal_i2c_init
I (530) pal_i2c: I2C SDA:33 SCL34 Bitrate:400000
I (530) pal_i2c: init successful

Select the key type from below list
Press 1 to Generate NIST P-256
Press 2 to Generate NIST P-384
Press 3 to Generate RSA 1024
Press 4 to Generate RSA 2048

Selected NIST P-256 Curve
Generating keypair in Oid E0F1
202
Key Pair generation failed

To try things out could you üease try two things:

Change the reset tyep to the software reset - https://github.com/Infineon/optiga-trust-m/blob/trust_m1_m3/optiga/include/optiga/optiga_lib_config_m_v3.h#L114 it should be 1 instead of 0
If the above doesn't change anything, could you please enable logs by uncommenting the following lines - https://github.com/Infineon/optiga-trust-m/blob/trust_m1_m3/optiga/include/optiga/optiga_lib_config_m_v3.h#L136-L143

Here is the output with reset type changed and log enabled. There wasn't any blob directory in azure package but there was a optiga_lib_config.h in include folder.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
I (21) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (21) boot: compile time 12:10:18
I (21) boot: chip revision: 0
I (24) boot.esp32s2: SPI Speed      : 80MHz
I (29) boot.esp32s2: SPI Mode       : DIO
I (34) boot.esp32s2: SPI Flash Size : 4MB
I (38) boot: Enabling RNG early entropy source...
I (44) boot: Partition Table:
I (47) boot: ## Label            Usage          Type ST Offset   Length
I (55) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (62) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (70) boot:  2 factory          factory app      00 00 00010000 00100000
I (77) boot: End of partition table
I (81) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=09550h ( 38224) map
I (98) esp_image: segment 1: paddr=00019578 vaddr=3ffbe590 size=02cdch ( 11484) load
I (101) esp_image: segment 2: paddr=0001c25c vaddr=40022000 size=03dbch ( 15804) load
I (111) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=1fa2ch (129580) map
I (143) esp_image: segment 4: paddr=0003fa54 vaddr=40025dbc size=087d0h ( 34768) load
I (152) esp_image: segment 5: paddr=0004822c vaddr=50000000 size=00010h (    16) load
I (159) boot: Loaded app from partition at offset 0x10000
I (160) boot: Disabling RNG early entropy source...
I (174) cac��f<��3?����,W��
                           �V�,ZY�B��size 8KB, 4Ways, cache line size 32Byte
I (174) cpu_start: Pro cpu up.
I (185) cpu_start: Pro cpu start user code
I (186) cpu_start: cpu freq: 160000000
I (186) cpu_start: Application information:
I (190) cpu_start: Project name:     provision_test_certificate
I (197) cpu_start: App version:      202005.00-3-g722bb54-dirty
I (203) cpu_start: Compile time:     Jul  2 2021 14:11:58
I (209) cpu_start: ELF file SHA256:  1849f23d546e667c...
I (215) cpu_start: ESP-IDF:          v4.3-dirty
I (221) heap_init: Initializing. RAM available for dynamic allocation:
I (228) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (234) heap_init: At 3FFC2240 len 00039DC0 (231 KiB): DRAM
I (240) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (247) spi_flash: detected chip: generic
I (251) spi_flash: flash io: dio
I (256) cpu_start: Starting scheduler on PRO CPU.
vTaskCallbackHandler
I (461) pal_os_event: Init : Create Timer
I (461) pal_os_event: Init : Create Timer successful
[optiga util]     : OPTIGA Trust initializationI (461) :

I (461) :

[optiga util]     : optiga_util_open_applicationI (471) :

I (471) :

[optiga cmd]      : optiga_cmd_open_applicationI (481) :

I (481) :

I (521) pal_i2c: Initialize pal_i2c_init
I (521) pal_i2c: I2C SDA:33 SCL34 Bitrate:400000
I (521) pal_i2c: init successful
[optig
Select the key type from below list
Press 1 to Generate NIST P-256
Press 2 to Generate NIST P-384
Press 3 to Generate RSA 1024
Press 4 to Generate RSA 2048

Selected NIST P-256 Curve
Generating keypair in Oid E0F1
[optiga crypt]    : optiga_crypt_ecc_generate_keypairI (11041) :

I (11041) :

[optiga cmd]      : optiga_cmd_gen_keypairI (11041) :

I (11051) :

[optiga cmd]      : Sending generate keypair command..I (11071) :

I (11071) :

[optiga crypt]    : Call back status errorI (11081) :

I (11081) :

202
Key Pair generation failed

I tried on multiple hardware prototypes, just to eliminate possibility of defective IC, but all result remained same. Circuit wise it's very simple. 3.3V connected to Vcc. SCL and SDA goes to ESP32 directly with 10k pull up on both. RST is connected to a GPIO on ESP32. So I don't think that this can be an hardware issue. There no other I2C devices on bus. There is a log Optiga Trust Initialization.  Does that mean the ESP can reach the IC?

Just checking out possibilities. Is it possible that the azure example is not compatible with Optiga Trust M V3? My hardware uses V3. As there is no file which you mentioned here in the repo I cloned. I think it is V3 specific config.: https://github.com/Infineon/optiga-trust-m/blob/trust_m1_m3/optiga/include/optiga/optiga_lib_config_m_v3.h#L136-L143. Azure repo just has optiga_lib_config.h.

I've udpate the code and tested it on the 4.3 (it was originally build for the 4.1). It should work, youcl you please update your repository. Also please check again whetehr you have all teh pins selected correctly, and ECC Private key (second private key) is selected by default.

Hello @ayushev, I tried with new repo but same result. Here is the output.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
I (21) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (21) boot: compile time 11:31:53
I (21) boot: chip revision: 0
I (24) boot.esp32s2: SPI Speed      : 80MHz
I (29) boot.esp32s2: SPI Mode       : DIO
I (34) boot.esp32s2: SPI Flash Size : 4MB
I (38) boot: Enabling RNG early entropy source...
I (44) boot: Partition Table:
I (47) boot: ## Label            Usage          Type ST Offset   Length
I (55) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (62) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (70) boot:  2 factory          factory app      00 00 00010000 00100000
I (77) boot: End of partition table
I (81) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=09e80h ( 40576) map
I (98) esp_image: segment 1: paddr=00019ea8 vaddr=3ffbe590 size=02ce4h ( 11492) load
I (101) esp_image: segment 2: paddr=0001cb94 vaddr=40022000 size=03484h ( 13444) load
I (110) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=203c0h (132032) map
I (143) esp_image: segment 4: paddr=000403e8 vaddr=40025484 size=09108h ( 37128) load
I (153) esp_image: segment 5: paddr=000494f8 vaddr=50000000 size=00010h (    16) load
I (161) boot: Loaded app from partition at offset 0x10000
I (161) boot: Disabling RNG early entropy source...
I (174) ca��fÆ~
               ��3?��]�],]Z�
                            �V�,ZY�B��size 8KB, 4Ways, cache line size 32Byte
I (174) cpu_start: Pro cpu up.
I (186) cpu_start: Pro cpu start user code
I (186) cpu_start: cpu freq: 160000000
I (186) cpu_start: Application information:
I (191) cpu_start: Project name:     provision_test_certificate
I (197) cpu_start: App version:      202005.00-6-gd0d8690-dirty
I (204) cpu_start: Compile time:     Jul  6 2021 11:46:29
I (210) cpu_start: ELF file SHA256:  4027ebe53cbea321...
I (216) cpu_start: ESP-IDF:          v4.3-dirty
I (221) heap_init: Initializing. RAM available for dynamic allocation:
I (228) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (235) heap_init: At 3FFC2248 len 00039DB8 (231 KiB): DRAM
I (241) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (247) spi_flash: detected chip: generic
I (252) spi_flash: flash io: dio
I (256) cpu_start: Starting scheduler on PRO CPU.
I (261) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (361) pal_os_event: Init : Create Timer
I (361) pal_os_event: Init : Create Timer successful
[optiga util]     : OPTIGA Trust initialization
[optiga util]     : optiga_util_open_application
[optiga cmd]      : optiga_cmd_open_application
I (451) pal_i2c: Initialize pal_i2c_init
I (451) pal_i2c: init successful
[opt
Select the key type from below list
Press 1 to Generate NIST P-256
Press 2 to Generate NIST P-384
Press 3 to Generate NIST P-521
Press 4 to Generate Brainpool 256 r1
Press 5 to Generate Brainpool 384 r1
Press 6 to Generate Brainpool 512 r1
Press 7 to Generate RSA 1024
Press 8 to Generate RSA 2048

Selected NIST P-256 Curve
Generating keypair in Oid E0F0
[optiga crypt]    : optiga_crypt_ecc_generate_keypair
[optiga cmd]      : optiga_cmd_gen_keypair
[optiga cmd]      : Sending generate keypair command..
[optiga crypt]    : Call back status error
202
Key Pair generation failed

Hi @markandpathak you need to select a correct ECC Private key, you should take on of unlocked, for instance second, third or fourth ECC Private Key  + a corresponding certificate slot. Could you please additionally enable logging similar to what I explained above.

Hello @ayushev , As per your suggestions, I selected 2nd Key slot and  2nd Certificate slot in config. Double checked the pins and turned on logs by uncommenting 4 log definitions in optiga_lib_config_m_v3.h. Here is the output.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: 89dd7a5e205d897961c59f847ded89b3829cd434f6d4cfb09e8f6eea74d3efd1
Expected: 68993744f5b84880edf0d1e26d76552739a4dbfab466afa1b0188c36999fb90b
Attempting to boot anyway...
entry 0x4004c1ec
I (40) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (40) boot: compile time 13:38:50
I (40) boot: chip revision: 0
I (43) boot.esp32s2: SPI Speed      : 80MHz
I (47) boot.esp32s2: SPI Mode       : DIO
I (52) boot.esp32s2: SPI Flash Size : 4MB
I (57) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (66) boot: ## Label            Usage          Type ST Offset   Length
I (73) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (81) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (88) boot:  2 factory          factory app      00 00 00010000 00100000
I (95) boot: End of partition table
I (100) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=096d8h ( 38616) map
I (117) esp_image: segment 1: paddr=00019700 vaddr=3ffbe590 size=02ce4h ( 11492) load
I (120) esp_image: segment 2: paddr=0001c3ec vaddr=40022000 size=03c2ch ( 15404) load
I (129) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=1fd50h (130384) map
I (162) esp_image: segment 4: paddr=0003fd78 vaddr=40025c2c size=08960h ( 35168) load
I (171) esp_image: segment 5: paddr=000486e0 vaddr=50000000 size=00010h (    16) load
I (178) boot: Loaded app from partition at offset 0x10000
I (178) boot: Disabling RNG early entropy source...
I (192) cac��f<��3?����f��`tion cache   : size 8KB, 4Ways, cache line size 32Byte
I (193) cpu_start: Pro cpu up.
I (204) cpu_start: Pro cpu start user code
I (204) cpu_start: cpu freq: 160000000
I (204) cpu_start: Application information:
I (209) cpu_start: Project name:     provision_test_certificate
I (215) cpu_start: App version:      202005.00-6-gd0d8690-dirty
I (222) cpu_start: Compile time:     Jul  6 2021 13:38:44
I (228) cpu_start: ELF file SHA256:  41c199aa8de225ce...
I (234) cpu_start: ESP-IDF:          v4.3-dirty
I (239) heap_init: Initializing. RAM available for dynamic allocation:
I (247) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (253) heap_init: At 3FFC2248 len 00039DB8 (231 KiB): DRAM
I (259) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (266) spi_flash: detected chip: generic
I (270) spi_flash: flash io: dio
I (274) cpu_start: Starting scheduler on PRO CPU.
I (479) pal_os_event: Init : Create Timer
I (479) pal_os_event: Init : Create Timer successful
[optiga util]     : OPTIGA Trust initialization
[optiga util]     : optiga_util_open_application
[optiga cmd]      : optiga_cmd_open_application
I (569) pal_i2c: Initialize pal_i2c_init
I (569) pal_i2c: init successful
[opt
Select the key type from below list
Press 1 to Generate NIST P-256
Press 2 to Generate NIST P-384
Press 3 to Generate NIST P-521
Press 4 to Generate Brainpool 256 r1
Press 5 to Generate Brainpool 384 r1
Press 6 to Generate Brainpool 512 r1
Press 7 to Generate RSA 1024
Press 8 to Generate RSA 2048

Selected NIST P-256 Curve
Generating keypair in Oid E0F1
[optiga crypt]    : optiga_crypt_ecc_generate_keypair
[optiga cmd]      : optiga_cmd_gen_keypair
[optiga cmd]      : Sending generate keypair command..
[optiga crypt]    : Call back status error
202
Key Pair generation failed

I've checked in pal_i2c write by uncommenting the ESP_LOG lines. i2c_write always returns w failure. And if err code if checked it is always ESP_FAIL which is a generic error code.

Can you try to put here the log which you have enabled for the i2c write and read.
Here is my output fro your reference, I've cloned the fresh code and compiled it
 Long logging
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7040
load:0x40078000,len:14292
ho 0 tail 12 room 4
load:0x40080400,len:3688
0x40080400: _init at ??:?

entry 0x40080678
I (28) boot: ESP-IDF v4.3-beta3-195-g6be10fab0 2nd stage bootloader
I (28) boot: compile time 12:14:39
I (28) boot: chip revision: 1
I (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (85) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) boot_comm: chip revision: 1, min. application chip revision: 0
I (104) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0a404h ( 41988) map
I (128) esp_image: segment 1: paddr=0001a42c vaddr=3ffb0000 size=02ec8h ( 11976) load
I (133) esp_image: segment 2: paddr=0001d2fc vaddr=40080000 size=02d1ch ( 11548) load
I (139) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=221ach (139692) map
I (195) esp_image: segment 4: paddr=000421d4 vaddr=40082d1c size=09a4ch ( 39500) load
I (212) esp_image: segment 5: paddr=0004bc28 vaddr=50000000 size=00010h (    16) load
I (219) boot: Loaded app from partition at offset 0x10000
I (220) boot: Disabling RNG early entropy source...
I (232) cpu_start: Pro cpu up.
I (232) cpu_start: Starting app cpu, entry point is 0x40081180
0x40081180: call_start_cpu1 at /mnt/c/Users/Yushev/git/esp-idf/components/esp_system/port/cpu_start.c:141

I (0) cpu_start: App cpu up.
I (247) cpu_start: Pro cpu start user code
I (247) cpu_start: cpu freq: 160000000
I (247) cpu_start: Application information:
I (251) cpu_start: Project name:     provision_test_certificate
I (258) cpu_start: App version:      202005.00-6-gd0d8690
I (264) cpu_start: Compile time:     Jul  6 2021 12:24:46
I (270) cpu_start: ELF file SHA256:  99b7b9bc68debc18...
I (276) cpu_start: ESP-IDF:          v4.3-beta3-195-g6be10fab0
I (283) heap_init: Initializing. RAM available for dynamic allocation:
I (290) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (296) heap_init: At 3FFB3F30 len 0002C0D0 (176 KiB): DRAM
I (302) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (308) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (315) heap_init: At 4008C768 len 00013898 (78 KiB): IRAM
I (322) spi_flash: detected chip: generic
I (326) spi_flash: flash io: dio
I (331) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (535) pal_os_event: Init : Create Timer
I (535) pal_os_event: Init : Create Timer successful
[optiga util]     : OPTIGA Trust initialization
[optiga util]     : optiga_util_open_application
[optiga cmd]      : optiga_cmd_open_application
I (625) pal_i2c: Initialize pal_i2c_init
I (625) pal_i2c: init successful
I (625) pal_i2c : W:: 84
I (635) pal_i2c : R:: 00 00 01 90
I (645) pal_i2c: W-Failure
I (655) pal_i2c : W:: 81 01 15
I (665) pal_i2c: W-Failure
I (675) pal_i2c: W-Failure
I (685) pal_i2c : W:: 81
I (695) pal_i2c : R:: 01 15
[optiga cmd]      : Sending open app command...
[optiga comms]    : >>>>
                    Length of data - 0x001B
I (725) pal_i2c: W-Failure16 08 20 F0 00 00 10 D2 76 00 00 04 47 65 6E 41 75 74 68 41 70 70 6C BE 40
I (745) pal_i2c: W-Failure
I (755) pal_i2c: W-Failure
I (765) pal_i2c: W-Failure
I (775) pal_i2c: W-Failure
I (785) pal_i2c : W:: 80 03 00 16 08 20 f0 00 00 10 d2 76 00 00 04 47
I (785) pal_i2c : W:: 65 6e 41 75 74 68 41 70 70 6c be 40
I (795) pal_i2c : W:: 82
I (805) pal_i2c : R:: 48 80 00 0b
I (815) pal_i2c : W:: 80
I (825) pal_i2c : R:: 00 00 06 08 20 00 00 00 00 19 04
[optiga comms]    : <<<<
                    Length of data - 0x000B
I (835) pal_i2c : W:: 80 80 00 00 0c ec  00 00 19 04
[optiga cmd]      : Processing response for open app command...
[optiga cmd]      : Respo
Select the key type from below list
Press 1 to Generate NIST P-256
Press 2 to Generate NIST P-384
Press 3 to Generate NIST P-521
Press 4 to Generate Brainpool 256 r1
Press 5 to Generate Brainpool 384 r1
Press 6 to Generate Brainpool 512 r1
Press 7 to Generate RSA 1024
Press 8 to Generate RSA 2048

Selected NIST P-256 Curve
Generating keypair in Oid E0F1
[optiga crypt]    : optiga_crypt_ecc_generate_keypair
[optiga cmd]      : optiga_cmd_gen_keypair
[optiga cmd]      : Sending generate keypair command..
[optiga comms]    : >>>>
                    Length of data - 0x0014
I (21085) pal_i2c: W-Failure 08 20 B8 03 00 09 01 00 02 E0 F1 02 00 01 11 66 AE
I (21105) pal_i2c: W-Failure
I (21115) pal_i2c: W-Failure
I (21125) pal_i2c : W:: 80 04 00 0f 08 20 b8 03 00 09 01 00 02 e0 f1 02
I (21125) pal_i2c : W:: 00 01 11 66 ae
I (21135) pal_i2c : W:: 82
I (21145) pal_i2c : R:: c8 80 00 05
I (21155) pal_i2c : W:: 80
I (21165) pal_i2c : R:: 81 00 00 56 30
I (21175) pal_i2c : W:: 82
I (21185) pal_i2c : R:: 88 80 00 00
I (21205) pal_i2c : W:: 82
I (21215) pal_i2c : R:: 48 80 00 52
I (21225) pal_i2c : W:: 80
I (21235) pal_i2c : R:: 05 00 4d 08 20 00 00 00 47 02 00 44 03 42 00 04
I (21235) pal_i2c : R:: 0b eb 9f 0d b0 b5 a4 e8 ba 73 b0 33 dc d8 a9 a0
I (21235) pal_i2c : R:: 30 f2 76 8c d2 ca cb 0a a2 dd 83 85 78 42 ab 03
I (21245) pal_i2c : R:: bf e9 68 14 8b fd 8d 85 55 74 38 e2 20 3c 2c 18
I (21255) pal_i2c : R:: 3d 60 46 50 ac 25 b0 da 02 f5 3c d5 35 f9 36 df
I (21255) pal_i2c : R:: 78 cb
[optiga comms]    : <<<<
                    Length of data - 0x0052
I (21295) pal_i2c : W:: 80 81 00 00 56 30 A 02 F5 3C D5 35 F9 36 DF 78 CB 68 14 8B FD 8D 85 55 74 38 E2 20 3C 2C 18
[optiga cmd]      : Processing response for generate keypair command...
[optiga cmd]      : Response of generate keypair command is processed...

 30 59 30 13 06 07 2A 86 48 CE 3D 02 01 06 08 2A
 86 48 CE 3D 03 01 07 03 42 00 04 0B EB 9F 0D B0
 B5 A4 E8 BA 73 B0 33 DC D8 A9 A0 30 F2 76 8C D2
 CA CB 0A A2 DD 83 85 78 42 AB 03 BF E9 68 14 8B
 FD 8D 85 55 74 38 E2 20 3C 2C 18 3D 60 46 50 AC
 25 B0 DA 02 F5 3C D5 35 F9 36 DF
PEM format public key

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEC+ufDbC1pOi6c7Az3NipoDDydozS
yssKot2DhXhCqwO/6WgUi/2NhVV0OOIgPCwYPWBGUKwlsNoC9TzVNfk23w==
-----END PUBLIC KEY-----

[optiga crypt]    : Generate Key Pair successful!!!

Here is the log.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: 89dd7a5e205d897961c59f847ded89b3829cd434f6d4cfb09e8f6eea74d3efd1
Expected: 68993744f5b84880edf0d1e26d76552739a4dbfab466afa1b0188c36999fb90b
Attempting to boot anyway...
entry 0x4004c1ec
I (40) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (40) boot: compile time 13:38:50
I (40) boot: chip revision: 0
I (43) boot.esp32s2: SPI Speed      : 80MHz
I (47) boot.esp32s2: SPI Mode       : DIO
I (52) boot.esp32s2: SPI Flash Size : 4MB
I (57) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (66) boot: ## Label            Usage          Type ST Offset   Length
I (73) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (81) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (88) boot:  2 factory          factory app      00 00 00010000 00100000
I (95) boot: End of partition table
I (100) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=097a8h ( 38824) map
I (117) esp_image: segment 1: paddr=000197d0 vaddr=3ffbe590 size=02ce4h ( 11492) load
I (120) esp_image: segment 2: paddr=0001c4bc vaddr=40022000 size=03b5ch ( 15196) load
I (129) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=1fed4h (130772) map
I (162) esp_image: segment 4: paddr=0003fefc vaddr=40025b5c size=08a30h ( 35376) load
I (171) esp_image: segment 5: paddr=00048934 vaddr=50000000 size=00010h (    16) load
I (178) boot: Loaded app from partition at offset 0x10000
I (179) boot: Disabling RNG early entropy source...
I (192) cac��f<��3?������W��
                            �V�,ZY�B��size 8KB, 4Ways, cache line size 32Byte
I (193) cpu_start: Pro cpu up.
I (204) cpu_start: Pro cpu start user code
I (204) cpu_start: cpu freq: 160000000
I (204) cpu_start: Application information:
I (209) cpu_start: Project name:     provision_test_certificate
I (216) cpu_start: App version:      202005.00-6-gd0d8690-dirty
I (222) cpu_start: Compile time:     Jul  6 2021 13:38:44
I (228) cpu_start: ELF file SHA256:  4a4efcbdc51afc32...
I (234) cpu_start: ESP-IDF:          v4.3-dirty
I (239) heap_init: Initializing. RAM available for dynamic allocation:
I (247) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (253) heap_init: At 3FFC2248 len 00039DB8 (231 KiB): DRAM
I (259) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (266) spi_flash: detected chip: generic
I (270) spi_flash: flash io: dio
I (274) cpu_start: Starting scheduler on PRO CPU.
I (479) pal_os_event: Init : Create Timer
I (479) pal_os_event: Init : Create Timer successful
[optiga util]     : OPTIGA Trust initialization
[optiga util]     : optiga_util_open_application
[optiga cmd]      : optiga_cmd_open_application
I (569) pal_i2c: Initialize pal_i2c_init
I (569) pal_i2c: init successful
I (579) pal_i2c: W-Failure
I (599) pal_i2c: W-Failure
I (619) pal_i2c: W-Failure
I (639) pal_i2c: W-Failure
I (659) pal_i2c: W-Failure
I (679) pal_i2c: W-Failure
I (699) pal_i2c: W-Failure
I (719) pal_i2c: W-Failure
I (739) pal_i2c: W-Failure
I (759) pal_i2c: W-Failure
I (779) pal_i2c: W-Failure
I (799) pal_i2c: W-Failure
I (819) pal_i2c: W-Failure
I (839) pal_i2c: W-Failure
I (859) pal_i2c: W-Failure
I (879) pal_i2c: W-Failure
I (899) pal_i2c: W-Failure
I (919) pal_i2c: W-Failure
I (939) pal_i2c: W-Failure
I (959) pal_i2c: W-Failure
I (979) pal_i2c: W-Failure
I (999) pal_i2c: W-Failure
I (1019) pal_i2c: W-Failure
I (1039) pal_i2c: W-Failure
I (1059) pal_i2c: W-Failure
I (1079) pal_i2c: W-Failure
I (1099) pal_i2c: W-Failure
I (1119) pal_i2c: W-Failure
I (1139) pal_i2c: W-Failure
I (1159) pal_i2c: W-Failure
I (1179) pal_i2c: W-Failure
I (1199) pal_i2c: W-Failure
I (1219) pal_i2c: W-Failure
I (1239) pal_i2c: W-Failure
I (1259) pal_i2c: W-Failure
I (1279) pal_i2c: W-Failure
I (1299) pal_i2c: W-Failure
I (1319) pal_i2c: W-Failure
I (1339) pal_i2c: W-Failure
I (1359) pal_i2c: W-Failure
I (1379) pal_i2c: W-Failure
I (1399) pal_i2c: W-Failure
I (1419) pal_i2c: W-Failure
I (1439) pal_i2c: W-Failure
I (1459) pal_i2c: W-Failure
I (1479) pal_i2c: W-Failure
I (1499) pal_i2c: W-Failure
I (1519) pal_i2c: W-Failure
I (1539) pal_i2c: W-Failure
I (1559) pal_i2c: W-Failure
I (1579) pal_i2c: W-Failure
I (1599) pal_i2c: W-Failure
I (1619) pal_i2c: W-Failure
I (1639) pal_i2c: W-Failure
I (1659) pal_i2c: W-Failure
I (1679) pal_i2c: W-Failure
I (1699) pal_i2c: W-Failure
I (1719) pal_i2c: W-Failure
I (1739) pal_i2c: W-Failure
I (1759) pal_i2c: W-Failure
I (1779) pal_i2c: W-Failure
I (1799) pal_i2c: W-Failure
I (1819) pal_i2c: W-Failure
I (1839) pal_i2c: W-Failure
I (1859) pal_i2c: W-Failure
I (1879) pal_i2c: W-Failure
I (1899) pal_i2c: W-Failure
I (1919) pal_i2c: W-Failure
I (1939) pal_i2c: W-Failure
I (1959) pal_i2c: W-Failure
I (1979) pal_i2c: W-Failure
I (1999) pal_i2c: W-Failure
I (2019) pal_i2c: W-Failure
I (2039) pal_i2c: W-Failure
I (2059) pal_i2c: W-Failure
I (2079) pal_i2c: W-Failure
I (2099) pal_i2c: W-Failure
I (2119) pal_i2c: W-Failure
I (2139) pal_i2c: W-Failure
I (2159) pal_i2c: W-Failure
I (2179) pal_i2c: W-Failure
I (2199) pal_i2c: W-Failure
I (2219) pal_i2c: W-Failure
I (2239) pal_i2c: W-Failure
I (2259) pal_i2c: W-Failure
I (2279) pal_i2c: W-Failure
I (2299) pal_i2c: W-Failure
I (2319) pal_i2c: W-Failure
I (2339) pal_i2c: W-Failure
I (2359) pal_i2c: W-Failure
I (2379) pal_i2c: W-Failure
I (2399) pal_i2c: W-Failure
I (2419) pal_i2c: W-Failure
I (2439) pal_i2c: W-Failure
I (2459) pal_i2c: W-Failure
I (2479) pal_i2c: W-Failure
I (2499) pal_i2c: W-Failure
I (2519) pal_i2c: W-Failure
I (2539) pal_i2c: W-Failure
I (2559) pal_i2c: W-Failure
I (2579) pal_i2c: W-Failure
I (2599) pal_i2c: W-Failure
I (2619) pal_i2c: W-Failure
I (2639) pal_i2c: W-Failure
I (2659) pal_i2c: W-Failure
I (2679) pal_i2c: W-Failure
I (2699) pal_i2c: W-Failure
I (2719) pal_i2c: W-Failure
I (2739) pal_i2c: W-Failure
I (2759) pal_i2c: W-Failure
I (2779) pal_i2c: W-Failure
I (2799) pal_i2c: W-Failure
I (2819) pal_i2c: W-Failure
I (2839) pal_i2c: W-Failure
I (2859) pal_i2c: W-Failure
I (2879) pal_i2c: W-Failure
I (2899) pal_i2c: W-Failure
I (2919) pal_i2c: W-Failure
I (2939) pal_i2c: W-Failure
I (2959) pal_i2c: W-Failure
I (2979) pal_i2c: W-Failure
I (2999) pal_i2c: W-Failure
I (3019) pal_i2c: W-Failure
I (3039) pal_i2c: W-Failure
I (3059) pal_i2c: W-Failure
I (3079) pal_i2c: W-Failure
I (3099) pal_i2c: W-Failure
I (3119) pal_i2c: W-Failure
I (3139) pal_i2c: W-Failure
I (3159) pal_i2c: W-Failure
I (3179) pal_i2c: W-Failure
I (3199) pal_i2c: W-Failure
I (3219) pal_i2c: W-Failure
I (3239) pal_i2c: W-Failure
I (3259) pal_i2c: W-Failure
I (3279) pal_i2c: W-Failure
I (3299) pal_i2c: W-Failure
I (3319) pal_i2c: W-Failure
I (3339) pal_i2c: W-Failure
I (3359) pal_i2c: W-Failure
I (3379) pal_i2c: W-Failure
I (3399) pal_i2c: W-Failure
I (3419) pal_i2c: W-Failure
I (3439) pal_i2c: W-Failure
I (3459) pal_i2c: W-Failure
I (3479) pal_i2c: W-Failure
I (3499) pal_i2c: W-Failure
I (3519) pal_i2c: W-Failure
I (3539) pal_i2c: W-Failure
I (3559) pal_i2c: W-Failure
I (3579) pal_i2c: W-Failure
I (3599) pal_i2c: W-Failure
I (3619) pal_i2c: W-Failure
I (3639) pal_i2c: W-Failure
I (3659) pal_i2c: W-Failure
I (3679) pal_i2c: W-Failure
I (3699) pal_i2c: W-Failure
I (3719) pal_i2c: W-Failure
I (3739) pal_i2c: W-Failure
I (3759) pal_i2c: W-Failure
I (3779) pal_i2c: W-Failure
I (3799) pal_i2c: W-Failure
I (3819) pal_i2c: W-Failure
I (3839) pal_i2c: W-Failure
I (3859) pal_i2c: W-Failure
I (3879) pal_i2c: W-Failure
I (3899) pal_i2c: W-Failure
I (3919) pal_i2c: W-Failure
I (3939) pal_i2c: W-Failure
I (3959) pal_i2c: W-Failure
I (3979) pal_i2c: W-Failure
I (3999) pal_i2c: W-Failure
I (4019) pal_i2c: W-Failure
I (4039) pal_i2c: W-Failure
I (4059) pal_i2c: W-Failure
I (4079) pal_i2c: W-Failure
I (4099) pal_i2c: W-Failure
I (4119) pal_i2c: W-Failure
I (4139) pal_i2c: W-Failure
I (4159) pal_i2c: W-Failure
I (4179) pal_i2c: W-Failure
I (4199) pal_i2c: W-Failure
I (4219) pal_i2c: W-Failure
I (4239) pal_i2c: W-Failure
I (4259) pal_i2c: W-Failure
I (4279) pal_i2c: W-Failure
I (4299) pal_i2c: W-Failure
I (4319) pal_i2c: W-Failure
I (4339) pal_i2c: W-Failure
I (4359) pal_i2c: W-Failure
I (4379) pal_i2c: W-Failure
I (4399) pal_i2c: W-Failure
I (4419) pal_i2c: W-Failure
I (4439) pal_i2c: W-Failure
I (4459) pal_i2c: W-Failure
I (4479) pal_i2c: W-Failure
I (4499) pal_i2c: W-Failure
I (4519) pal_i2c: W-Failure
I (4539) pal_i2c: W-Failure
I (4559) pal_i2c: W-Failure
I (4579
Select the key type from below list
Press 1 to Generate NIST P-256
Press 2 to Generate NIST P-384
Press 3 to Generate NIST P-521
Press 4 to Generate Brainpool 256 r1
Press 5 to Generate Brainpool 384 r1
Press 6 to Generate Brainpool 512 r1
Press 7 to Generate RSA 1024
Press 8 to Generate RSA 2048

Selected NIST P-256 Curve
Generating keypair in Oid E0F1
[optiga crypt]    : optiga_crypt_ecc_generate_keypair
[optiga cmd]      : optiga_cmd_gen_keypair
[optiga cmd]      : Sending generate keypair command..
[optiga crypt]    : Call back status error
202
Key Pair generation failed

The value ret in this if statement is ESP_FAIL which causes else part of the condition to be executed and hence printing w-failure

The value ret in this if statement is ESP_FAIL which causes else part of the condition to be executed and hence printing w-failure

According to the documentation it means that the slave doesn't acknowedge the transfer which might have different reasons.
What typo of baord do you have, is it a Shield2Go or a Chip (USON-10)? Do you have somewhere a reference kit where you can test whether your sample is working correctly, for example the Evaluation Kit, or FTDI USB-I2C Converter Board, or Raspberry Pi

It's a custom board with IC(USON-10) soldered into it. May be I need an evaluation kit to know whether it's a hardware issue or not. Although device has a fairly simple circuit. 3.3V to VCC with a dcap, GND to VSS, RST to ESP32-s2 GPIO4 and SCL SDA to GPIO34 GPIO33 respectively. Both SCL, SDA lines have 10k external pullups attached. I also tried to disable internal pullsups in pal_i2c but it also gives same result. Bottom pad is NC.

alternativly to use any digital/logic analyser to see what happens on the line, this would be actually very helpful. This chip might be damaged during soldering and that might be the reason why it doesn't respond, alternativly it might be some missing configuration on the host side.
Another question which is easy to check, what is the RST state, is it possible that it it configured "low"?

We have a usb based digital logic analyzer, it will be available tomorrow. Regarding RST pin I checked it for high state and also tied it to high and configuring the optiga lib to warm reset but that also didn't work. Let's see what logic analyzer reveals. I'll go through each configuration once again.

I tested the communication on the I2C lines. There is no response from the IC.

The same address byte is written at the interval of 20ms but no response from the IC.

RST pin was high all the time. It can be a hardware issue. Any suggestions where I need to look in hardware? As the circuit is exact similar to Shield2Go schematic.

@markandpathak thanks for the measurements!
When you say it is exactly the same, does it mean you also have the VCC control circuit?

No VCC part is not implemented. Vcc is supplied directly without any control. Everything rest is same.

Ok. I'll check and post the results here.

any progress here?

We had new boards fabricated. this time assembled with precise reflow oven to eliminate possibility of damage while soldering. Still, same issue.

There's a surprising observation. Just for experiment we removed both 10k pull up and let the device run by enabling ESP32's  internal pullups. Now there's no more I2C write failure. I am able to communicate with the chip. Keys generation fails is a second matter but now I am one step closer as atleast chip is responding. Any idea why this can happen? There are no other devices on I2C bus. Still without pullup the i2c does not respond when I2C clk frequency is more than 100k. From schematic perspective both SCL and SDA lines go straight into MCU pins.

This is the output now in which key generation fails.
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: 301ad638be6160e27efe560514a2e039cafeadf6bc4fb6fecab929e3ff7d58e9
Expected: 8e3e840813e19af230af79254ec30d923bd0cb97442d05668be75b5ffe95f2a4
Attempting to boot anyway...
entry 0x4004c1ec
I (40) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (40) boot: compile time 16:06:08
I (40) boot: chip revision: 0
I (43) boot.esp32s2: SPI Speed      : 80MHz
I (47) boot.esp32s2: SPI Mode       : DIO
I (52) boot.esp32s2: SPI Flash Size : 4MB
I (57) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (66) boot: ## Label            Usage          Type ST Offset   Length
I (73) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (81) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (88) boot:  2 factory          factory app      00 00 00010000 00100000
I (95) boot: End of partition table
I (100) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=09f08h ( 40712) map
I (117) esp_image: segment 1: paddr=00019f30 vaddr=3ffbe5a0 size=02ce4h ( 11492) load
I (120) esp_image: segment 2: paddr=0001cc1c vaddr=40022000 size=033fch ( 13308) load
I (129) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=20514h (132372) map
I (162) esp_image: segment 4: paddr=0004053c vaddr=400253fc size=09198h ( 37272) load
I (172) esp_image: segment 5: paddr=000496dc vaddr=50000000 size=00010h (    16) load
I (179) boot: Loaded app from partition at offset 0x10000
I (179) boot: Disabling RNG early entropy source...
I (193) cac�fÆ~
               ��3?���\],]Z�
                            �V�,ZY�B��size 8KB, 4Ways, cache line size 32Byte
I (193) cpu_start: Pro cpu up.
I (205) cpu_start: Pro cpu start user code
I (205) cpu_start: cpu freq: 160000000
I (205) cpu_start: Application information:
I (209) cpu_start: Project name:     provision_test_certificate
I (216) cpu_start: App version:      202005.00-6-gd0d8690-dirty
I (222) cpu_start: Compile time:     Aug 23 2021 16:19:43
I (235) cpu_start: ESP-IDF:          v4.3-dirty
I (240) heap_init: Initializing. RAM available for dynamic allocation:
I (247) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (253) heap_init: At 3FFC2258 len 00039DA8 (231 KiB): DRAM
I (259) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (266) spi_flash: detected chip: generic
I (270) spi_flash: flash io: dio
I (275) cpu_start: Starting scheduler on PRO CPU.
I (280) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (380) pal_os_event: Init : Create Timer
I (380) pal_os_event: Init : Create Timer successful
[optiga util]     : OPTIGA Trust initialization
[optiga util]     : optiga_util_open_application
[optiga cmd]      : optiga_cmd_open_application
I (470) pal_i2c: Initialize pal_i2c_init
I (470) pal_i2c: init successful
I (470) pal_i2c : W:: 84
I (480) pal_i2c : R:: 00 00 01 90
I (490) pal_i2c : W:: 81 01 15
I (500) pal_i2c : W:: 81
I (510) pal_i2c : R:: 01 15
[optiga cmd]      : Sending open app command...
[optiga comms]    : >>>>
                    Length of data - 0x001B
                    03 00 16 08 20 F0 00 00 10 D2 76 00 00 04 47 65 6E 41 75 74 68 41 70 70 6C BE 40

elect the key type from below list
Press 1 to Generate NIST P-256
Press 2 to Generate NIST P-384
Press 3 to Generate NIST P-521
Press 4 to Generate Brainpool 256 r1
Press 5 to Generate Brainpool 384 r1
Press 6 to Generate Brainpool 512 r1
Press 7 to Generate RSA 1024
Press 8 to Generate RSA 2048

Selected NIST P-384 Curve
Generating keypair in Oid E0F2
[optiga crypt]    : optiga_crypt_ecc_generate_keypair
[optiga cmd]      : optiga_cmd_gen_keypair
[optiga cmd]      : Sending generate keypair command..
[optiga comms]    : >>>>
                    Length of data - 0x0014
[optiga crypt]    : Call back status error0 09 01 00 02 E0 F2 02 00 01 11 03 6D
102
Key Pair generation failed

I see,
ok the chip on the board is configured to operate on 400 kHz, however 10 kOhm are usually recomednded for the 100kHz operation frequency.
Can you please try co configure the communication stack to operate on 100kHz, you need to change it here and here
Also it is interesting but there is no
pal_i2c : W:: 80 03 00 15 00 70 00 00 10 D2 76 00 00 04 47 65 6E 41 75 74 68 41 70 70 6C 04 1A
<Several of pal_i2c : W:: 82>
pal_i2c : R:: 48 80 00 0A
pal_i2c : W:: 80
pal_i2c : R:: 00 00 05 00 00 00 00 00 14 87

before the "Select the key pair"
Maybe to have a more clear setup, could you please comment this line out to see whether you have a clear communication for the OpenApplicaiton (this is a prerequisite for the communication).
Actually this last command 00 00 05 00 00 00 00 00 14 87 means that the SE is ready to accept commands.

Ok, I tried what you suggested by editing the code and with resistors. Following are outcomes:
(1) With 10k resistor back in place IC does not respond at 100k or 400k frequency. Same as previous. Tried with both ESP pullup enabled and disabled.
(2) We replaced 10k with 4.7k and tried the same. With esp32 pull-ups disabled IC does not respond.
With ESP32 pull-ups enabled IC does respond but never outputs the SE ready byte sequence.
I can not understand particularly this issue. I have never faced such issue in any of my previous designs involving multiple I2C sensors on same bus.
I changed the frequency to 100k in both files. but still same sequence is received 00 00 01 90 as you mentioned previously.
Here is the output:
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1830
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
SHA-256 comparison failed:
Calculated: 05b12c3a7d15c2939279d99d73c7eacbafa543325162c6d72dea795769d5eb35
Expected: 61b1924eca2766815c2fb33b1a3b727290fa18a23bacfa1a4d3ee072db500fda
Attempting to boot anyway...
entry 0x4004c1ec
I (40) boot: ESP-IDF v4.3-dirty 2nd stage bootloader
I (40) boot: compile time 13:08:45
I (40) boot: chip revision: 0
I (43) boot.esp32s2: SPI Speed      : 80MHz
I (47) boot.esp32s2: SPI Mode       : DIO
I (52) boot.esp32s2: SPI Flash Size : 4MB
I (57) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (66) boot: ## Label            Usage          Type ST Offset   Length
I (73) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (81) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (88) boot:  2 factory          factory app      00 00 00010000 00100000
I (95) boot: End of partition table
I (100) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=093f8h ( 37880) map
I (116) esp_image: segment 1: paddr=00019420 vaddr=3ffbe3c0 size=02ce4h ( 11492) load
I (119) esp_image: segment 2: paddr=0001c10c vaddr=40022000 size=03f0ch ( 16140) load
I (129) esp_image: segment 3: paddr=00020020 vaddr=40080020 size=1dc6ch (121964) map
I (160) esp_image: segment 4: paddr=0003dc94 vaddr=40025f0c size=084ach ( 33964) load
I (169) esp_image: segment 5: paddr=00046148 vaddr=50000000 size=00010h (    16) load
I (176) boot: Loaded app from partition at offset 0x10000
I (176) boot: Disabling RNG early entropy source...
I (191) cac�fÆ~
               ��3?������W��
                            �V�,ZY�B��size 8KB, 4Ways, cache line size 32Byte
I (191) cpu_start: Pro cpu up.
I (202) cpu_start: Pro cpu start user code
I (202) cpu_start: cpu freq: 160000000
I (202) cpu_start: Application information:
I (207) cpu_start: Project name:     provision_test_certificate
I (214) cpu_start: App version:      202005.00-6-gd0d8690-dirty
I (220) cpu_start: Compile time:     Aug 24 2021 13:08:40
I (226) cpu_start: ELF file SHA256:  2fb4f1a8f64a403f...
I (232) cpu_start: ESP-IDF:          v4.3-dirty
I (238) heap_init: Initializing. RAM available for dynamic allocation:
I (245) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM
I (251) heap_init: At 3FFC2070 len 00039F90 (231 KiB): DRAM
I (257) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (264) spi_flash: detected chip: generic
I (268) spi_flash: flash io: dio
I (273) cpu_start: Starting scheduler on PRO CPU.
I (278) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (378) pal_os_event: Init : Create Timer
I (378) pal_os_event: Init : Create Timer successful
[optiga util]     : OPTIGA Trust initialization
[optiga util]     : optiga_util_open_application
[optiga cmd]      : optiga_cmd_open_application
I (468) pal_i2c: Initialize pal_i2c_init
I (468) pal_i2c: init successful
I (468) pal_i2c : W:: 84
I (478) pal_i2c : R:: 00 00 01 90
I (488) pal_i2c : W:: 81 01 15
I (498) pal_i2c : W:: 81
I (508) pal_i2c : R:: 01 15
[optiga cmd]      : Sending open app command...
[optiga comms]    : >>>>
                    Length of data - 0x001B
E (5358) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (5358) task_wdt:  - IDLE (CPU 0)
E (5358) task_wdt: Tasks currently running:
E (5358) task_wdt: CPU 0: main
E (5358) task_wdt: Print CPU 0 (current core) backtrace

Backtrace:0x4008BE6A:0x3FFBEB60 0x400240EE:0x3FFBEB80 0x40085A50:0x3FFC36C0 0x400859DB:0x3FFC36E0 0x4009DABA:0x3FFC3700 0x4002A5AD:0x3FFC3720
0x4008be6a: task_wdt_isr at /home/invesun/esp/esp-idf/components/esp_common/src/task_wdt.c:189

0x400240ee: _xt_lowint1 at /home/invesun/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1105

0x40085a50: optiga_trust_init at /home/invesun/UNITGRID/optiga/azure-optiga-trust-m/components/optiga/optiga-trust-m/examples/utilities/optiga_trust.c:614 (discriminator 1)

0x400859db: app_main at /home/invesun/UNITGRID/optiga/azure-optiga-trust-m/examples/provision_test_certificate/build/../main/main.c:472

0x4009daba: main_task at /home/invesun/esp/esp-idf/components/freertos/port/port_common.c:133 (discriminator 2)

0x4002a5ad: vPortTaskWrapper at /home/invesun/esp/esp-idf/components/freertos/port/xtensa/port.c:168

[optiga util]     : optiga_util_open_application failed 00 04 47 65 6E 41 75 74 68 41 70 70 6C BE 40

Do you have any concretes outputs ?  or help ?
I have the same issue do not find a proper way to be acknowledge by the chip.
Thanks


add ignore for IDEA

Reasons for making this change:
This change adds ignore for IntelliJ IDEA.
Links to documentation supporting these rule changes:
N/A
If this is a new template:

Link to application or project’s homepage: N/A

Thanks, but we actually have a Global/JetBrains.gitignore which covers all the JetBrains IDEs, including IntelliJ.
Please add any proposed changes to that template.

Hi  @mgingras01
You could pull a request to merge origin, if you add your template.


don't pass our token to github call

Merging this one line change to get github onboarding running on staging


Utilize MonitoredTrainingSession for training

Moving to this for training would have a number of benefits.

Improved support for model inspection via TensorBoard
Better recovery from failure and check pointing, automatic loading of most recent model from directory

So 1 sounds interesting. For 2 sklearn's preferred serialization format is through joblib. How would this interact with that?


Force write journal to initialize when read journal is started

Changes
close #344
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):

[x] This change follows the Akka.NET API Compatibility Guidelines.
[x] This change follows the Akka.NET Wire Compatibility Guidelines.
[x] I have reviewed my own pull request.
[x] Design discussion issue #344
[x] Changes in public API reviewed, if any.

Got the error to occur:
Failed: Expected a message of type Akka.Streams.TestKit.TestSubscriber+OnComplete, but received {TestSubscriber.OnError(One or more errors occurred. (42P01: relation "journal" does not exist

POSITION: 31))} (type Akka.Streams.TestKit.TestSubscriber+OnError) instead  from [akka://test/user/StreamSupervisor-1252/Flow-0-0-unknown-operation#440889324]


Added insert_selection mode for multi-line text insertion

This is relative to https://github.com/jonathanslenders/python-prompt-toolkit/pull/403

Thank you @davidbrochart,
A few things were implemented differently in prompt_toolkit, but this commit https://github.com/jonathanslenders/pyvim/commit/0c36a2766c68a6da75943be77da472e3434fb104 should do it. Let me know if you have some remarks.


[iOS] Add export options to control external access to user data.

Add export options to control access to user data (user:// folder) from the iOS Files.app and iTunes/Finder sharing (see #34007 for details).

Thanks!


Test Issue created at Fri, 21 May 2021 09:00:45 GMT

Test issue body  Fri, 21 May 2021 09:00:45 GMT

Comment on issue at Fri, 21 May 2021 09:00:48 GMT


docs: popular issues file generator

Description
Script to automatically retrieve the github issues and generate a doc with the most popular.
NOTE: By the moment, I left it commented in mkdocs.yml as I don't know if this will be added for 2.0. So, when merged, it's saved but not run. Using it, the docs building takes around 20 seconds more.
TO BE DISCUSSED (below a screenshot):

Still not sure about the given names to each table, probably it's better to shorten them.
I added it to Community, but if you think this is more suitable in other section, we can discuss it.
I ran it locally, but I don't know if any external workflow must be also updated.
Any other feedback is welcome!

Closes #4967
Type of change
(Remember to title the PR according to the type of change)

[x] Documentation update

How Has This Been Tested

[x] Run with mkdocs serve

@sdiazlor looking great! Amazing.
I think "popular issues" does not fully cover "planned issues for upcoming release", perhaps we can change the naming to something like "issue dashboard" or something?
Additionally, would you be able to do something similar but minimal for the changelog too?

Looks super cool! Will it be automated somehow or do we need to regenerate the file from time to time?

Looks super cool! Will it be automated somehow or do we need to regenerate the file from time to time?

@nataliaElv Great! With this, the file will be created automatically after each publication, that is, after each release :)

That sounds great! 😃 Thanks for taking care of this one.


Minesweeper-game

Hackathon Submission: <PROJECT_NAME>
Name of Team Lead
Enter your full name

GitHub handles of Team Members
Enter the GitHub handles of all your team members (including yourself) as separate bullet points

Are all of your team members registered on our Hackathon Signup page?
This is a mandatory step for all participants to be considered eligible for judging

[ ] Yes
[ ] No

Rules and Code of Conduct
By submitting this PR, you agree to follow our Rules and Code of Conduct.

[x] Yes

Anything Else?
Any other feedback, queries or information you would like to share with us?

@ChiragTankan the project repo does not show any usage of Appwrite, which makes this submission ineligible for the hackathon, unfortunately.


bug fixes

Description

changed a couple config settings so they can be disabled via command line arguments
fixed CoinbasePro and Kucoin API errors for standard API access - believe all errors causing restarts are now resolved
moved getTicker call up pycryptobot.py to be inline with getHistoricalData and replace DF last row data with ticker data before technical anlaysis is performed.
changed getHistoricalData call to only be called at candle close instead of every iteration and use ticker to fill data between candle open and close.
known problems with CoinbasePro and Kucoin websocket functions still exist, but above fixes will make websocket fixes easier
fixed standard indicators still being process when custom strategies are enabled

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please make your selection.

[x ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] This change requires a new dependency
[x ] Code Maintainability / comments
[ ] Code Refactoring / future-proofing

How Has This Been Tested?
over 2 weeks of running with live trades
Checklist:

[x ] My code follows the style guidelines of this project
[x ] I have performed a self-review of my own code
[x ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x ] My changes generate no new warnings
[ ] I have added pytest unit tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[x ] I have checked my code and corrected any misspellings

Found a couple of issues and to prevent being merged before they are fixed, close PR for now.


Update akka to 2.6 and other minor dependencies

We need akka 2.6 upstream for another project, and this update will become mandatory anyway in the future.

Codecov Report

Merging #3 (680948e) into master (073db68) will decrease coverage by 0.15%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
- Coverage   66.50%   66.35%   -0.16%
==========================================
  Files          16       16
  Lines         630      633       +3
  Branches       32       29       -3
==========================================
+ Hits          419      420       +1
- Misses        211      213       +2

Impacted Files
Coverage Δ

...main/scala/cakesolutions/kafka/KafkaConsumer.scala
77.77% <0.00%> (-6.23%)
:arrow_down:

...main/scala/cakesolutions/kafka/KafkaProducer.scala
80.48% <ø> (+1.91%)
:arrow_up:

.../cakesolutions/kafka/akka/KafkaConsumerActor.scala
57.24% <100.00%> (+0.31%)
:arrow_up:

...ala/cakesolutions/kafka/akka/TrackPartitions.scala
84.28% <0.00%> (-1.43%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 073db68...680948e. Read the comment docs.

Looks got too me


Tests for Cat Painting step 3 are too strict regarding attribute order

Describe the Issue
The tests fail when the href attribute is placed before the rel attribute in the link tag. The tests pass when you reverse it and place the rel attribute before the href attribute.
Affected Page
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-intermediate-css-by-building-a-cat-painting/step-3
Your code
This fails but should pass:
<link href="./styles.css" rel="stylesheet">

Expected behavior
Update tests to accept attributes in either order.
Screenshots
No response
System
N/A
Additional context
No response

I want to contribute to this issue. This is the my first time, actually.

Agree, the attribute order shouldn't matter. I will open this up to contribution.

An issue with the help wanted or first timers only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.
If you would like to contribute and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/
If you have any issues with contributing, be sure to join us on the contributors channel, or on the contributors sub-forum


Add bindings for Key Derivation

Add bindings/tests for key derivation (crypto_kdf_*() API) with the following functions:

crypto_kdf_keygen()
crypto_kdf_derive_from_key(subkey_size, subkey_id, context, master_key)

Bindings Added


base.ogg not downloading (Dev Build)

I am migrating songs from an old version of Arcaea to a new one so it can support ETR difficulty. I am getting a bug in which it is not downloading the base.ogg and thus cannot play the song. I am using server version v<IP_ADDRESS> (the recent version in dev) and arcaea version 5.5.8c

Can you show me the folder structure of song data?
Do all songs have this problem?

you too? I'm having the exact same problem. I think the current dev build has a problem.

Can you show me the folder structure of song data?
Do all songs have this problem?

To me, All of the songs have the problem. Plus, it seems the link play doesn't work, and PTT doesn't increase either.

@Lost-MSth tested via the 2.11.3 master branch files, overwrting the "download.py" file in "/core" directory fixed this problem.

OK. I know it.

(4.aff ) file name is missing in core > download.py
FILE_NAMES = ['0.aff', '1.aff', '2.aff', '3.aff', '4.aff',
'base.ogg', '3.ogg', 'video.mp4', 'video_audio.ogg', 'video_720.mp4', 'video_1080.mp4']

Works now, thank you!


chore(master): release 0.4.0

:robot: I have created a release beep boop
0.4.0 (2023-05-30)
⚠ BREAKING CHANGES

remove ingest mapping config
remove old ingest client
update ingest client

Features

get digital twin by property (34b895c)

Bug Fixes

fix optional oauth2 client properties (4522b1e)
remove ingest mapping config (545d473)
remove old ingest client (acb1af2)
update ingest client (a0d6b8b)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/indykite/indykite-sdk-node/releases/tag/v0.4.0 :sunflower:


Inv Changer instant Crash when Enable

Your Windows version: Windows 10 Pro Spring Creator Update
Your injector (+ injection method): Private Injector
Current cheat version (any old versions will not be supported!): Newest 4.4.1
Bug details? Is it important to fix?:  Cant enable Invent Changer, and it also crash when enable

Try updating these files (InventoryChanger.cpp, Client.cpp, EventLogs.cpp, EventLogs.h) using the files here on the GitHub. It was recently updated to fix that crashing error.


Create new BB: Simple Article Header

This is a Building Block for our upcoming News/Magazine Kit. For anyone who wants to contribute some building blocks to the site, feel free to assign this to yourself to let us know you're taking this one on!
Description/Interaction: A simple header area for an individual article/blog page. Should include publish date, article title, author, comment sections, social links, and an image (can be above or below text). Use category "media" in yml file.
Example:

Christine PR is up #140