Sigfox module send message problem (IOT)

Hello, I bought this module https://www.gmelectronic.com/lpwan-sigfox-node-uart-modem-868mhz, this module uses software serial and at commands to senfing messages, I writed this code for my module and I really dont know why it doesnt send any message. THX for help.

#include <SPI.h>
#include <SD.h>
#include <SoftwareSerial.h>
#define TX 7
#define RX 8
SoftwareSerial Sigfox(RX, TX);
unsigned long i = 0;

int polynom = 234;
char* key = (char*)malloc(12);
int divisor = 234;
long x;
File myFile;

void setup() {
  while (!Serial) {
    ;
  }
  Sigfox.begin (9600); //nastavení softwarové  seriové linky
  Serial.begin(115200);
  Serial.setTimeout(100);
  Serial.print("Initializing SD card...");
  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
}

void loop() {

  if (Serial.available()) {
    //uint8_t* key;
    uint8_t* msg;
    delay(20);
    String l = Serial.readString();
    if (l.length()<=11){
    msg = (uint8_t*)malloc(l.length());
    memcpy(msg, l.c_str(), l.length());
    /*memcpy(&s, l.c_str(), l.length());
      x = s%234;
      Serial.println("polynom:");
      Serial.println(x);
    */
    msg[11]=(uint8_t) mod_big(msg, l.length(), divisor);
    Serial.write("orig: "); Serial.write(msg, l.length()); Serial.println();
    myFile = SD.open("keys.txt");
    if (myFile) {
      myFile.seek (i); //porblém se seek
      Serial.println(i);
      myFile.readBytesUntil('\n', key, l.length());
      myFile.close();
    } else {
      Serial.println("error opening keys.txt");
    }
    //encode
    for (int i = 0; i < (l.length()+1); i++) {
      msg[i] ^= key[i];
    }
    Serial.write("key: "); Serial.write(key, l.length()+1); Serial.println();
    Serial.write("encoded: "); Serial.write(msg, l.length()+1); Serial.println();
    //decode
    for (int i = 0; i < l.length()+1; i++) {
      msg[i] ^= key[i];
    }
    Serial.write("decoded: "); Serial.write(msg, l.length()+1); Serial.println();
   Sigfox.print("AT$SF="); 
   Sigfox.write(msg, l.length()+1); //sending as uint8_t + crc part of message
    Serial.print("ok"); Serial.println();
    i = i + 12; // SD card 12 bytes up.. keys have 12bytes length
  }
  }
}
unsigned mod_big(const uint8_t *num, size_t size, unsigned divisor) { //16 bit číslo..... CRC
  unsigned rem = 0; // zbytek z předchozího dělení
  // Assume num[0] is the most significant
  while (size-- > 0) {
    // Use math done at a width wider than `divisor`
    rem = ((255 + 1ULL) * rem + *num) % divisor; //ULL 4 bytová matematika, nepřeteče, vezme zbytek z předchozího dělení a přidá k aktuálnímu
    num++;
  }
  return rem;
}

Do you have a stripped down, simple program that only sends a simple "hello" test message?

A much simpler program would be a far better palce to start.

And how do you know its not sending ?

Have you contacted the supplier of the device ? They provide sample code and the Sigfox registration details, so you would assume they would help.

There is problem in the code, because simplier program works

echo_cz:
There is problem in the code, because simplier program works

Useful information.

Can you describe what the program is supposed to be doing and what actually happens ?