About I2C protocol for online use

Hier habt Ihr die Möglichkeit direkt mit dem fischertechnik Team in Kontakt zu treten
Here you have the Possibility to get in direct contact with the fischertechnik-Team

Moderator: fischertechnik Mitarbeiter

Bitte beachte die Forumsregeln!

In dieser Unterkategorie können nur fischertechnik-Mitarbeiter und Moderatoren antworten!
Beiträge: 1220
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)

About I2C protocol for online use

Beitrag von vleeuwen » 22 Jun 2020, 19:31

In the remote C/C++ description for the I2C, the I2C communication is missing.
In FtRoboPy there is a description of a remote I2C implementation.
This works also in C/C++.
The port_I2C can be open and closed. The console log shows that the I2C thread is reacting in the right way.
However there is no official protocol description from fischertechnik available.

Will it be possible that fischertechnik publish the corresponding protocol?

The next info has been extracted from FtRoboPy but it is not covering the complete I2C protocol.

Code: Alles auswählen

port_I2C =65002;
/* I2C communication over port 65002,command/respondse ID's */
ftIF2013CommandId_I2C = 0xB9DB3B39;  //write: m_command    = 0x02, read: m_command    = 0x01
ftIF2013ResponseId_I2C  = 0x87FD0D90; 
/* I2C communication over port 65002, the data structure  */
// Command packet for I2C Command
struct ftIF2013Command_I2C : public ftIF2013Command_Base
{//Todo: what is the structure?	

// Response packet for I2C Command

struct ftIF2013Response_I2C : public ftIF2013Response_Base
{//Todo: what is the structure?	

/*   ftIF2013TransferAreaComHandlerEx::   I2C section             */
bool ftIF2013TransferAreaComHandlerEx::StartI2C()
    // Open camera socket
    m_I2Csocket = this->OpenSocket("65002");
    if (m_I2Csocket == INVALID_SOCKET)
        cerr << "StartI2C: Cannot open I2C socket" << endl;
        return false;
    m_I2Cstarted = true;
    return true;

bool ftIF2013TransferAreaComHandlerEx::StopI2C() {
    if (!m_I2Cstarted)
        cerr << "StopI2C: not started" << endl;
        return false;
    m_I2Cstarted = false;
    m_I2Csocket = INVALID_SOCKET;
    delete[] m_I2Cbuffer;
    m_I2Cbuffersize = 0;
    return true;
Zuletzt geändert von vleeuwen am 10 Jul 2020, 13:48, insgesamt 1-mal geändert.

AlexanderSteiger ft
fischertechnik Mitarbeiter
Beiträge: 27
Registriert: 09 Aug 2017, 08:39

Re: About I2C protocol for online use

Beitrag von AlexanderSteiger ft » 10 Jul 2020, 08:19

Unfortunately there is no detailed I2C documentation available.
As noted ftrobopy uses already I2C read and write methods, please see https://github.com/ftrobopy/ftrobopy/bl ... py.py#L363