Ezurio's UWScript and LPC2104

Hi all,

I'm working on an application with a LPC2104 storing data on a memory card, which is connected through RS232 (using only the ground, TX and RX) to an Ezurio's WIFI module. I programmed the microcontroller using C, and when I connect it on a computer to check whether it is working, everything is OK. Same goes for the WIFI module, programmed using Ezurio's UWScript.

However, when I connect them together, the WIFI module can get the data sent by the microcontroller, but the microcontroller never gets the response from the module, and the program is blocked on the reading function.

These are codes I wrote to test if I could make it work :

WIFI module, UWScript : ULONG ubaud UWORD ubits UWORD uparity UWORD ustop UWORD upersist ubaud=115200 ubits=8 uparity=0 ustop=1 upersist=1 _UARTMODIFY (ubaud, ubits , uparity, ustop, upersist) string test slong end endfile = H'FFFFFFFF plouf="hello\r\n\0" print test;endfile while 1 endwhile

LPC2104, C : int main( void){ (void)SetNativeSpeed( 10000uL ); // Quartz (void)SetMAM( 3u, MAM_full_enable ); // MAM (void)SetDesiredSpeed( 60000uL); // CPU (void)VPBControl( VPB_DIV2 ); // Vitesse périph

// Configuration liaison port série (Vers Wifi/PC) struct serial_param sp; sp.baud = 115200uL; sp.length = UART_WORD_LEN_8; sp.parity = UART_PARITY_NONE; sp.stop = UART_STOP_BITS_1; (void)ioctl( fileno(WIFI_out), UART_SETUP, &sp); //WIFI_out is stdout (void)ioctl( fileno(WIFI_in), UART_SETUP, &sp); //WIFI_in is stdin (void)StartClock();

char* test; char bla[30]; test = (char*)malloc(1024*sizeof(char)); strcpy(test,""); fprintf(WIFI_out,"AT+RUN \"azerty\"\r"); //Run the script fflush(WIFI_out); int c; int i=0; while (i

Reply to
AlexandreD
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.