Version 5 (modified by 15 years ago) ( diff ) | ,
---|
Network
Network File System (NFS)
It is helpful to setup an NFS share on your host computer for application testing. You may place your executables to be tested in the directory and access them from the target hardware. Using MiniCom, HyperTerminal or another communications program to communicate with the debug serial port 115000 8N1 the prompt should appear as:
#
Type:
# mount –t nfs 192.168.1.100:/srv/nfs /mnt/nfs –o nolock <CR>
Replace "192.168.1.100:/srv/nfs" with the appropriate IP address and share name of your NFS share. "/srv/nfs" is NFS share name already configured when using the VMware development image.
Type:
# cd /mnt/nfs
to change to the NFS directory. You can then run an application directly from the NFS folder without having to copy it to the 825 NAND. Make sure the application is flagged as executable from the host. To set a file as executable:
# chmod +x indicator
To run the application type:
# ./indicator &
To run an application named indicator. Note the "./" at the beggining is needed to tell the OS to run the executable in the current directory. Alternatively, you may run the executable file by specifying the full path:
# /mnt/nfs/indicator &
The "&" symbol specifies that the application will run in a new thread so you may continue to type commands, for example to check memory or copy files while the program is running. If the "&" symbol is not specified the terminal will be locked until the program exits or "CTRL-C" from the terminal will usually be able to stop the execution.
To stop a running application type:
# ps
This will list the running processes:
PID TTY TIME CMD 1 ? 00:00:02 init 2 ? 00:00:00 kthreadd 3 ? 00:00:00 migration/0 4 ? 00:00:00 ksoftirqd/0 5 ? 00:00:00 watchdog/0 6 ? 00:00:00 migration/1 7 ? 00:00:00 ksoftirqd/1 8 ? 00:00:00 watchdog/1 9 ? 00:00:00 events/0 10 ? 00:00:00 events/1 11 ? 00:00:00 khelper 85 ? 00:00:00 kintegrityd/0 86 ? 00:00:00 kintegrityd/1 88 ? 00:00:00 kblockd/0 89 ? 00:00:00 kblockd/1 91 ? 00:00:00 kacpid 92 ? 00:00:00 kacpi_notify
Identify the PID number of the process to stop and type:
# kill <PID> (where <PID> is the appropriate process ID)
The "pidof" statement allows for another method of stopping a process:
# kill 'pidof indicator'
Note if you accidentally press ENTER before closing the apostrophe you may get a prompt:
>
It is not possible to get out of this prompt until a closing apostrophe "'" is typed and ENTER is pressed:
>' Unknown command #
At times you may lose track of your current path. To check the current path type:
# pwd
This will respond with the current path such as “/mnt/nfs”.
Weight Server -- Network Access
The 825 weight server feature allows remote control operations to be performed via a network connection. The weight server also allows weight data to be accessed via a network connection. The weight data may be accessed using SMA commands such as "<LF>W<CR>" from a client to request the weight or the legacy CTRL-E request for 738 computer format data. This also network access to the 825 from various software such as Cardinal WinVRS or Cardinal WinDDE.
Network Programming
Programs may be written utilizing many of the common Linux network libraries. Programs may be written to act as a TCP/IP server waiting for connections from clients. This is similar to the 825 weight server.
825 TCP/IP Server Example
// TCP/IP Server Example
825 TCP/IP Client Example
// TCP/IP Client Example