SerialTransfer has no member named 'txBuff'

Hello everyone,
I am trying to program an ESP32 using the SerialTransfer library,
The problem is that when compiling the program I get this error.
I have already tried to change several libraries but I can't get it to work.
Can anyone tell me how to fix this?

ERROR code:


C:\Users\User\Desktop\Arduino\x\x.ino: In function 'void setup()':
TestRoutine:42:15: error: 'class SerialTransfer' has no member named 'txBuff'
    myTransfer.txBuff[i] = '0';                                                                                ////
               ^~~~~~
C:\Users\User\Desktop\Arduino\x\x.ino: In function 'void readValue()':
readValue:10:28: error: 'class SerialTransfer' has no member named 'rxBuff'
       hiByte6 = myTransfer.rxBuff[18];                                                                            ////
                            ^~~~~~
readValue:11:28: error: 'class SerialTransfer' has no member named 'rxBuff'
       loByte6 = myTransfer.rxBuff[19];                                                                            ////
                            ^~~~~~
readValue:12:28: error: 'class SerialTransfer' has no member named 'rxBuff'
       hiByte7 = myTransfer.rxBuff[20];                                                                            ////
                            ^~~~~~
readValue:13:28: error: 'class SerialTransfer' has no member named 'rxBuff'
       loByte7 = myTransfer.rxBuff[21];                                                                            ////
                            ^~~~~~
C:\Users\User\Desktop\Arduino\x\x.ino: In function 'void readIncome()':
readiIncome:9:39: error: 'class SerialTransfer' has no member named 'rxBuff'
       Sincome = Sincome + (myTransfer.rxBuff[i]);                                                                 ////
                                       ^~~~~~
C:\Users\User\Desktop\Arduino\x\x.ino: In function 'void transmitOutcome()':
transmitOutcome:8:2: error: expected ';' before 'myTransfer'
 2   myTransfer.txBuff[i] = outcome[i];       //                                                                    ////
  ^  ~~~~~~~~~~
  **;**
**exit status 1**
**'class SerialTransfer' has no member named 'txBuff'**

It might help if you posted your sketch

Is the ESP32 supported by the library ?
Having said that, it seems true that the library has not got a function named rxBuff

I don't think the problem depends on the sketch, because it has already been used and working.
Could the problem be the right library?
I can't figure out which SerialTransfer library to use.
Am I on the right track?

Where did you get the sketch from

Unfortunately I can't solve it, I've tried various libraries but nothing.
The sketch is 100% functional with ESP32.
The sketch was sent to me some time ago by a friend

But we can't see it

Both of these statements cannot be true

Have you looked for a version of the Serial Transfer library that has those members?

how can i find it? thanks man

Take a look at the library code and see if, for example, "rxBuff" is declared and public.

yes now I'm out for work, in a few hours I'll try to send it.

Good evening everyone guys, I finally solved it.
Just download an older SerialTransfer Library.
From here:
https://www.arduinolibraries.info/libraries/serial-transfer
with the SerialTransfer-2.1.2.zip everything went smoothly.
Thanks to all, it can be closed

2 Likes

It is normal to leave topics open so that others can still contribute to it. The topic will automatically close 6 months after the last reply

1 Like

I'm late to the party, but what happened is you're using outdated code. The code given to you was before a few updates to the SerialTransfer.h library. Since then, txBuff and rxBuff have been moved to a sub-class named packet. Now, in order to access the transmit and receive buffers, simply call myTransfer.packet.txBuff and myTransfer.packet.txBuff.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.