If we can create a "Gatway I2C" to extend i2c protocol wireless ! ?

mohasrj
Posts: 33
Joined: Mon Jan 20, 2020 9:38 am

If we can create a "Gatway I2C" to extend i2c protocol wireless ! ?

Postby mohasrj » Tue Dec 13, 2022 5:22 pm

Hi ,

iam a begener embedded system engineer and i have a simple question about i2c protocol !

What i know about this standard protocol I2C (Inter-Integrated Circuit) : it was developed by Philips in 1982 for the internal communication of electronic devices in its articles. Subsequently, it was gradually adopted by other manufacturers until it became a market standard.

I know there is a lot of method to extend this protocol up to100m like (DS28E18 1-Wire-to-I2C Master, Differential I2C Bus Extender ... )

My question is :

It is possible to Extend this protocol with an wireless technology like (XBee® 865/868LP RF Modules) or another technology.

If we can create a "Gatway I2C" ?

This gatway can send/transfter those digital data and message without delay and error ACK/NACK . . . ?

Standard Mode 100kbps or Fast Mode 100kbps !

 

Best regard,

autodog
Posts: 9
Joined: Sat Sep 21, 2019 5:41 am

Re: If we can create a "Gatway I2C" to extend i2c protocol wireless ! ?

Postby autodog » Wed Dec 14, 2022 4:50 am

Very unlikely.

I2C is a transactional protocol with very specific hardware timing requirements.

For example, if an I2C master attempts to read from an I2C slave, it expects a response on a very specific set of SCL clock edges. It would not be practical to relay such a message wirelessly, query a remote I2C device, respond wirelessly and still meet the timing requirements of the local bus master.

Better to replace I2C with something more suitable for wireless messaging (i.e. messaging over a UART-type interface) if possible.

-AD

mohasrj
Posts: 33
Joined: Mon Jan 20, 2020 9:38 am

Re: If we can create a "Gatway I2C" to extend i2c protocol wireless ! ?

Postby mohasrj » Wed Dec 14, 2022 9:49 am

Hi, thanks for ur replay and i understand very well but i prefer ask my question maybe its possible , that will be save my code and my time ... so its a challange to do it if possible , i mean if the hardware i given the opportunity to make it. But if u said me u cant did it bcp its hard or very hard or it could not be practical (all those answer not the purpose of this poste)that mean its possible and that what i called challange.

so please in my case i need to do this methode maybe its not practical but in my case need it , so i ask my question if the hardware  hardware i given the opportunity to make it or no ?

"understanding the question is half the answer"
"You scratch my back, and I'll scratch yours"

ESP_Sprite
Posts: 9577
Joined: Thu Nov 26, 2015 4:08 am

Re: If we can create a "Gatway I2C" to extend i2c protocol wireless ! ?

Postby ESP_Sprite » Thu Dec 15, 2022 1:18 am

Technically, the I2C protocol has something called 'clock stretching'. You could technically have a wireless device sit on the bus, receive a byte, use clock stretching to stall the master, send it to the other side, have that send the byte to the device, then send the response back, un-stall the master, receive the data. This however requires the master to tolerate long periods of clock stretching, and not every master will do that. It's a finnicky solution at best. Additionally, because every byte now needs to wait for the roundtrip over wireless, this will slow down the I2C communication by quite a bit.

Is there any special reason why you want to build something like this? Do you have a particular use case in mind?

mohasrj
Posts: 33
Joined: Mon Jan 20, 2020 9:38 am

Re: If we can create a "Gatway I2C" to extend i2c protocol wireless ! ?

Postby mohasrj » Thu Dec 15, 2022 11:21 am

@ESP_Sprite Thanks for ur replay and for ur good undersrtand the purpose of my post and my question , so i will answer u the reason first i want to know if its possbile but i have a project i use i2c and 8 sensor with cable RJ45 up to 30m for now so i have a esp32 software&logic to read value frome those sensor or board that why i want change only hardware from cable R45 to wireless without change anything in my software code for me its very fast to update my project and add a wireless protocol on it. But i know i can use a my gatway xbee like a buffer so my esp32 ask this getway the value of sensor for example Temperature and the xbee will communicate with other xbee in sensor board , but that mean my esp32 soft change thats all ....


note important :

For me its very hard because I2C its an half duplex communication and not simplex !! and at same times to switch for an wireless communication it becoming more sensitive to noise !!

Who is online

Users browsing this forum: No registered users and 338 guests