text:
CHANGE event on custom field component removes focus from input

Hi everyone! :)
I just recently started the migration from v4 to v6 of redux-form (v6.2.0), and I'm really loving the improvements so far. I noticed a quirk, though, with using a custom component for the Field.
Once I type the first character into a previously empty text field, the component loses focus and I have to click on it again to continue typing. The problem goes away once I use the default Field component <Field component="input" type="text" name="input" /> rather than a custom component, e.g.:
<Field name="username" component={username =>

		<input type="text" {...username.input} />
		<ErrorMessage message={ username.meta.touched && username.meta.error } background={false} />

}/>

I'm not sure if I'm doing something wrong, or if it's a bug?
To reproduce:

Have a Field with a custom input component.
Start typing into input field. After the CHANGE event is fired, now I'm no longer focused on the input field and will have to click on the field again in order to continue typing, after which there are no issues.

My entire form component:
import React, { Component } from 'react'
import is from 'simply-is'
import _ from 'lodash'
import Promise from 'bluebird'

import { Field, reduxForm } from 'redux-form'
import { FormGroup } from '../ui/forms'
import { ErrorMessage } from '../ui/messages'
import { LoadingDots } from '../ui/loading'

class LoginForm extends Component {
  render() {
	const { error, handleSubmit, pristine, reset, submitting, syncErrors } = this.props
	return (
	  <form onSubmit={handleSubmit} className="loginform l-top-labels">
		<FormGroup className="username">
			Username
			<Field name="username" component={username =>

					<input type="text" {...username.input} />
					<ErrorMessage message={ username.meta.touched && username.meta.error } background={false} />

			}/>
		</FormGroup>
		<FormGroup className="password">
			Password
			<Field name="password" component={password =>

					<input type="password" {...password.input} />
					<ErrorMessage message={ password.meta.touched && password.meta.error } background={false} />

			}/>
		</FormGroup>
		<FormGroup className="remember">
			<Field name="remember" component="input" type="checkbox"/>
			Remember me for 30 days
		</FormGroup>
		<button type="submit" className="btn blue submit">
			{ submitting ? (Logging in <LoadingDots />) : "Submit" }
		</button>
		<ErrorMessage message={error} background={false} />
	  </form>
	)
  }
}

export default reduxForm({
	form: 'login',
	initialValues: {
		'remember': true
	},
	validate: (values) => {
		let errors = {}
		if(!values.username){
			errors.username = 'Username required'
		}
		if(!values.password){
			errors.password = 'Password required'
		}
		return errors
	}
})(LoginForm)

I originally suspected it had to do with the synchronous validation (e.g. the UPDATE_SYNC_ERRORS event), but the issue happens even when I remove validation entirely and disappears when using the default Field component.

Gah! Sorry, just found out what was going wrong. This issue is the same as #1323, and the problem had to do with inline fat arrows for the custom component. Instead of:
<Field name="username" component={username =>

		<input type="text" {...username.input} />
		<ErrorMessage message={ username.meta.touched && username.meta.error } background={false} />

}/>

The fat-arrow input component declaration should be declared separately, not inline:
const FormInput = (field) =>{
	return (

			<input type="text" {...field.input} />
			<ErrorMessage message={ field.meta.touched && field.meta.error } background={false} />

	)
}

and then, for the input itself:
<Field name="username" component={FormInput}/>

I have no idea why, but I was looking at the 6.0.0 version docs, hence the confusion... 😅 Thanks for the great work on the library, and sorry again for opening this duplicate issue.

For anyone coming from Google, this is also the problem when a on a checkbox click redux-form dispatches the FOCUS actions but not the CHANGE one.

authors: alfonsoperez anonmily


text:
add RN integration instructions on faq

add react-native integration instructions on github page faq

Great PR, thanks!

source: gharchive/pull-request

authors: erikras zxcpoiu

repo: erikras/redux-form

license: MIT

license_type: permissive

license_source: github-api


text:
blance of speed and accuracy

Hello, thanks for your amazing work you are doing. Is there any possible way to increase the mapping and tracking speed per frame, which could reduce accuracy.

Thanks, it's really helpful!

source: gharchive/issue

repo: eriksandstroem/Point-SLAM


text:
1.21.1 Support

1|survival  | [06:36:07 ERROR]: Error occurred while enabling TradeSystem v2.6.0 (Is it up to date?)
1|survival  | de.codingair.tradesystem.lib.codingapi.nms.NmsCheckError: Could not initialize class: de.codingair.tradesystem.lib.codingapi.player.gui.anvil.AnvilGUI. Version=v1_21, Type=Paper, Bukkit='1.21.1-2285-abf2f21 (MC: 1.21.1)'
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:63) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:55) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.testInternalApi(NmsCheck.java:44) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:53) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.spigot.TradeSystem.checkNms(TradeSystem.java:196) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.spigot.TradeSystem.onEnable(TradeSystem.java:102) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
1|survival  |   at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
1|survival  |   at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:654) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:603) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:757) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:519) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:363) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1230) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:333) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
1|survival  |   at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
1|survival  | Caused by: java.lang.ExceptionInInitializerError
1|survival  |   at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method) ~[?:?]
1|survival  |   at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160) ~[?:?]
1|survival  |   at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300) ~[?:?]
1|survival  |   at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor(MethodHandleAccessorFactory.java:103) ~[?:?]
1|survival  |   at java.base/jdk.internal.reflect.ReflectionFactory.newConstructorAccessor(ReflectionFactory.java:200) ~[?:?]
1|survival  |   at java.base/java.lang.reflect.Constructor.acquireConstructorAccessor(Constructor.java:549) ~[?:?]
1|survival  |   at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
1|survival  |   at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.runNmsLoader(NmsCheck.java:85) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:61) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   ... 17 more
1|survival  | Caused by: java.lang.IllegalStateException: Unable to find method getBukkitView (null).
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:187) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:185) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:185) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:185) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.player.gui.anvil.AnvilGUI.(AnvilGUI.java:79) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method) ~[?:?]
1|survival  |   at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160) ~[?:?]
1|survival  |   at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300) ~[?:?]
1|survival  |   at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor(MethodHandleAccessorFactory.java:103) ~[?:?]
1|survival  |   at java.base/jdk.internal.reflect.ReflectionFactory.newConstructorAccessor(ReflectionFactory.java:200) ~[?:?]
1|survival  |   at java.base/java.lang.reflect.Constructor.acquireConstructorAccessor(Constructor.java:549) ~[?:?]
1|survival  |   at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
1|survival  |   at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.runNmsLoader(NmsCheck.java:85) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:61) ~[TradeSystem_v2.6.0.jar:?]
1|survival  |   ... 17 more
1|survival  | [06:36:07 INFO]: [TradeSystem] Disabling TradeSystem v2.6.0

[07:28:41 ERROR]: Error occurred while enabling TradeSystem v2.6.0 (Is it up to date?)
de.codingair.tradesystem.lib.codingapi.nms.NmsCheckError: Could not initialize class: de.codingair.tradesystem.lib.codingapi.player.gui.anvil.AnvilGUI. Version=v1_21, Type=Paper, Bukkit='1.21.1-2285-abf2f21 (MC: 1.21.1)'
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:63) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:55) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.testInternalApi(NmsCheck.java:44) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:53) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.spigot.TradeSystem.checkNms(TradeSystem.java:196) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.spigot.TradeSystem.onEnable(TradeSystem.java:102) ~[TradeSystem_v2.6.0.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:654) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:603) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:757) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:519) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:363) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1230) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:333) ~[purpur-1.21.1.jar:1.21.1-2285-abf2f21]
        at java.base/java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.lang.ExceptionInInitializerError
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method) ~[?:?]
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unknown Source) ~[?:?]
        at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(Unknown Source) ~[?:?]
        at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor(Unknown Source) ~[?:?]
        at java.base/jdk.internal.reflect.ReflectionFactory.newConstructorAccessor(Unknown Source) ~[?:?]
        at java.base/java.lang.reflect.Constructor.acquireConstructorAccessor(Unknown Source) ~[?:?]
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) ~[?:?]
        at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.runNmsLoader(NmsCheck.java:85) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:61) ~[TradeSystem_v2.6.0.jar:?]
        ... 17 more
Caused by: java.lang.IllegalStateException: Unable to find method getBukkitView (null).
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:187) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:185) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:185) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.server.reflections.IReflection.getMethod(IReflection.java:185) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.player.gui.anvil.AnvilGUI.<clinit>(AnvilGUI.java:79) ~[TradeSystem_v2.6.0.jar:?]
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method) ~[?:?]
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unknown Source) ~[?:?]
        at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(Unknown Source) ~[?:?]
        at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor(Unknown Source) ~[?:?]
        at java.base/jdk.internal.reflect.ReflectionFactory.newConstructorAccessor(Unknown Source) ~[?:?]
        at java.base/java.lang.reflect.Constructor.acquireConstructorAccessor(Unknown Source) ~[?:?]
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) ~[?:?]
        at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.runNmsLoader(NmsCheck.java:85) ~[TradeSystem_v2.6.0.jar:?]
        at TradeSystem_v2.6.0.jar/de.codingair.tradesystem.lib.codingapi.nms.NmsCheck.test(NmsCheck.java:61) ~[TradeSystem_v2.6.0.jar:?]
        ... 17 more
[07:28:41 INFO]: [TradeSystem] Disabling TradeSystem v2.6.0
[07:28:41 ERROR]: [TradeSystem] This Minecraft version does not seem to be supported yet. Please contact the author with the given error above.

repo: erikzimmermann/TradeSystem


text:
Add F# to similar lists

Add link to F# companies list.

Thanks, I believe this might be of interest for people reading this list.

repo: erkmos/haskell-companies

license: Unlicense


text:
"Use Identity as Username"

Environment

VerneMQ Version: N/A
OS: RHEL 7
Erlang/OTP version (if building from source): 19.2

I am using PSKs to connect to my MQTT instance, which includes sending a psk-identity, so it would be perfect for me to securely connect with the PSK and then pull the psk-identity out and use that as a ClientId to restrict access to topics.
In the VerneMQ documentation, it says that "If you use client certificates and want to use the certificates CN value as a username you can set: listener.ssl.use_identity_as_username = on"
Ideally I would like to write a plugin to use the psk-identity as a ClientID. How/where in the code does VerneMQ get the CN value from the certificate? Can you point me in the right direction so that I can see how you did that, and then I can work on pulling out the psk-identity?
Thank you

@PiedPieper thanks for this interesting question/idea!
I see that Erlang SSL and also ranch_ssl directly have the option for psk_identity
From http://erlang.org/doc/man/ssl.html
{psk_identity, string()}

Specifies the identity the client presents to the server.
The matching secret is found by calling user_lookup_fun.

Up to @dergraf to tell us if this could be done in a similar way as with use_identity_as_username.

@ioolkos Just to clarify, I can connect with PSKS. The problem is authenticating users. It would be nice if we could use the psk-identity as the clientId so that we didnt have to send extra data as a username/password

I guess we tried to be Mosquitto compatible. Reading here: https://mosquitto.org/man/mosquitto-conf-5.html, it seems that with pre-shared-key, the use_identity_as_username uses the PSK identity as MQTT Username. Without that, it uses the client certificate common (CN) name as MQTT Username.
@dergraf @larshesel are we 100% compatible there (ie. do we do the same?)
and @PiedPieper's approach is then to use the PSK identity as the ClientID (not the Username, or maybe using ClientID = Username)
If I seem confused, tell me ;)

@ioolkos thank your taking the time to dig that up. That information is very useful, as now we know that the client will pass us the psk-identity as a username. The problem is that if the client sends a false username through mosquitto with a valid psk, then that client would have access to topics that it is not allowed to.
This is why "use_identity_as_username" is so important to be implemented on the server side, so that we force the username=psk_identity. I think that changing the user so that we set its ClientID=Username will be trivial, it's just the Username/ClientID = psk_identity could be tricky.

@ioolkos , vmq uses the function socket_to_common_name to get the certificate from the client:
socket_to_common_name(Socket) ->     case ssl:peercert(Socket) of         {error, no_peercert} ->             undefined;         {ok, Cert} ->             OTPCert = public_key:pkix_decode_cert(Cert, otp),             TBSCert = OTPCert#'OTPCertificate'.tbsCertificate,             Subject = TBSCert#'OTPTBSCertificate'.subject,             extract_cn(Subject)     end.
I have been trying to figure out what was wrong with peercert for a few hours as I keep getting the error {error, unexpected_request} and it dawns on me that this will never work, as psks dont use certificates, they use keys..
Would you happen to know of any way using erlang ssl to get any information about psk credentials?

You can see a client example in the vmq_bridge here:
https://github.com/erlio/vernemq/blob/204f2f7190b1e8b0cb04158ec6c2d9304b4bfc72/apps/vmq_bridge/src/vmq_bridge.erl#L309
The main point is the user_lookup_fun.
This mailing list answer for a similar problem might also clear things a little further: http://erlang.org/pipermail/erlang-questions/2017-July/092799.html
Time permitting, we're very keen to help you get this working! /cc @larshesel @dergraf

@ioolkos, to be clear, I have the psks working. I can connect to my vmq instance with psks using a user_lookup_fun that I have already built, and I actually used that mailing list question to solve that. The problem is that once connected, I need to authenticate users so that they can only view certain topics. So I need some way to see that Psk_identity server side outside of the user_lookup function.
My user lookup function can validate that your connection is secure and connect you. But the vmq server code needs to be able to set that psk_identity to the clientid or username. It can't do this in the user_loookup_fun because it has no information about the socket or monitoring process

@PiedPieper thanks for your explanations! it wasn't in fact clear to me that you already got psks working.
Now let's see. To go further I think we need 3 things, working back from the MQTT session state machine.
1. vmq_mqtt_fsm:
We have the actual ClientID check, that works with the preauth label:
https://github.com/erlio/vernemq/blob/60a8e478b881ca1587664c70851d2c76cbec160a/apps/vmq_server/src/vmq_ssl.erl#L20
We need a clause there that can actually be used as an entry point to check the psk_identity
2. vmq_ranch:
We should take the psk_identity and give it to the MQTT session state machine, similar to this:
https://github.com/erlio/vernemq/blob/204f2f7190b1e8b0cb04158ec6c2d9304b4bfc72/apps/vmq_server/src/vmq_ranch.erl#L55
3. vmq_ssl:
That probably means we need something like vmq_ssl:socket_to_common_name/1 to extract the psk_identity:
https://github.com/erlio/vernemq/blob/60a8e478b881ca1587664c70851d2c76cbec160a/apps/vmq_server/src/vmq_ssl.erl#L20
We also need to check if the proxy_protocol can handle the PSK identity, as we want to be able to let a proxy terminate TSL for VerneMQ.
@larshesel @dergraf does that seem like a correct assessment of the PSK identity situation?

I think this sounds reasonable. Basically it's supporting preauth with another source than a client-certificate. That said I have no knowledge of the mechanics of PSK in Erlang and it's not clear to me if this could be handled with the existing vernemq.conf options (and just work when PSKs are used instead of client certs) or if we'd need to change something there?

Hello @PiedPieper ,
Do you have success with that?
I also need this functionality.
Is it implemented already in vernemq?
thanks

authors: PiedPieper ioolkos larshesel smoomrik

repo: erlio/vernemq

license_source: bigquery


text:
Added new Open Both Folders button

Added new button next to duplicate image results (next to the Delete Both Images button), with tooltip text "Open both containing folders". Clicking this will open a separate windows explorer window for both of the displayed images;
Added new PNG image of two open folders;
Modified logic in Images.Get to enable other types of images to be loaded in addition to the default .IMG format.

Notes:

I don't speak Russian so the Russian tooltip text I added is from a Google translation.
I used a PNG image for the new button, because my graphics editing software (XnView) was exporting a .IMG file in a format that AntiDupl couldn't read properly (I got an OutOfMemoryException when I tried).

The folder which contains the image can be open from context menu of the image. Are you sure that opening of two folders is so often used operation that we need to create new button?

In my experience at least, I found that I was opening both folders so often that I found it to be quite useful to have a button available that would open both at once.  For large image collections, it saves time + clicks versus using the context menu on each image, plus it lessens the chance of clicking something unintended in the context menu, such as "add to ignored folders" which I found myself clicking accidentally on occasion.

Ok. I will merge your pull request.


text:
Show status of users

Show online, offline, etc. status of users in the channels list

Hi. Did you started work on that? I want to try when I have free time.

authors: erroneousboat firstrow

repo: erroneousboat/slack-term

license: mit


text:
Enter Button (OK)

Hi,
Could you help me with the code of Enter Button?
I can't Find in the list

Hi,
You can use the "KEY_ENTER" command.

authors: ersinayaz mdezotti

repo: ersinayaz/rn-samsung-tv-remote


text:
修改飞书自动同步，手动同步报错“Client.Timeout exceeded while awaitina headers”

您使用的版本？ | Your usage version?
2023-04-25
您使用的场景？ | Your usage scenarios?
飞书用户自动同步
您做了什么操作？ | What did you do?
修改：
enable-sync: true  # 是否开启定时同步飞书的任务
dept-sync-time: "0 20 0 * * *" # 部门同步任务的时间点 * * * * * * 秒 分 时 日 月 周, 请把时间设置在凌晨 1 ~ 5 点
user-sync-time: "0 40 0 * * *" # 用户同步任务的时间点 * * * * * * 秒 分 时 日 月 周, 请把时间设置在凌晨 1 ~ 5 点,注意请把用户同步的任务滞后于部门同步时间,比如部门为2点,则用户为3点
您遇到了什么问题？ | What are your problems?
修改“false”为“true”后，手动同步报错
"获取飞书用户列表失败: Post "https:/open.feishu.cn/open-apis/auth/3/tenant_access_token/internal": context deadline exceeded
(Client.Timeout exceeded while awaitina headers)"
您期望的结果是怎样的？ | What is your expected outcome?
修改配置后，同步正常

您好 @Young-3👋，我已收到您的反馈，我将安排时间考虑您提交的信息并进行回复。-- 这条信息是由自动回复的机器人发出的。
Hello @Young-3. I have received your feedback, and I will arrange time to consider the information you submitted and reply. -- This message is sent by an automatic reply robot.

创建飞书应用等步骤有没有做呢，详见：http://ldapdoc.eryajf.net/pages/83c90b/

这个参数作为自动同步的配置，所以看起来没问题了

repo: eryajf/go-ldap-admin


text:
New Design of Quiz Creation / Update Page

Can you guys push the new redesigned Quiz Creation Page when you guys are done, where:

Answers of the Question can be dynamically added
With a delete button for each Question (I have made an example delete button in the js file)
Multiple questions can be marked as correct (Maybe the user can select it with checkbox?)
Multiple formats of Questions / Answers (optional)

Update Page should be almost the same except for the instead of Create, the button shows Update and there it a big delete button to delete the whole quiz
After that I will make it work.

I will do this tonight, sorry I didnt find time yet!

repo: erykksc/kwikquiz


text:
Add mandatory person attributes

Fixes #457, fixes #283.

Coverage remained the same at 60.521% when pulling d0077267548022c76aa87f91a65ec1c338101cbb on ynurmahomed:fix-provenience into d5364fa29f636c5be6f6a3342fc15f2b989727f2 on esaude:master.

authors: coveralls ynurmahomed

repo: esaude/esaude-emr-poc


text:
Feature: override loader

It would be nice to have the option to define loaders for arbitrary file extensions. esbuild automatically chooses a loader based on the filename, but that is limited to a small list of known file extensions, e.g., the loader text is used for .txt files. (See https://esbuild.github.io/content-types/#text)
esbuild itself and other tools based on it, like tsup, allow overriding loaders with CLI parameters like --loader:.html=text or --loader ".html=text".
My suggestion is to allow esm-loader and cjs-loader to be configured via environment variables like this:
ESBK_LOADER_MAP=.html=text,.png=base64 tsx watch index.ts

When the loaders support it, tsx could get respective command line parameters, which set the env var internally. Similar to --tsconfig.
Optional The mapping could be more sophisticated by matching globs via minimatch.

Node.js already offers a much more flexible Loader API that let's you load arbitrary file types.
(tsx makes much more sense if you think of it as Node.js, instead of esbuild.)

authors: privatenumber schummar

repo: esbuild-kit/core-utils


text:
Getting Error 404 for repository first tag

Orb Version: 0.1
Describe the bug
When you run this orb on a repository without a previous tag, it's returning a 404 error since it's trying to compare the current tag to the previous one that doesn't exist.
Steps to reproduce

Create or use any Github repository that doesn't have any tag/release
Push a brand new tag and run this orb

Expected behavior

Identify if exist or not a previous tag
In the case of being the first time, apply the diff based on the first repository commit

Actual behavior
Trying to do a GET on a URL that doesn't exist. (https://api.github.com/repos/escaletech/health-socrates/compare/...v1.0.0)

Alright, this is pretty straightforward. Looks like you've given all the necessary details.


text:
Separation from babel?

I see that this project has been rebooted. Could you provide some context for those not familiar?

I should have provided some more context. This project isn't being rebooted in a way that competes with babel, as it did before. I see it as a compliment to babel now, since what it does now is effectively the reverse of what it did before: convert legacy JavaScript to next-generation JavaScript instead of the reverse.
The idea is this: you have a project written using old-style JavaScript features, like var instead of const and let, or function instead of => for callbacks etc, or using CommonJS instead of the new module syntax. You'd like to modernize your source code, but doing so is tedious. This project, rebooted, aims to help with that. It is something you could run on your code periodically to help you update your actual source code, then use babel on that source code to run it in legacy environments.
Does that make sense?

authors: eventualbuddha ustun

repo: esnext/esnext


text:
CORS?

Привет. А этот метод можно использовать на сайте? У меня, вот, ругается...
XMLHttpRequest cannot load http://data.esosedi.org/regions/v1/?lang=ru_60189&type=coast. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:1000' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
На Node.js работает, в jsFiddle работает, в браузере, вот не хочет.

Нашёл проблему. Я использую Webpack, поэтому пришлось сделать
const osme = require('osme/regions.js');

👍  (за всем не уследить, сори)

authors: Disorrder theKashey

repo: esosedi/regions


text:
esp-wifi: other crates also provide strchr (littlefs2-sys)

Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝

[ ] I have updated existing examples or added new ones (if applicable).
[x] I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
[x] My changes were added to the CHANGELOG.md in the proper section.
[x] I have added necessary changes to user code to the Migration Guide.
[x] My changes are in accordance to the esp-rs API guidelines

Extra:

[x] I have read the CONTRIBUTING.md guide and followed its instructions.

Pull Request Details 📖
Description
With the WPA2 ENTERPRISE (#2004) PR came an implementation of strchr - is someone is using littlefs2 this causes link failures with this symbol being multiply defined.
This PR make that optional with a have-strchr feature.  Not sure this is the best solution - ideally there would be some common crate of these C functions that could be used.
Testing
Compiled unit that includes littlefs with have-strchr feature enabled.

I think you should also commit your changes to Cargo.toml :)

I think you should also commit your changes to Cargo.toml :)

yea - added that with the changelog :-)

Should we somehow provide our implementation as a weak symbol to avoid the feature?

I don't think its stable yet: https://github.com/rust-lang/rust/issues/29603

I found this: https://github.com/rust-embedded-community/tinyrlibc

I've also created a PR for littlefs2

I don't think its stable yet: rust-lang/rust#29603

Yes - unfortunately it's not and something like PROVIDE(strchr = _strchr); in the linker script doesn't work since at the time the linker script is evaluated symbols from the libraries are not resolved yet and will be 0
For sure feature-gating single functions isn't great so if anyone finds a workaround, I'm all ears

I found this: https://github.com/rust-embedded-community/tinyrlibc

Main reason I don't want to use that is the fact it compiles src/snprintf.c which requires users to have a suitable C compiler installed - since we have everything else pre-compiled that is a huge annoyance IMHO

authors: bjoernQ bugadani liebman

repo: esp-rs/esp-hal


text:
[Feature] Allow to differentiate based on flash size

Builds can now be defined based on chipFamily, but it would also be nice to differentiate based on flash size.
For example:
{
  "name": "ESPHome",
  "version": "2021.10.3",
  "home_assistant_domain": "esphome",
  "builds": [
    {
      "chipFamily": "ESP8266",
      "flashSize": "4M",
      "parts": [
        { "path": "esp8266_4M.bin", "offset": 0 },
      ]
    },
    {
      "chipFamily": "ESP8266",
      "flashSize": "1M",
      "parts": [
        { "path": "esp8266_1M.bin", "offset": 0 },
      ]
    }
  ]
}

I would say "exactly" match.
But on the other hand, if we don't have like an 8M build, but do have an 4M and 16M, then the 4M would be the best match.
However if a user would accidentally flash the wrong version, the file system would be deleted so maybe best to offer a dialog then suggesting there is no matching build, maybe offering to continue at the users own risk.

I'd second the JSON structure proposed by @TD-er.
For choosing which build to install, it ideally should be the build which exactly matches the flash size, but if no such build is available, it should install the one intented for the closest smaller size.
On clean install (either no Improv detected or a different firmware) we don't have to worry about versions that much since there is no data to be preserved anyways.
On update, I see how a warning dialog could be useful, but in that case we don't know at all what partition layout the user is using, that can't reliably be detected using the auto-detected size alone. Perhaps we should add an optional flash size string to Improv... but then again, you could still e.g. use different partition tables both with a size of 4MB total - with 1.5mb FS or 1mb FS size. Of course, we could pass a string like 4M,1M, denoting overall target flash size and FS size, but I don't know if it'll be worth it.
And there should definitely be an option to specify a default build per chipFamily in case auto detecting the size is not possible (although I have yet to observe such a case)

@Aircoookie In my ESPEasy builds, I have in all builds (except for the ESP8285 or special hardware builds) the flash layout specified in the file name.

4M1M
4M2M
4M318k  (for ESP32, but that's the only layout I use for 4M on ESP32)
16M1M (SPIFFS)
16M2M (LittleFS)
16M8M (LittleFS)

etc.
Thus specifying the file system en partitioning would be also nice to have.
But that's only diable when adding improv.

Most users will not know what size their FS has. When users see the word "Update" they definitely feel like it's save to update. It shouldn't end up being incompatible.
Flash size can be detected by rebooting the ESP into the bootloader. Some devices require the BOOT button to be held, so we only do that when a user clicks install/update. This means we cannot use this information in the dashboard unless Improv tells us about this information.

Differentiating on flash size is already a big improvement if it is made possible.
For example it will help users to get started with at least working defaults.
On a clean unit there is for sure no improv running, so that shows the importance of at least some flash size detection.
If we can already use the most commonly used defaults for this, then users may only be left with the choice of file system. But I think that's also going to become an obsolete choice very soon. Here improv can help, so I will try to add it ASAP.
Right now Improv Serial has documented this:

Order of strings: Firmware name, firmware version, hardware chip/variant, device name.
Example: ESPHome, 2021.11.0, ESP32-C3, Temperature Monitor.

Is it possible to define 1 or 2 more fields?

preferred flash layout
File System

I do understand that file system detection is not the responsibility of the flasher, thus when no improv is used then it will just be the best default. But if improv is present, it would be nice to get a build matching whatever is already present.

Might be time to revisit this. As a first step towards implementing this, I propose we add flash size to the device informaton RPC result in Improv Serial.
As for the format, probably going with the ESP custom of a string like 4M1M for 4MB flash with 1MB FS would be easiest.

The problem with adding it to Improv is that Improv is only available on upgrade.

I guess that there haven't been any changes to this right?
I see that there is something about Detected Flash size in the installdialog.js.

authors: Aircoookie TD-er balloob lost-hope

repo: esphome/esp-web-tools


text:
E (767) vfs_fat_sdmmc: slot init failed (0x103). (IDFGH-8749)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
IDF_VER: v4.4.1-405-g6c5fb29c2c
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
No response
What is the expected behavior?
I want to store CSI collected by AP to SD card through SPI.
What is the actual behavior?
E (767) vfs_fat_sdmmc: slot init failed (0x103).
E (768) sd.h: Failed to initialize the card (ESP_ERR_INVALID_STATE).   If you do not have an SD card attached, please ignore this message.  Make sure SD card lines have pull-up resistors in place.
Steps to reproduce.
I have refer to demo code at ESP32-WROOM-32D, I try setting for SPI pins.
#define PIN_NUM_MISO    2
#define PIN_NUM_CLK    14
#define PIN_NUM_MOSI    15
#define PIN_NUM_CS     13
Its not worked for me, giving error
E (767) vfs_fat_sdmmc: slot init failed (0x103).
E (768) sd.h: Failed to initialize the card (ESP_ERR_INVALID_STATE).   If you do not have an SD card attached, please ignore this message.  Make sure SD card lines have pull-up resistors in place.
I study SPI Pins for ESP-WROOM-32 that are
(VSPI (MISO, CLK, MOSI, CS)=(19, 18, 23, 5))
(HSPI (MISO, CLK, MOSI, CS)=(12, 14, 13, 15))
Also test using VSPI pins, also not work for me. I have used Kingston micro SD 64 GB.
Build or installation Logs.
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:6676
load:0x40078000,len:14848
ho 0 tail 12 room 4
load:0x40080400,len:3792
0x40080400: _init at ??:?

entry 0x40080694
I (28) boot: ESP-IDF v4.4.1-405-g6c5fb29c2c 2nd stage bootloader
I (28) boot: compile time 20:27:28
I (28) boot: chip revision: 1
I (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) 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 (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=293c4h (168900) map
I (173) esp_image: segment 1: paddr=000393ec vaddr=3ffb0000 size=03a1ch ( 14876) load
I (179) esp_image: segment 2: paddr=0003ce10 vaddr=40080000 size=03208h ( 12808) load
I (184) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=a31a8h (668072) map
I (429) esp_image: segment 4: paddr=000e31d0 vaddr=40083208 size=12c4ch ( 76876) load
I (461) esp_image: segment 5: paddr=000f5e24 vaddr=50000000 size=00010h (    16) load
I (472) boot: Loaded app from partition at offset 0x10000
I (472) boot: Disabling RNG early entropy source...
I (483) cpu_start: Pro cpu up.
I (484) cpu_start: Starting app cpu, entry point is 0x4008137c
0x4008137c: call_start_cpu1 at /home/ssr-zenan/esp/esp-idf/components/esp_system/port/cpu_start.c:160

I (0) cpu_start: App cpu up.
I (500) cpu_start: Pro cpu start user code
I (500) cpu_start: cpu freq: 160000000
I (500) cpu_start: Application information:
I (504) cpu_start: Project name:     active-ap
I (509) cpu_start: App version:      1
I (514) cpu_start: Compile time:     Nov 15 2022 20:27:23
I (520) cpu_start: ELF file SHA256:  2d870ad44feb58a3...
I (526) cpu_start: ESP-IDF:          v4.4.1-405-g6c5fb29c2c
I (532) heap_init: Initializing. RAM available for dynamic allocation:
I (539) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (546) heap_init: At 3FFB8DC8 len 00027238 (156 KiB): DRAM
I (552) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (558) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (565) heap_init: At 40095E54 len 0000A1AC (40 KiB): IRAM
I (572) spi_flash: detected chip: generic
I (575) spi_flash: flash io: dio
W (579) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (597) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

-----------------------
ESP32 CSI Tool Settings
-----------------------
PROJECT_NAME: ACTIVE_AP
CONFIG_ESPTOOLPY_MONITOR_BAUD: 115200
CONFIG_ESP_CONSOLE_UART_BAUDRATE: 115200
IDF_VER: v4.4.1-405-g6c5fb29c2c
-----------------------
WIFI_CHANNEL: 4
ESP_WIFI_SSID: myssid
ESP_WIFI_PASSWORD: mypassword
SHOULD_COLLECT_CSI: 1
SHOULD_COLLECT_ONLY_LLTF: 1
SEND_CSI_TO_SERIAL: 0
SEND_CSI_TO_SD: 1
-----------------------

E (767) vfs_fat_sdmmc: slot init failed (0x103).
E (768) sd.h: Failed to initialize the card (ESP_ERR_INVALID_STATE).   If you do not have an SD card attached, please ignore this message.  Make sure SD card lines have pull-up resistors in place.
I (784) wifi:wifi driver task: 3ffc1b24, prio:23, stack:6656, core=0
I (787) system_api: Base MAC address is not set
I (792) system_api: read default base MAC address from EFUSE
I (818) wifi:wifi firmware version: 84ed08c
I (818) wifi:wifi certification version: v7.0
I (818) wifi:config NVS flash: enabled
I (818) wifi:config nano formating: disabled
I (822) wifi:Init data frame dynamic rx buffer num: 32
I (827) wifi:Init management frame dynamic rx buffer num: 32
I (832) wifi:Init management short buffer num: 32
I (837) wifi:Init dynamic tx buffer num: 32
I (841) wifi:Init static rx buffer size: 2212
I (845) wifi:Init static rx buffer num: 10
I (849) wifi:Init dynamic rx buffer num: 32
I (853) wifi_init: rx ba win: 6
I (856) wifi_init: tcpip mbox: 32
I (860) wifi_init: udp mbox: 6
I (864) wifi_init: tcp mbox: 6
I (868) wifi_init: tcp tx win: 5744
I (872) wifi_init: tcp rx win: 5744
I (876) wifi_init: tcp mss: 1440
I (880) wifi_init: WiFi IRAM OP enabled
I (885) wifi_init: WiFi RX IRAM OP enabled
I (896) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (995) wifi:mode : softAP (94:e6:86:66:85:2d)
I (999) wifi:Total power save buffer number: 16
I (1000) wifi:Init max length of beacon: 752/752
I (1000) wifi:Init max length of beacon: 752/752
I (1003) wifi:Set ps type: 0

More Information.
#ifndef ESP32_CSI_SD_COMPONENT_H
#define ESP32_CSI_SD_COMPONENT_H
#include <stdio.h>
#include <string.h>
#include <sys/unistd.h>
#include <sys/stat.h>
#include "esp_err.h"
#include "esp_log.h"
#include "esp_vfs_fat.h"
#include "driver/sdspi_host.h"
#include "driver/sdmmc_host.h"
#include "driver/spi_common.h"
#include "sdmmc_cmd.h"
#define MOUNT_POINT "/sdcard"
#define SPI_DMA_CHAN    1
#define PIN_NUM_MISO    4
#define PIN_NUM_MOSI    15
#define PIN_NUM_CLK     14
#define PIN_NUM_CS      25
FILE *f;
char filename[24] = {0};
void _sd_pick_next_file() {
int i = -1;
struct stat st;
while (true) {
i++;
printf("Checking %i.csv\n", i);
sprintf(filename, "/sdcard/%i.csv", i);
    if (stat(filename, &st) != 0) {
        break;
    }

    printf("File size: %li\n", st.st_size);
}

}
void sd_init() {
#ifdef CONFIG_SEND_CSI_TO_SD
esp_err_t ret;
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
    .format_if_mount_failed = false,
    .max_files = 1,
    .allocation_unit_size = 16 * 1024
};

sdmmc_card_t *card;
const char mount_point[] = MOUNT_POINT;
ESP_LOGI("sd.h","Initializing SD card");

sdmmc_host_t host = SDSPI_HOST_DEFAULT();

//host.slot = SPI3_HOST;

spi_bus_config_t bus_cfg = {
    .mosi_io_num = PIN_NUM_MOSI,
.miso_io_num = PIN_NUM_MISO,
.sclk_io_num = PIN_NUM_CLK,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = 4000
};

// SPI总线初始化

ret = spi_bus_initialize(host.slot, &bus_cfg, SDSPI_DEFAULT_DMA);
if (ret != ESP_OK) {
ESP_LOGE("sd.h","Failed to initialize bus.");
return;
}
// 这将初始化没有卡检测（CD）和写保护（WP）信号的插槽。
// 如果您的主板有这些信号，请修改slot_config.gpio_cd和slot_config.gpio_wp。
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT();
slot_config.gpio_cs = PIN_NUM_CS;
slot_config.host_id = host.slot;

// 挂载文件系统
ret = esp_vfs_fat_sdspi_mount(mount_point, &host, &slot_config, &mount_config, &card);

if (ret != ESP_OK) {
    if (ret == ESP_FAIL) {
    ESP_LOGE("sd.h",
            "Failed to mount filesystem."
	"If you want the card to be formatted, set the EXAMPLE_FORMAT_IF_MOUNT_FAILED menuconfig option.");
} else {
    ESP_LOGE("sd.h",
            "Failed to initialize the card(%s)."
        "Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret));
}
return;
}

sdmmc_card_print_info(stdout, card);
_sd_pick_next_file();
f = fopen(filename, "a");

// 卸载分区并禁用SDMMC或SPI外设
//esp_vfs_fat_sdcard_unmount(mount_point, card);
//卸载总线
//spi_bus_free(host.slot);

#endif
}
/*

Printf for both serial AND sd card (if available and configured)
*/
void outprintf(const char *format, ...) {
va_list args;
va_start(args, format);

#ifdef CONFIG_SEND_CSI_TO_SERIAL
vprintf(format, args);
#endif
#ifdef CONFIG_SEND_CSI_TO_SD
if (f != NULL) {
vfprintf(f, format, args);
}
#endif
va_end(args);

}
void sd_flush() {
#ifdef CONFIG_SEND_CSI_TO_SD
fflush(f);
fclose(f);
f = fopen(filename, "a");
#endif
}
#endif //ESP32_CSI_SD_COMPONENT_H

@Sunlu2333  thank you for reporting the issue here, however I was not able to replicate it on my setup (ESP32-WROOM-32 with SD card adapter) with default SPI pin settings
#define PIN_NUM_MISO 2
#define PIN_NUM_CLK 14
#define PIN_NUM_MOSI 15
#define PIN_NUM_CS 13
This demo example worked for me.
Can you please again refer README.md to cross check pull up requirement and pin configurations as from above logs and error message,
E (767) vfs_fat_sdmmc: slot init failed (0x103).
E (768) sd.h: Failed to initialize the card (ESP_ERR_INVALID_STATE). If you do not have an SD card attached, please ignore this message. Make sure SD card lines have pull-up resistors in place.
I can see, there must be some issue with pull-up resistors.
Please refer above README.md and let me know for any further query.

Thank you for reporting the issue on GitHub. Closing this issue as of now as we have not received any update. If you encounter this issue again or have any additional information to share, please don't hesitate to reopen the issue or create a new one. We will be more than happy to assist you further and work towards a resolution.

repo: espressif/esp-idf


text:
[v5.1.2][ESP32-s3] CONFIG_MBEDTLS_HARDWARE_AES=y causes AES to return non-deterministic results (IDFGH-11568)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.1.2
Espressif SoC revision.
ESP32-s3
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3
Power Supply used.
USB
What is the expected behavior?
Given the same input data & iv, the encrypted data should be the same
What is the actual behavior?
The output data is not always the same
Steps to reproduce.

I'm using AES decrypt during my OTA process, over wifi
CONFIG_MBEDTLS_AES_USE_INTERRUPT=n
CONFIG_MBEDTLS_HARDWARE_AES=y
sdkconfig.txt

Debug Logs.
// note: output checksum is not the same between runs! or even between boots!

// run #1
I (163944) pd ota session: checksumD 792277 // iv
I (163944) pd ota session: checksumE 1612320 // input len
I (163944) pd ota session: checksumF 205499032 // input bytes
I (163954) pd ota session: checksumG 140200246 // output

// run #2
I (84744) pd ota session: checksumD 792277 // iv
I (84744) pd ota session: checksumE 1612320 // input len
I (84744) pd ota session: checksumF 205499032 // input bytes
I (84744) pd ota session: checksumG 13996798 // output

More Information.
This code was originally written using v4.4 and used to work every-time. There have been minimal changes to my code since then.

the aes decryption process does occasionally work without issues. It seems like it works ~10% of the time.

I've made simple checksums of the input data & output data.
The input data always has the same checksum, but the output does not!
uint64_t checksumD = 0;
uint64_t checksumE = 0;
uint64_t checksumF = 0;
uint64_t checksumG = 0;

static pd_buf_t decryptAesCbc(pd_ota_session_t* ctx,
                                 const pd_buf_t input,
                                    pd_error_t* error)
{
    pd_err_unset(error);

    pd_buf_t decrypted = pd_buf_empty();
    {
            decrypted = pd_buf_fill_zeros(input.len);

            // checksumD
            for(int i = 0; i < 16; i++) {
                checksumD += ctx->aesIv[i];
            }

            // checksumE
            checksumE += input.len;

            // checksumF
            for(int i = 0; i < input.len; i++) {
                checksumF += input.bytes[i];
            }

            // decryptAesCbc
            int ret = 0;
            mbTry(mbedtls_aes_crypt_cbc,(&ctx->aesCtx, MBEDTLS_AES_DECRYPT,
                input.len, ctx->aesIv, input.bytes, decrypted.bytes));

            // checksumG
            for(int i = 0; i < decrypted.len; i++) {
                checksumG += decrypted.bytes[i];
            }
        }

        pd_err_success(error);
    }
end:
    eOnFail(pd_buf_delete(&decrypted));
    eOnFail(decrypted = pd_buf_empty());
    return decrypted;
}

static void setupAesCtx(pd_ota_session_t* ctx,
                      const pd_ota_hdr_t* otaHdr,
                              pd_error_t* error)
{
    pd_err_unset(error);

    {
        // setup iv
        memcpy(ctx->aesIv, otaHdr->aesIv, 16);

        // get key
        eTry(pd_256_bit_t otaAesKey =,pd_ota_aes_key_get,(error));

        // setup aesKey
        ctx->aesCtx.key_bytes = 256 / 8;
        ctx->aesCtx.key_in_hardware = 0;
        memcpy(ctx->aesCtx.key, otaAesKey.bytes, sizeof(pd_256_bit_t));

        pd_err_success(error);
    }
end:
    return;
}

@mahavirj

This is what ChatGPT said:
If mbedtls_aes_crypt_cbc is returning nondeterministic results despite being given the same input data, it's important to carefully check several aspects of your usage of the function to identify the cause. Here are some key factors to consider:
Initialization Vector (IV):

The IV for CBC mode must be unique and should not be reused with the same key. However, for the same output, the same IV must be used for encryption and decryption.
Ensure that the IV is properly initialized before each encryption or decryption operation. If the IV is not set or is set incorrectly (e.g., uninitialized memory), it can lead to nondeterministic results.

Key Initialization:

Make sure the key is correctly initialized and is the same for every operation.
Check if the key size matches the expected size for the AES variant you are using (AES-128, AES-192, AES-256).
Input Data:

that the input data (including its length) is the same for each operation.
Remember that CBC mode requires the input size to be a multiple of the block size (16 bytes for AES). If your data does not meet this requirement, you need to apply padding.
Context Reuse:

u are reusing the mbedtls_aes_context, ensure it is properly reset or reinitialized before each operation. Context reuse without proper reinitialization can lead to unexpected results.
Memory Issues:

or any memory corruption issues or unintended modifications of the input data, key, or IV between operations.
Use tools like Valgrind to detect memory issues that could be affecting your program's behavior.
Library Version and Configuration:

Ensure you are using a compatible and stable version of the Mbed TLS library.
Check if the library is configured correctly for your needs. Mbed TLS can be fine-tuned with various compile-time options, which might affect its behavior.
Error Checking:

Ensure that you check the return value of mbedtls_aes_crypt_cbc for errors after each call.
Investigate any errors returned by the function to understand what might be going wrong.
Thread Safety:

If your application is multi-threaded, ensure that there are no race conditions affecting the shared resources like keys, IVs, or context.

Environmental Factors:

Consider if there are any environmental factors that could be affecting the operation, such as changes in the system's state or external modifications of data.

By methodically checking each of these areas, you should be able to pinpoint the cause of the nondeterministic behavior. In cryptographic operations, small changes or errors in the setup can lead to large differences in output, so attention to detail is crucial

it looks like in v5.0 theres a new way to set the decryption key. ill try that
int mbedtls_aes_setkey_dec(mbedtls_aes_context *ctx, const unsigned char *key,
                           unsigned int keybits)

note if i set CONFIG_MBEDTLS_AES_USE_INTERRUPT=y , i get
E (38001) esp-aes: Timed out waiting for completion of AES Interrupt
E (38001) esp-aes: esp_aes_dma_wait_complete failed

It is fixed by setting CONFIG_MBEDTLS_HARDWARE_AES=n!!!!

I found another bug in my code. I was using esp_aes_context instead of mbedtls_aes_context. But it does not fix anything.

It is fixed by setting CONFIG_MBEDTLS_HARDWARE_AES=n !!!!

Hello @chipweinberger,
If possible could you share the values of the input and iv that you are experimenting with?  I tried out some AES-CBC calculations with some random values but they seem to work fine. We even have an AES-CBC test case in ESP-IDF and that seems to work well too.

@Harshal5 my code is quite large and complex. I wish I had the time to debug it further.
My guess is that it might be related to wifi & ota
my ota binary is 1.5MB and I transfer it in chunks of ~16KB where each chunk is sent in a separate http POST request.
I also have bluetooth enabled, and am using PSRAM. I can't think of anything else to say.

@chipweinberger, could you try executing the test mbedtls AES performance with the sdkconfig that you have provided  above? (below are the steps for the same) I tried it on my side and the encryption seems to work well.
Steps to execute the mbedtls test:

cd components/mbedtls/test_apps
Copy the sdkconfig file that is linked above.
Run idf.py build flash monitor
Enter the number for the test "mbedtls AES performance" (26 maybe)

works.
note: I use a watchdog timeout in my sdkconfig. it's unrelated of course.
Running mbedtls AES self-tests...
  AES note: built-in implementation.
  AES-ECB-128 (dec): passed
  AES-ECB-128 (enc): passed
  AES-ECB-192 (dec): passed
  AES-ECB-192 (enc): passed
  AES-ECB-256 (dec): passed
  AES-ECB-256 (enc): passed

  AES-CBC-128 (dec): passed
  AES-CBC-128 (enc): passed
  AES-CBC-192 (dec): passed
  AES-CBC-192 (enc): passed
  AES-CBC-256 (dec): passed
  AES-CBC-256 (enc): passed

  AES-CFB128-128 (dec): passed
  AES-CFB128-128 (enc): passed
  AES-CFB128-192 (dec): passed
  AES-CFB128-192 (enc): passed
  AES-CFB128-256 (dec): passed
  AES-CFB128-256 (enc): passed

  AES-OFB-128 (dec): passed
  AES-OFB-128 (enc): passed
  AES-OFB-192 (dec): passed
  AES-OFB-192 (enc): passed
  AES-OFB-256 (dec): passed
  AES-OFB-256 (enc): passed

  AES-CTR-128 (dec): passed
  AES-CTR-128 (enc): passed
  AES-CTR-128 (dec): passed
  AES-CTR-128 (enc): passed
  AES-CTR-128 (dec): passed
  AES-CTR-128 (enc): passed

  AES-XTS-128 (dec): passed
  AES-XTS-128 (enc): passed
  AES-XTS-128 (dec): passed
  AES-XTS-128 (enc): passed
  AES-XTS-128 (dec): passed
  AES-XTS-128 (enc): passed

Verified no APB corruption from operations
MALLOC_CAP_8BIT usage: Free memory delta: 0 Leak threshold: -1024
MALLOC_CAP_32BIT usage: Free memory delta: 0 Leak threshold: -1024
/IDF/components/mbedtls/test_apps/main/test_mbedtls.c:31:mbedtls AES self-tests:PASS
Test ran in 1151ms

-----------------------
1 Tests 0 Failures 0 Ignored
OK
Enter next test, or 'enter' to see menu
E (8089) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (8089) task_wdt:  - IDLE (CPU 0)
E (8089) task_wdt: Tasks currently running:
E (8089) task_wdt: CPU 0: testTask
E (8089) task_wdt: CPU 1: IDLE
E (8089) task_wdt: Print CPU 0 (current core) backtrace

Backtrace: 0x42017CCB:0x3FC97920 0x403777C9:0x3FC97960 0x40048D03:0x3FCB0C20 |<-CORRUPTED
0x42017ccb: pd_xtrans_resp_set_hdr(pd_xtrans_t*, char const*, char const*, pd_error_t*) at /Volumes/User/MBP-Google-Drive/jamcorder/firmware/jamcorder-firmware/jamcorder_common/jcommon/api/xcoms/pd_xtrans.cpp:649

0x403777c9: rtc_isr_noniram_enable at /Volumes/User/MBP-Google-Drive/jamcorder/firmware/esp-idf/components/esp_hw_support/rtc_module.c:202

0x40048d03: uart_rx_one_char in ROM

The test passes so I am not sure if there could be a sdkconfig migration issue in this case. Would it be possible for you to share a minimal example or any more information for me to reproduce the issue?

the test is probably not stressful enough imo. testing PSRAM would be the first thing to check imo.
But unfortunately I can'y justify the time to create a minimal example. I plan to use software AES regardless because I think it would more reliable.

Closing the issue for now as the issue is not reproducible at our end, please feel free to re-open the issue as needed.


text:
ot_rcp does not work correctly on esp32h2 (IDFGH-11951)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.2-beta1-263-ge49823f10c
Espressif SoC revision.
ESP32-H2
Operating System used.
Windows
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-H2-DevKitM-1 V1.2
Power Supply used.
USB
What is the expected behavior?
ot_rcp and ot_br form the border router.
What is the actual behavior?
ot_rcp could not run successfully on esp32h2. Below is all the logs, it doesn't seem to start executing the main function
log.txt
Steps to reproduce.
idf.py set-target esp32h2
idf.py flash monitor -p /dev/ttyUSB1
Debug Logs.
No response
More Information.
No response

This is the log of ot-br, and the log shows that the rcp cannot be reset
W(11567) OPENTHREAD:[W] Platform------: Wait for response timeout
W(13577) OPENTHREAD:[W] Platform------: Wait for response timeout
E(13577) OPENTHREAD:[C] Platform------: Failed to reset RCP!
E(13587) OPENTHREAD:[C] Platform------: ResetRcp() at radio_spinel_impl.hpp:281: Failure

log.txt

Hi @KEEPHEADU  Could you please show me more details about your env?

Which type of the interface did you use for connecting BR with RCP, UART or SPI?
Did you check the connection pin between BR and RCP is correct?
Did you modify the sdkconfig via idf.py menuconfig?

Hi @zwx1995esp ,Thank you for your reply.

Which type of the interface did you use for connecting BR with RCP, UART or SPI?

UART

Did you check the connection pin between BR and RCP is correct?

I followed the example image in the README to connect BR and RCP, using the default pins.

Did you modify the sdkconfig via idf.py menuconfig?

Below is my sdkconfig file.
sdkconfig--br.txt
sdkconfig--rcp.txt

Hi, I reproduce this issue on my local env, will investigate it ASAP. I will sync to you if I find something or fix it. So, please just give me some time.

Hi @KEEPHEADU  , could you please try the rx pin GPIO1 and tx pin GPIO0 for C3? I tried these pins and worked well. If these pins work well, could you please try them first? And for the pin GPIO4 and pin GPIO5 do not work, I will discuss with the HW team and reply here later.

Hi, we find a solution tio use GPIO4 and GPIO5 on C3, could you please try to add these code after this line?
        if (config->tx_pin != -1) {
            gpio_set_drive_capability(config->tx_pin, GPIO_DRIVE_CAP_3);
        }
        if (config->rx_pin != -1) {
            gpio_set_drive_capability(config->rx_pin, GPIO_DRIVE_CAP_3);
        }

(before calling the function uart_set_pin)

Hi, we find a solution tio use GPIO4 and GPIO5 on C3, could you please try to add these code after this line?
        if (config->tx_pin != -1) {
            gpio_set_drive_capability(config->tx_pin, GPIO_DRIVE_CAP_3);
        }
        if (config->rx_pin != -1) {
            gpio_set_drive_capability(config->rx_pin, GPIO_DRIVE_CAP_3);
        }

(before calling the function uart_set_pin)

Yes, ot-br works fine after adding this code.


text:
ESP-IDF ESP32s3 Project head driver/rmt_tx.h not found (IDFGH-14173)

Answers checklist.

[x] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.2.2
Operating System used.
Windows
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
PowerShell
What is the expected behavior?
The cmake can find head file "driver/rmt_tx.h", then make my project successfully.
What is the actual behavior?
The cmake can't find head file "driver/rmt_tx.h", and throwing an error:
In file included from I:/Projects/esp32-s3zhukongyaokongche/fasheduan/main/drivers/ws2812.c:1:
I:/Projects/esp32-s3zhukongyaokongche/fasheduan/main/drivers/ws2812.h:7:10: fatal error: driver/rmt_tx.h: No such file or directory
    7 | #include "driver/rmt_tx.h"
      |          ^~~~~~~~~~~~~~~~~

but in the same project on esp32, cmake can find this head file.
Steps to reproduce.

I copy the drivers/ws2812.c from other project(esp32), and copy to this project(esp32s3)
change CMakeLists.txt to:

idf_component_register(SRCS "main.c" "drivers/ws2812.c"
                       INCLUDE_DIRS "."
                       #REQUIRES
                       PRIV_REQUIRES nvs_flash esp_wifi)

then click:

throw this error.

Build or installation Logs.
[0/1] Re-running CMake...-- ccache will be used for faster recompilation
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32s3
-- Project sdkconfig file I:/Projects/esp32-s3zhukongyaokongche/fasheduan/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- App "fasheduan" version: 1
-- Adding linker script I:/Projects/esp32-s3zhukongyaokongche/fasheduan/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script I:/Projects/esp32-s3zhukongyaokongche/fasheduan/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script I:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script I:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script I:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script I:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script I:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script I:/ESP-IDF/v5.2.2/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport touch_element ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: I:/ESP-IDF/v5.2.2/esp-idf/components/app_trace I:/ESP-IDF/v5.2.2/esp-idf/components/app_update I:/ESP-IDF/v5.2.2/esp-idf/components/bootloader I:/ESP-IDF/v5.2.2/esp-idf/components/bootloader_support I:/ESP-IDF/v5.2.2/esp-idf/components/bt I:/ESP-IDF/v5.2.2/esp-idf/components/cmock I:/ESP-IDF/v5.2.2/esp-idf/components/console I:/ESP-IDF/v5.2.2/esp-idf/components/cxx I:/ESP-IDF/v5.2.2/esp-idf/components/driver I:/ESP-IDF/v5.2.2/esp-idf/components/efuse I:/ESP-IDF/v5.2.2/esp-idf/components/esp-tls I:/ESP-IDF/v5.2.2/esp-idf/components/esp_adc I:/ESP-IDF/v5.2.2/esp-idf/components/esp_app_format I:/ESP-IDF/v5.2.2/esp-idf/components/esp_bootloader_format I:/ESP-IDF/v5.2.2/esp-idf/components/esp_coex I:/ESP-IDF/v5.2.2/esp-idf/components/esp_common I:/ESP-IDF/v5.2.2/esp-idf/components/esp_eth I:/ESP-IDF/v5.2.2/esp-idf/components/esp_event I:/ESP-IDF/v5.2.2/esp-idf/components/esp_gdbstub I:/ESP-IDF/v5.2.2/esp-idf/components/esp_hid I:/ESP-IDF/v5.2.2/esp-idf/components/esp_http_client I:/ESP-IDF/v5.2.2/esp-idf/components/esp_http_server I:/ESP-IDF/v5.2.2/esp-idf/components/esp_https_ota I:/ESP-IDF/v5.2.2/esp-idf/components/esp_https_server I:/ESP-IDF/v5.2.2/esp-idf/components/esp_hw_support I:/ESP-IDF/v5.2.2/esp-idf/components/esp_lcd I:/ESP-IDF/v5.2.2/esp-idf/components/esp_local_ctrl
I:/ESP-IDF/v5.2.2/esp-idf/components/esp_mm I:/ESP-IDF/v5.2.2/esp-idf/components/esp_netif I:/ESP-IDF/v5.2.2/esp-idf/components/esp_netif_stack I:/ESP-IDF/v5.2.2/esp-idf/components/esp_partition I:/ESP-IDF/v5.2.2/esp-idf/components/esp_phy I:/ESP-IDF/v5.2.2/esp-idf/components/esp_pm I:/ESP-IDF/v5.2.2/esp-idf/components/esp_psram I:/ESP-IDF/v5.2.2/esp-idf/components/esp_ringbuf I:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom I:/ESP-IDF/v5.2.2/esp-idf/components/esp_system I:/ESP-IDF/v5.2.2/esp-idf/components/esp_timer I:/ESP-IDF/v5.2.2/esp-idf/components/esp_wifi I:/ESP-IDF/v5.2.2/esp-idf/components/espcoredump I:/ESP-IDF/v5.2.2/esp-idf/components/esptool_py I:/ESP-IDF/v5.2.2/esp-idf/components/fatfs I:/ESP-IDF/v5.2.2/esp-idf/components/freertos
I:/ESP-IDF/v5.2.2/esp-idf/components/hal I:/ESP-IDF/v5.2.2/esp-idf/components/heap I:/ESP-IDF/v5.2.2/esp-idf/components/http_parser I:/ESP-IDF/v5.2.2/esp-idf/components/idf_test I:/ESP-IDF/v5.2.2/esp-idf/components/ieee802154 I:/ESP-IDF/v5.2.2/esp-idf/components/json I:/ESP-IDF/v5.2.2/esp-idf/components/log I:/ESP-IDF/v5.2.2/esp-idf/components/lwip I:/Projects/esp32-s3zhukongyaokongche/fasheduan/main I:/ESP-IDF/v5.2.2/esp-idf/components/mbedtls I:/ESP-IDF/v5.2.2/esp-idf/components/mqtt I:/ESP-IDF/v5.2.2/esp-idf/components/newlib I:/ESP-IDF/v5.2.2/esp-idf/components/nvs_flash I:/ESP-IDF/v5.2.2/esp-idf/components/nvs_sec_provider I:/ESP-IDF/v5.2.2/esp-idf/components/openthread I:/ESP-IDF/v5.2.2/esp-idf/components/partition_table I:/ESP-IDF/v5.2.2/esp-idf/components/perfmon I:/ESP-IDF/v5.2.2/esp-idf/components/protobuf-c I:/ESP-IDF/v5.2.2/esp-idf/components/protocomm I:/ESP-IDF/v5.2.2/esp-idf/components/pthread I:/ESP-IDF/v5.2.2/esp-idf/components/sdmmc I:/ESP-IDF/v5.2.2/esp-idf/components/soc I:/ESP-IDF/v5.2.2/esp-idf/components/spi_flash I:/ESP-IDF/v5.2.2/esp-idf/components/spiffs I:/ESP-IDF/v5.2.2/esp-idf/components/tcp_transport I:/ESP-IDF/v5.2.2/esp-idf/components/touch_element I:/ESP-IDF/v5.2.2/esp-idf/components/ulp I:/ESP-IDF/v5.2.2/esp-idf/components/unity I:/ESP-IDF/v5.2.2/esp-idf/components/usb I:/ESP-IDF/v5.2.2/esp-idf/components/vfs I:/ESP-IDF/v5.2.2/esp-idf/components/wear_levelling I:/ESP-IDF/v5.2.2/esp-idf/components/wifi_provisioning I:/ESP-IDF/v5.2.2/esp-idf/components/wpa_supplicant I:/ESP-IDF/v5.2.2/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: I:/Projects/esp32-s3zhukongyaokongche/fasheduan/build

[1/9] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/drivers/ws2812.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/drivers/ws2812.c.obj
ccache I:\ESP-IDF\.espressif\tools\xtensa-esp-elf\esp-13.2.0_20230928\xtensa-esp-elf\bin\xtensa-esp32s3-elf-gcc.exe -DESP_PLATFORM -DIDF_VER=\"v5.2.2-1-gbdcfabac2d-dirty\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -II:/Projects/esp32-s3zhukongyaokongche/fasheduan/build/config -II:/Projects/esp32-s3zhukongyaokongche/fasheduan/main -II:/ESP-IDF/v5.2.2/esp-idf/components/newlib/platform_include -II:/ESP-IDF/v5.2.2/esp-idf/components/freertos/config/include -II:/ESP-IDF/v5.2.2/esp-idf/components/freertos/config/include/freertos -II:/ESP-IDF/v5.2.2/esp-idf/components/freertos/config/xtensa/include -II:/ESP-IDF/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/include -II:/ESP-IDF/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -II:/ESP-IDF/v5.2.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos -II:/ESP-IDF/v5.2.2/esp-idf/components/freertos/esp_additions/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_hw_support/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_hw_support/include/soc -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_hw_support/include/soc/esp32s3 -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_hw_support/port/esp32s3/. -II:/ESP-IDF/v5.2.2/esp-idf/components/heap/include -II:/ESP-IDF/v5.2.2/esp-idf/components/log/include -II:/ESP-IDF/v5.2.2/esp-idf/components/soc/include -II:/ESP-IDF/v5.2.2/esp-idf/components/soc/esp32s3 -II:/ESP-IDF/v5.2.2/esp-idf/components/soc/esp32s3/include -II:/ESP-IDF/v5.2.2/esp-idf/components/hal/platform_port/include -II:/ESP-IDF/v5.2.2/esp-idf/components/hal/esp32s3/include -II:/ESP-IDF/v5.2.2/esp-idf/components/hal/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/include/esp32s3 -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_rom/esp32s3 -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_common/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_system/include
-II:/ESP-IDF/v5.2.2/esp-idf/components/esp_system/port/soc -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_system/port/include/private -II:/ESP-IDF/v5.2.2/esp-idf/components/xtensa/esp32s3/include -II:/ESP-IDF/v5.2.2/esp-idf/components/xtensa/include -II:/ESP-IDF/v5.2.2/esp-idf/components/xtensa/deprecated_include -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/include -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/include/apps -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/include/apps/sntp -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/lwip/src/include -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/port/include -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/port/freertos/include -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/port/esp32xx/include -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/port/esp32xx/include/arch -II:/ESP-IDF/v5.2.2/esp-idf/components/lwip/port/esp32xx/include/sys -II:/ESP-IDF/v5.2.2/esp-idf/components/nvs_flash/include -II:/ESP-IDF/v5.2.2/esp-idf/components/spi_flash/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_partition/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_wifi/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_wifi/wifi_apps/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_event/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_phy/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_phy/esp32s3/include -II:/ESP-IDF/v5.2.2/esp-idf/components/esp_netif/include -mlongcalls  -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -O2 -fmacro-prefix-map=I:/Projects/esp32-s3zhukongyaokongche/fasheduan=. -fmacro-prefix-map=I:/ESP-IDF/v5.2.2/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -std=gnu17 -Wno-old-style-declaration -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/drivers/ws2812.c.obj -MF esp-idf\main\CMakeFiles\__idf_main.dir\drivers\ws2812.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/drivers/ws2812.c.obj -c I:/Projects/esp32-s3zhukongyaokongche/fasheduan/main/drivers/ws2812.c
In file included from I:/Projects/esp32-s3zhukongyaokongche/fasheduan/main/drivers/ws2812.c:1:
I:/Projects/esp32-s3zhukongyaokongche/fasheduan/main/drivers/ws2812.h:7:10: fatal error: driver/rmt_tx.h: No such file or directory
    7 | #include "driver/rmt_tx.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
[2/9] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D I:\Projects\esp32-s3zhukongyaokongche\fasheduan\build\bootloader\esp-idf\esptool_py && I:\ESP-IDF\.espressif\python_env\idf5.2_py3.11_env\Scripts\python.exe I:/ESP-IDF/v5.2.2/esp-idf/components/partition_table/check_sizes.py --offset 0x9000 bootloader 0x0 I:/Projects/esp32-s3zhukongyaokongche/fasheduan/build/bootloader/bootloader.bin"
Bootloader binary size 0x5d00 bytes. 0x3300 bytes (35%) free.
ninja: build stopped: subcommand failed.

More Information.
But the other lib on esp32s3 can find header file, such as:
// Standard
#include <stdio.h>
#include <string.h>
// esp
#include "esp_task_wdt.h"
#include "esp_log.h"
// RGB light
//#include "drivers/ws2812.h"
// FreeRTOS
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
// NVS
#include "nvs.h"
#include "nvs_flash.h"
// WiFi
#include "esp_wifi.h"
#include "esp_mac.h"

@emofalling
In the ws2812.c component's CMakeLists.txt, does the following resolve the build error?
idf_component_register(SRCS "main.c" "drivers/ws2812.c"
                       INCLUDE_DIRS "."
                       REQUIRES driver
                       PRIV_REQUIRES nvs_flash esp_wifi)

@Dazza0
Thank your help. I successfully resolved the build error.

Glad you resolved the issue. @emofalling
BTW, WRT the ws2812 driver, Espressif officially support this component: https://components.espressif.com/components/espressif/led_strip/
Feel free to give it a try :)

@suda-morris
Thanks. I may be change the ws2812 driver to esp32s3's built-in.

authors: Dazza0 emofalling suda-morris


text:
[TW#27227] smp_process_pairing_public_key, Invalid Public key

@Weijian-Espressif @Yulong-espressif Could you point me direction please. Thanks.
I am assuming it is my fault that i am getting this error message, just i cant figure out what i do that i am changing keys value. The story is i am trying to pair with windows 10 and all has been working few weeks ago, now it complains about invalid pairing key. esp-idf gatt_secure example dont have this problem.
E (119013) BT_SMP: smp_process_pairing_public_key, Invalid Public key.
https://github.com/espressif/esp-idf/blob/master/components/bt/bluedroid/stack/smp/smp_act.c#L739
I (118853) BT_BTM: BTM_InqDbRead: bd addr [80a58982f5d2]

I (118873) BT_GATT: GATT_GetConnIdIfConnected status=1

I (118883) BT_L2CAP: L2CA_SendFixedChnlData()  CID: 0x0004  BDA: 80a58982f5d2
I (118883) BT_GATT: GATT_GetConnectionInfor conn_id=3
I (118883) BT_L2CAP: L2CA_SetDesireRole() new:x1, disallow_switch:0
I (118903) BT_L2CAP: L2CA_SendFixedChnlData()  CID: 0x0004  BDA: 80a58982f5d2
I (118923) BLEDevice: ESP_GAP_BLE_SEC_REQ_EVT
I (118933) BT_L2CAP: L2CA_SendFixedChnlData()  CID: 0x0006  BDA: 80a58982f5d2
I (118933) BT_L2CAP: L2CA_EnableUpdateBleConnParams - BD_ADDR 80a58982f5d2 enable 0 current upd state 0x0c
I (118943) BT_L2CAP: L2CA_SendFixedChnlData()  CID: 0x0004  BDA: 80a58982f5d2
E (119013) BT_SMP: smp_process_pairing_public_key, Invalid Public key.
I (119013) BT_L2CAP: L2CA_SendFixedChnlData()  CID: 0x0006  BDA: 80a58982f5d2
I (119013) BT_L2CAP: L2CA_EnableUpdateBleConnParams - BD_ADDR 80a58982f5d2 enable 1 current upd state 0x0c
I (119023) BT_L2CAP: L2CA_RemoveFixedChnl()  CID: 0x0006  BDA: 80a58982f5d2
I (119033) BT_BTM: BTM_InqDbRead: bd addr [80a58982f5d2]

I (119033) BT_BTM: BTM_IsAclConnectionUp: RemBdAddr: 80a58982f5d2

I (119043) BT_L2CAP: L2CA_SendFixedChnlData()  CID: 0x0004  BDA: 80a58982f5d2
W (119053) BT_BTM: btm_sec_clr_temp_auth_service() - no dev CB

I (119063) BT_GATT: GATT_GetConnIdIfConnected status=0

E (119063) BT_BTM: Device not found

I (119073) BT_BTM: BTM_IsAclConnectionUp: RemBdAddr: 80a58982f5d2

I (119073) BT_L2CAP: L2CA_SetDesireRole() new:x1, disallow_switch:0
W (119083) BT_APPL: BTA got unregistered event id 31

W (119093) BT_APPL: BTA got unregistered event id 31

I (119103) BLEDevice: ESP_GAP_BLE_AUTH_CMPL_EVT

PS i have to mention that i have no issue pairing/bond with android or iPhone smartphone.

@hegewara Can you print the values of peer_publ_key.x and peer_publ_key.y in smp_process_pairing_public_key().  ESP32 will check whether the x and y coordinates are on the given elliptic curve.

@Weijian-Espressif For some reason peer_bul_key.y is not initialized and x is not fully initialized:
W (17538) SMP_ACT X:: 0c d7 0f 90 45 14 e5 68 31 47 7d 22 4a 3d fe 05
W (17538) SMP_ACT X:: 6e 2d 17 3b 82 79 00 00 00 00 00 00 00 00 00 00
W (17548) SMP_ACT Y:: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
W (17548) SMP_ACT Y:: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

This is from android device:
W (37638) SMP_ACT X:: 07 6e 9f c4 79 7b 1c 71 4a 09 a9 6a 3e d0 d0 73
W (37638) SMP_ACT X:: 1b 89 9b 8a 24 2d e5 ef 0d ab 2d 42 49 50 b4 4b
W (37638) SMP_ACT Y:: 99 c1 c0 2a 0e 29 43 c8 1d 82 95 79 98 1a 71 6e
W (37648) SMP_ACT Y:: 75 54 49 62 54 8a 8f e2 f6 9f 77 5a 29 16 e7 29

What is even more disturbing, when iPhone is exchanging keys smp_process_pairing_public_key is not even called:
W (24748) SampleHIDDevice: custom gatts event handler, event: 14, length: 0
W (24748) SampleHIDDevice: custom gatts event handler, event: 4, length: 0
W (24828) SampleHIDDevice: custom gap event handler, event: 20
E (25338) BT_GATT: GATT_INSUF_ENCRYPTION

W (25398) SampleHIDDevice: custom gap event handler, event: 10
W (25458) SampleHIDDevice: custom gap event handler, event: 20
W (27048) SampleHIDDevice: custom gap event handler, event: 9
W (27058) SampleHIDDevice: custom gap event handler, event: 9
W (27258) SampleHIDDevice: custom gatts event handler, event: 1, length: 5467
W (27258) SampleHIDDevice: custom gap event handler, event: 9
W (27258) SampleHIDDevice: custom gap event handler, event: 9
W (27268) SampleHIDDevice: custom gap event handler, event: 20
W (27268) SampleHIDDevice: custom gap event handler, event: 8
W (27278) SampleHIDDevice: custom gatts event handler, event: 21, length: 0
W (27558) SampleHIDDevice: custom gatts event handler, event: 1, length: 5467
W (27558) SampleHIDDevice: custom gatts event handler, event: 21, length: 21346
W (27678) SampleHIDDevice: custom gatts event handler, event: 1, length: 5467
W (27688) SampleHIDDevice: custom gatts event handler, event: 21, length: 21346
W (27918) SampleHIDDevice: custom gatts event handler, event: 1, length: 5467
W (27918) SampleHIDDevice: custom gatts event handler, event: 21, length: 21346
W (27978) SampleHIDDevice: custom gatts event handler, event: 1, length: 5467
W (27978) SampleHIDDevice: custom gatts event handler, event: 21, length: 21346
W (28068) SampleHIDDevice: custom gatts event handler, event: 2, length: 5467
W (28068) SampleHIDDevice: custom gatts event handler, event: 21, length: 21346
W (28368) SampleHIDDevice: custom gatts event handler, event: 2, length: 5467
W (28368) SampleHIDDevice: custom gatts event handler, event: 21, length: 21346
W (28438) SampleHIDDevice: custom gap event handler, event: 20
W (28438) SampleHIDDevice: custom gatts event handler, event: 1, length: 5467
W (28448) SampleHIDDevice: custom gatts event handler, event: 21, length: 21346

Here is my wireshark file (renamed to upload):
win10.pcapng.txt

@chegewara From the log you gave, it is because your y coordinate is not initialized. If the y coordinate is not initialized, it means that your public key is not on the given elliptic curve. In this case, when your private key is the base, then your DHkey is calculated to be equal to the Public key; when your private key is even, DHkey is 0.


text:
HTTP & MQTT components donot work when Wifi Ethernet and PPPOS clients are initialized (v4.1 beta 2) (IDFGH-3561)

Environment
-Module or chip used: ESP32-PICO-D4
-IDF version : v4.1 beta 2-cd4fa46f5372a552a67452313d246d4d09d2b39f
-Build System: [idf.py]
-Compiler version (run xtensa-esp32-elf-gcc --version to find it):
-xtensa-esp32-elf-gcc (crosstool-NG esp-2020r1) 8.2.0
-Operating System: [Windows]
-(Windows only) environment type: [Plain Command Prompt].
-Using an IDE?: [No]
Problem Description
HTTP & MQTT components do not work when Wifi Ethernet and PPPOS clients are initialized.
//Detailed problem description goes here.
My system needs to initialize Wifi, Ethernet and LTE modules. When all of the modules initialized and have gotten their respective IP adresses MQTT & HTTP components always fail with a transport layer error. Once I deinitialize other netifs and chose to initialize only module, HTTP and MQTT components start working again.
Expected Behavior
MQTT and HTTP components to work with a connected underlying netif inetrface.
Actual Behavior
MQTT and HTTP components stop working once i initialize second interface after wifi interface.
Steps to reproduce

Initialize Wifi and get IP
Initialize Ethernet and get IP
Start MQTT client and it would never connect to the broker.

Debug Logs
Error logs from MQTT component
E (904821) TRANS_TCP: DNS lookup failed err=202 res=0x0
E (904821) MQTT_CLIENT: Error transport connect
Error logs from HTTP component
E (899821) TRANS_TCP: DNS lookup failed err=202 res=0x0
E (899822) HTTP_CLIENT: Connection failed, sock < 0
E (899822) wifi station: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
Other items if possible
sdkconfig.txt

Thanks for reporting, we will look into.

Hi @joeyExec
Could you please apply this patch to the IDF version you use and repeat your test?
0001-esp-netif-ppp-netif-to-use-netif_is_link_up-to-updat.patch.txt
There was an issue with interface routing, which was fixed in acdadeb, but this hasn't been backported to 4.1 yet (seen it's not included in your version).

@joeyExec Thanks for reporting, have you tried the patch provided by @david-cermak ? Would you please help share if any updates? Thanks.

Thanks for reporting, will close due to short of feedback, feel free to reopen with more updates, thanks.

Thanks for reporting, will close due to short of feedback, feel free to reopen with more updates, thanks.

authors: Alvin1Zhang david-cermak joeyExec


text:
UART_PIN_NO_CHANGE doesn't work correctly. (IDFGH-4224)

Environment

Development Kit: ESP32-DevKitC
Module or chip used: ESP32-WROOM-32
IDF version: v4.1
Build System: idf.py
Compiler version: 8.2.0
Operating System: Windows
(Windows only) environment type: PowerShell
Using an IDE?: VS code
Power Supply: USB

Problem Description
UART communication doesn't work with UART_PIN_NO_CHANGE, but works with explicit pin numbers even default pin numbers!
Steps to reproduce

Set UART pins with UART_PIN_NO_CHANGE.
Send something.

Other items if possible
I think this problem can arise from here in uart.c file from drivers:
c     UART_CHECK((tx_io_num < 0 || (GPIO_IS_VALID_OUTPUT_GPIO(tx_io_num))), "tx_io_num error", ESP_FAIL);     UART_CHECK((rx_io_num < 0 || (GPIO_IS_VALID_GPIO(rx_io_num))), "rx_io_num error", ESP_FAIL);     UART_CHECK((rts_io_num < 0 || (GPIO_IS_VALID_OUTPUT_GPIO(rts_io_num))), "rts_io_num error", ESP_FAIL);     UART_CHECK((cts_io_num < 0 || (GPIO_IS_VALID_GPIO(cts_io_num))), "cts_io_num error", ESP_FAIL);
because these lines check parameters to be more than 0, but UART_PIN_NO_CHANGE is -1.

UART_PIN_NO_CHANGE means "do nothing" it does not mean "use the default mux pin"

authors: mohammadjavadpirhadi negativekelvin