# Example18_PassThru ESP-IDF version of the Arduino example [Example18_PassThru.ino](../../examples/Example18_PassThru/Example18_PassThru.ino). This example passes characters between the console and the module, so you can type AT commands directly. It is a copy of [Satellite_Example9_PassThru](../Satellite_Example9_PassThru) which selects the **LTE Cat M1** RAT instead of the satellite RAT, so you can investigate the cellular (LTE-M) AT commands. If the RAT has to be changed, the module reboots: allow it time to register on the network (`AT+CEREG?`) before testing data commands. ## Hardware * An ESP32 (or other ESP-IDF target) connected to the Iridium 9604 via a UART * Connect: ESP32 TX to 9604 RXD; ESP32 RX to 9604 TXD; GND to GND * Optionally connect RTS / CTS (hardware flow control) and PWR_ON ## Building ``` idf.py set-target esp32 idf.py menuconfig # "Example Configuration": UART port, baud rate and GPIO pins idf.py -p PORT flash monitor ``` The module only executes an AT command when it receives a CR (Enter). `sdkconfig.defaults` sets `CONFIG_LIBC_STDIN_LINE_ENDING_LF`, so the console passes the CR through unchanged (the ESP-IDF default converts it into an LF). If you already have an `sdkconfig`, delete it (or set "Line ending for console input" to LF in menuconfig) so the new default is used. The example also converts a lone LF into a CR, so it works with `idf.py monitor`, Tera Term and other terminals whether they send CR, LF or CR LF. The module echoes what you type (ATE1). `main/idf_component.yml` points at the library in this repository (`override_path: "../../../"`).
To create a project from this example, run:
idf.py create-project-from-example "sparkfun/sparkfun_iridium_9604_library=1.0.0:Example18_PassThru"