Data is never successfully received from the Nano Matter.
I have confirmed the I2C interface is working properly on the Nano Matter by running it as the Controller Reader, using it with other I2C sensors, and I tried manually setting clock speeds on both ends.
This same Peripheral Sender code works fine if I run it on an Uno R4 Minima (with a 5v to 3.3v translator) to the R4 WiFi or the Nano Matter as the Controller Reader, or between 2 Uno R4 WiFi's using their QWIIC connectors.
Is there some trick to getting a Nano Matter to be an I2C Peripheral Sender?
Or what am I doing wrong?
I should also mention, my application needs 50 bytes sent, but I tried reducing the test down to below 32 bytes (4 actually) and the Nano Matter would still not work as a Peripheral Sender.
I also tried using all of the Nano Matter 'stacks' (Matter, BLE Arduino, BLE SiLabs and None).
Hi @flynace. You should only make one topic. The Projects > Networking, Protocols, and Devices category you chose is perfectly reasonable, but if you think this topic would be better categorized in Nano Family > Nano Matter (which is also reasonable), you are welcome to change the category. You can change the category by the following procedure:
Scroll up to the top of the topic's web page until you can see the title ("Nano Matter as I2C Peripheral Sender").
Hover the mouse pointer over the title.
A ๐ icon will appear to the right of the title.
Click the ๐ icon.
The title will change to an editable field and the category will change to a drop-down menu.
Click on the drop-down category menu (which is directly under the title field).
The menu will expand.
Thank you @ptillisch - I hope someone here knows why I2C Peripheral Sender does not work with the Nano Matter.
Is it Silicon Labs who manages the Wire library compatibility for the Arduino Nano Matter?
If you look at the Wire.h file in the Siicon Labs core library it shows...
/***************************************************************************//**
* Starts the I2C peripheral in follower mode
*
* @param[in] follower_mode_address I2C follower address to join the bus with
******************************************************************************/
void begin(uint8_t follower_mode_address);
And the Nano Matter User Manual indicates the Wire library is compatible while also the Nano Connector Carrier comes with a QWIIC port, so I was believing it Peripheral Follower mode should work.
So it seems like it should be working as other Arduino boards do, but it's hard to figure out who to ask, or if Arduino has any interest in the matter.
That is correct. The variant of the "Wire" library that is used when compiling for the Nano Matter is bundled with the "Silicon Labs" Arduino boards platform, which the Silicon Labs developers maintain:
Does Arduino believe that the Nano Matter should be Peripheral Follower capable and it is a software bug or lack of support in Silicon Labs' Wire library?
Or is it the Arduino documentation for the Nano Matter and I2C communication is incomplete by failing to warn that the Nano Matter is not capable of supporting Peripheral Follower mode?
The Arduino documents for the Inter-Integrated Circuit (I2C) Protocol and Wire library only mention the Nano formfactor and Nano boards in general, without distinguishing specific models, implying compatibility.
The Nano Matter user manual only generically states that "The Nano Matter supports I2C communication" without distinguishing between being a bus controller or a peripheral follower, again implying compatibility.
Unfortunately I am not knowledgeable in this subject matter and don't have any involvement in the development and documentation work related to the Nano Matter board. So I am unable to answer these questions
Hopefully one of the other forum helpers will be able to answer them.
Frustratingly the Nano Matter Wire library does not support the write buffer in Follower mode....
/***************************************************************************//**
* Sends the provided byte over the I2C bus
* (leader/follower mode)
*
* @param[in] value Byte of data to be sent over the I2C bus
*
* @return Returns the number of bytes sent
******************************************************************************/
size_t write(uint8_t value);
/***************************************************************************//**
* Sends the provided bytes over the I2C bus
* (leader mode only)
*
* @param[in] data Pointer to the data to be sent
* @param[in] size Size of the data to be sent
*
* @return Returns the number of bytes sent
******************************************************************************/
size_t write(const uint8_t* data, size_t size);
I can now send 1 byte at a time, but the received data seems random, so I am going to close this topic and seek help in the Projects section.