I2C / wire.h library - readdressing issue

Hi,

I connect two Arduinos together and would like to have a possibility to change I2C addresses.
Currently if I use wire.h library and initiate one of Arduino with Wire.begin(1);

which works fine. The issue is that as soon as would like to change I2C address and execute Wire.begin(2); and want to attach new receiveEvent/requestEvent, it does not work.

Can you please advise if there is any limitation in current Wire.h library (where I can find sources) for readdressing and if there is other implementation where I will be able to successfully readdress my device?

Thank you!

The Wire.end() was added a few months ago.
After Wire.end(), you should be able to call Wire.begin() and start all over again.
https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/libraries/Wire/Wire.cpp

Show us your sketch.