This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problems with the UBLOX's connectivity

I was trying to connect my cellphone tu the ublox modulo for sends at commands from my cell, in the main program of the micro I've the next lines for turn on the ublox module:

nrf_gpio_cfg_output(UBLOX_RST_PIN);//activar buffer del modem
nrf_gpio_cfg_output(UBLOX_PWR_PIN);//activar buffer del modem

uart_init();
nrf_gpio_pin_set(UBLOX_RST_PIN);
nrf_gpio_pin_set(UBLOX_PWR_PIN);

nrf_gpio_pin_clear(UBLOX_RST_PIN);
nrf_delay_ms(200);
nrf_gpio_pin_set(UBLOX_RST_PIN);
nrf_delay_ms(200);
nrf_gpio_pin_clear(UBLOX_PWR_PIN);
nrf_delay_ms(200);
nrf_gpio_pin_set(UBLOX_PWR_PIN);

The error happens after nrf_"gpio_pin_clear(UBLOX_PWR_PIN);",  but that meant that the module did not respond to the at commands and sometimes it's not connect. . For this reason I tried in several ways to solve it and the only thing that works for me is that in the main program I only put the lines until before the delay that I mentioned that I was wrong, in this way to turn on the oblox module for cellular connectivity I must pressed the key.

Now, when I run the program and load it into the terminal, everything goes well until the key is pressed, it shows me the error and the module is restarted(This is where the error occurs and in my boron the RGB LED lights up implying that the entire micro is being completely restarted.), but the connectivity is correct. If I press the button again, other error does not occur and the module doesn't restarted. In other words, the error only happens the first time I press the key.

The new error is this:

[NRF_ERROR_DATA_SIZE] in APP_ERROR_HANDLER(p_event->data.error_communication);

In this line

case APP_UART_COMMUNICATION_ERROR:
APP_ERROR_HANDLER(p_event->data.error_communication);
break;

Parents
  • Hi, I want to restart the module because with this I can get cell connectivity without problems. What I do is similar to what is shown in the image.
    I have really done tests and it always gives me problems with these lines(specifically the delay)
    nrf_gpio_pin_clear(UBLOX_PWR_PIN);
    nrf_delay_ms(200);
    nrf_gpio_pin_set(UBLOX_PWR_PIN);

    , so I would like to be oriented to know if I am activating the cell module correctly.
  • Hi,

    I am still lacking an understanding of your setup. Please confirm if this is correct and elaborate:

    • Is the nRF inside the ublox module, or is the nRF one device, and the ublox module another device (which kind of device - what is the model number)?
    • Is the nRF trying to power-cycle and reset the ublox device?
    • Do you have UART communication ongoing between the nRF and ublox module?
    • What state is the ublox module in when you get this error?

    Could it be caused by you resetting or in other ways messing with the ublox module when there is active UART communication? The typical reason for getting APP_UART_COMMUNICATION_ERROR is a UART framing error, but you can check error_communication to know more details.

  • Is the nRF inside the ublox module, or is the nRF one device, and the ublox module another device (which kind of device - what is the model number)?

    The module that I'm using is the which shows in the next link docs.particle.io/.../. Ublox module -->sara-r410m-02b. 

    Is the nRF trying to power-cycle and reset the ublox device?

    Indeed, I am restarting and turning on the ublox module from the nRF pins (pin 12 and pin 16).

    Do you have UART communication ongoing between the nRF and ublox module?

    I'm using bluetooth communication between my cell phone and the Ublox module to send it ar commands

    What state is the ublox module in when you get this error?

    The error happens in these lines

    nrf_gpio_pin_clear(UBLOX_PWR_PIN);
    nrf_delay_ms(200);
    nrf_gpio_pin_set(UBLOX_PWR_PIN);
    I am trying to reset the ublox module to reestablish communication via bluetooth otherwise the communication between my cell phone and the ublox module is not correct (it does not respond to the at commands)
    On other hand uart's communication error refers to this:
    This field contains the value in the ERRORSRC register for the UART peripheral. The UART_ERRORSRC_x defines from nrf5x_bitfields.h can be used to parse the error code. See also the \nRFXX Series Reference Manual for specification. */

  • Hi,

    I see. So you are working on a Particle Boron, which has a nRF52840 and a U-blox LTE device connected like this (from Boron documentation):

    When you do things with the POWER_ON signal and RESET signal things happen in the u-blox module that causes issues with UART communication. You may get some relevant information by checking the error_communication that I asked for. As you snipped from the documentation, that will tell you the reason for the error. In any case, it is clear that the only difference on the nRF side is how it powers on or resets the u-blox module, so you need to look into that to understand what is going on and how it should be fixed. I suggest you contact U-blox about that since it is their product.

    If I am understanding you in the wrong way, and your tweaking with the POWER_ON and RESET signal is not the problem, then knowing the error_communication value (which is the ERRORSRC register) is even more relevant. If it is a framing error, which is quite typical, then it could be caused by a clock mismatch. You should make sure to start the HFXO on the nRF side in that case, and similarly choose a high accuracy clock on the u-blox (if not done automatically).

  • Thank you for responding, the error you referred to is error number 12, that is

    [NRF_ERROR_DATA_SIZE]

    Thos happens in the main, in the line:

    in APP_ERROR_HANDLER(p_event->data.error_communication);

    I have been making a change in the code, in the main of my program I have this(UBLOX_PWR_PIN = Pin16 of nrf),

    uart_init();
    nrf_gpio_cfg_output(UBLOX_PWR_PIN);
    nrf_gpio_pin_set(UBLOX_PWR_PIN);
    nrf_delay_ms(200);
    nrf_gpio_pin_clear(UBLOX_PWR_PIN);

    While if the "mode" button is pressed, I will reset the ublox module.(UBLOX_RST_PIN=Pin12)

    case BSP_EVENT_KEY_0:
       if (m_conn_handle != BLE_CONN_HANDLE_INVALID)
       {
           nrf_gpio_cfg_output(UBLOX_RST_PIN);//activar buffer del modem
           nrf_gpio_pin_clear(UBLOX_RST_PIN);
           nrf_delay_ms(200);
           nrf_gpio_pin_set(UBLOX_RST_PIN);
    }
    break;

    The cellular connectivity is now correct but this happens when I first load the program. 

    It is important to mention that if I reset the ublox module from the "mode" button, no error occurs, but if I reset the boron module from the reset button, the error appears.  the error is that the rgb leds of the boron module remain on for about a second, then it goes out and does not happen again.

  • Sorry for the inconvenience, I am new using these modules.
Reply Children
No Data
Related