Found the problem, the standard built in function for sierra wireless "wip_close(data_channel)" was not shutting down the line correctly.
The software would start by putting a named file on the FTP server - 0bytes.
Packets appeared to be sending successfully.
When closing down a data channel that uses FTP you must ensure the connection is closed correctly otherwise all the data packets appear to be dropped.
0 bytes is simply because the file was placed there before transferring the packets.
For other sierra wireless users wanting more detail, see below:
Original Code:
handle_events_on_FTP_channel(){
case WIP_CEV_OPEN:
wip_putFile(control_channel,x,x,x)
break;
case WIP_CEV_PEER_CLOSE:
wip_close(data_channel);
data_channel = NULL;
wip_close(control_channel);
control_channel = NULL;
break;
}
Modified Code:
handle_events_on_FTP_channel(){
case WIP_CEV_OPEN:
wip_putFile(control_channel,x,x,x)
break;
case WIP_CEV_PEER_CLOSE:
wip_close(data_channel);
data_channel = NULL;
wip_close(control_channel);
control_channel = NULL;
break;
case WIP_CEV_DONE:
wip_close(control_channel);
break;
}
Original Code:
handle_events_on_data_channel(){
case WIP_CEV_WRITE:
wip_write(data_channel,x,x)
if(ALL_DATA_TRANSMITTED){
wip_close(data_channel);
data_channel = NULL;
wip_close(control_channel);
control_channel = NULL;
}
break;
}
Modified Code:
handle_events_on_data_channel(){
case WIP_CEV_WRITE:
wip_write(data_channel,x,x)
if(ALL_DATA_TRANSMITTED){
wip_shutdown(data_channel,FALSE,TRUE) //Channel, Input, Output
}
break;
case WIP_CEV_PEER_CLOSE:
wip_close(data_channel);
data_channel = NULL;
}
n.b. code is modified to be minimal and not character for character the same as the demo but enough is here to make the modifications necessary.