login
Forgot?
Login with Facebook

Don't have an account? Register one now!

Wavecom Fastrack Supreme 20 FTP serial data

Bids 
5
Avg Bid
$730 USD
CLOSED
  • Project ID:

    541202
  • Project Type:

    Fixed
  • Budget:

    $250-$750 USD

Project Description:

Job Description: Program Wavecom Fastrack Supreme 20 GPRS modem with OpenAT. Developers with wavecom development experience and own a wavecom modem are preferred.

Process: The modem is to take in serial input from a current profiler. The current profiler outputs one serial string every 5 seconds. The modem is to store the serial strings into a buffer and FTP the data to a server via GPRS every 1 hour. If the FTP transmission fails, the modem will redial every 10 minutes.

Status:
We have managed to program the modem with openAT to send the serial data input every 1 hour. But the problem is we noticed that every time the modem managed to ftp only 5840b out of the 20kb data buffer.

We tried to tune with this code:
static wip_channel_t dst_ftp_cx = NULL, dst_data = NULL;
wip_setOpts(dst_ftp_cx, WIP_COPT_SND_BUFSIZE, 30000,WIP_COPT_SND_LOWAT,3000, WIP_COPT_END );

by adjusting the below variables but of no use:
WIP_COPT_SND_BUFSIZE 30000, 20000, 10000
WIP_COPT_SND_LOWAT 10000, 3000, 500, 100, 0
Using dst_data instead of dst_ftp_cx

Another problem is when the modem is FTPing, it cannot take in the serial input so part of the serial data is missing.

Now we are stuck and need a programmer to continue from where we left off with the two problem above, and of course the code need to include error handling and ftp retry. Note we require source code.

Part of our code refer below.

The serial input string from the current profiler is below:

16 C811 70802 2008 3 28 12 21 52 3 0 1 2
40 200 100 10 1
0 0 0 2886 17424 0 0 0 0 0 15425
0 0 0 0 61 191 65 193 14 16 18 0 110 192 0 107
1 -1399 -2174 -172 0 0 0 129 131 162
2 -1412 -2378 -294 0 0 0 115 119 136
3 -2078 -1699 -211 0 0 0 115 107 118
4 -1839 -1868 -230 0 0 0 114 118 103
5 -1418 -2299 -333 0 0 0 109 124 104
6 -1778 -1971 -472 0 0 0 79 115 112
7 -1688 -1862 -289 0 0 0 120 95 109
8 -1675 -1995 -358 0 0 0 106 96 115
9 -986 -1709 -324 0 0 0 90 105 102
10 -1246 -1961 -422 0 0 0 87 104 94
11 -1399 -2030 -301 0 0 0 83 95 95
12 -1258 -775 -99 0 0 0 80 95 72
13 -992 -1405 -407 0 0 0 84 94 74
14 -1691 -1885 -484 0 0 0 82 99 83
15 -1603 -1586 -245 0 0 0 80 102 99
16 -1536 -1425 -239 0 0 0 87 91 102
17 -1266 -1690 -232 0 0 0 90 92 100
18 -1814 -1267 -326 0 0 0 65 69 96
19 -1379 -1944 -336 0 0 0 77 67 74
20 -1585 -1822 -495 0 0 0 56 61 54
21 -2084 -1354 -425 0 0 0 82 52 59
22 -1368 -1815 -126 0 0 0 61 63 66
23 -837 -1383 -436 0 0 0 45 58 66
24 -1608 -1715 -397 0 0 0 57 68 49
25 -1775 -1619 -282 0 0 0 47 56 59
26 -1445 -1433 -285 0 0 0 41 39 52
27 -1030 -1451 -256 0 0 0 40 43 46
28 -1248 -1572 -313 0 0 0 51 41 38
29 -1368 -2256 -160 0 0 0 39 43 49
30 -1256 -2065 -164 0 0 0 31 38 46
31 -1615 -2036 -278 0 0 0 29 32 38
32 -1926 -1847 3 0 0 0 50 23 44
33 -1281 -2289 -280 0 0 0 110 66 30
34 -1436 -1745 -343 0 0 0 75 137 32
35 -1763 -1328 -356 0 0 0 15 55 35
36 6009 -2757 -1856 0 0 0 13 13 67
37 -1235 1269 -1493 0 0 0 13 16 120
38 4405 -645 -2062 0 0 0 13 11 78
39 -2618 957 -1234 0 0 0 15 13 22
40 -1753 10311 499 0 0 0 15 14 22


Additional information submitted:

02/03/2009 at 20:48 EST:
Main source code:


#include "adl_global.h"
#include "wip.h"
#include "adl_rtc.h"
#define DST_SERVER "209.90.82.23"
#define DST_USER "datataker"
#define DST_PASSWORD "password"
#define DST_FILENAME "data.txt"
#define DST_ISPASSIVE TRUE
#define BKSP '\x08'
#define BKSPSEQ "\x08 \x08"
#define USED_FLOW ADL_FCM_FLOW_V24_UART1
s32 retVal;

adl_rtcTime_t presentTimeAndDate;
bool bFCMIsReady = TRUE;

ascii * buffer;
ascii * buffer2;


ascii * tempBuffer;
ascii * file_name;

static u16 tempLength;


static s8 V24Handle;
static int offset = 0;
static wip_channel_t
dst_ftp_cx = NULL,
dst_data = NULL;

u16 bufferLength;

static void evh_cx( wip_event_t *ev, void *ctx);
static void evh_data( wip_event_t *ev, void *ctx);
bool V24DataHandler ( u16 Length, u8 * Data );
bool V24CtrlHandler ( u8 Event );
void HelloWorld_TimerHandler ( u8 ID );

void appli_entry_point()
{
bufferLength = 0;

buffer = adl_memGet( 20000* sizeof(ascii) );
tempBuffer = adl_memGet( 20000* sizeof(ascii) );
file_name = adl_memGet( 20000* sizeof(ascii) );

TRACE (( 1, "fcm subscribe" ));
V24Handle = adl_fcmSubscribe ( USED_FLOW, V24CtrlHandler, V24DataHandler );

TRACE (( 1, "timer subscribe" ));
adl_tmrSubscribe ( TRUE, 600, ADL_TMR_TYPE_100MS, HelloWorld_TimerHandler );
}

static void evh_cx( wip_event_t *ev, void *ctx)
{
switch( ev->kind)
{
case WIP_CEV_OPEN:
wm_sprintf (

(file_name),"%d%d.%d%d.txt",presentTimeAndDate.Month,presentTimeAndDate.Day,presentTimeAndDate.Hour,presentTimeAndDate.Minute);
TRACE (( 1, "Make new file up FTP connection" ));
dst_data = wip_putFile( dst_ftp_cx, file_name, evh_data, NULL);
if( ! dst_data) { wip_debug( "Can't create data channel"); return; }
break;

case WIP_CEV_ERROR:
break;

case WIP_CEV_PEER_CLOSE:
break;
}
}

static void evh_data( wip_event_t *ev, void *ctx)
{
switch( ev->kind)
{
case WIP_CEV_OPEN:
wip_setOpts(dst_data, WIP_COPT_SND_BUFSIZE, 30000,WIP_COPT_SND_LOWAT,3000, WIP_COPT_END );
break;

case WIP_CEV_WRITE:
{
int nwrite = wip_write( dst_data, buffer, tempLength);

//wip_close( dst_data); //dst_data = NULL;
//wip_close( dst_ftp_cx); //dst_ftp_cx = NULL;

//adl_memRelease ( buffer );
tempLength = 0;
}
break;
case WIP_CEV_ERROR:
break;
}
}

bool V24CtrlHandler ( u8 Event )
{
bool bReturn = TRUE;
s32 sReturn;
TRACE (( 1, "serial event %d", Event ));
switch ( Event )
{
case ADL_FCM_EVENT_FLOW_OPENNED :
sReturn = adl_fcmSwitchV24State ( V24Handle, ADL_FCM_V24_STATE_DATA );
TRACE (( 1, "serial switch to datamode %d ", sReturn ));
bFCMIsReady = TRUE;
break;

case ADL_FCM_EVENT_RESUME :
break;

case ADL_FCM_EVENT_MEM_RELEASE :
break;
}
return bReturn;
}

bool V24DataHandler ( u16 Length, u8 * Data )
{
retVal = adl_rtcGetTime(&presentTimeAndDate);

TRACE (( 1, "Serial data event"));

TRACE (( 1, "tt %d", presentTimeAndDate.Year ));

wm_memcpy ( ( ascii * ) (buffer + tempLength), ( ascii * ) Data, Length);
tempLength += Length;

return TRUE;
}

void HelloWorld_TimerHandler ( u8 ID )
{
TRACE (( 1, "Timer trigger" ));
TRACE (( 1, "Connect to FTP" ));
dst_ftp_cx = wip_FTPCreateOpts (
DST_SERVER, evh_cx, NULL,
WIP_COPT_USER, DST_USER,
WIP_COPT_PASSWORD, DST_PASSWORD,
WIP_COPT_PASSIVE, DST_ISPASSIVE,
WIP_COPT_END);
}

/*
16 C811 70802 2008 3 28 12 21 52 3 0 1 2
40 200 100 10 1
0 0 0 2886 17424 0 0 0 0 0 15425
0 0 0 0 61 191 65 193 14 16 18 0 110 192 0 107
1 -1399 -2174 -172 0 0 0 129 131 162
2 -1412 -2378 -294 0 0 0 115 119 136
3 -2078 -1699 -211 0 0 0 115 107 118
4 -1839 -1868 -230 0 0 0 114 118 103
5 -1418 -2299 -333 0 0 0 109 124 104
6 -1778 -1971 -472 0 0 0 79 115 112
7 -1688 -1862 -289 0 0 0 120 95 109
8 -1675 -1995 -358 0 0 0 106 96 115
9 -986 -1709 -324 0 0 0 90 105 102
10 -1246 -1961 -422 0 0 0 87 104 94
11 -1399 -2030 -301 0 0 0 83 95 95
12 -1258 -775 -99 0 0 0 80 95 72
13 -992 -1405 -407 0 0 0 84 94 74
14 -1691 -1885 -484 0 0 0 82 99 83
15 -1603 -1586 -245 0 0 0 80 102 99
16 -1536 -1425 -239 0 0 0 87 91 102
17 -1266 -1690 -232 0 0 0 90 92 100
18 -1814 -1267 -326 0 0 0 65 69 96
19 -1379 -1944 -336 0 0 0 77 67 74
20 -1585 -1822 -495 0 0 0 56 61 54
21 -2084 -1354 -425 0 0 0 82 52 59
22 -1368 -1815 -126 0 0 0 61 63 66
23 -837 -1383 -436 0 0 0 45 58 66
24 -1608 -1715 -397 0 0 0 57 68 49
25 -1775 -1619 -282 0 0 0 47 56 59
26 -1445 -1433 -285 0 0 0 41 39 52
27 -1030 -1451 -256 0 0 0 40 43 46
28 -1248 -1572 -313 0 0 0 51 41 38
29 -1368 -2256 -160 0 0 0 39 43 49
30 -1256 -2065 -164 0 0 0 31 38 46
31 -1615 -2036 -278 0 0 0 29 32 38
32 -1926 -1847 3 0 0 0 50 23 44
33 -1281 -2289 -280 0 0 0 110 66 30
34 -1436 -1745 -343 0 0 0 75 137 32
35 -1763 -1328 -356 0 0 0 15 55 35
36 6009 -2757 -1856 0 0 0 13 13 67
37 -1235 1269 -1493 0 0 0 13 16 120
38 4405 -645 -2062 0 0 0 13 11 78
39 -2618 957 -1234 0 0 0 15 13 22
40 -1753 10311 499 0 0 0 15 14 22
*/

Skills required:

C Programming, Embedded Software, Wireless

Project posted by:

sealandtech Singapore
(0 Reviews)

Last seen:

Public Clarification Board

2 messages

  • eraser

    I already found the problem and solved it (I am sure you understand if I do not give details yet ).
    I also worked with Wavecom devices for almost a year and I am new to this site .
    I worked with FTP , SERIAL/USB ports(on the developement kitt Q26) , HTTP , SMS , I implemented DOTA (not only through GPRS/EDGE but through SMS too ) , DATA/VOICE CALLS , I added an ethernet controller to the modem through SPI and SD Card Reader using the second SPI Port :)

    And by the way I too work with C and embedded programming for a long time ...

    over 2 years ago

  • lhl

    Hello
    I can provide a high quality solution quickly,
    I’m a full-time freelancer with a long carrier in C, embedded programming and above all data-communication
    Are you 100% sure that you get more than 5840 bytes of data from the serial port?
    Or does your serial device send the data “+++” ~ “2b 2b 2b” with sets the port in AT Mode ?
    Or does your serial device disconnect (drop the modem signals)?
    If neither there must be a buffer overflow somewhere, I can’t spot in the code example you are giving. But I’m sure I can find it quickly.
    You must check for all possible events on your handlers.
    I’ve just been involved in a project using a Fasttack Supreme 10, still sitting on my desk.
    It involved Serial input, HTTP, DOTA, SMS’s and FTP uploads with error recovery procedures. Collecting monitor information on the serial port, post processing and delivering regular logs via HTTP, alarms via SMS and advanced monitor dumps via FTP (up to 1 MB in size),
    We used :
    • Firmware R73a00
    • OS 06.21.02
    • WIP 5.10.2020
    • M2M studio 1.0
    I think it will be an easy task to get your program working
    Is the input string ASCII or binary?
    I assume the first 4 lines of in-data is some kind of header,
    16 C811 70802 2008 3 28 12 21 52 3 0 1 2
    40 200 100 10 1
    0 0 0 2886 17424 0 0 0 0 0 15425
    0 0 0 0 61 191 65 193 14 16 18 0 110 192 0 107
    Followed by a line of data every 5 sec.
    1 -1399 -2174 -172 0 0 0 129 131 162
    Unless you can provide me with a data producer device, I’ll have to make a small Simulator program on a Pc to generate some test data. This is included in my price. If you can provide me with a large file with some life data it will be a great help.
    If you prefer; we can make an arrangement on an hourly rate (~$80 /hr).
    Price is negotiable
    You can see my detailed updated CV attached
    Regards Lars H. Larsen

    Attachment: cv_lars_hostrup_larsen_en.pdf

    over 2 years ago


If you are the project creator or one of the bidders, please Log In for more options.


All Bids ()

mtech2009 Sri Lanka
mtech.PNG
mtech2009
Sri Lanka From Sri Lanka     Offline
  C++ Level 1 (75%, 64th percentile)
  General Freelancer Orientation (85%, 95th percentile)
$750 in 14 days 
0
over 2 years ago
5.0

5.4

16 Reviews
88% Completion Rate
Please Read the PM
nroxi Romania
nroxi
Romania From Romania     Offline
$700 in 15 days 
0
over 2 years ago
5.0

2.8

1 Review
40% Completion Rate
Hi ! Please read the PM Thanks
rythnace Malaysia
rythnace
Malaysia From Malaysia     Offline
$700 in 25 days 
0
over 2 years ago
We are highly esteemed concern deal with lot of projects, and our team of professionals can complete your work and the whole project within the time frame and with good quality standards. If my quotation and delivery t... more
We are highly esteemed concern deal with lot of projects, and our team of professionals can complete your work and the whole project within the time frame and with good quality standards. If my quotation and delivery time is acceptable, then we can proceed into the next step. Thanks & regards Rythnace (+60169641020) less
eraser Romania
eraser
Romania From Romania     Offline
$700 in 3 days 
0
over 2 years ago
I have worked with wavecom for almost 2 years , I have two modems a fastrack supreme 10 and a fastrack supreme 20 , i have a q26 developement kitt (I worked with Q2687 Classic , Q2687 and Q26 Extreme). I have do... more
I have worked with wavecom for almost 2 years , I have two modems a fastrack supreme 10 and a fastrack supreme 20 , i have a q26 developement kitt (I worked with Q2687 Classic , Q2687 and Q26 Extreme). I have done projects very similar with yours , let me give you an example : I have a project with a FS 20 which reads from a device on every 30 minutes and writes data to a ftp server . Thank you , I wait an answer  less
lhl Denmark
lhl
Denmark From Denmark     Offline
  Foundation EUFreelance.com Member
$800 in 10 days 
0
over 2 years ago
Hello, Please read PM -regards Lars