# Use SPI instead of UART for AT commands communicaion

**URL:** <https://forum.amebaiot.com/t/use-spi-instead-of-uart-for-at-commands-communicaion/1316>\
**Category:** AT Cmd\
**Tags:** rtl872xd\
**Created:** [June 21, 2022, 7:31am UTC](https://forum.amebaiot.com/t/use-spi-instead-of-uart-for-at-commands-communicaion/1316 "2022-06-21T07:31:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jrr](https://forum.amebaiot.com/u/jrr)\
**Post date:** [June 21, 2022, 7:31am UTC](https://forum.amebaiot.com/t/use-spi-instead-of-uart-for-at-commands-communicaion/1316/1 "2022-06-21T07:31:28Z")

</div>

Hi,  
The SDK has a switch to choose communication channel for AT commands (UART or SPI).  
As default, the UART is chosen

```auto
#define CONFIG_EXAMPLE_UART_ATCMD	1
#define CONFIG_EXAMPLE_SPI_ATCMD 0

```

When trying to switch to SPI, by setting:

```auto
#define CONFIG_EXAMPLE_SPI_ATCMD 1
#define CONFIG_EXAMPLE_UART_ATCMD	0

```

..I’m getting an compilation error because few functions are no implemented.  
The first one is: `spi_at_send_string()`  
Where can I find implementation for those missing functions?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [June 22, 2022, 1:47am UTC](https://forum.amebaiot.com/t/use-spi-instead-of-uart-for-at-commands-communicaion/1316/2 "2022-06-22T01:47:56Z")

</div>

It looks like the example code is not available on the latest GitHub SDK. You can find the old code [here](https://github.com/ambiot/ambd_sdk/tree/5ad332ff02fe212495d705cf18c5f443dea5758e/component/common/example/spi_atcmd), and you might need to modify the makefiles to ensure that they are compiled.
