You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "gcmurray1990 (via GitHub)" <gi...@apache.org> on 2024/05/09 02:59:50 UTC
[I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
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: commits-unsubscribe@nuttx.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2122924037
@gcmurray1990 I never used that LTE API, so I'm not much useful here, however looking the function lte_send_atcmd_sync() at apps/lte/lapi/src/lapi_other.c is seems like it doesn't apply directly to a serial line (this is way you saw -25 error: NOTTY). Look at lapi_req() it communicates with some socket, that is really strange.
I suspect this LTE is not a generic LTE libray, but something specific for Sony ALT1250. If that is the case I think we need to move apps/lte to apps/modem/alt1250.
@SPRESENSE since you are the author of that library, could you please help here?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "gcmurray1990 (via GitHub)" <gi...@apache.org>.
gcmurray1990 commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2122887105
@acassis Thank you for the quick reply. I understand that you all are busy, but is there anything I can do to help, or something I can clarify?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2127778856
@raiden00pl did you get it working?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2128118245
You are welcome, if you face some issue integrating usrsocket to support SIM7600G-H please let us know
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2104655869
Hi @gcmurray1990 thanks for bring this issue to our attention.
About the warning you can fix using: %"PRIx32"
@SPRESENSE @masayuki2009 any idea why this error is happening?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2127871844
Nice! Thank you @raiden00pl !!! Maybe it could be a reference for @gcmurray1990 !!!
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2127685348
With some changes, LTE lib works also with nrf91 (you just need to get rid of alt1250 specific code).
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2127876776
Maybe we need some board profile example to nRF91, when I git grep CONFIG_LTE_LAPI it only returns `boards/arm/cxd56xx/spresense/configs/lte/defconfig`
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "SPRESENSE (via GitHub)" <gi...@apache.org>.
SPRESENSE commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2126463570
Hi, @gcmurray1990
The LTE API is a method to request some to the user-sock daemon which is supporting LTE, like WAPI(Wireless API) of NuttX.
And the user-sock daemon is provided for each network devices which is supporting TCP/IP protocol layer.
Now, the LTE Usersock daemon in NuttX is only for Alt1250.
So, as @acassis said, currently the lapi is only for Sony Alt1250 device.
Please see document below to find a network stack structure in NuttX.
https://github.com/apache/nuttx/blob/master/Documentation/components/net/index.rst
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2127821698
yes, but this lib is designed to work with socket interface, not a simple serial device. To make this work you have to implement usersock device with LTE_CMDID ioctls like here https://github.com/apache/nuttx/blob/07f0e0c166b8bf3c65561531c8ea7f87a1bb9b53/arch/arm/src/nrf91/nrf91_modem_sock.c#L479 (in this case lte_send_atcmd_sync() that uses LTE_CMDID_SENDATCMD is not supported)
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] lte_send_atcmd_sync says inappropriate I/O for device [nuttx]
Posted by "gcmurray1990 (via GitHub)" <gi...@apache.org>.
gcmurray1990 commented on issue #12309:
URL: https://github.com/apache/nuttx/issues/12309#issuecomment-2128106824
@raiden00pl , @acassis , and @SPRESENSE Thank you all for being so helpful and looking into this. I appreciate everyone's time very much.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org