# Satellite_Example9_PassThru ESP-IDF version of the Arduino example [Satellite_Example9_PassThru.ino](../../examples/Satellite_Example9_PassThru/Satellite_Example9_PassThru.ino). This example passes characters between the console and the module, so you can type AT commands directly. Based on the SparkFun IridiumSBD I2C Arduino Library example Example11_PassThru. ## 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:Satellite_Example9_PassThru"