You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi , i am trying to control knx ip secure device by establishing secure link , my code is
public static void main(String[] args) {
final var duration = Duration.ofSeconds(60);
System.out.println("This example establishes a secure tunneling link to "
+ server + ", and waits for tunneled datagrams for "
+ duration.toSeconds() + " seconds");
final byte[] userKey = SecureConnection.hashUserPassword(userPwd.toCharArray());
final byte[] deviceAuthCode = SecureConnection.hashDeviceAuthenticationPassword(deviceAuthPwd.toCharArray());
var tcpTry = TcpConnection.newTcpConnection(server);
System.out.println("tcp try is " + tcpTry);
var sessionTry = tcpTry.newSecureSession(user, userKey, deviceAuthCode);
System.out.println("sessionTry " + sessionTry);
// IndividualAddress dev = new IndividualAddress(1/1/1);
try ( var tcp = TcpConnection.newTcpConnection(server);
var session = tcp.newSecureSession(user, userKey, deviceAuthCode);
var link = KNXNetworkLinkIP.newSecureTunnelingLink(session, new TPSettings())) {
System.out.println("inside try block ");
link.addLinkListener(new NetworkLinkListener() {
@Override
public void indication(final FrameEvent e) { System.out.println(e.getFrame()); }
});
System.out.println("Secure link established to " + link.getName());
Thread.sleep(duration.toMillis());
}
catch (KNXException | InterruptedException e) {
System.out.println("Error creating KNX IP secure tunneling link: " + e);
e.printStackTrace();
}
finally {
System.out.println("Link closed");
}
}
We have given correct passwords but we getting unauthenticated
This example establishes a secure tunneling link to /192.168.100.100:3671, and waits for tunneled datagrams for 60 seconds
tcp try is 0.0.0.0:0<=>192.168.100.100:3671 (unbound)
sessionTry 🔒 session 0 (user 2): Idle
Nov 26, 2024 3:23:37 PM io.calimero.knxnetip.StreamConnection$SecureSession parseSessionResponse
WARNING: skipping device authentication of 192.168.100.100:3671 (no device key)
Nov 26, 2024 3:23:37 PM io.calimero.knxnetip.StreamConnection$SecureSession acceptServiceType
SEVERE: authorization failed 🔒 session 7 (user 2): Unauthenticated
Link closed
Exception in thread "main" io.calimero.secure.KnxSecureException: secure session authorization failed
at io.calimero.knxnetip.StreamConnection$SecureSession.setupSecureSession(StreamConnection.java:300)
at io.calimero.knxnetip.StreamConnection$SecureSession.ensureOpen(StreamConnection.java:248)
at io.calimero.knxnetip.SecureConnection.newTunneling(SecureConnection.java:125)
at io.calimero.link.KNXNetworkLinkIP.newSecureTunnelingLink(KNXNetworkLinkIP.java:202)
at knxtest.KNXSecurePassword.main(KNXSecurePassword.java:58)
Can you please help in resolving steps for this issue
Thank you
The text was updated successfully, but these errors were encountered:
Hi , i am trying to control knx ip secure device by establishing secure link , my code is
We have given correct passwords but we getting unauthenticated
Can you please help in resolving steps for this issue
Thank you
The text was updated successfully, but these errors were encountered: