Home  >  Support  >  Support Forum  >  how can i send and receive a pdf through tcp\ip and udp
Notice! We've recently migrated to using a new forum, we hope you enjoy it. If you are an existing member and this is your first time visiting our new forum, please reset your password to be able to sign in.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

how can i send and receive a pdf through tcp\ip and udp

0 votes
hi
how can do a pdf transmission\reception through tcp\ip and udp
pls provide me valuable suggestion and advice to carry forward my work.

wifi module -wiem9210 module

with regards,
vijayakumar.S
asked Jun 19 in NET+OS by vijayakumar New to the Community (4 points)

Please log in or register to answer this question.

2 Answers

+1 vote
FTP uses TCP sockets internally.

FTP is a higher level protocol which uses TCP sockets to read any file and split into pieces and send via sockets to destination .
At destination FTP server application will read and put these packets into a file with the same filename and save onto the filesystem.

If you are looking for transferring a file from one to another, FTP is the best solution.

If you really want to use bare sockets then probably you will be implementing a thin version of FTP.

You can make use of the below links
http://www.thegeekstuff.com/2011/12/c-socket-programming/
http://www.csd.uoc.gr/~hy556/material/tutorials/cs556-3rd-tutorial.pdf

Implement this in your application. For data you will have to read the pdf file and send to destination.

At destination read contents and open a file with this filename and write onto that file, which will essentially result in transferring a file
answered Jun 20 by tuxembb Seasoned Professional (202 points)
0 votes
You can run the ftpserver sample application provided with Netos distribution on device and ftp to the device from a host.
ftp ipaddress
user: root
pwd: password
answered Jun 19 by Campbell Seasoned Professional (181 points)
my  first thought would be to check the size of the input buffer you are using and check the size of your root thread's stack.  I do not know what soReceived  is but if it is in a thread of its own, I'd check the size of the thread stack that soReceived  runs in. You have, in most cases overrun some buffer, array or otherwise and overwritten something vital. You'll need to debug your code.
Hi Dakotas_dad,
Presently I using one  Root thread only .
I am buliding the sample code  with some addition of  upd server program on application start function...
If I need change the stack size of the thread means how much I need to change....
In server code I am using buffer array of 6 only...
"If I need change the stack size of the thread means how much I need to change...."
If (and only if) that is the problem, increase the root stack size (set in appconf.h) until the program stops crashing.

"In server code I am using buffer array of 6 only..."
You did not finish your thought so I do not know what to make of this.

Have you stepped through your code to get a feel of exactly where the crash is occurring?
i am presently using Tftp clent program on netos 7.5 .2 in wiem9210 module.
here i cant able to transfer a file to target  instead it shows message of  time out occurred in cmd prompt of host pc .
and same time target board pc shows response of  error msg as naTFTPrecv Failure[-1]  
log  of target board:
NET+OS Version 7.5.2.2
Copyright (c) 1997-2011, Digi International, Inc.

PLATFORM: connectwiem9210_esp 4M/8M [Jul 01 2014 10:28:56]
APPLICATION: TFTP Client API Application [Jul  1 2014 10:28:17]
-----------------------------------------------------------------------------
NETWORK INTERFACE PARAMETERS:
  The board will obtain wireless IP configuration parameters from the network.
  Wireless country name configured is United States
  Wireless protocol mode is for access point (infrastructure) networks only
  Wireless SSID is Phoenix1
  Frequency band is band bg
  Wireless channel is (search band bg only )
  Wireless transmit rate is 54
  Wireless transmit power is set to maximum
  Wireless multi domain capability (802.11d) disabled
  Wireless powersave disabled
  Authentication type = WPA/WPA2 Personal (WPA-PSK)
  Encryption type = CCMP (AES)
HARDWARE PARAMETERS:
  Serial channels will use a baud rate of 9600
  This board's serial number is N99999999
  This board's Wireless MAC Address is 00:40:9D:4A:75:1C
  After board is reset, start-up code will wait 5 seconds
-----------------------------------------------------------------------------
Press any key in 5 seconds to change these settings.

Serial CLI Started
IAM:Got AUTO-CONFIGURED IPv6 address FE80::240:9DFF:FE4A:751C on interface wln0:
3
IAM:Got AUTOIP IPv4 address 169.254.38.68 on interface wln0:0
IAM:Got DHCP IPv4 address 192.168.1.9 on interface wln0
Network IP configured.
Starting TFTP Client Application
naTFTPrecv Failure[-1]
naTFTPrecv Failure[-1]
naTFTPrecv Failure[-1]
naTFTPrecv Failure[-1]
naTFTPrecv Failure[-1]
naTFTPrecv Failure[-1]
naTFTPrecv Failure[-1]
naTFTPrecv Failure[-1]
TFTP Client Application complete
Pls respond my Question to carry forward my work with your valuable suggestion...
Your M2M Expert™for Businessfor Developers
Newsletter SignupYouTubeGoogle+FacebookCopyright © 1996-2013 Digi International Inc. All rights reserved. Legal
...