Erreur ~ invalid conversion from 'char*' to 'uint8_t* {aka unsigned char*}'

Bonjour à tous! Je suis ce qu'on pourrait appeler un novice avec l'IDE et le codage en général, seulement j'ai un projet de fin d'étude à l'étranger qui me demande de m'y mettre sérieusement. J'ai utilisé l'IDE d'Arduino pour faire un petit programme d'échange MQTT avec un serveur, du type PubSubClient, qui a fonctionné parfaitement sur l'Intel Galileo Gen2. Seulement pour mon projet j'utilise une RedBear CC3 200 que je programme avec Energia sous Windows 10, et lorsque je veux compiler mon programme j'obtiens les erreurs suivantes
:

sketch_apr28b.cpp:24:36: error: 'long' or 'short' specified with char for 'message_buff'
 #include "Arduino.h"
                                    ^
sketch_apr28b.cpp:30:20: error: 'long' or 'short' specified with char for 'topic'
 #line 23
                    ^
sketch_apr28b.cpp: In function 'void callback(char*, byte*, unsigned int)':
sketch_apr28b.cpp:67:48: error: invalid conversion from 'char*' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       message_buff[j] = '\0';
                                                ^
In file included from sketch_apr28b.cpp:17:0:
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\PubSubClient/PubSubClient.h:66:12: error:   initializing argument 2 of 'boolean PubSubClient::publish(char*, uint8_t*, unsigned int)' [-fpermissive]
    boolean publish(char *, uint8_t *, unsigned int);
            ^
sketch_apr28b.cpp: In function 'void setup()':
sketch_apr28b.cpp:86:19: error: invalid conversion from 'byte* {aka unsigned char*}' to 'char*' [-fpermissive]
 
                   ^
In file included from C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\MQTTClient/WifiIPStack.h:20:0,
                 from sketch_apr28b.cpp:14:
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\WiFi/WiFi.h:137:9: error:   initializing argument 1 of 'int WiFiClass::begin(char*)' [-fpermissive]
     int begin(char* ssid);
         ^

Comme dit plus haut je suis un débutant malgré tout enthousiaste, si quelqu'un peut prendre le temps de m'expliquer le problème je suis preneur sachant que ça fait une semaine que je cherche sur le net pour essayer de le résoudre.. Je n'ai plus que vous vers qui me tourner! Je poste dans la suite la partie de code concernée en espérant que cela vous suffira à comprendre ce qui ne vas pas..
D'avance, un grand merci!*

#include <FP.h>
#include <MQTTClient.h>
#include <MQTTConnect.h>
#include <MQTTFormat.h>
#include <MQTTLogging.h>
#include <MQTTPacket.h>
#include <MQTTPublish.h>
#include <MQTTSubscribe.h>
#include <MQTTUnsubscribe.h>
#include <StackTrace.h>
#include <WifiIPStack.h>
#include <WiFi.h>
#include <SPI.h>
#include <PubSubClient.h>
//#include <Arduino.h>

/*********************************************************************************************************************************************************************************************/

#define server "40.87.158.158"

byte mac[]= {  0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED }; //Server mac adress
long unsigned char message_buff[100];                              //Contains the payload for a while
int a=0;                                             //To print status and [CONNECTED] once (see loop)
int p=0;
byte* payload = '\0';                                //callback payload
int j=0;                                             // Incremented to read the payload
String msgString = "";                               //String containing the payload
long unsigned char topic;                                         //callback topic
unsigned int length;                                 // payload length
int b=0;                                             // Incremented to print [IN THE CALLBACK] just once
String inputString = "";                             // a string to hold incoming data (console input)
boolean stringComplete = false;                      // whether the string is complete (console input)

/*********************************************************************************************************************************************************************************************/

//callback declaration
void callback(char* topic, byte* payload, unsigned int length);

/*********************************************************************************************************************************************************************************************/

Et la fonction callback précedement déclarée:

void callback(char* topic,byte* payload,unsigned int length)
  {
   Serial.begin(9600);
   if(b<=0) //Makes it appear once
   {
    Serial.println("[IN THE CALLBACK]");    
    Serial.println("-----------------");
    b++;   
   }
   for(j=0; j<length; j++) 
     {
      message_buff[j] = '\0';
      message_buff[j] = payload[j]; // Copy of payload in message_buff byte by byte
     }
   String msgString = String(message_buff); //Copies the payload into a single String object
   Serial.println("Payload: " + msgString); //Prints the payload in the monitor
   
  //PUBLICATION
  if(p<=0){
  client.publish("oTopic", message_buff, length); // Attempt to make it publish ONCE but doesn't work
  for(j=0; j<100; j++) 
      {
        payload[j] = '\0';      //Clear payload chars
        message_buff[j] = '\0'; //Clear message_buff chars
      }}
  Serial.println("PUBLISHED");
  Serial.println("*********");  
  Serial.println("");
  delay(1000);
  }

bonjour,
pourquoi déclarer

long unsigned char message_buff[100];                              //Contains the payload for a while

alors que tu lui donnes une taille?

char message_buff[100];                              //Contains the payload for a while

idem

long unsigned char topic;                                         //callback topic

doit manquer des bouts car pas de void setup ni void loop

Bonjour infobarquee,
Merci de ta réponse rapide!
J'ai déclaré message_buff comme ça car ça enlève pas mal d'erreurs qui se rajoutent en plus, pour ce qui est du reste du code je le poste ici, je ne voulais faire de flood inutile.
J'en profite aussi pour poster les erreurs qui se rajoutent dont je te parle. Merci beaucoup!!

//#include "application.h"
//#include <Countdown.h>  // undeclared "millis()" error
#include <FP.h>
#include <MQTTClient.h>
#include <MQTTConnect.h>
#include <MQTTFormat.h>
#include <MQTTLogging.h>
#include <MQTTPacket.h>
#include <MQTTPublish.h>
#include <MQTTSubscribe.h>
#include <MQTTUnsubscribe.h>
#include <StackTrace.h>
#include <WifiIPStack.h>
#include <WiFi.h>
#include <SPI.h>
#include <PubSubClient.h>
//#include <Arduino.h>

#define server "40.87.158.158"

byte mac[]= {  0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED }; //Server mac adress
char* message_buff[100];                              //Contains the payload for a while
int a=0;                                             //To print status and [CONNECTED] once (see loop)
int p=0;
uint8_t* payload ;/*= '\0';*/                        //callback payload
int j=0;                                             // Incremented to read the payload
String msgString = "";                               //String containing the payload
char topic;                                          //callback topic
unsigned int length;                                 // payload length
int b=0;                                             // Incremented to print [IN THE CALLBACK] just once
String inputString = "";                             // a string to hold incoming data (console input)
boolean stringComplete = false;                      // whether the string is complete (console input)

//callback declaration
void callback(char* topic, byte* payload, unsigned int length);
WiFiClient ethClient;
PubSubClient client(server, 80, callback, ethClient);

void callback(char* topic,byte* payload,unsigned int length)
  {
   Serial.begin(9600);
   if(b<=0) //Makes it appear once
   {
    Serial.println("[IN THE CALLBACK]");    
    Serial.println("-----------------");
    b++;   
   }
   for(j=0; j<length; j++) 
     {
      message_buff[j] = '\0';
      message_buff[j] = payload[j]; // Copy of payload in message_buff byte by byte
     }
   String msgString = String(message_buff); //Copies the payload into a single String object
   Serial.println("Payload: " + msgString); //Prints the payload in the monitor
   
  //PUBLICATION
  if(p<=0){
  client.publish("oTopic", message_buff, length); // Attempt to make it publish ONCE but doesn't work
  for(j=0; j<100; j++) 
      {
        payload[j] = '\0';      //Clear payload chars
        message_buff[j] = '\0'; //Clear message_buff chars
      }}
  Serial.println("PUBLISHED");
  Serial.println("*********");  
  Serial.println("");
  delay(1000);
  }


void setup()    // put your setup code here, to run once:
  {
    WiFi.begin(mac);
    Serial.begin(9600);
    Serial.println(" ");
    Serial.println("[IN THE SETUP]");
    client.connect(server,"test","test");
    pinMode(13, OUTPUT);  //LED pin
    inputString.reserve(200); //serialEvent declaration
  if(client.connected())
      {
        client.publish("STATUS","I am connected");
        Serial.println("[CONNECTED]");
        digitalWrite(13, HIGH);
        Serial.println("READY FOR MESSAGE");
        client.subscribe("inTopic");
       }
  else
      {
       Serial.println("Not connected. Check cable and reset board.");
       client.disconnect(); //Advise by Knick O'leary
       reconnect();
      }
  
  }


void loop() //Initializes serialEvent, connects and publishes status to STATUS topic, and loops client
  {
   serialEvent();
    //client.loop();  //Should not be hidden
      
  if (stringComplete) 
      {
      Serial.println(inputString);
      stringComplete = false;   //clears the string
      inputString = "";         //clear the input tab
      }
  }



void serialEvent()             //Serial imput handling function
{
  while (Serial.available()) 
    {
    // get the new byte:
char inChar = (char)Serial.read();
    // add it to the inputString:
    inputString += inChar;
    // if the incoming character is a newline, set a flag
    // so the main loop can do something about it:
    if (inChar == '\n') 
      {
      stringComplete = true;      
      }
    }
}



void reconnect() {   //Reconnection if not connected in the setup
  client.connect(server,"test","test");}

J'en profite aussi pour poster les erreurs qui se rajoutent dont je te parle. Merci beaucoup!!

sketch_apr28b.cpp: In function 'void callback(char*, byte*, unsigned int)':
sketch_apr28b.cpp:59:34: error: invalid conversion from 'byte {aka unsigned char}' to 'char*' [-fpermissive]
    {
                                  ^
sketch_apr28b.cpp:61:42: error: call of overloaded 'String(char* [100])' is ambiguous
     Serial.println("-----------------");
                                          ^
sketch_apr28b.cpp:61:42: note: candidates are:
In file included from C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/Energia.h:197:0,
                 from C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\WiFi/WiFi.h:23,
                 from C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\MQTTClient/WifiIPStack.h:20,
                 from sketch_apr28b.cpp:13:
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:71:11: note: String::String(long unsigned int, unsigned char) <near match>
  explicit String(unsigned long, unsigned char base=10);
           ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:71:11: note:   no known conversion for argument 1 from 'char* [100]' to 'long unsigned int'
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:70:11: note: String::String(long int, unsigned char) <near match>
  explicit String(long, unsigned char base=10);
           ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:70:11: note:   no known conversion for argument 1 from 'char* [100]' to 'long int'
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:69:11: note: String::String(unsigned int, unsigned char) <near match>
  explicit String(unsigned int, unsigned char base=10);
           ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:69:11: note:   no known conversion for argument 1 from 'char* [100]' to 'unsigned int'
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:68:11: note: String::String(int, unsigned char) <near match>
  explicit String(int, unsigned char base=10);
           ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:68:11: note:   no known conversion for argument 1 from 'char* [100]' to 'int'
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:67:11: note: String::String(unsigned char, unsigned char) <near match>
  explicit String(unsigned char, unsigned char base=10);
           ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:67:11: note:   no known conversion for argument 1 from 'char* [100]' to 'unsigned char'
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:66:11: note: String::String(char) <near match>
  explicit String(char c);
           ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:66:11: note:   no known conversion for argument 1 from 'char* [100]' to 'char'
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:60:2: note: String::String(const String&) <near match>
  String(const String &str);
  ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\cores\cc3200/WString.h:60:2: note:   no known conversion for argument 1 from 'char* [100]' to 'const String&'
sketch_apr28b.cpp:66:48: error: no matching function for call to 'PubSubClient::publish(const char [7], char* [100], unsigned int&)'
       message_buff[j] = '\0';
                                                ^
sketch_apr28b.cpp:66:48: note: candidates are:
In file included from sketch_apr28b.cpp:16:0:
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\PubSubClient/PubSubClient.h:65:12: note: boolean PubSubClient::publish(char*, char*)
    boolean publish(char *, char *);
            ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\PubSubClient/PubSubClient.h:65:12: note:   candidate expects 2 arguments, 3 provided
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\PubSubClient/PubSubClient.h:66:12: note: boolean PubSubClient::publish(char*, uint8_t*, unsigned int)
    boolean publish(char *, uint8_t *, unsigned int);
            ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\PubSubClient/PubSubClient.h:66:12: note:   no known conversion for argument 2 from 'char* [100]' to 'uint8_t* {aka unsigned char*}'
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\PubSubClient/PubSubClient.h:67:12: note: boolean PubSubClient::publish(char*, uint8_t*, unsigned int, boolean)
    boolean publish(char *, uint8_t *, unsigned int, boolean);
            ^
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\PubSubClient/PubSubClient.h:67:12: note:   candidate expects 4 arguments, 3 provided
sketch_apr28b.cpp: In function 'void setup()':
sketch_apr28b.cpp:85:19: error: invalid conversion from 'byte* {aka unsigned char*}' to 'char*' [-fpermissive]
 
                   ^
In file included from C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\MQTTClient/WifiIPStack.h:20:0,
                 from sketch_apr28b.cpp:13:
C:\Users\Thibaut\Downloads\energia-0101E0017-windows\energia-0101E0017\hardware\cc3200\libraries\WiFi/WiFi.h:137:9: error:   initializing argument 1 of 'int WiFiClass::begin(char*)' [-fpermissive]
     int begin(char* ssid);
         ^

Je me répète, mais merci de cette aide inespérée!