65. STM32CubeIDE MQTT Publish to Broker. SIM7600 with STM32F103C8T6

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

Комментарии • 47

  • @mamunurrashid4628
    @mamunurrashid4628 2 года назад +2

    wow it's so nice description. thanks

  • @francismwangi5676
    @francismwangi5676 Год назад +1

    Thanks so much for this tutorial Sir. Just out of curiosity, how can one send data from server side to the hardware/device in this case?

  • @ibrahimabubakr2227
    @ibrahimabubakr2227 Год назад

    hello sir, I have a question I hope you can help me with, there is a K pin in the board, the vendor say it is a PWRKEY pin and it is connected to GND, If sent this command (AT+CPOF) to the board to power it off can I use the PWRKEY to power it back on ? If yes how I can use it ? by putting 3.3 volt from the stm32 to it ?
    thank you

  • @VICKYKUMAR-y6n5v
    @VICKYKUMAR-y6n5v 12 дней назад

    Hi I'm trying to publish the data directly to the HiveMQ from my STM32F4xx. So, I don't want to use the node js in the project so can you help with how to publish the data to a particular topic from STM32 board with SIM7600.

  • @scienceoftheuniverse9155
    @scienceoftheuniverse9155 Год назад

    Thank you so much indeed. We really appreciate your great effort.
    Please Sir can you do this with esp32 with GSM module and hivemq broker.

  • @Chaiebfawez
    @Chaiebfawez Год назад

    Hello
    I'm currently working on a project where I need to interface an STM32F4 microcontroller with a SIM900 module to send TCP/IP data to a server. I was wondering if you have experience with this kind of setup and could share their source code with me.
    Specifically, I'm looking for any tips or advice on how to properly interface the SIM900 module with the STM32F4, as well as any sample code for sending TCP/IP data to a server. Any help or guidance would be greatly appreciated.
    Thank you in advance for your time and assistance.
    Best regards,

  • @uongnguyenvan4607
    @uongnguyenvan4607 2 года назад +1

    wow it's so great. thanks

    • @NizarMohideen
      @NizarMohideen  2 года назад

      Glad you like it!

    • @sangnguyenvan7260
      @sangnguyenvan7260 2 года назад

      Nguyễn Văn Đường a có thể giúp e với được k a, a cũng làm theo nhưng đến đoạn node app nó connected xong thì k thầy gửi thông tin về

  • @minhquyenha6468
    @minhquyenha6468 Год назад

    can i do the same with hiveMQ's broker (instead of test mosquitto broker)

  • @GlorytoourGod_Jehovah
    @GlorytoourGod_Jehovah Год назад

    hello sir, Great video
    thank you for sharing your knowledge...
    sir, can you make a video on " stm32cubeIDE mqtt publish to broker using esp8266 with stm32f103c8t6" please.........

  • @ibrahimabubakr2227
    @ibrahimabubakr2227 Год назад

    Hi,
    thank you for your video it really did make it easy for me, but in the commented line that should be used to connect to a broker with user and password, you forgot to add the two quotations for the user and password, just if anyone failed to make it works, I also created a record for the SIM module reply to each command so that I can debug better if it didn't work

  • @leighsmith9257
    @leighsmith9257 2 месяца назад

    This does not work for me. When connected to a serial terminal it does not get past the first AT command. I'm using a SIM7600G-H and Nucleo-F042K6 with the pins remapped. I have confirmed that the hardware setup works with your other video about sending an SMS.

    • @NizarMohideen
      @NizarMohideen  2 месяца назад

      You need to have mobile data available for this test
      Try with a different sim card
      It seems like it does not passing from AT+CGREG?
      AT+CGREG? Gives one of the following response
      0,0 - not registered, MT is not currently searching a new operator to register to
      0,1 - Registered, home network
      0,2 - Searching
      0,3 - Registration denied
      0,5 - Registered, non-home network
      Check from a serial terminal what response it gets (0,1 is the one we need)

    • @leighsmith9257
      @leighsmith9257 2 месяца назад

      @@NizarMohideen Thanks for your reply. Actually I only got the response to the first 'AT' by inserting a function that waits for the modem to fully initialise before sending 'AT'. Once the program enters mqttPublish(void) it fails. That is to say, if I run the code exactly as you have presented it, I never get a response from the modem.

    • @leighsmith9257
      @leighsmith9257 2 месяца назад

      Here is the function I included:
      void waitForModemInitialization(void)
      {
      printf("Waiting for modem initialization (PB DONE)...
      ");
      int modemReady = 0;
      while (!modemReady)
      {
      // Receive modem output
      HAL_UART_Receive(&huart2, buffer, sizeof(buffer), 1000);
      printf("Received line: %s
      ", buffer);
      // Check for "PB DONE" message
      if (strstr((char *)buffer, "PB DONE"))
      {
      modemReady = 1;
      printf("Modem initialized (PB DONE).
      ");
      }
      HAL_Delay(1000);
      }
      // Turn off echo
      SIMTransmit("ATE0
      ");
      // After modem is ready, send the AT command and wait for "OK"
      int ATisOK = 0;
      while (!ATisOK)
      {
      SIMTransmit("AT
      ");
      HAL_Delay(1000);
      if (strstr((char *)buffer, "OK"))
      {
      ATisOK = 1;
      printf("AT command OK.
      ");
      }
      else
      {
      printf("Waiting for AT command response. Buffer: %s
      ", buffer);
      }
      }
      }

  • @fachriyasir7083
    @fachriyasir7083 2 года назад

    I have sim7000g, will this code also work for this module?

    • @NizarMohideen
      @NizarMohideen  2 года назад +2

      These setup/code are for SIM7500 SIM7600 SIM7800 Series.
      They use different AT commands for SIM7000 series.
      For example (to publish)
      AT+CMQTTPUB for SIM7500 SIM7600 SIM7800 Series
      AT+SMPUB for SIM7000 series.
      You can read the data-sheet for that module and use similar algorithm to create codes. Thanks

  • @mehamedrida1674
    @mehamedrida1674 5 месяцев назад

    I did not understand me, I have connected MQTT Brocker with MySQL, now I want to connect the application of mysql phone

    • @NizarMohideen
      @NizarMohideen  5 месяцев назад

      I am sorry. I have not done it with a phone
      Thanks

  • @alperinci7743
    @alperinci7743 5 месяцев назад

    Hello, Data is coming to MQTT very slowly. How can I solve this problem?

    • @NizarMohideen
      @NizarMohideen  5 месяцев назад +1

      May be the ADC is slow. Try sending some ordinary numbers
      If the MQTT broker is slow, try different times when the broker is not busy
      or use different broker
      Thanks

  • @mehamedrida1674
    @mehamedrida1674 5 месяцев назад

    Can you send me a code on how to connect an application with the MySQL database, because I tried it before and it did not work for me.

    • @NizarMohideen
      @NizarMohideen  5 месяцев назад

      Thanks
      Did you mean this one ruclips.net/video/bLbdcjBjhCU/видео.html

    • @mehamedrida1674
      @mehamedrida1674 5 месяцев назад

      I did not understand me, I have connected MQTT Brocker with MySQL, now I want to connect the application of mysql phone

  • @MATKILLER1700
    @MATKILLER1700 3 года назад +1

    with a NEO-6M pleaseeee

    • @NizarMohideen
      @NizarMohideen  3 года назад +2

      I am sorry I don't have NEO-6M with me at the moment.

  • @assemkarmi9370
    @assemkarmi9370 3 года назад +1

    what about SIM800L?

    • @NizarMohideen
      @NizarMohideen  3 года назад +2

      The code works for SIM7500 SIM7600 SIM7800 Series. I haven't tested for SIM800 Series. They are using different set of AT commands for SIM800 Series

    • @assemkarmi9370
      @assemkarmi9370 3 года назад

      @@NizarMohideen okay, it is clear, in fact my problem is that i can connect to public broker like hivemq with the SIM800L, but it still not work with the local mosquitto broker, have you an idea how to fix this problem?

    • @NizarMohideen
      @NizarMohideen  3 года назад

      Hi Assem,
      In my country, we don’t have 2G networks any more. So I can not test with SIM800 Module.

    • @assemkarmi9370
      @assemkarmi9370 3 года назад

      @@NizarMohideen no i mean if there is a configuration that i have to do with the mosquitto broker ?

    • @NizarMohideen
      @NizarMohideen  3 года назад

      As I shown in the later part of this video, Create a Node JS app and put your credentials (host, port, username, password). Subscribe to your topic and console log the received data.

  • @sangnguyenvan7260
    @sangnguyenvan7260 2 года назад +1

    hi, can u help me search the apn of Viettel in VietNam?

    • @NizarMohideen
      @NizarMohideen  2 года назад +1

      v-internet
      wiki.droam.com/wiki/index.php/Vietnam

    • @sangnguyenvan7260
      @sangnguyenvan7260 2 года назад

      @@NizarMohideen thanks

    • @sangnguyenvan7260
      @sangnguyenvan7260 2 года назад

      @@NizarMohideen thanks for your video, it is so great.

    • @sangnguyenvan7260
      @sangnguyenvan7260 2 года назад

      @@NizarMohideen Can I use this STM32 for receive the message from broker by subscribe the topic "pot/adc/1"?

    • @NizarMohideen
      @NizarMohideen  2 года назад

      Yes. You can use the same topic "pot/adc/1" for receiving too.
      You can also use a different topic for receiving.

  • @dioadadosite4516
    @dioadadosite4516 Год назад

    int comandoA0 = 0xA0;
    int comandoA1 = 0xA1;
    int comandoA2 = 0xA2;
    int comandoA3 = 0xA3;
    int comando00 = 0x00;
    int comando01 = 0x01;
    int comando02 = 0x02; séria normal que lo envíe a través de los comandos AT, así: sendAndCheckAT("AT+CIPSEND
    ", ">",5000);
    relé:
    sprintf(comandoAT, "%s", comandoA0);
    enviarYComprobarAT(comandoAT, "OK", 1000);
    HAL_Delay(500);