Nucleo STM32 F401RE , NodeMCU and TCP Conneciton

Dependencies:   BufferedSerial mbed-rtos mbed

Fork of NucleoF401_ESP8622 by Veysel KARADAG

Embed: (wiki syntax)

« Back to documentation index

esp8622 Class Reference

esp8622 Class Reference

Modem class. More...

#include <esp8622.h>

Public Member Functions

 esp8622 (PinName tx, PinName rx, int baudRate)
 Create Modem Instance.
void sendCmd (const char *cmd)
 send AT command to Modem module
int sendATTest (void)
 send "AT" to Modem module
int readFromBuffer (char *resp, unsigned int timeout, unsigned int len)
 check Modem module response before time out

Detailed Description

Modem class.

Used for Modem communication. attention that Modem module communicate with MCU in serial protocol

Definition at line 35 of file esp8622.h.


Constructor & Destructor Documentation

esp8622 ( PinName  tx,
PinName  rx,
int  baudRate 
)

Create Modem Instance.

Parameters:
txuart transmit pin to communicate with Modem
rxuart receive pin to communicate with Modem
baudRatebaud rate of uart communication

Definition at line 44 of file esp8622.h.


Member Function Documentation

int readFromBuffer ( char *  resp,
unsigned int  timeout,
unsigned int  len 
)

check Modem module response before time out

Parameters:
*respcorrect response which Modem module will return
*timeoutwaiting seconds till timeout
Returns:
0 on success -1 on error

Definition at line 40 of file esp8622.cpp.

int sendATTest ( void   )

send "AT" to Modem module

Definition at line 17 of file esp8622.cpp.

void sendCmd ( const char *  cmd )

send AT command to Modem module

Parameters:
cmdcommand array which will be send to GPRS module

Definition at line 33 of file esp8622.cpp.