Search found 24 matches

by dkaufmann
Tue Sep 10, 2024 8:02 am
Forum: ESP-IDF
Topic: Updated examples of new I2C master/slave driver for IDF 5.2.x...
Replies: 3
Views: 4858

Re: Updated examples of new I2C master/slave driver for IDF 5.2.x...

Hello all I was using ESP-IDF v5.0 and I had a running I2C Slave code. Then I was updating to ESP-IDF V5.3 and I run into fatal errors with unchanged code. So I tried to update my code to the new I2C-Slave functions according to the API description with i2c_slave_config_t, i2c_new_slave_device, i2c_...
by dkaufmann
Wed Jun 29, 2022 6:37 am
Forum: ESP-IDF
Topic: NVS issue, unable read stored data from NVS
Replies: 2
Views: 3141

Re: NVS issue, unable read stored data from NVS

Hello. I had a very similar problem. In my case the initialization of the size was wrong
You could try:

Code: Select all

size_t size = strlen(data)+1;
best regards
Dominik
by dkaufmann
Mon Nov 16, 2020 2:21 pm
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

I understand this. I will try to handle it by myself with a customized callback in the modbus component part. I hope there will be a supported possibility later which allows to return a value based on a the requested address (or to write a value based on the specific address). The difference would b...
by dkaufmann
Mon Nov 16, 2020 1:42 pm
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

thanks for you comments. Please find my comment to 1), 2) and 4) below: I understand your point and it would also work as you suggested: 1) define register areas of holding registers 2) write a modbus task to update holding register continuously, so all holding registers contain valid information in...
by dkaufmann
Thu Nov 12, 2020 12:46 pm
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

Okay thank you for your efforts to improve this ESP freemodbus port. I now use your example you shared and I changed the callback function: eMBErrorCode mbc_reg_holding_slave_cb(UCHAR * reg_buffer, USHORT address, USHORT n_regs, eMBRegisterMode mode) according my wishes. It all works perfectly. The ...
by dkaufmann
Tue Nov 10, 2020 8:50 am
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

Thanks for the update. Now it works perfectly and I can define several areas of holding registers. But I have some general problems using this library (Modbus TCP-slave): 1) Like in your example: When updating the holding or input register value on read request, the old value is already returned to ...
by dkaufmann
Wed Nov 04, 2020 1:31 pm
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

Hello, yes I am still interested and I would also test it. It might takes some time because at the moment my project works with esp-idf 4.0 so I need to change some things first to be compatible with esp-idf v4.3.
thanks for your update and let me know how I can test it.
by dkaufmann
Thu Oct 29, 2020 9:08 am
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

Okay interesting.
Did you find any possibility or work around to make several address areas of holding registers for a Modbus TCP slave?
HREG area 1: 0-100
HREG area 2: 1000-1100
HREG area 3: 2000-2100
...
by dkaufmann
Wed Oct 28, 2020 8:09 am
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

in my case it is a Modbus TCP slave (server).
The problem is, that the prepared library from esp-idf does not allow several areas of holding register areas.
by dkaufmann
Fri Aug 28, 2020 8:51 am
Forum: ESP-IDF
Topic: Modbus TCP Implementation
Replies: 36
Views: 36041

Re: Modbus TCP Implementation

Hello,
okay thank you very much for your reply, very appreciated.
I am looking forward for the new version then.
best regards
DK