- FIRST REQUEST AFTER BOOT-------------------------------------
- V (24926)[RX]: MESSAGE NUM:3, LENGHT:13
- I (24926) [RX]: DECRYPTED DATA AT at_port_read_data: <------- AT REQUEST SHOULD BE HERE
- V (24926)[TX]: MESSAGE NUM:3, LENGHT:13
- I (24929) [TX]: DECRYPTED DATA AT at_port_write_data: AT+CWSTATE?
- I (24936) [TX]: START ENCRYPT PROCCES
- I (24941) [TX]: ENCRYPTED DATA AT LEN: 0d 00
- I (24945) [TX]: ENCRYPTED DATA AT CRC16ENCRYPT: 18 e5
- I (24951) [TX]: ENCRYPTED DATA AT CRC16DECRYPT: b3 a9
- I (24957) [TX]: ENCRYPTED DATA AT NONCE: 8b c2 d2 28 49 5d 8f 6e bf 16 5e b8
- I (24965) [TX]: ENCRYPT PROCCES RES:0
- I (24969) [TX]: ENCRYPTED DATA AT at_port_write_data: aa 0d 00 18 e5 b3 a9 8b c2 d2 28 49 5d 8f 6e bf
- I (24979) [TX]: ENCRYPTED DATA AT at_port_write_data: 16 5e b8 63 04 28 e7 14 f1 57 13 0f 67 55 1e c0
- V (24990)[TX]: MESSAGE NUM:4, LENGHT:15
- I (24994) [TX]: DECRYPTED DATA AT at_port_write_data: +CWSTATE:0,""
- I (25001) [TX]: START ENCRYPT PROCCES
- I (25005) [TX]: ENCRYPTED DATA AT LEN: 0f 00
- I (25010) [TX]: ENCRYPTED DATA AT CRC16ENCRYPT: 95 6c
- I (25016) [TX]: ENCRYPTED DATA AT CRC16DECRYPT: 58 48
- I (25022) [TX]: ENCRYPTED DATA AT NONCE: e7 19 27 98 e7 1e ea b2 cd cc 1c ef
- I (25029) [TX]: ENCRYPT PROCCES RES:0
- I (25034) [TX]: ENCRYPTED DATA AT at_port_write_data: aa 0f 00 95 6c 58 48 e7 19 27 98 e7 1e ea b2 cd
- I (25044) [TX]: ENCRYPTED DATA AT at_port_write_data: cc 1c ef 1c 4f a1 99 46 f9 5b 3a 05 89 90 fd 38
- I (25054) [TX]: ENCRYPTED DATA AT at_port_write_data: 93 44
- V (25061)[TX]: MESSAGE NUM:5, LENGHT:6
- I (25065) [TX]: DECRYPTED DATA AT at_port_write_data: OK
- I (25071) [TX]: START ENCRYPT PROCCES
- I (25076) [TX]: ENCRYPTED DATA AT LEN: 06 00
- I (25080) [TX]: ENCRYPTED DATA AT CRC16ENCRYPT: 5f c9
- I (25086) [TX]: ENCRYPTED DATA AT CRC16DECRYPT: c5 86
- I (25092) [TX]: ENCRYPTED DATA AT NONCE: 3d 38 da fd 52 8c a0 4c cd 1b fc c9
- I (25100) [TX]: ENCRYPT PROCCES RES:0
- I (25105) [TX]: ENCRYPTED DATA AT at_port_write_data: aa 06 00 5f c9 c5 86 3d 38 da fd 52 8c a0 4c cd
- I (25116) [TX]: ENCRYPTED DATA AT at_port_write_data: 1b fc c9 70 aa 62 b4 d6 b6
- SECOND REQUEST------------------------------------
- V (44052)[RX]: MESSAGE NUM:4, LENGHT:6
- I (44052) [RX]: DECRYPTED DATA AT at_port_read_data: AT+CWS <----- WIERD PREV REQUEST DATA
- [b]V (44053)[TX]: MESSAGE NUM:6, LENGHT:6[/b]
- I (44056) [TX]: DECRYPTED DATA AT at_port_write_data: ATE1
- I (44062) [TX]: START ENCRYPT PROCCES
- I (44067) [TX]: ENCRYPTED DATA AT LEN: 06 00
- I (44071) [TX]: ENCRYPTED DATA AT CRC16ENCRYPT: 63 21
- I (44077) [TX]: ENCRYPTED DATA AT CRC16DECRYPT: ce 4a
- I (44083) [TX]: ENCRYPTED DATA AT NONCE: 93 d7 9d 0a d6 1f 66 a5 9a 33 37 6d
- I (44091) [TX]: ENCRYPT PROCCES RES:0
- I (44095) [TX]: ENCRYPTED DATA AT at_port_write_data: aa 06 00 63 21 ce 4a 93 d7 9d 0a d6 1f 66 a5 9a
- I (44105) [TX]: ENCRYPTED DATA AT at_port_write_data: 33 37 6d 26 2e 38 f3 68 85
- V (44114)[TX]: MESSAGE NUM:7, LENGHT:6
- I (44118) [TX]: DECRYPTED DATA AT at_port_write_data: OK
- I (44124) [TX]: START ENCRYPT PROCCES
- I (44129) [TX]: ENCRYPTED DATA AT LEN: 06 00
- I (44133) [TX]: ENCRYPTED DATA AT CRC16ENCRYPT: 6a 66
- I (44139) [TX]: ENCRYPTED DATA AT CRC16DECRYPT: c5 86
- I (44145) [TX]: ENCRYPTED DATA AT NONCE: a5 f8 95 94 3d e3 a2 58 1a 9e cc 95
- I (44153) [TX]: ENCRYPT PROCCES RES:0
- I (44157) [TX]: ENCRYPTED DATA AT at_port_write_data: aa 06 00 6a 66 c5 86 a5 f8 95 94 3d e3 a2 58 1a
- I (44167) [TX]: ENCRYPTED DATA AT at_port_write_data: 9e cc 95 b4 fa ee 08 80 ca
UART encryption
UART encryption
Is it possible to encrypt data coming through UART, such as AT commands and data using ESD-IDF or some Espressif lib?
Re: UART encryption
I tried using encryption in the at_port_read_data and at_port_write_data functions. The recording function works properly, it correctly encrypts data from the *buffer and sends it further. However, the reading function works strangely. Even with decryption disabled, when you try to read a buffer with data, the previous request is always there. At the same time, the requests themselves are executed successfully, as can be seen in the logs. Maybe the logging function works in a special way, which is why it does not read data from the buffer correctly.
Anyway, when I try to enable decryption of incoming data, for some reason it breaks, apparently due to the addition of the decryption process...
Maybe someone knows the features of working with the at_port_read_data function, how to correctly interpret and modify data from it
Anyway, when I try to enable decryption of incoming data, for some reason it breaks, apparently due to the addition of the decryption process...
Maybe someone knows the features of working with the at_port_read_data function, how to correctly interpret and modify data from it
Re: UART encryption
The problem was solved.
I placed the encryption and data processing processes in the at_port_read_data function before executing read_fn, but it was necessary after.
Encryption now works properly
I placed the encryption and data processing processes in the at_port_read_data function before executing read_fn, but it was necessary after.
Encryption now works properly
Who is online
Users browsing this forum: No registered users and 33 guests