Create a file into NAS through Ethernet

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create a file into NAS through Ethernet

538 Views
utsavikalpesh
Contributor V

Hi,

I am working with CodeWarrior v10.6 and of MQX v4.0.

My NAS (say with  IP address of 172.168.1.99) is connected with my module with Ethernet Cable. Now I need to create .txt file into NAS directly.  (NAS configuration is OK by test with PC.)

Can anybody tell me what procedure I need to do?

Regards,

Utsavi

0 Kudos
4 Replies

355 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

I suggest your start a ftpserver in PC, and the start a ftp client in your board. Then you can copy file to your PC

Regards

Daniel

0 Kudos

355 Views
utsavikalpesh
Contributor V

Hi ,

Thanx for reply.

I want to create/copy a file into ReadyNAS

I tried to connect PC to ReadyNAS via FileZilla Client utility that works

fine. Now same I want to do with my TWR-K60D100M to ReadyNAS.

Can you tell me exactly what Commands I need to do in module?

I tried to follow your instruction ...

Now what I get is.,

RTCS v3.08.00 FTP client

Connecting to:

220 RTCS FTP Server Ready

ftp []> help

ascii      binary    bye        cd        close      delete

get        help      ls        mkdir      open      pass

put        pwd        remotehelp rename    rmdir      user

ftp []> open

Usage: open

ftp []> open

Usage: open <host>

ftp []> pwd

550 Requested action not taken. File system not mounted.

ftp []> mkir

Invalid command.  Type 'help' for a list of commands.

ftp []> mkdir

Usage: mkdir <dir>

ftp []> mkdir FTP_TEST

550 Requested action not taken. File system not mounted.

ftp []>

One more thing to go...

In shell demo example Ram_disk_start() function is used..Now I write my

sdcard driver functions like

sdcard_function

{

//my variable declarations....

com_handle = fopen(SDCARD_COM_CHANNEL, (void *)(SPI_FLAG_FULL_DUPLEX));

/* Open low level communication device */

error_code = lwgpio_init(&sd_detect, BSP_SDCARD_GPIO_DETECT,

LWGPIO_DIR_INPUT, LWGPIO_VALUE_NOCHANGE);/* Init GPIO pins for other SD

card signals */

lwgpio_set_functionality(&sd_detect,BSP_SDCARD_DETECT_MUX_GPIO); /*Set

detect and protect pins as GPIO Function */

lwgpio_set_attribute(&sd_detect, LWGPIO_ATTR_PULL_UP, LWGPIO_AVAL_ENABLE);

error_code = iosdcard_install("sdcard:", (pointer)&_bsp_sdcard0_init,

com_handle);

error_code = iopart_mgr_install(sdcard_handle, partman_name, 0);

partition_handle = fopen(partition_name, NULL);

if (partition_handle != NULL)

{

error_code = ioioctl(partition_handle, IO_IOCTL_VAL_PART, NULL);

error_code = iomfs_install(partition_handle, filesystem_name, 0);

}

if (error_code == MFS_NO_ERROR)

{

filesystem_handle = fopen(filesystem_name, NULL);

ferror(filesystem_handle);

fh_ptr_ttyd = (pointer)fopen("ttyd:", 0);

}

}

}

but when I am writing this then commands seems not working.

Can you tell me what exactly I need to do for sending a file from/to SDCard

to from/to NAS.

On Fri, Aug 21, 2015 at 8:02 AM, danielchen@fsl <

0 Kudos

355 Views
utsavikalpesh
Contributor V

Hi Daniel,

thank you for your reply.

In PC you are correct but In NAS there is no OS in it.

so How we Run ftpserver?

my PC ,NAS, TWRk60d100m All are in single network through Dlink through one ServerPC.

PC To NAS access

i simply write  fopen("\\172.168.1.99\ Test\test.txt" , "w+") in PC and it create test.txt file in NAS.

TWRk60d100m  to NAS

i want to create  test.txt file in NAS??? same way as PC through TWRk60d100m.

please help me..

0 Kudos

355 Views
hirentailor
Contributor I

hello

I have same requirement

but instead of NAS i want to write C:drive of my PC

please help me out.

0 Kudos