Quick, send data from SD card to server through TCP,IP Micro
$30-50 USD
クローズ
投稿日: 11年以上前
$30-50 USD
完了時にお支払い
Hi everybody ,
simply what i have is Telit gm862 , and mikroc compiler and I have simple VB6 application in my PC which is have static Ip ,
the pic18 is connected to telit modem and it work fine
ok ? now to open the TCP connection in PIC18 I need to insert the following command
UART1_Write_Text("AT\r\n");
Deleay_ms(2000);
UART1_Write_Text("AT+CMEE=2\r\n");
Deleay_ms(2000);
UART1_Write_Text("AT&K=0\r\n");
Deleay_ms(2000);
UART1_Write_Text("AT#SKTSET=0,8082,\"IP\"\r\n"); // Server Ip and the Port
delay_ms(5000);
UART1_Write_Text("AT#SKTOP\r\n"); // start connection to send data .
Ok , now the connection is open and I will start to send some data ,
When I write simple data in UART1_write_Text("Hi Freelancer") , I can't receive it in my server but if I connected to pc terminal to see the output I can see it !! , I make this simple function to send character one by one which is
void send1(char *text)
{
while(*text)
UART1_Write(*text++); // Send characters one by one
}
Thin when I use this function send1("Hi Freelancer"); yes I can see it in terminal and in my Server application . that great and it is accept as much as I insert of data .
Now when I come to sd card to read it and send to server I problem , this is the code to read data from sd card , but in first I initialize the sd card then come to read function which is
Mmc_Fat_Assign("[login to view URL]", 0);
Mmc_Fat_Reset(&size); // To read file, procedure returns size of file
for (i = 1; i <= size; i++) {
Mmc_Fat_Read(&character);
UART1_Write(character); // Write data to UART
}
Yes I can see the data in terminal but in server I can't … ???????? I try to use send1 function but I didn't reach anywhere .
Now please , from freelancer read carefully and you should have knowledgment of dealing with array and telit modem gm862 . I need only the way to send data from sd card to server , only this .. I Will not release the milestone until I chick the c code .
Regards