marcinbor85 / cAT

Plain C library for parsing AT commands for use in host devices.
MIT License
385 stars 76 forks source link

CAT_RETURN_STATE_ERROR in cat_service loop #44

Open Halo3fanz opened 1 year ago

Halo3fanz commented 1 year ago

Hi,

I'm running cAT on a host nRF52811 MCU attempting to communicate with a Quectel BC660 AT module. I've established UART communication prior to this and now I want to add cAT to easily send and handle AT commands.

This is my code, part of a larger codebase: cAT_handler.zip

I keep getting CAT_RETURN_STATE_ERROR (-1) in the main loop and as far as I can tell, none of my write, read or run functions are called. For now, I'm just trying to send and receive responses for a simple AT+CPIN? command to check for a SIM card. Can you tell me what I'm doing wrong here?

marcinbor85 commented 10 months ago

cAT cannot be used to communicate with any external AT module. with cAT You can write firmware to make Your own AT-based module. Its dedicated for host devices, not for AT-devices clients.