nanoframework / Home

:house: The landing page for .NET nanoFramework repositories.
https://www.nanoframework.net
MIT License
844 stars 75 forks source link

I2cDevice is throwing an ArgumentException for busId=2 #1486

Closed romankiss closed 1 month ago

romankiss commented 1 month ago

Target name(s)

ESP32_PICO, ESP32_S3

Firmware version

1.9.1.123+, 1.9.1.90+

Was working before? On which version?

1.9.1.93, 1.9.1.69

Device capabilities

No response

Description

The following line thrown an exception when the busId = 2:

 i2c_device = new I2cDevice(new I2cConnectionSettings(2, M5AtomicMotion.DefaultI2cAddress));

++++ Exception System.ArgumentException - 0xfd000000 (1) ++++
++++ Message: 
++++ System.Device.I2c.I2cDevice::NativeInit [IP: 0000] ++++
++++ System.Device.I2c.I2cDevice::.ctor [IP: 001c] ++++
++++ NFAppAtomLite_Testing.Program::Main [IP: 0041] ++++
Exception thrown: 'System.ArgumentException' in System.Device.I2c.dll
An unhandled exception of type 'System.ArgumentException' occurred in System.Device.I2c.dll

Note, that using a busId=1 is working well.

How to reproduce

No response

Expected behaviour

No response

Screenshots

No response

Aditional information

No response

romankiss commented 1 month ago

@josesimoes and @AdrianSoundy Thanks, I will test it tomorrow.

romankiss commented 1 month ago

@josesimoes and @AdrianSoundy , I have tried to test it with the following result:

It looks like, that the overnight build was not published yet, also why the deploy failed for ESP32_S3 target with the latest firmware versions such as 1.9.1.141, 138 and 136?

AdrianSoundy commented 1 month ago

@romankiss I don't think the pico firmware has been updated yet. Will need to look at overnight builds. I don't know why you are having deployment errors. Have there been any changes in that area @josesimoes

alberk8 commented 1 month ago

@josesimoes , I have tested a simple program and it failed to deploy on ESP32 S3 starting with firmware 1.9.1.136. Could it be y related to some changes of the WireProtocol.

09:00:01.034 [Deploying 8128/49860 bytes.]
09:00:01.066 [Deploying 9144/49860 bytes.]
09:00:06.527 [Error writing 1016 bytes to device @ 0x001B1FC0. No reply from nanoDevice.]
09:00:06.527 [*** ERROR deploying assemblies to the device ***]
09:00:06.527 [*** ERROR: deployment failed ***]
romankiss commented 1 month ago

I am confirming that my devices have been successfully tested for this issue with the following info: