gcmurray1990 opened a new issue, #12309:
URL: https://github.com/apache/nuttx/issues/12309

   I am using NuttX 12.2.1 on an stm32 nucleo f103rb with a SIM7600G-H to try 
to use an AT command (via the LTE library). 
   
   This is how I am using the AT command:
   int customhello_main(int argc, char *argv[])
   {
     char respbuff[15];
     int x = **lte_send_atcmd_sync("AT\r", 3,
                           respbuff, 15,
                           15);**
     printf("%s", respbuff);
     printf("%d",x);
   
     return 0;
   }
   
   In summary I am just sending an AT command hoping to get “OK”, but instead 
am getting the error code -25 (inappropriate i/o for device). I tried finding 
more info on this error but it is very general.
   
   **How do I set up IO appropriately for AT commands and avoid these issues?**
   
   More details:
   
   - For configuration: I have GPIO debug features enabled. Under stm32 
peripheral support, I have USART2 enabled for the SIM . Under I/O I have FILE 
stream enabled. Under networking, I have late driver init, udp, and tcp 
enabled. Under LTE I have deprecated API enabled. 
   
   - I have tried using USART1 instead of USART2, but I am getting the same 
error.
   
   - Also, when running make, I am seeing this:
   
   CC:  chip/stm32_dumpgpio.c In file included from chip/stm32_dumpgpio.c:34:
   chip/stm32_dumpgpio.c: In function 'stm32_dumpgpio':
   chip/stm32_dumpgpio.c:110:9: warning: format '%x' expects argument of type 
'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} 
[-Wformat=]
     110 |   _info("GPIO%c pinset: %08x base: %08x -- %s\n",
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     111 |        g_portchar[port], pinset, base, msg);
         |                          ~~~~~~
         |                          |
         |                          uint32_t {aka long unsigned int}
   chip/stm32_dumpgpio.c:110:28: note: format string is defined here
     110 |   _info("GPIO%c pinset: %08x base: %08x -- %s\n",
         |                         ~~~^
         |                            |
         |                            unsigned int
         |                         %08lx
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to