Home
PIKA Application Development Suite (PADS) 2.1
Contents
1. User Guide UCTS JST UCT10 JST 2JDT UCT5 EUT G6EUTDST CT 3 CT 12 CT 3 CT 5 SY ee ETE CT 7 EET 2EETDST EUT 2EUTDST UCT 2 UCT UCT 2 CET 1CEST EET 2EETDST CET 1CEST UCT 8 CET 1CEST UCT 3 UCT 2 MST 8 UCT 5 UCT CET 1CEST UCT 10 UCT4 UCT UCT 4 129 PIKA Application Development Suite PADS Mayotte Mexico Mexico Baja N Mexico Baja S Midway Islands Moldova Monaco Mongolia Montenegro Montserrat Morocco Mozambique Namibia Nauru Nepal The Netherlands Antilles The Netherlands New Caledonia New Hebrides New Zealand New Zealand Chatham Island Nicaragua Niger Nigeria Niue Islands Norfolk Island North Korea Norway Oman Pakistan Palau User Guide 16 UCT 3 CST6CDT PST8PDT MST7MDT UCT11 EET 2EETDST CET 1CEST EUT 8EUTDST CET 1CEST CT4 CT CT 2 CT 2 CT 12 CT 5 45 CT4 ET 1CEST CT 11 E rE OQ Gn eS ee cee ea es IS CT 11 NZST 12NZDT CIST 12 45CIDT UCT6 UCT 1 UCT 1 U CT11 UCT 11 30 KST CET 1CEST UCT 4 UCT 5 UCT 9 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Island Poland Portugal Portugal Azores Puerto Rico Qatar Reunion Romania Russia Moscow Russian Fed Zone 1 Kaliningrad Russian Fed Zone 10 Magadan Russian Fed Zone 11 Petropavolovsk Kamchatsky Russian Fed Zone 2 St Petersburg Russia
2. Notes This function can only be called in bitmap mode otherwise the error code PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg 112 will be returned 114 User Guide 2 26 2010 2 1 0 403 15 9 PK_LCD_DisplayString PIKA Application Development Suite PADS 15 8 Events Macros PK_LCD_EVENT_LCD_BUTTON_PRESSED pg 115 Value 5B00 The PK_LCD_EVENT_LCD_BUTTON_PRESSED event indicates that the button on the Appliance has been pressed 15 8 1 PK_LCD_EVENT_LCD_BUTTON_PRESSED Value 5B00 The PK_LCD_EVENT_LCD_BUTTON_PRESSED event indicates that the button on the Appliance has been pressed define PK_LCD_EVENT_LCD_BUTTON_PRESSED 0x5B00 Parameters Parameters Description PO The number of times the button has been pressed continously once at least P1 None P2 None Remarks None 15 9 PK_LCD_DisplayString The PK_LCD_DisplayString displays a string to the specified line on the LCD PK_STATUS PK_API PK_LCD_DisplayString IN TPikaHandle lcdHandle IN PK_CHAR string IN PK_UINT length IN PK_UINT lineNumber Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 string The address of the pointer to the string of characters 0 255 to be displayed 2 26 2010 2 1 0 403 User Guide 115 PIKA Application Development Suite PADS 15 10 PK_LCD_EnableLogs length The length of the string to be displayed lineNumber The index of
3. PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg The LCD is configured in the text mode This function should only be 112 called in the bitmap mode PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg The region parameter passed in is NULL 113 PK_LCD_ERROR_LCD_ INVALID _REGION_HORIZONTAL The sum of the horizontalPosition parameter and the horizontalWidth pg 113 parameter in region is larger than the maximum number of horizontal pixels The region is too big to be displayed The maximum number of horizontal pixels can be retrieved by PK_LCD_GetInfo pg 119 0 PK_LCD_ERROR_LCD_INVALID_REGION_VERTICAL pg The sum of the verticalPosition parameter and the verticalLength 113 patameter in region is larger than the maximum number of vertical pixels The region is too big to be displayed The maximum number of vertical pixels can be retrieved by PK_LCD_GetInfo pg 119 PK_SUCCESS The function succeeded Remarks This function sets an area in the LCD with the specified region parameter to blink It will overwrite the setBlink functions in the same region The blink action in a region will continue until the UnsetBlink function is called with the same region parameter the display mode of the display is changed or the PK_LCD_Clear pg 103 function is call Notes This function can only be called in bitmap mode otherwise the error code PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg 112 will be returned 15 18 PK_LCD_SetConfig
4. The PK_LCD_SetConfig function sets the configuration settings of the specified LCD PK_STATUS PK_API PK_LCD_SetConfig IN TPikaHandle lcdHandle IN PK_LCD_TLCDConfig lcdConfig i 2 26 2010 2 1 0 403 User Guide 121 Parameters Parameters lcdHandle lcdConfig Return Values Return Values PK_LCD ERROR PIKA Application Development Suite PADS DEVICE_INVALID_HANDLE pg 112 PK_LCD ERROR NULL _PARAMETER_SPECIFIED pg 113 PK_LCD ERROR LCD PK_LCD ERROR LCD 112 PK_LCD ERROR LCD PK_LCD ERROR LCD PK_LCD ERROR LCD PK_SUCCESS Remarks INVALID_ORIENTATION pg 112 INVALID_DISPLAY_MODE pg INVALID_SHIFT_TIME pg 113 INVALID_BLINK_TIME pg 112 INVALID_BRIGHTNESS pg 112 15 19 PK_LCD_SetEventHandler Description The LCD handle returned by PK_LCD_Open pg 119 The address of the PK_LCD_TLCDConfig pg 104 structure containing the information used to configure the LCD Description The IcdHandle parameter does not refer to an LCD previously opened with the PK_LCD_Open pg 119 function The IcdConfig parameter passed in is NULL The orientation parameter in the lcdConfig is invalid The mode parameter specified in the lcdConfig is invalid The shiftTime parameter specified in the lcdConfig is out of range The blinkTime parameter specified in the lcdConfig is out of range The brightness parameter
5. the function that will be called when the event is raised user data information specific to the user application When the event PK_LCD_EVENT_LCD_BUTTON_PRESSED pg 115 is raised paramter p0 indicates the number of times the button was pressed When the application no longer requires information about button presses it should call PK_LCD_ResetEventHandler pg 120 to deregister the callback function If the user application does not need information about button presses a callback function does not need to be registered 2 26 2010 2 1 0 403 User Guide 79 Writing Software Images to Flash Using the PIKA Application Development Suite PADS 12 5 Alternative Methods for Writing Images to For detailed information about the LCD API refer to Appendix A LCD API Reference pg 102 12 5 Alternative Methods for Writing Images to Flash In addition to the autoflash utility the following mechanisms are available to update the main flash chip NAND Writing Software Images to Flash Using the Warploader pg 80 e Writing Software Images to Flash Using U Boot pg 84 Each utility has different features e RAM Optimization indicates whether the utility uses trailer information to ensure that only the required amount of RAM is set aside for the image Supports Images without Trailers indicates whether the utility can write images without trailers NOTE Without a trailer RAM optimization is not possible The
6. 7 7 Network Applications Applications The following packages are located in the Applications menu These packages are not included in the factory default appliance software Package Package Dependencies Description Directory sqlite SQLite is an open source software library that implements a self contained server less zero configuration transactional SQL database engine For support and further information about SQLite refer to http www sqlite org php PHP is a general purpose scripting language intended for use in web based applications For support and information refer to http php net Network Applications The following packages can be selected from the Networking menu Package Directory Present Description Name in Default Software SSH Client dropbear yes Dropbear is an open source implementation of the SSH and SCP protocols and and Server provides remote shell access to the appliance It provides the client server key generation and key encryption It will generate the necessary encryption keys the first time it is started after replacing the persistent file system image Most users will want to include this package for development purposes For information and support refer to http matt ucc asn au dropbear dropbear html Note that to use SSH from the appliance to access another system the client executable is called dhclient Dropbear is controlled by Linux Service Management pg 20
7. The files and directories that were backed up are in the process of being restored Touch the button to The autoflash process has reached a point where a reboot is necessary to update the persistent ABORT system file systems The user has 10 seconds to abort the process by pressing the toggle button restart Touch the button to The process to begin writing images to flash is about to begin The user has 10 seconds to abort ABORT flash the process by pressing the toggle button process User Guide 2 26 2010 2 1 0 403 11 3 Using the Autoflash Feature Flashing Image lt partition name gt Failed at Flashing lt partition name gt Success Finished Flashing Restarting to apply changes Successfully completed autoflash Restarting Now Aborted Restart Starting flash process Aborted Image Flash Verifying Image lt partition name gt Autoflash failed during backup Backup failure Media read only Autoflash failed Too many flash inc Failure while running autoflash Failed See flash log 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS An image is in the process of being written to the specified partition The attempt to update the specified partition with an image has failed Refer to the file flash log in the flash directory for more information All images have been successfully written to flash The system is restarting to load the new images There is no opportu
8. a message will be displayed No space left on device when attempting to transfer the image The following options are available Use the SD mnt sd or USB mnt usb recommended e Increase the size of tmp refer to File System Layout pg 71 for information e Create a new temporary file system refer to File System Layout pg 71 for information e Increase the size of the ramdisk not recommended refer to Managing the Ramdisk Image Size pg 45 for information The image can be transferred from your development computer to the appliance using a file transfer protocol such as SCP or TFTP Depending on the protocol used an image can be pushed to the appliance from your development 2 26 2010 2 1 0 403 User Guide 81 Writing Software Images to Flash Using the PIKA Application Development Suite PADS 12 5 Alternative Methods for Writing Images to 82 machine or the appliance can pull it from your development computer For example to retrieve the image file from the tftpboot directory on your development computer enter the following at the Linux prompt on the appliance cd tmp tftp g rt lt filename gt lt ip address of your development computer gt To use SCP to transfer an image from your development computer to the appliance enter the following command at the Linux prompt on your development computer scp lt Your PADS Path gt images lt filename gt root lt ip address of the appliance gt tmp Y
9. image jffs2 persistent file system imagel jffs2 persistent 1 image2 jffs2 persistent 2 11 2 Creating Software Images The kernel and ramdisk images are compressed at build time and uncompressed when loaded into RAM during the boot sequence Example 64 The following examples show the trailer information for various image types Example output for ramdisk wsrp magic PIKA Warped v1 crc fba55329604078e2d172a8671a2a36f0 type root date 2010 01 05 15 13 17 time 1262722397 version 2 1 0 341 os Gunther atch PPC part n a flash nand pstart 0x00200000 psize Ox03e00000 size 0x010de588 ramdisk size 0x000109a0 Example trailer for kernel wrp magic PIKA Warped v1 crc 743a62e249bc48ed92f0424235263c5a type kernel date 2010 01 05 15 13 17 time 1262722397 version 2 6 31 7 7 os Gunther atch PPC part n a flash nand pstart O0x00000000 User Guide 2 26 2010 2 1 0 403 11 3 Using the Autoflash Feature PIKA Application Development Suite PADS psize 0x00200000 size Ox001b7ec3 ramdisk size n a Example trailer for persistent wrp magic PIKA Warped v1 crc 395eb6e0841a75b4 7a2a22 3456cbbe type persistent date 2010 01 05 15 13 18 time 1262722398 version 2 1 0 341 os Gunther atch PPC part jffs2 flash nand pstart 0x04000000 psize 0x04000000 size 0x01700000 ramdisk size n a 3 Using the Autoflash Feature The autoflash application provides the ability to automatically write images
10. p is not pressed before the specified number of seconds expires booting will continue bootemd Indicates whether the appliance will boot from flash or run nand_boot NES Valid values e run nand_boot e run net_nfs bootdelay Number of seconds to wait before continuing to boot 3 after the FPGA is finished loading baudrate Serial port baudrate 115200 2 26 2010 2 1 0 403 User Guide 87 loads_echo preboot netdev hostname post_dma_lb_loops nfsargs framargs ramdisk_ size addip addtty bootfile net_nfs load_nand_kernel 88 PIKA Application Development Suite PADS If set to 1 all characters received during a serial download are echoed back Message to display before continuing to boot after the FPGA is finished loading Name of the network device Hostname used for the appliance Not used after the system has finished booting Number of times the DMA POST loopback test will run Do not change this value Arguments to pass to the kernel when booting from NFS Do not change this value Arguments to pass to the kernel when booting from flash memory Do not change this value Number of bytes to copy from flash into RAM This value is modified dynamically when the ramdisk is updated using U Boot or the autoflash feature Network settings to pass to the kernel at boot time This information is appended to the existing bootargs value Do not change this value Serial port com
11. 1 0 403 15 2 LCD Structures Unions and Enumerations PIKA Application Development Suite PADS PK_LCD_TLCDConfig 15 1 PK_LCD_Clear The PK_LCD_Clear function is a utility function that sets the LCD to the blank state both in text mode and bitmap mode In bitmap mode it will clear the content of the LCD and cancel all the blink operations set before In text mode the content of all line buffers will be cleared PK_STATUS PK_API PK_LCD_Clear IN TPikaHandle lcdHandle 3 Parameters Parameters lcdHandle Return Values Return Values PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg PK_SUCCESS Remarks None 112 Description The LCD handle returned by PK_LCD_Open pg 119 Description The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function The function succeeded 15 2 LCD Structures Unions and Enumerations Structures PK_LCD_TLCDConfig pg 104 PK_LCD_TLCDInfo pg 104 PK_LCD_TLCDRegion pg 105 PK_LCD_TPikaEvent pg 105 2 26 2010 2 1 0 403 The PK_LCD_TLCDConfig structure is used by PK_LCD_GetConfig pg 118 and PK_LCD_SetConfig pg 121 function to retrieve and set the configuration of the LCD display The PK_LCD_TLCDInfo structure is used by PK_LCD_GetLCDInformation function to retrieve read only information describing the dimensions of the LCD display in text mode and bitmap mode There are no defaults for this s
12. 1 Development System Setup and Configuration PIKA Application Development Suite PADS Configuring Serial Access Remove the top cover You must be grounded with an anti static wrist strap Plug in the end of the serial cable provided with the appliance to the connector as shown below The cable can only be plugged in to the connector using the correct orientation Connect the other end to the serial port on your development computer Configuring a Serial Client A serial client such as minicom is required to access the serial console Use the following settings for the serial client 115200 None 8 1 Hardwate Flow Control No Software Flow Control Refer to the following web pages for additional information Setting up minicom Describes how to set up minicom for a Linux system 2 26 2010 2 1 0 403 User Guide 11 PIKA Application Development Suite PADS 6 2 Building Software for the Appliance e Setting up terminal programs Describes how to set up various serial clients 6 2 Building Software for the Appliance Obtaining PADS PADS is available as a tarball downloaded from the http www pikatechnologies com appliancedownloads or from PIKA s SVN repository http svn pikatech com pads distro The SVN path for the latest PADS release is available on the PIKA Technologies website For information about using SVN refer to the Subversion website subversion tigris org In the following sections lt Your P
13. 2 1 0 403 12 7 U Boot Environment Variables PIKA Application Development Suite PADS persistent data e lt Your PADS path gt build_warp root persistent e lt Your PADS path gt build_warp root persistent1 e lt Your PADS path gt build_warp root persistent2 When running from NFS there may be a need to use the persistent file systems in flash for example when debugging a system from the field with its current configuration settings In this case the option Persistent File System in Flash can be selected using the Advanced Options Menu pg 38 when building the ramdisk All persistent file systems including the additional persistent partitions will be accessed from flash instead of NFS Note that this option has no effect when the ramdisk is run from flash the ramdisk in flash will always access the persistent file systems in flash U Boot Environment Variables The following table summarizes the U Boot environment variables and their use If it becomes necessary to revert the U Boot environment to the factory preset values the following command can be executed at the U Boot prompt gt defenvs NOTE Replacing U Boot does not alter the environment variables either to change the values back to defaults or to add new environment variables Variable Value Default Value def_env PIKA internal use do not change 1 postdelay Number of seconds to wait for p to be pressed to 1 enter POST Power On Self Tests If
14. 9 4 Managing the Ramdisk Image Size 10 Adding a Package to PADS User Guide 20 21 23 27 28 28 30 32 32 33 34 35 36 38 39 39 40 40 41 42 45 48 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS 10 1 The Package mk File 10 1 1 Variables 10 1 2 Rules 10 1 3 Compile Time Dependencies 10 2 Adding Your Package to the Menu 10 3 Additional PADS Makefile Rules to Build Software 11 Using Flash Memory to Run Your Application 11 1 Flash Memory Partition Layout 11 1 2 Tracking NAND Writes 11 2 Creating Software Images 11 3 Using the Autoflash Feature 12 Advanced Topics 12 1 File System Layout 12 2 Logging 12 3 Network Settings 12 4 Displaying Information on the LCD 12 5 Alternative Methods for Writing Images to Flash 12 5 1 Writing Software Images to Flash Using the Warploader 12 5 2 Writing Software Images to Flash Using U Boot 12 5 3 Updating U Boot and the FPGA 12 6 Using the Persistent File Systems from Flash 12 7 U Boot Environment Variables 12 8 Retrieving System Identifcation Information 12 9 Modifying the Hardware Discovery Script 2 26 2010 2 1 0 403 User Guide 50 50 51 55 55 58 61 61 62 63 65 71 71 73 76 77 80 80 84 85 86 87 90 90 PIKA Application Development Suite PADS 13 Frequently Asked Questions 96 13 1 How do I run software from NFS 96 14 Troubleshooting 97 15 Appendix A LCD API
15. File Rule Purpose package source Defines a target that obtains the package source from the remote site to the download directory unpacked Defines a target and associated rules that decompress the downloaded package source Depends on the package source rule This may include applying patches to the package source Patches are typically used to substitute platform specifics in code written for a different architecture For example Makefiles written for an x86 platform may require different options for cross compiling on the Power PC architecture of the appliance and it may be undesirable to permanently alter the original makefile Patches should only be applied as part of unpacking as multiple attempts to apply a patch will fail configured Defines a target and associated rules that configure the software Depends on the unpacked rule If a package has a configure script it should be executed here main package target Defines how to cross compile and install the package Typically uses the compile and install rules in the package source Makefile clean Defines a target to clean the software build by calling the clean and or uninstall rules from the package Makefiles The clean target should run make clean on BUILD_DIR package version and MUST uninstall all files of the package from TARGET_DIR Defines a target to completely remove the directory into which the software was uncompressed configured and compiled The dirclean
16. NULL 113 PK_SUCCESS The function succeeded Remarks This function retrieves the capacity information of the LCD display including the dimensions of the LCD in text mode and bitmap mode 15 15 PK_LCD_Open The PK_LCD_Open function allocates a LCD object and returns its handle to the calling routine PK_STATUS PK_API PK_LCD_Open IN PK_VOID reserved0O OUT TPikaHandle lcdHandle 3 Parameters Parameters Description reserved0 Reserved for future use This field must be set to NULL 2 26 2010 2 1 0 403 User Guide 119 PIKA Application Development Suite PADS 15 17 PK_LCD_SetBlink ilcdHandle The address of the TPikaHandle type used to return the LCD handle Return Values Return Values Description PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg The LCDHandle parameter passed in is NULL 113 PK_LCD_ERROR_OUT_OF_MEMORY pg 113 There is insufficient memory available to allocate resources for the LCD PK_LCD_ERROR_LCD_NOT_PRESENT pg 113 The LCD is not currently present in the system PK_SUCCESS The function succeeded Remarks This function allocates all the resources required to operate the LCD and initiates communication with the LCD driver A handle is returned to be used for all further function invocations dealing with the LCD Later calls to PK_LCD_Open will increase the use count there will be only one instance of LCD service running in the system 15 16 PK LCD_ResetEventHandler The PK_LCD_Res
17. Reference 102 15 1 PK_LCD_Clear 103 15 2 LCD Structures Unions and Enumerations 103 15 2 1 PK_LCD_TLCDConfig 104 15 2 2 PK_LCD_TLCDInfo 104 15 2 3 PK_LCD_TLCDRegion 105 15 2 4 PK_LCD_TPikaEvent 105 15 3 PK_LCD_Close 106 15 4 LCD Constants 106 15 4 1 PK_LCD_BITMAP_HEIGHT 07 15 4 2 PK_LCD_BITMAP_WIDTH 07 15 4 3 PK_LCD_BLINK_INTERVAL_DEFAULT 07 15 4 4 PK_LCD_BLINK_INTERVAL_MAX 08 15 4 5 PK_LCD_BLINK_INTERVAL_MIN 08 15 4 6 PK_LCD_BRIGHTNESS_0 08 15 4 7 PK_LCD_BRIGHTNESS_100 08 15 4 8 PK_LCD_BRIGHTNESS_25 08 15 4 9 PK_LCD_BRIGHTNESS_50 08 15 4 10 PK_LCD_BRIGHTNESS_75 08 15 4 11 PK_LCD_DISPLAY_MODE_BITMAP 09 15 4 12 PK_LCD_DISPLAY_MODE_TEXT 09 15 4 13 PK_LCD_EVENT_MAX_NAME_LENGTH 09 15 4 14 PK_LCD_ERROR_MAX_NAME_LENGTH 09 15 4 15 PK_LCD_ORIENTATION_NORMAL 09 15 4 16 PK_LCD_ORIENTATION_REVERSED 09 15 4 17 PK_LCD_REGION_FULL_SCREEN 09 User Guide 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS 15 4 18 PK_LCD_SHIFT_INTERVAL_DEFAULT 15 4 19 PK_LCD_SHIFT_INTERVAL_MAX 15 4 20 PK_LCD_SHIFT_INTERVAL_MIN 15 4 21 PK_LCD_TEXT_LINE_BUFFER_LENGTH 15 4 22 PK_LCD_TEXT_LINE_LENGTH 15 4 23 PK_LCD_TEXT_LINES 15 5 PK_LCD_DisableLogs 15 6 Errors 15 6 1 PK_LCD_ERROR_BASE_GENERAL 15 6 2 PK_LCD_ERROR_DEVICE_INVALID_HANDLE 15 6 3 PK_LCD_ERROR_LCD_INVALID_BLINK_TIME 15 6 4 PK_LCD_ERROR_LCD_INVALID_BRIGHTNESS 15 6 5 PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE 15 6 6 PK_LCD_ERROR_LCD_INVA
18. Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg The IcdConfig parameter passed in is NULL 113 PK_SUCCESS The function succeeded Remarks This function retrieves the current LCD configuration settings 118 User Guide 2 26 2010 2 1 0 403 15 15 PK_LCD_Open PIKA Application Development Suite PADS User applications should call this function to initialize their PK_LCD_TLCDConfig pg 104 structure prior to using the PK_LCD_SetConfig pg 121 function This ensures all parameters including parameters added in later releases are set to proper default values 15 14 PK_LCD_GetInfo The PK_LCD_GetInfo function retrieves the capability information of the specified LCD PK_STATUS PK_API PK_LCD_GetInfo IN TPikaHandle lcdHandle OUT PK_LCD_TLCDInfo lcdInfo Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 lcdInfo The address of the PK_LCD_TLCDInfo pg 104 type used to return the information about the LCD Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg The IcdInfo parameter passed in is
19. a feature while lt N gt will exclude a feature Press lt Esc gt lt Esc gt to exit lt gt for Help lt gt for Search Legend feature is selected feature is excluded Busybox Configuration Use the arrow keys to navigate this window or press the hotkey of the item you wish to select followed by the lt SPACE BAR gt Press lt gt for additional information about this option Recommended Bus i ustom Busybox Options If custom options are selected the following menu will be shown when the BusyBox component is compiled after entering make to begin compiling the software Select any additional tools you would like included in the image Note that the size of the image will increase in proportion to the number of additional tools selected Refer to Managing the Ramdisk Image Size pg 45 for information about the image size NOTE If you have previously compiled busybox and then select Custom Busybox Options you will need to execute make busybox clean before entering make to begin compilation 2 26 2010 2 1 0 403 User Guide 37 PIKA Application Development Suite PADS 8 3 Advanced Options Menu Arrow keys navigate the menu lt Enter gt selects submenus gt Highlighted letters are hotkeys Pressing lt gt includes lt N gt excludes lt M gt modularizes features Press lt Esc gt lt Esc gt to exit lt gt for Help lt gt for Search Legend built in excluded lt M gt mo
20. change the following variables as shown below astspooldir gt mnt sd lt your log directory name gt astlogdir gt mnt sd lt your log directory name gt If logs are sent to a subdirectory of mnt sd the permissions for that directory must be set so that the asterisk user can write to them Ensure that the SD card is formatted for ext3 or ext2 refer to ext2 File System Utilities for USB and SD Media pg 30 There are two options 1 Change the permissions so that all users have read write and execute permissions by executing the following commands at the Linux prompt on the appliance after you have created the subdirectory chmod 777 mnt sd lt your log directory name gt 2 Change the directory ownership so that the asterisk user owns the directories by executing the following commands at the Linux prompt on the appliance after you have created the subdirectory chown R asterisk asterisk mnt sd lt your log directory name gt Note that any files including voice mail files that are normally sent to any subdirectory specified by the astspooldir variable will now be sent to the SD Restart Asterisk to activate the changes Using Syslog to Send Logs to a Remote System Syslog is a standard for forwarding log messages in an IP network The term syslog is often used for both the actual syslog protocol as well as the application or library sending syslog messages The appliance can use syslog for packages that support its
21. command is provided in U Boot to burn images to flash Enter help update at the U Boot prompt for information The update command uses the trailer information to ensure that the image is not corrupt that the correct partition is specified and when updating the ramdisk image to optimize RAM usage If the partition specified does not match the 84 User Guide 2 26 2010 2 1 0 403 12 5 Alternative Methods for Writing Images to PIKA Application Development Suite PADS Updating U Boot and the FPGA partition indicated in the trailer the command will fail If the image does not have a trailer you will be prompted to verify that you wish to write the image to flash PEAR ARSK AR ARK RAK A A A RK ABA AK A AA ROK ARK A A AA ROK A A A AB AA KARA AB A RAK OK ARK KK a WARNING FEE ARK A A A RK E EE A A RR K A EE A RR A A EKK k k kkk kkk The image that was downloaded did NOT contain an image trailer which is used to verify the integrity of the downloaded image Are you sure you want to continue burning this image lt y N gt You must copy the files to the directory tftpboot on your development machine before using the update command The following instructions assume that you have done so Image type Command kernel update kernel kernel wrp ramdisk update ramdisk ramdisk wrp persistent file system update persistent persistent wrp persistent 1 update persistent1 persistentl wrp persistent 2 update persistent2 persistent2
22. following table summarizes the differences RAM Supports Images without Trailers Optimization no yes using the f option U Boot versions 1 3 0 86 yes and up U Boot versions 1 3 0 74 yes and older NOTE When using older versions of U Boot the U Boot image file with a trailer u boot wrp cannot be used You must use the version without the trailer u boot bin Due to the RAM optimization feature we recommend that you avoid switching between mechanisms that support it and those that do not For example autoflash and the warploader should not be used interchangeably 2 5 1 Writing Software Images to Flash Using the Warploader The warploader is a tool that allows you to write software into flash memory while the appliance is running As of PADS release 2 1 x the warploader tool has been deprecated The autoflash utility should be used instead Should you 80 User Guide 2 26 2010 2 1 0 403 12 5 Alternative Methods for Writing Images to PIKA Application Development Suite PADS Writing Software Images to Flash Using the wish to use it you must use the F option The warploader checks the validity of the image and automatically copies the image to the correct flash partition based on the trailer information contained in the image The tool provides a single step to replace software there is no need to return to the U Boot prompt and no serial connection is required However you require network access to the appliance us
23. into the slot SD or USB is detected but fails to mount If an error such as mount mounting dev mmcblk0p1 on mnt sd failed Invalid argument appears on the serial console either at system startup or when the device is inserted into an appliance at run time it indicates that the entry for the device in persistent etc fstab specifies the wrong file system type We recommend that you use auto for the file system type to ensure that the system auto detects the file system type 100 User Guide 2 26 2010 2 1 0 403 14 PIKA Application Development Suite PADS Cannot set permissions on mnt sd or mnt usb Ensure that the device is formatted for ext3 or ext2 There is no concept of permissions for a vfat file system and attempting to change the file system type will have no affect The system does not generate any error messages Message Bad eraseblock appears on the serial console at system startup Messages such as Bad eraseblock 1393 at 0x0ae20000 are normal for NAND flash All NAND flash devices are likely to have a few bad blocks As the flash ages the number of bad blocks will increase However if the flash is new and there are more than ten such messages it may indicate a faulty flash chip Message JFFS2 notice 36 check_node_data wrong data CRC appears on the serial console at system startup Messages such as JFFS2 notice 36 check_node_data wrong data CRC in data node at 0x004268c0 on the ser
24. is taken from chan_pika mk It shows that chan_pika depends on both the asterisk and hmp packages It cannot co exist with the grandprix package so the second TARGETS line removes the grandprix package from the list of targets to build Note that if another package with no relationship to chan_pika includes grandprix in its list of targets it may still be included if the other package s mk is parsed after chan_pika mk To avoid this ensure that the entries in Config in for your package specify the menu level dependencies correctly such that this package cannot be selected on the menu Refer to Adding Your Package to the Menu pg 55 for details ifeq strip PADS_PACKAGE_CHAN_PIKA y TARGETS asterisk hmp chan_pika TARGETS erandprix endif 10 2 Adding Your Package to the Menu This section describes the basic information required to add a package into the overall PADS menu The file lt Your PADS Path gt config Kconfig language txt describes other useful details Two files are used to implement the overall package menu 2 26 2010 2 1 0 403 User Guide 55 e PIKA Application Development Suite PADS 10 2 Adding Your Package to the Menu lt Your PADS Path gt Config in e Specifies the parameters for adding the package to the menu lt Your PADS Path gt package Config in e Specifies the complete list of packages that are included in the Package Selection for the Target menu displayed when make menuconfig i
25. level actions to perform that must occur between steps that are currently executed in tc S For example if there is an action to execute that must occur before the autorun scripts are executed it would be necessary to modify rc S Autorun or run scripts typically execute the command to start a service in addition to any other initialization steps An application may use both an autorun and a run script if necessary Note that the run scripts are executed after rc S completes and therefore will occur after the execution of all autorun scripts Run scripts are executed alphabetically by service name Example The httpd package uses the file S51httpd to perform actions at initialization The number 51 in the file name indicates that it has medium priority in relation to other packages For example the script that sets up networking must run before the script for httpd The networking initialization script has priority 30 so using 51 for httpd ensures that it will run after networking initialization The httpd initialization script is shown below It performs the following actions e Sets up a softlink between the directory in persistent storage where web pages are stored to the location in the 44 User Guide 2 26 2010 2 1 0 403 9 4 Managing the Ramdisk Image Size PIKA Application Development Suite PADS ramdisk where a web server will access them at run time e Starts the web server service which includes specifying the location of
26. m oa Services that use these files may need to be restarted e g Asterisk If the path used for NFS is deleted the appliance will no longer function Any attempts to perform operations will return either Unknown command or Stale NFS file handle The only way to recover is to reboot the system by pressing the reset button An NFS mount point must be rebuilt before booting Simply rebuilding the software at the 2 26 2010 2 1 0 403 User Guide 13 PIKA Application Development Suite PADS 6 3 Running Software from NFS mount point will not recover the system the system must be rebooted Any errors when booting using NFS will be shown on the serial display Refer to Troubleshooting pg 97 for more information Setting up U Boot You must now configure the bootloader U Boot on the appliance Press the reset button on the appliance and then press any key when the boot sequence is shown on the serial client The following shows the first part of the boot sequence You must press a key after this part of the boot sequence U Boot 1 3 0 87 Dec 21 2009 16 17 06 CPU AMCC PowerPC 440EP Rey C at 533 333 MHz PLB 133 OPB 66 EBC 66 MHz I2C boot EEPROM enabled Bootstrap Option H Boot ROM Location I2C Addr 0x52 PCI async ext clock used 32 kB I Cache 32 kB D Cache Board PIKA Embedded Appliance I2C ready DRAM 256 MB HHH Press p to enter POST 0 RAM Offset Ox0ff33000 NOR Offset Oxfff80000 DIF Offset 0xf
27. specified in the lcdConfig is not valid it should be one of the PK_LCD_BRIGHTNESS_x values defined in this header file The function succeeded This function configures the LCD with the settings provided in the lcdConfig struct pointer The settings become effective immediately after the function call If the mode of the display is changed all the content and operations such as blinking and shifting associated with previous mode will be cleared User applications should initialize the PK_LCD_TLCDConfig pg 104 structure by calling PK_LCD_GetConfig pg 118 and passing in the lcdConfig structure prior to calling this function This guarantees that all fields including fields added in later releases of this software are set to proper default values 15 19 PK _ LCD _ SetEventHandler The PK_LCD_SetEventHandler function sets the callback function for notifying events generated by LCD PK_STATUS PK_API PK_LCD_SetEventHandler IN TPikaHandle lcdHandle IN PK_LCD_Callback callback PK_VOID userData Parameters Parameters lcdHandle 122 Description The LCD handle returned by PK_LCD_Open pg 119 User Guide 2 26 2010 2 1 0 403 15 21 PK_LCD_UnsetBlink PIKA Application Development Suite PADS callback The function pointer to the callback function userData The user data that will be reported back to the user in the events Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_
28. start reading number of bytes hex to read from NAND The value for the last parameter may need to be changed if compressed ramdisk image size is larger than 48M Command to boot from flash memory do not change this value IP address of your development computer IP address of the appliance gateway IP for your local network network mask for your local network path to the NFS mount point on your development machine Active Ethernet port The appliance has only one Ethernet port do not change this value U Boot version and build date run ramargs addip addtty load_nand_kernel load_nand_tramdisk bootm 2000000 2200000 0 0 0 0 deflt 0 0 0 0 255 255 255 0 opt eldk ppc_4xx ppc_4xx_eth0 None based on the current U Boot Version information shown in U Boot is used by U Boot and the autoflash feature Examples are shown below Do not alter the value of these variables version kernel version ramdisk version persistent version persistent1 version persistent2 2 26 2010 2 1 0 403 Sample Value u boot 1 3 0 87 1262714149 3 0 1 0 1263316166 2 6 31 7 7 1263239021 2 1 0 348 1263329459 2 1 0 348 1263245510 2 1 0 347 1263239023 2 1 0 347 1263239023 User Guide 89 PIKA Application Development Suite PADS 12 9 Modifying the Hardware Discovery Script Retrieving System Identifcation Information When writing applications information about the system hardware including the serial numbe
29. the file specified fails to load it will be overwritten with the latest hardware information If a file was specified the file will be modified or created If an error occurred while loading the specified file this error will be logged in the etc pika pikacf txt Errors such as Unable to load etc pika aohscan new file or Unable to create the etc pika aohscan new file will be appended to the log file Override default values syntax pikacf defaults lt file gt Generates configuration files using the defaults specified in the file If the file path contains spaces enclose the text in double quotes This option can be used either when creating new configuration files or updating existing ones due to hardware changes This option functions in a manner similar to the auto option in that it does not prompt for user input and will generate configuration entries using the default values for any key not specified in the override file The override file only requires entries for keys that should be set to a value other than the default that is it is not necessary to specify values for all keys If no file is specified the file etc pika override_defaults ini will be used If the override file does not exist or if a problem was encountered while loading it any existing configuration files will 2 26 2010 2 1 0 403 User Guide 93 PIKA Application Development Suite PADS 12 9 Modifying the Hardware Discovery Script be overwri
30. to section ext2 File System Utilities for USB and SD Media pg 30 vfat commonly used for Windows file systems e jffs2 Journaling Flash File System version 2 used for all persistent flash partitions The setting auto is not a file system type it indicates that the operating system will automatically add the device to the file system according to the file system format on the device at the time the device is added to the system tmpfs var run tmpfs size lm 0 0 tmpfs var log tmpfs size 4m 0 0 tmpfs tmp tmpfs size 36m omo dev mmcblk0p1 mnt sd auto noauto 0 0 dev sdal mnt usb auto noauto 00 dev mtdblock7 persistentl Fie SZ auto 0 0 dev mtdblock8 persistent2 Vie SZ auto Q 0 When running from flash persistent flash partitions are mounted into the file system using the mtdblock devices These partitions are not loaded into memory and all reads and writes access the flash directly The following mtd blocks are used for the persistent flash partitions User Guide 2 26 2010 2 1 0 403 12 2 Logging PIKA Application Development Suite PADS e persistent is mapped to mtdblock6 e persistentl is mapped to mtdblock7 e persistent2 is mapped to mtdblock8 To view the current mtd block table enter the command cat proc mtd at the Linux prompt on the appliance Logging On a regular Linux operating system run time logs are sent to the var log directory On the appliance this directory is part of the ramdisk and theref
31. to the capabilities of the appliance including those related to Asterisk PBX functionality NOTE Third party packages are available through PADS for convenience only and are provided as is PIKA does not support third party packages Issues and questions about these packages should be directed to the package owners indicated in the package descriptions The factory default software on the appliance enables it to run as an Asterisk PBX Various other utilities are also included e Network Applications pg 28 ntpd tftp server http server e ssh server dhep client timezone utility Timezone pg 27 e update utilities Software Update Utilities pg 32 e ext2 File System Utilities for USB and SD Media pg 30 e Linux Utilities pg 20 The following diagram shows the main software included 2 26 2010 2 1 0 403 User Guide 17 PIKA Application Development Suite PADS 7 1 Base Software PIKA channel astmanproxy driver PIKA High Level API Se ER GrandPrix y PIKA HMP Drivers and SDK Base Software kernel skeleton file system Busybox The following diagram shows the packages required to build telephony applications using the appliance hardware The LCD library is optional if the application does not need to write to the LCD Use of the High Level API is optional if the user application needs fine grained hardware and software control Note that the application may use both the High Level API a
32. to the flash memory This utility is part of the update utils pg 32 package which is included in the factory default software on the appliance Autoflash is the recommended method for updating the flash memory To use autoflash the system must be running a ramdisk created with PADS version 2 1 x or later IMPORTANT Before upgrading to PADS 2 1 x from an earlier version please refer to the section Upgrade Information in the release notes Images can reside on a USB device an SD card or on the local file system The utility also provides the ability to backup and restore specified files and directories The file called flash inc specifies the location of the image files to write to flash and a list of files or directories to backup and restore The file format is as follows the directory to check for images to be burned 2 26 2010 2 1 0 403 User Guide 65 PIKA Application Development Suite PADS 11 3 Using the Autoflash Feature IMAGE_DIR lt directory path gt a space separated list of directories to backup and restore BACKUP persistent etc networking conf persistent etc pika The file flash inc must be placed in a directory called flash which must be located in one of three designated locations on the appliance Location Appliance file system location main persistent file system persistent flash SD card mnt sd flash USB device mnt usb flash NOTE When creating the flash directory on the SD card
33. use Using syslog for capturing log information is recommended to avoid consuming memory on the appliance If syslog is configured to send logs to a remote system logs are sent to var log messages on the remote host By default Asterisk logs are sent to var log asterisk The contents of this directory will not be preserved across reboots To direct Asterisk logs to syslog change the appropriate setting in etc asterisk logger conf By default PIKA HMP and PIKA GrandPrix either stand alone or from within the PIKA Asterisk channel driver logs are directed to var log pika 74 User Guide 2 26 2010 2 1 0 403 12 2 Loggin PIKA Application Development Suite PADS geing PP p To direct PIKA logs to syslog change the file persistent etc localenv as follows Value export PKH_LOGS_DIR SYSLOG export PKX_LOGS_DIR SYSLOG To enable syslog On the remote host where the logs will be stored execute the following syslogd m 0 r On the Appliance execute the following syslogd R lt remote host IP gt If logs will be permanently redirected to a remote host ensure that syslog is started at boot time on both the remote host and the appliance The following syslog levels can be set for PIKA HMP and PIKA GP when exporting the log environment variable For example export PKX_LOGS_DIR SYSLOG LOG_INFO Log Level Meaning LOG_EMERG system is unusable LOG_ALERT action must be taken immediately LOG_CRIT critical condit
34. 0 403 16 Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu ganda kraine kraine Simferopol nited Arab Emirates nited Kingdom ruguay S Virgin Islands SA Alaska SA Aleutian Islands SA Arizona SA Central SA Eastern SA Indiana SA Mountain SA Pacific U U U U U U U U U U U U U U U U zbekistan Vanuatu Vatican City Venezuela Vietnam Wake Islands Wallis and Futana Islands Western Samoa Yemen Zaire Kasai Zaire Kinshasa 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS User Guide UCT 1 EET 2EETDST UCT 5 EST5EDT UCT 12 UCT 3 EET 2EETDST EUT 3EUTDST UAEST 4 GMTOBST SAT3 UCT4 NASTINADT AST10ADT MST7 CST6CDT EST5EDT EST5 MST7MDT PST8PDT UCT 5 UCT 11 CET 1CEST CT4 CT 7 CT 12 CT 12 CT11 CT 3 CT 2 CT 1 amp Er eee rG ea Gs ira SS 133 PIKA Application Development Suite PADS 16 Zambia UCT 2 Zimbabwe UCT 2 134 User Guide 2 26 2010 2 1 0 403 17 PIKA Application Development Suite PADS Index Adding a Package to PADS 48 Adding Your Package to the Menu 55 Additional PADS Makefile Rules to Build Software 58 Advanced Options Menu 38 Advanced Topics 71 Alternative Methods for Writing Images to Flash 80 Appendix A LCD API Reference 102 Appendix B Timezone Codes 125 Applications 28 Assumed Knowledge 4 Asterisk and Related Packages 23 Base Software 18 Building Software f
35. 00 Maximum LCD blink interval in ms 15 4 5 PK_LCD_BLINK_INTERVAL_MIN Minimum LCD blink interval in ms define PK_LCD_BLINK_INTERVAL_MIN 100 Minimum LCD blink interval in ms 15 4 6 PK_LCD_BRIGHTNESS_0 The brightness of the LCD back lighting is 0 percent define PK_LCD_BRIGHTNESS_0 0 The brightness of the LCD back lighting is 0 percent 15 4 7 PK_LCD_BRIGHTNESS_100 The brightness of the LCD back lighting is 100 percent define PK_LCD_BRIGHTNESS_100 4 The brightness of the LCD back lighting is 100 percent 15 4 8 PK_LCD_BRIGHTNESS_25 The brightness of the LCD back lighting is 25 percent define PK_LCD_BRIGHTNESS_25 1 The brightness of the LCD back lighting is 25 percent 15 4 9 PK_LCD_BRIGHTNESS_50 The brightness of the LCD back lighting is 50 percent define PK_LCD_BRIGHTNESS_50 2 The brightness of the LCD back lighting is 50 percent 15 4 10 PK_LCD_BRIGHTNESS_75 The brightness of the LCD back lighting is 75 percent define PK_LCD_BRIGHTNESS_75 3 The brightness of the LCD back lighting is 75 percent 108 User Guide 2 26 2010 2 1 0 403 15 4 LCD Constants PIKA Application Development Suite PADS PK_LCD_SHIFT_INTERVAL_DEFAULT 15 4 11 PK_LCD_DISPLAY_MODE_BITMAP The display mode of the LCD is bitmap mode define PK_LCD_DISPLAY_MODE_BITMAP 0 The display mode of the LCD is bitmap mode 15 4 12 PK_LCD_DISPLAY_MODE_TEXT The display mode of the
36. 004d000 FLASH 4 MB NAND 256 MiB In serial Out serial Err serial FPGA 3 0 1 0 MMC PIKA SD 0 Net ppc_4xx_eth0 ENET Speed is 100 Mbps FULL duplex connection EMAC0 Kernel Version 2 6 31 7 7 1261670375 Ramdisk Version 2 1 0 328 1261680962 Persistent Version 2 1 0 328 1261680963 but before the end of countdown in this part of the boot sequence Hit any key to stop autoboot 3 14 User Guide 2 26 2010 2 1 0 403 6 3 Running Software from NFS PIKA Application Development Suite PADS You will see the U Boot prompt which is indicated by gt The following commands are used when changing the U Boot environment variables Purpose Sets the environment variable to a specified value Syntax setenv lt environment variable name gt lt environment variable value gt Prints the list of U Boot environment variables Saves changes to U Boot environment variables Set the following variables using setenv When you are finished enter the command saveenv Environment variable changes do not take effect until the system is rebooted either by pressing the reset button or by entering the reset command at the U Boot prompt U Boot Environment Variable Name The IP address of your development computer The IP address of the appliance it must be set to an IP address that is valid on your network The factory preset value is deflt Note that this will override the IP address in the file etc networking con
37. 28 User Guide 2 26 2010 2 1 0 403 7 7 Network Applications TFIP tftpd Server FTP Server ftpd NTP ntpd Client and Server HTTP httpd Server 2 26 2010 2 1 0 403 yes no yes yes PIKA Application Development Suite PADS Tiny File Transport TFTP is used as a bare bones special purpose file transfer protocol TFTP allows only unidirectional transfer of files depends on UDP has low overhead and provides virtually no control TFTP provides no user authentication TFTP is a high security risk and should not be enabled unless absolutely necessary The package adds only the server side of the protocol a tftp client is included by default and is not controlled by selecting this package The server directory is persistent tftpboot File Transfer Protocol FTP server support is provided by the vsftp Very Secure FTP package an open source implementation of a complete session oriented general purpose file transfer protocol Refer to vsftpd beasts org for details and support FTP on the appliance is enabled for read only anonymous access Files in the directory persistent ftp on the appliance can be retrieved using any standard FTP client such as Filezilla Network Time Protocol NTP is a protocol for synchronizing the clocks of computer systems over packet switched variable latency data networks NTP is configured to use the cluster of time servers supported by http www pool ntp org Files in the pa
38. ADS path gt refers to the directory into which you unpacked the tarball or the directory specified for your checkout from SVN The commands specified in the following instructions should be executed your Linux development computer You must run as root to build software using PADS In the following examples the local copy of PADS will be in a directory called PADS_2 1 0 x where x is the build number Tarball from the Website tar zxvf PADS_2 1 0 x tez From the SVN Repository svn checkout http svn pikatech com pads distro tags 2 1 0 x PADS_2 1 0 x Building the Software In the ditectory lt Your PADS path gt enter the command make menuconfig This command displays the package selection menu For now you will use the default menu selections Refer to Software Packages Available in PADS pg 17 for a description of the all the packages and to Navigating the PADS Menu pg 34 to learn about using the menu system to select individual packages Use the arrow keys to select Exit Select Yes when asked if you want to save your configuration Once you have exited the menu enter the commands 12 User Guide 2 26 2010 2 1 0 403 6 3 Running Software from NFS PIKA Application Development Suite PADS make make image This will build the software for the default packages and create images When the build is complete you will have an NFS mount point at lt Your PADS path gt build_warp root Running Software from NF
39. C_DEBUG e Press x to save the changes and compilation will continue 32 User Guide 2 26 2010 2 1 0 403 7 11 Samples PIKA Application Development Suite PADS Samples The following sample applications can be selected from the Samples menu No samples are included in the factory default software load Package Directory Dependencies Description Name hello world hello_world none This is a simple hello world application included to assist developers in adding packages to PADS IVR monzaivr HMP LCD This application demonstrates the use of the PIKA HMP SDK to create a Application library telephony application It can receive incoming calls from a SIP IP phone configured for direct IP calling Upon connection an announcement is played then a tone is played after which the user can begin recording This sample includes code to update the appliance LCD with call status information This package cannot co exist with Asterisk as there will be a conflict in the use of the SIP port 2 26 2010 2 1 0 403 User Guide 33 PIKA Application Development Suite PADS 8 1 Kernel Configuration Menu 8 Navigating the PADS Menu The PADS menu is displayed by running make menuconfig from the top level directory of PADS lt Your PADS path gt Package selection in PADS is driven by an ncurses based menu system The information at the top of the menu describes how to navigate the menu and select components The following i
40. DT UCT 9 30 UCT 10 TST 10TDT UCT 8 MEZ 1MESZ UCT 3 EST5EDT UCT 3 UCT 6 UCT4 EET 2EETDST CET 1CEST 125 PIKA Application Development Suite PADS Belize Benin Bermuda Bhutan Bolivia Bonaire Bosnia Herzogovina Botswana Brazil East including All Coast and Brasilia Brazil Fernando de Noronha Brazil Trinity of Acre Brazil West British Virgin Islands Brunei Bulgaria Burkina Faso Burma Burundi Cambodia Cameroon Canada Atlantic Canada Central Canada Eastern Canada Mountain Canada Newfoundland Canada Pacific and Yukon Cape Verde Cayman Islands Central African Republic Chad Chile User Guide 16 UCT6 UCT 1 AST4ADT UCT 6 UCT4 UCT4 CET 1CEST UCT 2 EBST3EBDT NORO2 ACRE5 WBST4WBDT UCT4 UCT 8 EET 2EETDST CT CT 6 30 CT 2 CT 7 Ch ret e Ee ise CT 1 AST4ADT CST6CDT EST5EDT MST7MDT NST3 30NDT PST8PDT UCT1 UCT5 UCT 1 UCT 1 CST4CDT 2 26 2010 2 1 0 403 16 Chile Easter Island China Christmas Islands Cocos Keeling Islands Colombia Congo Cook Islands Costa Rica Cote d Ivoire Croatia Cuba Curacao Cyprus Czech Republic Denmark Djibouti Dominica The Dominican Republic Ecuador Ecuador Galapagos Islands Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Faroe Islands Fiji Finland France French Guiana 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS User G
41. D_ERROR_GetText 117 PK_LCD_ERROR_LCD_BLINK_ WAS _NOT_SET 113 PK_LCD_ERROR_LCD_INVALID_BLINK_TIME 112 PK_LCD_ERROR_LCD_INVALID_BRIGHTNESS 112 PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE 112 PK_LCD_ERROR_LCD_INVALID_LINE_NUMBER 112 PK_LCD_ERROR_LCD_INVALID_ORIENTATION 112 PK_LCD_ERROR_LCD_INVALID_REGION_HORIZONTAL 113 PK_LCD_ERROR_LCD_INVALID_REGION_VERTICAL 113 PK_LCD_ERROR_LCD_INVALID_SHIFT_TIME 113 PK_LCD_ERROR_LCD_NOT_PRESENT 113 PK_LCD_ERROR_MAX_ NAME LENGTH 109 PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED 113 PK_LCD_ERROR_OUT_OF_MEMORY 113 PK_LCD_EVENT_GetText 117 PK_LCD_EVENT_LCD_BUTTON_PRESSED 115 PK_LCD_EVENT_MAX NAME LENGTH 109 PK_LCD_GetConfig 118 PK_LCD_GetInfo 119 PK_LCD_Open 119 PK_LCD_ORIENTATION_NORMAL 109 PK_LCD_ORIENTATION_REVERSED 109 User Guide PK_LCD_REGION_FULL_SCREEN 109 PK_LCD_ResetEventHandler 120 PK_LCD_SetBlink 120 PK_LCD_SetConfig 121 PK_LCD_SetEventHandler 122 PK_LCD_SetFontLib 123 PK_LCD_SHIFT_INTERVAL_DEFAULT 110 PK_LCD_SHIFT_INTERVAL_MAX 110 PK_LCD_SHIFT_INTERVAL_MIN 110 PK_LCD_TEXT_LINE_BUFFER_LENGTH 110 PK_LCD_TEXT_LINE_LENGTH 110 PK_LCD_TEXT_LINES 110 PK_LCD_TLCDConfig 104 PK_LCD_TLCDInfo 104 PK_LCD_TLCDRegion 105 PK_LCD_TPikaEvent 105 PK_LCD_UnsetBlink 124 Linux Kernel 19 Linux Utilities 20 Logging 73 Logging in to the Appliance 16 Making a First Asterisk Call 16 Managing the Ramdisk Image Size 45 Modi
42. ERROR_DEVICE_INVALID_HANDLE pg 112 PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg 112 PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg 113 PK_LCD_ERROR_LCD_INVALID_REGION_HORIZONTAL pg 113 PK_LCD_ERROR_LCD_INVALID_REGION_VERTICAL pg 113 PK_SUCCESS Remarks Description The LCD handle returned by PK_LCD_Open pg 119 The pointer to the PK_LCD_TLCDRegion pg 105 defining the area to display the bitmap The pointer to the buffer containing the context of the bitmap pattern Description The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function The LCD is configured in text mode This function should only be called in bitmap mode Either the region or the bitmap parameter passed in is NULL The sum of the horizontalPosition parameter and the horizontalWidth parameter in region is larger than PK_LCD_BITMAP_WIDTH pg 107 The region is too big to be displayed The sum of the verticalPosition parameter and the verticalLength parameter in region is larger than PK_LCD_BITMAP_HEIGHT pg 107 The region is too big to be displayed The function succeeded This function displays a bitmap on the LCD with the specified region parameter and bitmap pattern It will overwrite the original content in that region If this function is called multiple times in succession and there are overlaps the subsequent bitmaps will be always on the top
43. File System Layout pg 71 for more information SD is only mounted if there is a card present USB is only mounted if there is a card present The LCD driver must be installed for use by the autoflash feature Refer to Using the Autoflash Feature pg 65 for more information Autorun scripts contain initialization instructions for each package in the system Scripts in the persistent autorun directory have the format S a number and the package name The scripts are executed in numerical order starting with the lowest number The numbers are used strictly for determining the order in which the files will be executed A separate file must be created for each package that requires initialization Software watchdog timeout 15 seconds User defined initialization steps which are specified in rc local located in the skeleton package In most cases it should not be necessary to modify the contents of the rc S script Any system level application specific steps should be added to rc local Initialization for individual packages should use an autorun script User Guide 43 PIKA Application Development Suite PADS 9 3 System Initialization Options for executing your initialization steps are 1 Use an autorun script This is useful if your package depends on the initialization steps of another package To use an autorun script perform the following steps e Create a file with the initialization steps The number you use in
44. HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_LCD_ERROR_NULL_PARAMETER_ SPECIFIED pg The callback parameter passed in is NULL 113 PK_SUCCESS The function succeeded Remarks Only one callback can be registered at a time The callback function registered later will replace the one registered earlier When the callback is not needed anymore an PK_LCD_ResetEventHandler pg 120 should be called to reset the callback function 15 20 PK_LCD_SetFontLib The PK_LCD_SetFontLib function sets the bitmap library of the ASCII characters to replace to the default one PK_STATUS PK_API PK_LCD_SetFontLib IN TPikaHandle lcdHandle IN PK_CHAR fontLib 3 Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 fontLib The pointer to the font library Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg The fontLib parameter passed in is NULL 113 PK_SUCCESS The function succeeded Remarks The size of the font s bitmap is set to 5x7 With a 1 pixel margin the size of the bitmap for each font is 6x8 As a result the bitmap pattern of each character is 6 bytes long with each byte representing the bitmask of the c
45. INVALID_REGION_VERTICAL pg The sum of the verticalPosition parameter and the verticalLength 113 parameter in region is larger than the maximum number of vertical pixels The region is too big to be displayed The maximum number of vertical pixels can be retrieved by PK_LCD_GetInfo pg 119 0 PK_LCD_ERROR_LCD_BLINK_WAS_NOT_SET pg 113 There is no blink operation set on the region specified by the region parameter PK_SUCCESS The function succeeded Remarks None Notes This function can only be called in bitmap mode otherwise the error code PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg 112 will be returned 124 User Guide 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS Appendix B Timezone Codes The following table lists time zone codes for most countries Countries Afghanistan Albania Algeria American Samoa Andorra Angola Anguilla Antigua and Barbuda Argentina Armenia Aruba Australia Broken Hill and South Australia Australia Lord Howe Island Australia New South Wales Capitol Territory Victoria Australia Northern Territory Australia Queensland Australia Tasmania Australia Western Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium 2 26 2010 2 1 0 403 User Guide Current Time Zone Notation UCT 4 30 CET 1CEST UCT 1 UCT11 CET 1CEST UCT 1 UCT4 UCT4 SAT3 UCT 4 UCT4 CST 9 30CDT LHT 10 30LHDT EST 10E
46. LCD is text mode define PK_LCD_DISPLAY_MODE_TEXT 1 The display mode of the LCD is text mode 15 4 13 PK_LCD_EVENT_MAX NAME_LENGTH Maximum length of an event name define PK_LCD_EVENT_MAX_NAME_LENGTH 80 15 4 14 PK_LCD_ERROR_MAX NAME LENGTH Maximum length of a status code name define PK_LCD_ERROR_MAX_NAME_LENGTH 80 15 4 15 PK_LCD_ORIENTATION_NORMAL The orientation of the LCD is normal define PK_LCD_ORIENTATION_NORMAL 0 The orientation of the LCD is normal 15 4 16 PK_LCD_ORIENTATION_REVERSED The orientation of the LCD is reversed define PK_LCD_ORIENTATION_REVERSED 1 The orientation of the LCD is reversed 15 4 17 PK_LCD_REGION_FULL_SCREEN Convenience definition for the full screen region define PK_LCD_REGION_FULL_SCREEN PK_LCD_TLCDRegion 0 0 PK_LCD_BITMAP_ WIDTH PK_LCD_BITMAP_HEIGHT 2 26 2010 2 1 0 403 User Guide 109 PIKA Application Development Suite PADS 15 5 PK_LCD_DisableLogs 15 4 18 PK_LCD_SHIFT_INTERVAL_DEFAULT Default LCD shift interval in ms define PK_LCD_SHIFT_INTERVAL_DEFAULT 500 Default LCD shift interval in ms 15 4 19 PK_LCD_SHIFT_INTERVAL_MAX Maximum LCD shift interval in ms define PK_LCD_SHIFT_INTERVAL_ MAX 5000 Maximum LCD shift interval in ms 15 4 20 PK_LCD_SHIFT_INTERVAL_MIN Minimum LCD shift interval in ms define PK_LCD_SHIF
47. LCD_ERROR_LCD_INVALID_BRIGHTNESS pg 112 The handle provided is not valid The blinkTime parameter in the PK_LCD_TLCDConfig pg 104 is invalid The brightness parameter in the PK_LCD_TLCDConfig pg 104 is invalid PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg 112 The mode parameter in the PK_LCD_TLCDConfig pg 104 is invalid PK_LCD_ERROR_LCD_INVALID_LINE_NUMBER pg 112 The lineNumber parameter passed in is invalid PK _LCD_ERROR_LCD_INVALID_ORIENTATION pg 112 The orientation parameter in the PK_LCD_TLCDConfig pg 104 is invalid PK_LCD_ERROR_LCD_INVALID_REGION_HORIZONTAL pg 113 The horizontal region parameter passed in is invalid PK_LCD_ERROR_LCD_INVALID_REGION_VERTICAL pg 113 The vertical region parameter passed in is invalid PK _LCD_ERROR_LCD_INVALID_SHIFT_TIME pg 113 The shiftTime parameter in the PK_LCD_TLCDConfig pg 104 is invalid PK_LCD_ERROR_LCD_BLINK_WAS_NOT_SET pg 113 The LCD blinking is not set PK _LCD_ERROR_LCD_NOT_PRESENT pg 113 The LCD is not present in the system PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg 113 A NULL parameter was passed to the function requiring a non NULL value PK_LCD_ERROR_OUT_OF_MEMORY pg 113 Thete is insufficient memory available to execute the function 2 26 2010 2 1 0 403 User Guide 111 PK_LCD_ERROR_LCD_INVALID_REGION _PIKA Application Devel
48. LID_LINE_NUMBER 15 6 7 PK_LCD_ERROR_LCD_INVALID_ORIENTATION 15 6 8 PK_LCD_ERROR_LCD_INVALID_REGION_HORIZONTAL 15 6 9 PK_LCD_ERROR_LCD_INVALID_REGION_VERTICAL 15 6 10 PK_LCD_ERROR_LCD_INVALID_SHIFT_TIME 15 6 11 PK_LCD_ERROR_LCD_BLINK_WAS_NOT_SET 15 6 12 PK_LCD_ERROR_LCD_NOT_PRESENT 15 6 13 PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED 15 6 14 PK_LCD_ERROR_OUT_OF_MEMORY 15 7 PK_LCD_DisplayBitmap 15 8 Events 15 8 1 PK_LCD_EVENT_LCD_BUTTON_PRESSED 15 9 PK_LCD_DisplayString 15 10 PK_LCD_EnableLogs 15 11 PK_LCD_ERROR_GetText 15 12 PK_LCD_EVENT_GetText 15 13 PK_LCD_GetConfig 2 26 2010 2 1 0 403 User Guide 10 10 10 10 10 10 110 111 12 12 12 12 12 12 12 13 13 3 13 13 13 13 114 115 115 115 116 117 117 118 vii PIKA Application Development Suite PADS 15 14 PK_LCD_GetInfo 119 15 15 PK_LCD_Open 119 15 16 PK_LCD_ResetEventHandler 120 15 17 PK_LCD_SetBlink 120 15 18 PK_LCD_SetConfig 121 15 19 PK_LCD_ SetEventHandler 122 15 20 PK_LCD_SetFontLib 123 15 21 PK_LCD_UnsetBlink 124 16 Appendix B Timezone Codes 125 Index a viii User Guide 2 26 2010 2 1 0 403 1 PIKA Application Development Suite PADS Copyright Information COPYRIGHTS Copyright 2010 PIKA Technologies Inc TRADEMARKS PIKA is a registered trademark of PIKA Technologies Inc All other trademarks product names and company names and or logos cited herein
49. NTAL 0x4407 15 6 9 PK_LCD_ERROR_LCD_INVALID_REGION_VERTICAL The vertical region parameter passed in is invalid define PK_LCD_ERROR_LCD_INVALID_REGION_VERTICAL 0x4408 15 6 10 PK_LCD_ERROR_LCD_INVALID_SHIFT_TIME The shiftTime parameter in the PK_LCD_TLCDConfig pg 104 is invalid tdefine PK_LCD_ERROR_LCD_INVALID_SHIFT_TIME 0x4403 15 6 11 PK_LCD_ERROR_LCD_BLINK_WAS_NOT_SET The LCD blinking is not set define PK_LCD_ERROR_LCD_BLINK_WAS_NOT_SET 0x440A 15 6 12 PK_LCD_ERROR_LCD_NOT_PRESENT The LCD is not present in the system define PK_LCD_ERROR_LCD_NOT_PRESENT 0x4409 15 6 13 PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED A NULL parameter was passed to the function requiring a non NULL value define PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED 0x2001 15 6 14 PK_LCD_ERROR_OUT_OF_MEMORY There is insufficient memory available to execute the function define PK_LCD_ERROR_OUT_OF_MEMORY 0x2002 2 26 2010 2 1 0 403 User Guide 113 PIKA Application Development Suite PADS 15 8 Events 15 7 PK_LCD_DisplayBitmap The PK_LCD_DisplayBitmap function displays a bitmap on the LCD in the specified region PK_STATUS PK_API PK_LCD_DisplayBitmap IN TPikaHandle lcdHandle IN PK_LCD_TLCDRegion region IN PK_CHAR bitmap Parameters Parameters lcdHandle region bitmap Return Values Return Values PK_LCD_
50. PIKA TECHNOLOGIES INC PIKA Application Development Suite PADS 2 1 User Guide Copyright c 2010 All rights reserved PIKA Application Development Suite PADS Table of Contents 1 Copyright Information 2 Contacting PIKA Technologies 3 Introduction 3 1 Purpose and Scope 3 2 Assumed Knowledge 3 3 Related Documents 4 Embedded Systems Overview 5 PADS Overview 6 Getting Started with PADS 6 1 Development System Setup and Configuration 6 1 1 System Requirements 6 1 2 Setting up TFTP and NFS 6 1 3 Configuring Serial Access 6 2 Building Software for the Appliance 6 3 Running Software from NFS 6 4 Logging in to the Appliance 6 5 Making a First Asterisk Call 7 Software Package Information 7 1 Base Software 2 26 2010 2 1 0 403 User Guide 12 13 16 16 17 18 iii PIKA Application Development Suite PADS 7 2 Linux Utilities 7 3 PIKA Drivers and SDKs 7 4 Asterisk and Related Packages 7 5 Timezone 7 6 Applications 7 7 Network Applications 7 8 ext2 File System Utilities for USB and SD Media 7 9 Software Update Utilities 7 10 Debugging Utilities 7 11 Samples 8 Navigating the PADS Menu 8 1 Kernel Configuration Menu 8 2 Busybox Configuration Menu 8 3 Advanced Options Menu 8 4 Package Selection Menu 8 4 1 Extra Packages 9 Developing Software for the Appliance 9 1 Design Guidelines for an Embedded System 9 2 Using the Additional Persistent Flash Memory 9 3 System Initialization
51. PK_LCD_Open pg 119 The function returns a handle to use for all subsequent function calls relating to the LCD Configuration information can be set using the function PK_LCD_SetConfig pg 121 The function PK_LCD_GetConfig pg 118 should always be called prior to calling this function This guarantees that all fields including fields added in later releases of this software are set to proper default values Options that can be configured orientation e normal or reversed mode text or bitmap shift time interval in milliseconds to use when scrolling text across the LCD used only in text mode blink time e interval in milliseconds between blinks used only in bitmap mode brightness brightness of the LCD background The default display mode is text Bitmap mode is typically used to display images while text mode is used to display simple text strings To display a text string on the LCD the user application uses the function PK_LCD_DisplayString pg 115 specifying the handle returned from the function PK_LCD_Open pg 119 and the following information about the string string pointer to the character buffer containing the string to be displayed length string length line number line on the LCD on which the string should be displayed User Guide 2 26 2010 2 1 0 403 12 4 Displaying Information on the LCD PIKA Application Development Suite PADS If the length of the string is greater than the wi
52. Partition Layout 11 1 2 Tracking NAND Writes Flash memory has a limited number of write erase cycles and an application that frequently writes to flash may reduce the lifespan of the NAND flash chip A utility is provided to track the writes to the NAND flash and can be used to monitor excessive or rapidly increasing amounts of data written to flash which may indicate a problem with an application To view the amount of data written enter the following at the Linux prompt on the appliance cat proc driver ndfc This value is reset to zero between reboots 11 1 3 NOR Flash This flash memory is 4 megabytes is size and contains the software required to boot the appliance It cannot be used by developers for any other purpose e U Boot 512 Kilobytes e U Boot environment variables 256 Kilobytes e FPGA 256 Kilobytes 62 User Guide 2 26 2010 2 1 0 403 11 2 Creating Software Images PIKA Application Development Suite PADS NOR Flash 4M offset Fcoo oooo oo00 0000 empty 0030 0000 DO2F FFFF fpga 0030 0000 J004 0o00 fpagxxxx rbf 0033 FFFF 0034 0000 env 0004 0000 0037 FFFF u boot 0038 0000 u boot wrp ooos 0000 OO3F FFFF 2 Creating Software Images To create software images for the ramdisk and the persistent file systems enter the command make image on your development computer from the directory lt Your PADS path gt As of PADS release 2 1 x all images are created with a t
53. S This section assumes that e you have installed the appliance according to the instructions in the Getting Started Hardware Installation section of the PIKA Warp the Appliance User Guide you are connected to the appliance using the serial port your serial client is running It is expected that NFS will be the primary method for running software on the appliance during development It is faster to boot using NFS updates to files can be done without taking the time to write new images into flash and depending on the file type being modified without rebooting The kernel ramdisk and persistent file systems can be accessed from your development computer through NFS Description Copy the file kernel wrp from e This image file was created when you built the software using the lt Your PADS path gt images to instructions in the previous section oin your development Ensure that TFTP is running on your development computer machine Ramdisk The mount point is lt Your PADS The mount point was created when you built the software using the Path gt build_warp root instructions in the previous section Ensure that the path in etc exports on your development computer matches this path Ensure that NFS is running on your computer Persistent lt Your PADS To modify persistent data files may be updated on your development file Path gt build_warp toot persistent computer and will be reflected on the appliance immediately
54. STORAGE2 BUILD_DIR root persistent2 Directory for the second additional persistent storage area NOTE The value for this variable can change depending on whether the option Persistent File System on Flash is selected in the Advanced Options Menu pg 38 Refer to Using the Persistent File Systems from Flash pg 86 for details about this option TARGETS Depends on the packages List of targets to be built based on packages selected selected using the menu 10 1 The Package mk File The mk file defines how a package is downloaded configured compiled and installed This section assumes you are familiar with makefile concepts 10 1 1 Variables In the package mk file the following variables are recommended for each package Variable Purpose lt package name gt _VER A version so that you can distinguish between different releases of the package lt package name gt _SOURCE A distinct name for the source that will be obtained It should include the version variable to ensure uniqueness 50 User Guide 2 26 2010 2 1 0 403 10 1 The Package mk File PIKA Application Development Suite PADS Rules lt package name gt _DIR A distinct directory name used for compiling the package It should include the version variable to ensure uniqueness This is the subdirectory into which the source will be unpacked under lt Your PADS path gt build_warp lt package name gt _SITE The location of the package sourc
55. T_INTERVAL_MIN 100 Minimum LCD shift interval in ms 15 4 21 PK_LCD_TEXT_LINE_BUFFER_LENGTH Number of characters in the LCD display line buffer i e the maximum number of characters that can be displayed when scrolling define PK_LCD_TEXT_LINE_BUFFER_LENGTH 40 15 4 22 PK_LCD_TEXT_LINE_LENGTH The maximum number of characters that can be displayed on a single line of the LCD without scrolling define PK_LCD_TEXT_LINE_LENGTH 20 15 4 23 PK_LCD_TEXT_LINES Maximum number of display lines in text mode define PK_LCD_TEXT_LINES 2 15 5 PK_LCD_DisableLogs The PK_LCD_DisableLogs function disables debug logging in PK_LCD PK_STATUS PK_API PK_LCD_DisableLogs 110 User Guide 2 26 2010 2 1 0 403 15 6 Errors PIKA Application Development Suite PADS PK_LCD_ERROR_BASE_GENERAL IN TPikaHandle lcdHandle i Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_SUCCESS 15 6 Errors Macros PK_LCD_ERROR_BASE_ GENERAL pg 112 The function succeeded General Error Codes PK_LCD_ERROR_DEVICE_INVALID_ HANDLE pg 112 PK _LCD_ERROR_LCD_INVALID_BLINK_TIME pg 112 PK_
56. ability to add and modify components to provide value added features when deploying customized versions of the appliance PADS can be used on any Linux distribution and includes all the components necessary to successfully cross compile applications and build software images for the appliance This guide describes how to develop custom applications for the appliance and how to use PADS to build and run the software 2 26 2010 2 1 0 403 User Guide PIKA Application Development Suite PADS 3 3 Related Documents 3 2 Assumed Knowledge We assume you have the following knowledge Linux operating system Makefiles gcc development suite Asterisk knowledge to use the appliance as an Asterisk PBX telephony concepts to create telephony applications for non Asterisk systems 3 3 Related Documents The following documents are related to the PADS User Manual These documents are linked together and constitute the complete set of documentation for the appliance All documents are available at http www pikatechnologies com appliancedownloads PIKA WARP the Appliance User Guide This guide describes installation and configuration of the appliance PIKA WARP the Appliance Hardware Manual This manual describes the appliance base board and plug in modules PIKA WARP the Appliance Release Notes These notes describe the contents of the release including known product issues User Guide 2 26 2010 2 1 0 403 4 PIKA Application Devel
57. able for PADS_PACKAGE X selection from the menu amp amp e Example chan_pika Config in PADS_PACKAGE_Y Both Asterisk and Zaptel Clocking are required and therefore the channel driver will not be displayed and cannot be selected without both of these packages selected User Guide 2 26 2010 2 1 0 403 10 2 Adding Your Package to the Menu PIKA Application Development Suite PADS depends Either package X or Y must be selected for the package to be displayed and available for PADS_PACKAGE _ X selection from the menu PADS_PACKAGE_Y depends If package X is selected the package cannot be selected and will not be shown on the menu IPADS_PACKAGE_X_ or will be removed from the menu when package X is selected Example grandprix Config in Selecting the chan_pika package will remove the grandprix package from the menu and therefore the grandprix package cannot be selected Adding the Package to the Main Menu The file package Config in must contain an entry for your package so that it can be selected form the Package Selection for Target menu The package may be added into the main menu you may add a new section to the menu or you may create a new submenu using the menu endmenu keywords Refer to the examples below Example The following is taken from the Config in for chan_pika Note that it depends on three different packages and that it is included by default config PADS_PACKAGE _CHAN_PIKA bool PIKA C
58. ackage e lt package gt mk makefile that defines how a package is built in PADS Config in specifies information about adding the package to the Package Selection menu Details about these files will be explained in subsequent sections Additional files for each package may include a patch file an autorun directory that contains a file specifying initialization instructions and any other necessary configuration files Further information about initialization instructions can be found under System Initialization pg 42 User Guide 2 26 2010 2 1 0 403 10 PIKA Application Development Suite PADS dl Package source files are placed in this directory when they are initially obtained at compile time either as tarballs downloaded from an FTP site or checked out from a source code repository Currently the only repository supported by PADS is Subversion SVN build_warp This is the top level directory used for compiling packages for the appliance architecture Each package has its own subdirectory which is created when it is unpacked from the dl directory The directory structure created at compile time is used when images for the ramdisk or persistent file system are built The directory build_warp root persistent is the basis for the persistent file system image The directory build_warp root is the directory on which the ramdisk image is based and also can be used as an NFS mount point Global Variables A nu
59. after using either U Boot or autoflash to update the ramdisk is not recommended If the new image is larger than the old image the system will fail to boot and you will need to return to U Boot to repair your system Refer to Troubleshooting for more information As of PADS release 2 1 x or greater the use of the warploader is not recommended Autoflash should be used 2 26 2010 2 1 0 403 User Guide 47 48 PIKA Application Development Suite PADS 10 Adding a Package to PADS This section describes how to add your own applications to PADS and include them in the menu system It also provides more information about using PADS To add a package to PADS take the following steps 1 Add a directory under lt Your PADS path gt package with the name of your package 2 In the new directory add two new files lt package gt mk and Config in 3 Fill in the files lt package gt mk and Config in with information appropriate for your package This will include settings for cross compiling 4 Add your new package to the file lt Your PADS path gt package Config in The following sections describe these steps in more detail In the top level PADS directory lt Your PADS path gt there are three important directories lt Your PADS path gt build_warp dl package Directory Purpose Name package Each package has its own directory containing the files specific to the package Two files must be present for each p
60. andprix Config in source package Icdlib Config in This portion of the file defines a submenu for utilities which is indicated by the use of the menu and submenu keywords menu Utilities source package update utils Config in source package gdb Config in source package e2fsprogs Config in endmenu Additional PADS Makefile Rules to Build Software In addition to the makefile rules for displaying the package selection menu and for building the software a number of other rules are available Rule Description make Displays the main package selection menu menuconfig 58 User Guide 2 26 2010 2 1 0 403 10 3 Additional PADS Makefile Rules to Build PIKA Application Development Suite PADS make defconfig make oldconfig make make clean make dirclean make image make lt package rule gt make lt package rule gt clean 2 26 2010 2 1 0 403 Selects the default set of packages without displaying a menu Preserves the existing package selections and displays a text based menu to select new package options This may be useful for example when upgrading to a new version of PADS and you wish to start with your existing package selections If make menuconfig or make defconfig have not previously been executed this will present a text based version of the menu selections Builds all the packages selected Executes the make clean rule for all the packages selected Note that if you hav
61. aneously Applications that consume significant CPU and memory can compete for resources causing degraded voice quality When designing your application you should consider e Memory management The entire file system ramdisk is loaded into RAM at run time and consumes a predefined amount of memory Applications that use a significant amount of memory may experience reduced performance due to memory paging A ramdisk which includes only the default packages will consume approximately 124 megabytes of RAM almost half of the available 256 megabytes If your application requires significant RAM some techniques to reduce memory usage include the following e Use persistent storage for files that are typically read only Refer to Using the Additional Persistent Flash Memoty pg 41 for alternative locations for file storage Avoid the use of persistent storage for files that require write access during run time and whose contents need not be preserved across reboots Writing to flash is slower than writing to RAM and frequent unnecessary writes may shorten the life of the flash memory It may also impact voice quality for voice applications Consider alternative approaches for files that are written frequently at run time and which may consume a lot of RAM such as logging and voice mails If files such as these are stored in RAM not only will the information be lost after a reboot but RAM may be consumed unnecessarily It is recommended that t
62. annot umount persistent Invalid argument This error will appear if you attempt to unmount any of the persistent files systems persistent persistentl persistent2 when you are running with the persistent file systems on NFS Unmounting is only necessary for example to write the 98 User Guide 2 26 2010 2 1 0 403 14 PIKA Application Development Suite PADS a new image to flash using the warploader if the persistent file systems are in flash Reboot takes a long time When the reboot command is executing immediately after writing large files to the SD for example when using the autoflash utility it may take ten to fifteen seconds for the reboot command to take effect When files are copied to the SD the contents are initially copied into RAM and then written to the SD in the background At reboot time if all the data has not been written the system will pause to finish writing the data before continuing the reboot sequence Do not interrupt this process by pressing the reset button or disconnecting the power to speed up the reboot as the data on the SD may be corrupted Line Status on the LCD is not Updated While Autoflash is in Progress While the autoflash process is updating images updates to the Asterisk line status information displayed on the LCD are disabled to avoid the autoflash status information from being overwritten If two applications attempt to update the LCD simultaneously each application will overwrite other
63. application will execute the script If both the new flash inc and the old style autorun script exist the autorun script will be ignored and the autoflash application will function as described above User Guide 2 26 2010 2 1 0 403 12 1 File System Layout PIKA Application Development Suite PADS 12 Advanced Topics The following sections contain important information for certain types of applications you may be developing and for more advanced system setup of the appliance e File System Layout pg 71 Logging pg 73 e Network Settings pg 76 Displaying Information on the LCD pg 77 Alternative Methods for Writing Images to Flash pg 80 e Using the Persistent File Systems from Flash pg 86 e U Boot Environment Variables pg 87 Retrieving System Identifcation Information pg 90 e Modifying the Hardware Discovery Script pg 90 12 1 File System Layout Software ramdisks use the normal RAM in main memory as if it were a partition on a hard drive The appliance ramdisk contains the root file system which is loaded into RAM at boot time and therefore changes are lost upon reboot Three temporary file systems are created at the following mount points in the ramdisk to limit the amount of RAM that can be used by these commonly accessed directories Space in RAM is only used when files are written to these directories space is not set aside up front Refer to the file persistent etc fstab for s
64. applications information The Asterisk line state display will be enabled once the autoflash process has completed Ramdisk image fails to boot after using the warploader to update the system The output at the serial console shows the ramdisk failing to boot 8 455538 RAMDISK Compressed image found at block 0 14 318905 RAMDISK incomplete write 28 32768 90112000 15 550254 VES Mounted root ext2 filesystem 15 555048 Freeing unused kernel memory 144k init 15 561938 attempt to access beyond end of device 15 566882 ram0 rw 0 want 187024 limit 176000 15 571670 EXT2 fs error device ram0 ext2_get_inode unable to read inode block inode 46771 block 93511 15 581803 Remounting filesystem read only 15 586091 Kernel panic not syncing No init found Try passing init opt SS m m SS SS See ion to kernel 15 594518 Rebooting in 1 seconds In U boot the value of the environment variable ramdisk_size indicates the number of bytes in hexadecimal that will be written from NAND into RAM If this value is too small the image will fail to boot Both U Boot and autoflash update this value dynamically to match the size indicated in the image trailer The warploader does not update this information If you have previously written an image to flash using the autoflash utility or using U Boot version 1 3 0 80 or greater that is smaller than an image subsequently written by the warploader the image will fail to b
65. ce if it dies e provide information about the service status and the length of time the service has been running e log service error messages The following services are under the control of the daemontools e Asterisk e dropbear ntpd The following table lists some of the commonly used daemontools commands Command Purpose svstat service lt setrvice name gt Indicates whether the service is up and if so how many seconds it has been up svc u service lt service name gt Starts a service if it dies it will be restarted svc d service lt service name gt Stops a service and does not restart it after it stops svc o service lt service name gt Starts a service once but will not restart it if it dies svc k service lt service name gt Kills a service that is hung but it will be restarted after it is killed For information and support refer to http cr yp to daemontools html Linux Utilities The following table describes the Linux utilities that are available outside of Busybox These packages have no dependencies User Guide 2 26 2010 2 1 0 403 7 3 PIKA Drivers and SDKs PIKA Application Development Suite PADS Package Package Present Description directory in name Default Software udev udev yes This utility provides dynamic device management If a new device is added to the system e g SD card or USB device a rule names and creates a device node and configures the device for use in the file sys
66. ckage directory lt Your PADS Path gt packages ntpd are used to initialize and configure the NTP service The file ntp conf contains configuration information for the service including the list of servers used for time synchronization This file is copied to persistent etc when the ntpd package is built The file run starts the NTP service This file is copied to service ntpd when the ntpd package is built The file S32ntpd copied to persistent autorun when ntpd is built sets the date initially using ntpdate This ensures that the time is correct before the NTP service starts After system initialization the ntpd service maintains the correct time using the servers specified in the file persistent etc ntp conf for synchronization The ntpd service is controlled by Linux Service Management pg 20 This options selects the BusyBox web server and configures it The default location for web pages is persistent var www htdocs User Guide 29 PIKA Application Development Suite PADS 7 8 ext2 File System Utilities for USB and SD Forwarding smtp no Two mail server packages are available under the Forwarding SMTP sub menu SMTP nullmailer ssmtp very simple but obsolete configuration file etc ssmtp nullmailer more powerful and actively supported configuration file etc nullmailer remotes To use a mail server the appropriate configuration file must be updated with the proper settings for your
67. containing the following settings service tftp disable no socket_type dgram protocol udp wait yes user SOO server usr sbin in tftpd server_args s tftpboot per_source 11 cps 100 2 flags IPv4 Start the xinetd and tftp services using the appropriate command for your Linux distribution Both the xinetd and tftp services should be included in the list of services to start at boot time using the appropriate mechanism for your Linux distribution e g chkconfig update re d or rc update Create a directory called tftpboot on your development computer If you do not want to create the directory at the root of the file system you can create a directory elsewhere and create a symbolic link to tftpboot To give all users full permissions use the following command chmod a rwx tftpboot To check if tftp is running use the netstat command netstat a grep tftp should return 2 26 2010 2 1 0 403 User Guide 9 Configuring Serial Access PIKA Application Development Suite PADS 6 1 Development System Setup and Configuration udp 0 0 tftp Refer to the following websites for more information e Installing TFTP Describes installing the TFTP server software using various package managers and configuring TFTP for various Linux distributions e Installing Linux Software Describes using various package managers and installing from source Setting up NFS The appliance can run soft
68. d in this temporary file system Changes to this file system are temporary and are lost the next time the appliance is rebooted The appliance uses a special section of the flash memory formatted as a Journaling Flash File System version 2 JFFS2 for persistent data such as configuration information Refer to section Using Flash Memory to Run Your Application pg 61 for information about writing images into flash memoty 2 26 2010 2 1 0 403 User Guide Setting up TFTP and NFS PIKA Application Development Suite PADS 6 1 Development System Setup and Configuration Getting Started with PADS The following sections describe how to e set up your development computer to use PADS e build software to run on the appliance with the default packages selected in PADS run the new software on the appliance using NFS Development System Setup and Configuration A separate Linux system is required to use PADS to cross compile applications and to run software on the appliance The following sections describe the steps to set up your Linux development computer to use PADS System Requirements Your development computer requires the following Linux packages in order to use PADS e A serial client e g minicom on Linux or HyperTerminal on Windows TFTP Trival File Transfer Protocol Server NFS Network File System Server e WGET e Subversion SVN 1 4 or greater CentOS 4 RedHat 4 will likely need an update to obtain a new
69. do_read_inode_internal appears on the serial console at system startup Messages such as JFFS2 warning 849 jffs2_do_read_inode_internal Truncating ino 0001008 to 29976 bytes failed because it only had 24576 bytes to start with are commonly seen in embedded systems and do not indicate a problem 2 26 2010 2 1 0 403 User Guide 101 PIKA Application Development Suite PADS 15 1 PK_LCD_Clear 15 Appendix A LCD API Reference The following sections provide reference information for the LCD library API Functions PK_LCD_Clear pg 103 PK_LCD_Close pg 106 PK_LCD_DisableLogs pg 110 PK_LCD_DisplayBitmap pg 114 PK_LCD_DisplayString pg 115 PK_LCD_EnableLogs pg 116 PK_LCD_ERROR_GetText pg 117 PK_LCD_EVENT_GetText pg 117 PK_LCD_GetConfig pg 118 PK_LCD_GetInfo pg 119 PK_LCD_Open pg 119 PK_LCD_ResetEventHandler pg 120 PK_LCD_SetBlink pg 120 PK_LCD_SetConfig pg 121 PK_LCD_SetEventHandletr pg 122 PK_LCD_SetFontLib pg 123 PK_LCD_UnsetBlink pg 124 102 The PK_LCD_Clear function is a utility function that sets the LCD to the blank state both in text mode and bitmap mode In bitmap mode it will clear the content of the LCD and cancel all the blink operations set before In text mode the content of all line buffers will be cleared The PK_LCD_Close function closes down the LCD and invalidates its handle The PK_LCD_DisableLogs fu
70. dth of the LCD the string will scroll across the screen In text mode the previous contents of the display are cleared before displaying the new string To display a bitmap on the LCD the user application uses the function PK_LCD_DisplayBitmap pg 114 specifying the handle returned from the function PK_LCD_Open pg 119 and the following information about the bitmap region starting horizontal and vertical pixels e horizontal and vertical sizes bitmap e the pattern to display If there is already content in the section of the LCD display specified in the region parameter calling the display function will overwrite the contents To start with a blank display the user application can use the function PK_LCD_Clear pg 103 before calling the display function The functions PK_LCD_SetBlink pg 120 and PK_LCD_UnsetBlink pg 124 can be used in bitmap mode to cause a region of the LCD to blink and stop blinking Once the user application has finished using the LCD the function PK_LCD_Close pg 106 should be used to free the associated resources It is a good practice to use the function PK_LCD_Clear pg 103 to clear the display before closing To receive notifications when the LCD button is pressed the user application must attach an event handler to the LCD handle using the PK_LCD_SetEventHandler pg 122 and specify the following information handle LCD handle returned from PK_LCD_Open pg 119 callback
71. dule lt gt module capable Applets rchival Utilities gt prceutiils onsole Utilities gt ebian Utilities gt ditors gt inding Utilities gt nit Utilities gt ogin Password Management Utilities gt inux Ext2 FS Progs gt inux Module Utilities gt inux System Utilities gt N scellaneous Utilities gt N tworking Utilities gt cocess Utilities gt hells gt ystem Logging Utilities gt unit Utilities gt psvd utilities gt oad an Alternate Configuration File ave Configuration to an Alternate File lt x Exit gt lt Help gt Advanced Options Menu The following shows the advanced options menu Arrow keys navigate the menu lt Enter gt selects submenus gt Highlighted letters are hotkeys Pressing lt Y gt selectes a feature while lt N gt will exclude a feature Press lt Esc gt lt Esc gt to exit lt gt for Help lt gt for Search Legend feature is selected feature is ystem on Fl oot ramdisk overhead llow experimental options lt Exit gt lt Help gt The options presented in this menu are intended for advanced users Refer to Using the Persistent File Systems from Flash pg 86 and Managing the Ramdisk Image Size pg 45 for information about using these options 38 User Guide 2 26 2010 2 1 0 403 8 4 Package Selection Menu PIKA Application Development Suite PADS Extra Packages All
72. e The location can be an FTP site or an SVN repository Other variables can be defined as required to improve the readability of the mk file Example This example is taken from the file dropbear mk Note the use of the version number as part of the package source name and the package build directory The source is obtained from PIKA s FTP site ifeq strip PADS_WARDP y SSH_VER 0 50 SSH_DIR BUILD_DIR dropbear SSH_VER SSH_SOURCE dropbear SSH_VER tar gz SSH_SITE ftp ftp pikatech com outgoing pads SSH_UNZIP zcat endif This example is taken from chan_pika mk and shows an example of variable definitions for a package that obtains the source from an SVN repository Note that the variable CHAN_PIKA_VER is actually a path within the SVN repository and it is used in the definition of the directory name used for compiling the package CHAN_PIKA_SITE http svn pikatech com CHAN_PIKA_ REPOSITORY chan_pika CHAN_PIKA_VER tags 1 1 0 62 CHAN_PIKA_SVN_REV head CHAN_PIKA_DIR_VER shell echo CHAN_PIKA_VER sed s g CHAN_PIKA_DIR BUILD_DIR chan_pika CHAN_PIKA_DIR_VER CHAN_PIKA_SOURCE chan_pika CHAN_PIKA_DIR_VER Rules A set of rules must be defined in the mk file for the package Each rule has a prerequisite that determines the order of tule execution The following rules may be defined 2 26 2010 2 1 0 403 User Guide 51 Rules PIKA Application Development Suite PADS 10 1 The Package mk
73. e LCD service If the use count is equal to zero it frees all resources allocated by the LCD 15 4 LCD Constants Macros PK_LCD_BITMAP_HEIGHT pg 107 PK_LCD_BITMAP_WIDTH pg 107 PK_LCD_BLINK_INTERVAL_DEFAULT pg 107 PK_LCD_BLINK_INTERVAL_MAX pg 108 106 User Guide Maximum number of vertical pixels in bitmap mode Maximum number of horizontal pixels in bitmap mode Default LCD blink interval in ms Maximum LCD blink interval in ms 2 26 2010 2 1 0 403 15 4 LCD Constants PK_LCD_BLINK_INTERVAL_MIN pg 108 PK_LCD_BRIGHTNESS_0 pg 108 PK_LCD_BRIGHTNESS_100 pg 108 PK_LCD_BRIGHTNESS_25 pg 108 PK_LCD_BRIGHTNESS_50 pg 108 PK_LCD_BRIGHTNESS_75 pg 108 PK_LCD_DISPLAY_MODE_BITMAP pg 109 PK_LCD_DISPLAY_MODE_TEXT pg 109 PK_LCD_EVENT_MAX_NAME_LENGTH pg 109 PK_LCD_ERROR_MAX_NAME_LENGTH pg 109 PK_LCD_ORIENTATION_NORMAL pg 109 PK_LCD_ORIENTATION_REVERSED pg 109 PK_LCD_REGION_FULL_SCREEN pg 109 PK_LCD_SHIFT_INTERVAL_DEFAULT pg 110 PK_LCD_SHIFT_INTERVAL_MAX pg 110 PK_LCD_SHIFT_INTERVAL_MIN pg 110 PK_LCD_TEXT_LINE_BUFFER_LENGTH pg 110 PK_LCD_TEXT_LINE_LENGTH pg 110 PK_LCD_TEXT_LINES pg 110 PIKA Application Development Suite PADS PK_LCD_BLINK_INTERVAL_ MAX Minimum LCD blink interval in ms The brightness of the LCD back lighting is 0 percent The brightness of the LCD back lighting is 100 percent The brightness of the LCD back
74. e been selected press s to save changes or q to quit Compilation will continue 7 5 Timezone This package provides a utility that allows you to specify information about your time zone so that the date and time used on the appliance reflect local time instead of Universal Time UTC The package directory name is zoneinfo and it has no dependencies Time zone information for both the Americas and Europe is included in the software image shipped with the appliance A separate menu option to include full time zone information for all countries is also provided To use the utility enter the following command at the Linux prompt on the appliance timezone You will be presented with a set of menus to select your time zone If your city does not appear in the list chose the one closest to you Changes will take affect immediately for the appliance itself Asterisk must be restarted to use the new time zone setting If you do not wish to install the Timezone Info package time zone information can be set by including the following line in the files persistent autorun S32ntpd and in persistent etc localenv export TZ lt time zone code gt Appendix B pg 125 lists time zone codes for most countries You will need to reboot your system for the changes to take effect Note that Asterisk will use UTC unless the Timezone Info package is used 2 26 2010 2 1 0 403 User Guide 27 PIKA Application Development Suite PADS
75. e device is used To run the astmanproxy application in debug mode execute the following commands at the Linux prompt on the appliance killall astmanproxy astmanproxy d lt path gt The lt path gt specifies the directory to which the logs should be written If no path is specified logs will be generated to persistent var log asterisk astmanproxy log Use of debug mode should be limited as the logs will consume space on the persistent file system Note that the astmanproxy application is disabled while autoflash operations are executing Refer to Using the Autoflash Feature pg 65 for more information Customizing Asterisk A set of default Asterisk options has been preselected To use different Asterisk features select the Asterisk Custom Settings option under the Asterisk menu When Asterisk is compiled the following menu will be presented 26 User Guide 2 26 2010 2 1 0 403 7 6 Applications PIKA Application Development Suite PADS KRAAAAKKAKAAEKEEAKEKKEEREEREEEERREEERE Asterisk Module Selection k e a a a a a a a a a a a a a a a a a a a a a a Press h for help gt Applications Call Detail Recording Channel Drivers Codec Translators Format Interpreters Dialplan Functions PBX Modules Resource Modules 9 Voicemail Build Options 10 Compiler Flags 11 Module Embedding 12 Core Sound Packages 13 Music On Hold File Packages 14 Extras Sound Packages QAKAK BONE When the required features hav
76. e located on your development computer The additional persistent file systems will be included in the NFS mount point at lt Your PADS 2 26 2010 2 1 0 403 User Guide 41 PIKA Application Development Suite PADS 9 3 System Initialization Path gt build_warp root persistentl and lt Your PADS Path gt build_warp root persistent2 Files changed in these directories will immediately be reflected on the appliance 9 3 System Initialization User applications may need to perform certain actions during system startup This sections describes the initialization sequence and how to include application initialization steps into the process The file etc inittab contains the set of actions that the appliance follows for system initialization shutdown and actions for normal operations syslogd At present the only actions for normal operation are those that spawn processes e getty listens for input on the serial port e svscan service monitoring process refer to Linux Service Management pg 20 The script rc 0 included with the skeleton package contains the steps to execute upon system shutdown To avoid data loss the script ensures that any data buffered in RAM is written to permanent storage SD USB persistent partitions in flash and unmounts the SD and USB This script will not execute on a hard reset and therefore to avoid data loss or file system corruption it is advisable to perform a software rese
77. e of only your package application when there have been no other changes to other packages For example make chan_pika clean will execute directly the clean rule defined in chan_pika mk User Guide 59 60 PIKA Application Development Suite PADS 10 3 Additional PADS Makefile Rules to Build make This will execute the dirclean rule only for the specified package This package specific rule can be used lt package regardless of whether the package has been selected in the menu This may be useful if you want to tule gt dirclean start with a fresh copy of your source code For example make chan_pika dirclean will execute directly the dirclean rule defined in chan_pika mk Typically this will remove the package directory from the build_warp directory however this will not normally delete the downloaded package source in the directory lt Your PADS path gt dl User Guide 2 26 2010 2 1 0 403 11 1 Flash Memory Partition Layout PIKA Application Development Suite PADS NAND Flash 11 Using Flash Memory to Run Your Application Software is typically run from flash memory during testing once initial development has been completed and when the software is ready for deployment This section provides information about how to write software to flash and other important information about using the flash memory e Flash Memory Partition Layout pg 61 Describes the flash chips and flash memory layout e Creating Software Image
78. e region height The vertical height of the region 15 2 4 PK_LCD_TPikaEvent The PK_LCD_TPikaEvent structure is the basic vehicle for passing asynchronous data to the user application typedef struct PK_UINT id TPikaHandle handle PK_TIMESTAMP_MS timestamp PK_VOID userData PK_UINTPTR p0 PK_UINTPTR pl PK_UINTPTR p2 PK_LCD_TPikaEvent Members Members Description id The event id 2 26 2010 2 1 0 403 User Guide 105 PIKA Application Development Suite PADS handle timestamp userData po pl p2 15 4 LCD Constants The handle of the object raising the event The time the event was raised in milliseconds since the computer was started The user data associated with the object see PK_LCD_SetEventHandler pg 122 The first parameter of the event The second parameter of the event The third parameter of the event 15 3 PK_LCD_Close The PK_LCD_Close function closes down the LCD and invalidates its handle PK_STATUS PK_API PK_LCD_Close IN TPikaHandle lcdHandle Parameters Parameters lcdHandle Return Values Return Values PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg PK_SUCCESS Remarks 112 Description The LCD handle returned by PK_LCD_Open pg 119 Description The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function The function succeeded This function decreases the use count of th
79. e unselected any packages from the menu the make clean rule for those packages will not be executed Executes the make dirclean rule for all the packages selected Additionally it will remove the following directories lt Your PADS path gt build_warp lt Your PADS path gt images e Any persistent directories This rule allows you to start fresh with a new build using previously downloaded source code for all previously selected packages Note that it does not delete the dl directory This will build the ramdisk and persistent file system images based on the files in the directory lt Your PADS path gt build_warp root Note that the kernel image is built when make is executed Refer to section Creating Software Images pg 63 for a complete description This will execute the main package rule defined in the lt package gt mk file This package specific rule can be used regardless of whether the package has been selected in the menu This may be useful if you need to recompile your package application when there have been no other changes to other packages Note that it will not build any of the package dependencies specified on the TARGETS line For example make chan_pika will not build the asterisk package This will execute the clean rule only for the specified package This package specific rule can be used regardless of whether the package has been selected in the menu This may be useful if you need to perform a fresh compil
80. ear source It specifies the ARCH and location of the compiler as options when calling make e Copies configuration files into the persistent storage The clean uses the clean rule defined in the dropbear source Makefile It also removes any files that were installed as part of the dropbear rule The dirclean rule removes the dropbear build directory 2 26 2010 2 1 0 403 User Guide 53 Rules PIKA Application Development Suite PADS 10 1 The Package mk File Additional Variables SSH_CONFIGURE_OPTS host powerpce linux target powerpc linux HOSTCC gcc CC ppc_4xxFP gcee ARCH ARCH prefix TARGET_DIR usr SSH_ETC PERSISTENT_STORAGE etc dropbear DL_DIR SSH_SOURCE WGET P DL_DIR SSH_SITE SSH_SOURCE SSH_DIR unpacked DL_DIR SSH_SOURCE SSH_UNZIP DL_DIR SSH_SOURCE tar C BUILD_DIR TAR_OPTIONS touch SSH_DIR unpacked SSH_DIR configured SSH_DIR unpacked cd SSH_DIR configure SSH_CONFIGURE_OPTS touch SSH_DIR configured dropbear SSH_DIR configured MAKE CC TARGET_CC BIN_DIR TARGET_DIR ARCH ARCH CROSS_COMPILE CROSS_COMPILE C SSH_DIR PROGRAMS dropbear dhclient dropbearkey dropbearconvert scp MAKE CC TARGET_CC BIN_DIR TARGET_DIR ARCH ARCH CROSS_COMPILE CROSS_COMPILE C SSH_DIR PROGRAMS dropbear dbclient dropbearkey dropbearconvert scp install mkdir p SSH_ETC f SSH_ETC dropbear_ds
81. ecordings such as IVR prompts created on your x86 based development computer will require appropriate code in your application to interpret the headers correctly when the files are played from within your application e Any application that communicates data across a network with other applications should respect network byte ordering for messaging 9 2 Using the Additional Persistent Flash Memory Two additional partitions are provided in flash memory for user defined purposes This space can be used for as part of a memory management strategy or for data that must survive system reboots The partitions are shown in the section NAND Flash pg 61 as persistent 1 and persistent 2 In your application mk file in the main package target section copy the appropriate files into either persistent 1 or persistent 2 using the following makefile variables PERSISTENT1_STORAGE persistent flash memory partition PERSISTENT2_STORAGE persistent2 flash memory partition make image will automatically create images for the additional partitions e persistent image name persistentl wrp e persistent2 image name persistent2 wrp The additional partitions will be mounted at run time as persistent1 and persistent2 If the option Persistent File System on Flash is not selected refer to Advanced Options Menu pg 38 for more information in addition to the regular persistent file system both persistentl and persistent2 will b
82. em e2fsck dev mmcblk0p1 umount dev sdal nmounts partition 1 on the USB drive and does a sanity check on the file system e2fsck dev sdal Before removing an SD card or USB device from a live system you must unmount the device from the file system or data may be lost Note that if any applications have files open on the device e g Asterisk the applications must be stopped first Enter the following command at the Linux prompt on the appliance before removing the USB device umount mnt usb Enter the following command at the Linux prompt on the appliance before removing the SD card umount mnt sd Mote information about file systems is provided in section File System Layout pg 71 For more information about the SD slot and USB port refer to Using an SD Card and Using the USB Port in the PIKA WARP the Appliance User Guide 2 26 2010 2 1 0 403 User Guide 31 PIKA Application Development Suite PADS 7 11 Samples 7 9 Software Update Utilities The PIKA Update Utilities package can be selected from the Utilities menu and the package directory name is update utils It requires the LCD library to display autoflash status information on the LCD and requires the udev package to support hot insertion for the SD card and USB devices Version 2 0 x and up of the update utils package provides three utilities autoflash refer to Using the Autoflash Feature pg 65 utility to automatically update multiple software
83. equested the autoflash process will abort If any files or directories to back up do not exist the process will abort If there is a problem restoring the data the copy of the backup data will be left in place to allow the data to be restored manually The system automatically reboots at least once to activate the new images An additional reboot may be required if any of the persistent file systems are replaced This ensures that the persistent file systems are unmounted properly before User Guide 2 26 2010 2 1 0 403 11 3 Using the Autoflash Feature PIKA Application Development Suite PADS updating them The LCD provides progress information and the LCD button can be used to abort the reboot process The process may be aborted by pressing the button before images are updated and before the reboot required to replace the persistent file systems Once the images have been replaced the system will reboot automatically and there is no opportunity to abort at this point Progress and error information are also captured in the file flash log which is located in the flash directory IMPORTANT e This utility is compatible only with images that have a trailer image files created with a wrp extension The trailer information is used to optimize RAM usage when updating the ramdisk and to validate all image types Refer to section Creating Software Images pg 63 for information about image trailers Any files without a trailer w
84. er a third party repository or PIKA s SVN repository Refer to Software Package Information pg 17 for descriptions of the individual packages that PIKA makes available PADS provides the ability to build software images that can be stored in the flash memory Images are a collection of softwate programs combined into a single binary file The following images can be created using PADS e U Boot bootloader Kernel e Ramdisk e Persistent file systems 6 User Guide 2 26 2010 2 1 0 403 Program bootloader PIKA Application Development Suite PADS Description The bootloader is the program responsible for configuring the FPGA e performing basic hardware validation e loading the operating system also referred to as the kernel into memory It then transfers control to the operating system to continue processing The bootloader used by the appliance is called U boot The kernel is responsible for initializing the hardware and loading the main program into memory The appliance uses a modified version of the open source Linux kernel version 2 6 31 7 PIKA has modified the code for use with the appliance Software ramdisks use the main memory as if it were a partition on a hard drive The appliance ramdisk contains an ext2fs based temporary file system using a standard Linux file system layout which is loaded into RAM at boot time All the programs that run on the appliance e g libraries applications Asterisk are locate
85. er version e MAKE e AUTOCONF e AUTOMAKE e LIBTOOL e NCURSES 5 4 or greater NCURSES DEVEL 5 4 or greater e PATCH e PATCHUTILS e SSH client e GCC 4 x or greater CentOS 4 RedHat 4 will likely need an update to obtain a newer version e module init tools 3 2 or later CentOS 4 RedHat 4 will likely need an update to obtain a newer version e ZLIB_DEVEL SELinux and any firewall software must be disabled on your development computer to run TFTP and NFS 8 User Guide 2 26 2010 2 1 0 403 6 1 Development System Setup and Configuration PIKA Application Development Suite PADS Setting up TFTP and NFS Setting up TFTP and NFS Setting Up TFTP A TFTP server must be running on your development computer to load software on to the appliance over the network Software accessed via TFTP is loaded into memory before it is copied into flash memory TFTP is controlled by the extended Internet services daemon xinetd which is responsible for starting services related to Internet access The xinetd package must be installed to use TFTP If your Linux distribution supports a package manager such as rpm yum Red Hat based systems or apt Debian use it to install the xinetd and tftp server packages If your Linux distribution does not support a package manager obtain the source for the xinetd and tftp packages compile and install them on your system In the directory etc xinetd d ensure that there is a configuration file called tftp
86. es Refer to the file flash log in the flash directory for more information Rebooting the system or executing the command autoflash from the command line will re initiate the autoflash procedure If the condition that caused the failure has been resolved the procedure should complete successfully The current autoflash process has failed for an unspecified reason Refer to the file flash log in the flash directory for more information User Guide 69 Cannot Run Autoflash from NFS Backup failure Device Out of Space Invalid line in flash inc Invalid parameter in flash inc PIKA Application Development Suite PADS 11 3 Using the Autoflash Feature The autoflash process cannot be used when running from NFS The process will abort There is insufficient space to back up the list of requested files The process will abort The file flash inc contains a line that is incorrectly formatted The process will abort Verify that all entries are spelled correctly and that lines do not contain hidden characters The file flash inc contains a line that is formatted correctly but the entries do not match either BACKUP or IMAGE_DIR Verify that all entries are spelled correctly Backward Compatibility with Autorun Scripts 70 The previous version of the autoflash application which used an autorun script file will still function as before If there is an autorun script in mnt sd or mnt usb the autoflash
87. etEventHandler function reset the callback function used to notify events generated by LCD PK_STATUS PK_API PK_LCD_ResetEventHandler IN TPikaHandle lcdHandle IN PK_LCD_Callback callback Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 callback The function pointer to the callback function Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_LCD_ERROR_NULL_PARAMETER_ SPECIFIED pg The callback parameter passed in is NULL 113 PK_SUCCESS The function succeeded 15 17 PK_LCD_SetBlink The PK_LCD_SetBlink function will set a region in the LCD to blink with the speed specified by the displayBlinkTime parameter in the configure struct 120 User Guide 2 26 2010 2 1 0 403 15 18 PK_LCD_SetConfig PIKA Application Development Suite PADS PK_STATUS PK_API PK_LCD_SetBlink IN TPikaHandle lcdHandle IN PK_LCD_TLCDRegion region i Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 region pointer to the PK_LCD_TLCDRegion pg 105 that defines the area set to blink Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function
88. f Refer to Network Settings pg 76 for more information about network information settings The IP address of your network gateway the default is 0 0 0 0 The netmask of your network the default is 255 255 255 0 The directory where you have compiled the appliance code lt Your PADS path gt build_warp root Ensure that the path specified matches the path in the file etc exports described in Setting up TFTP and NFS pg 9 run net_nfs e Instructs the bootloader to load the kernel via TFTP and to run the ramdisk from the NFS mount point specified in the rootpath environment variable By default it is set to run nand_boot which boots both the kernel and ramdisk from flash memoty Refer to U Boot Environment Variables pg 87 for a full list and description of all the U Boot environment 2 26 2010 2 1 0 403 User Guide 15 PIKA Application Development Suite PADS 6 5 Making a First Asterisk Call variables To change U Boot settings enter the command reboot from the Linux prompt on the appliance and then interrupt the boot process by pressing any key as described above to get back to the U Boot prompt 4 Logging in to the Appliance When the appliance is booted you will be presented with the login prompt on the serial console To login use the following e Userid root e Password pikapika To change the root password enter the following at the Linux command prompt on the appliance passwd root Follow
89. f the LCD display in text mode and bitmap mode typedef struct struct PK_UINT characters PK_UINT lines textMode struct PK_UINT width PK_UINT height bitmapMode PK_LCD_TLCDInfo Members Members textMode 104 Description Dimensions related to text mode User Guide 2 26 2010 2 1 0 403 15 2 LCD Structures Unions and Enumerations PIKA Application Development Suite PADS PK _LCD_TPikaEvent characters The maximum number of characters that can be displayed on one line of the LCD This number can be larger than the physical width of the LCD In that case the string will be scrolled automatically using the shiftTime parameter in the config structure Default is PK_LCD_TEXT_LINE_BUFFER_LENGTH pg 110 40 lines The maximum number of lines that can be displayed on the LCD Default is PK_LCD_TEXT_LINES pg 110 2 bitmapMode Dimensions related to bitmap mode width The maximum number of horizontal pixels Default is PK_LCD_BITMAP_WIDTH pg 107 160 height The maximum number of vertical pixels Default is PK_LCD_BITMAP_HEIGHT pg 107 32 15 2 3 PK_LCD_TLCDRegion There are no defaults for this since it is application specific typedef struct PK_UINT x PK_UINT y PK_UINT width PK_UINT height PK_LCD_TLCDRegion Membets Members Description x The start of horizontal position of the region y The start of vertical position of the region width The horizontal width of th
90. fying the Hardware Discovery Script 90 NAND Flash 61 Navigating the PADS Menu 34 Network Applications 28 Network Settings 76 NOR Flash 62 Package Selection Menu 39 2 26 2010 2 1 0 403 17 PIKA Application Development Suite PADS PADS Overview 6 PIKA Drivers and SDKs 21 W Purpose and Scope 3 Writing Software Images to Flash Using the Warploader 80 R Writing Software Images to Flash Using U Boot 84 Related Documents 4 Retrieving System Identifcation Information 90 Rules 51 Running Software from NFS 13 S Samples 33 Setting up TFTP and NFS 9 Skeleton File System 19 Software Package Information 17 Software Update Utilities 32 System Initialization 42 System Requirements 8 T The Package mk File 50 Timezone 27 Tracking NAND Writes 62 Troubleshooting 97 U Boot Environment Variables 87 pdating U Boot and the FPGA 85 sing the Additional Persistent Flash Memory 41 U U Using Flash Memory to Run Your Application 61 U Using the Autoflash Feature 65 U sing the Persistent File Systems from Flash 86 y Variables 50 2 26 2010 2 1 0 403 User Guide c
91. ge provides driver support for the appliance TDM interfaces FXS FXO and BRI ports and the audio ports PIKA HMP also provides a low level API for developing telephony applications including VoIP and voice processing such as record play DTMF detection tone detection and generation and voice detection For more information about using PIKA HMP to build telephony applications refer to the HMP documentation which is available at SDK downloads amp docs for HMP Boards on the PIKA website The HMP package is required for telephony applications with or without Asterisk PIKA GrandPrix GP is a software layer on top of the HMP low level API that makes it easier and faster for designers to develop user applications based on PIKA hardware and software It removes most of the in depth knowledge required to develop user applications to make calls using PIKA hardware play and record files and perform media analysis such as digit and tone detection call progress and call analysis At the same time it has the flexibility to co exist with the low level API For more information about using GP to develop telephony applications refer to the GP documentation which is available at SDK downloads amp docs for HMP Boards on the PIKA website The PIKA Channel Driver for Asterisk described in section Asterisk pg 23 includes its own copy of PIKA Grandprix Choose GrandPrix if you want to develop non Asterisk telephony applications using the app
92. h limited computer hardware resources processing power memory Some embedded systems include an operating system which is referred to as an embedded operating system It can be a very small operating system that was developed specifically for use with embedded systems or it can be a sttipped down version of a system that is commonly used on general purpose computers such as Linux Development for embedded systems is done on a separate computer because the embedded platform does not have the resources hardware or software to support compiling and linking programs The computer used for development is typically a desktop PC and because it usually uses a different processor than the embedded target system the process of producing machine code for a different processor is referred to as cross compiling 2 26 2010 2 1 0 403 User Guide PIKA Application Development Suite PADS 5 5 PADS Overview PADS is designed to provide a user friendly open source framework to allow developers to easily create custom applications for the appliance PADS simplifies embedded development by hiding the more complex aspects of embedded tool kits This section describes the high level concepts of the PADS framework PADS is based on the Buildroot framework Buildroot is a set of Makefiles and patches that makes it easy to generate a cross compilation tool chain and root file system for a target Linux system using the uClibe library Buildroot is useful ma
93. h the default kernel settings For specialized applications alternative kernel settings may be required in which case Custom Kernel Settings may be selected If Custom Kernel Options is selected the following menu will be shown when the kernel component is compiled after entering make to begin compiling the software Navigate the menu and select the required kernel options After exiting the top level kernel configuration menu kernel compilation will continue NOTE If you have previously compiled the kernel and then select Custom Kernel Options you will need to execute make linux clean before entering make to begin compilation 2 26 2010 2 1 0 403 User Guide 35 PIKA Application Development Suite PADS 8 2 Busybox Configuration Menu I 64 bit kernel Kri 8 2 Busybox Configuration Menu Refer to section BusyBox pg 19 for details about the this package A preselected set of features has been chosen from the Busybox package to use on the appliance If different features are required Busybox Custom options may be selected When the Busybox Configuration Menu is selected the following menu will be presented 36 User Guide 2 26 2010 2 1 0 403 8 2 Busybox Configuration Menu PIKA Application Development Suite PADS PIKA Appliance Development Suite PADS Configuration Arrow keys navigate the menu lt Enter gt selects submenus gt Highlighted letters are hotkeys Pressing lt Y gt selectes
94. hannel Driver for Asterisk depends on PADS PACKAGE ASTERISK amp amp PADS PACKAGE ZAPTEL amp amp PADS_PACKAGE HMP default y help Enables Asterisk to use the Warp hardware FXO FXS and BRI ports audio line in and line out ports The following example is taken from the grandprix Config in file The depends entries indicate that the HMP package must be present and that it cannot co exist with the CHAN_PIKA package The example above shows that chan_pika is included by default therefore in the default view of the menu PIKA GrandPrix will not appear PIKA Channel Driver for Asterisk must be unselected for PIKA GrandPrix to appear config PADS_PACKAGE_GRANDPRIX bool PIKA GrandPrix depends on PADS_ PACKAGE CHAN_PIKA 2 26 2010 2 1 0 403 User Guide 57 PIKA Application Development Suite PADS 10 3 Additional PADS Makefile Rules to Build depends on PADS_PACKAGE_HMP default n help PIKA GrandPrix GP is a software layer on top of the HMP low level API that makes it easier and faster for designers to develop user applications based on PIKA hardware and software The following examples are taken from the menu Package Selection for the Target for which the layout is defined in the file package Config in This section is shown in the main menu but is delineated in its own section of the menu which is indicated by the comment keyword comment PIKA Drivers and SDKs source package hmp Config in source package gr
95. have files open in persistent and that the current directory for any user is not in persistent For example the root user s home directory is persistent root The root user should change to another directory before upgrading the persistent file system You may then continue with updating the persistent file system umount persistent warploader tmp persistent wrp persistent persistent umount persistent1 Ifile watploader tmp persistent1 wrp system persistent persistent2 umount persistent2 2 file watploader tmp persistent2 wrp system Ensure that the U Boot environment variable bootcmd is set to run nand_boot the factory default setting and enter the command reboot at the Linux prompt to boot using the new images If you have previously modified the value to run from NFS change the value of bootcmd by entering the following commands at the U Boot prompt gt setenv bootcmd run nand_boot gt saveenv If the system is interrupted in any way during the update pressing the reset button disconnecting the power entering ctrl C the image will not be written to flash properly your system will not boot and you must return to U Boot to repair your system by updating the flash refer to section Writing Images to Flash Using U Boot pg 84 or boot instead from NFS 2 26 2010 2 1 0 403 User Guide 83 Writing Software Images to Flash Using U Boot PIKA Application Development Suite PADS 12 5 Alternati
96. hese types of files are directed to alternate storage such as the SD or USB or in the case of logging to an off board system Refer to 40 User Guide 2 26 2010 2 1 0 403 9 2 Using the Additional Persistent Flash Memory PIKA Application Development Suite PADS Logging pg 73 for more information For the reasons stated in the previous bullet writing these files to persistent flash memory is not recommended Consider the use of temporary file systems for files that are frequently updated and need not be preserved across reboots Entries in the file persistent etc fstab define the directories that are designated as temporary files systems and specify the maximum amount of RAM they may consume Space in RAM is only used when files are written to these directories space is not set aside up front For example the directory var log is a temporary file system which is limited to 4 megabytes of RAM Refer to File System Layout pg 71 for more information e Byte order The PowerPC processor is big endian most significant byte is at the lowest address while the typical PC which uses an x86 processor is little endian least significant byte is at the lowest address If you are porting your application from another system you show consider the following items Applications written only for the appliance typically will not have issues The headers for audio files created on a little endian system will be incompatible For example any r
97. ial console at system startup usually indicate that a hard reboot pressing the reset button pulling the power cable occurred while the system data was attempting to write data to the flash It typically does not indicate a problem however it is possible to corrupt the flash by doing a hard reboot Unless the system is completely inoperable the system is not accessible via SSH or serial console the system should be restarted by executing reboot from the command line If the system is functional and it is necessary to power down the system for example to install a new module the command halt should be executed from the command line first There is a ten second window to power off the system before the watchdog will trigger a reboot Message Empty flash appears on the serial console at system startup Messages such as Empty flash at 0x003edbd8 ends at 0x003ee000 are generated if a block of data is partially written It usually does not indicate a problem Mesage jffs2_scan_eraseblock appears on the serial console at system startup Messages such as jffs2_scan_eraseblock Magic bitmask 0x1985 not found at 0x02560000 0x5049 instead indicate that the magic markers indicating free blocks in the file system are being overwritten This will not cause any problems because the JFFS2 file system works around this situation It does however indicate a software error and should be reported to PIKA Message JFFS2 warning 849 jffs2_
98. iance dropbearconvert openssh dropbear path to keyFile ssh id_rsa db Appliance IP is 0 0 0 0 The appliance network configuration uses DHCP by default to obtain an IP address An IP address of 0 0 0 0 indicates the appliance is unable to connect to a DHCP server and you are not using the default DHCP client selected from the Networking menu in PADS We recommend that you include the DHCP client otherwise you will need a serial cable to access the appliance to change the network settings Refer to Configuring Serial Access pg 10 for instructions on using the serial cable Refer to Network Setup for instructions to configure the appliance network settings make image Fails In addition to exceeding the image size set in the top level Makefile of lt Your PADS Path gt make image can also fail with the following error genext2fs U d build_warp root b 130000 i 2048 images rootfs img genext2fs invalid option U make image Error 1 This may occur if you have more than one version of genext2fs on your development computer The version in lt Your PADS Path gt bin should be used The following entries in the top level Makefile may need to be adjusted if any of the directories listed in PATH contain the executable genext2fs PATH ust local sbin usr local bin sbin bin usr sbin usr bin root bin PATH PATH TOOLS_BIN Error Attempting to Unmount Persistent Filesystems umount c
99. ice asterisk User Guide 2 26 2010 2 1 0 403 12 9 Modifying the Hardware Discovery Script PIKA Application Development Suite PADS Help syntax pikacf help Displays help information and exits Verson information syntax pikacf version Displays version information and exits Specify an alternate configuration file location syntax pikacf o lt path gt or pikacf output lt path gt Creates new configuration files under the directory specified by path If the path contains spaces enclose the path text in double quotes The path must exist pikacf will not create the path Note that the file pika conf will always be generated in etc asterisk regardless of the path specified The o option and output option affect only the PIKA GP configuration files Example pikacf output etc If the output option is not provided configuration files are created in the default directory etc pika Automatic configuration file creation syntax pikacf auto Creates configuration files without prompting for input Default values are used and any existing configuration files will be overwritten The output option can be used to specify the directory under which the files will be created otherwise the files will be created in the default directories Scan for hardware information syntax pikacf scan 2 26 2010 2 1 0 403 User Guide 91 PIKA Application Development Suite PADS 12 9 Modifying the Hardware Discover
100. ied file For example if you have a customized version of the file pika conf you may wish to use the noasterisk option PIKACF_HW pikacf defaults noasterisk 2 26 2010 2 1 0 403 User Guide PIKA Application Development Suite PADS 13 1 How do I run software from NFS 13 Frequently Asked Questions This section answers some typical user questions 13 1 How do I run software from NFS ak Download PADS from http www pikatechnologies com appliancedownloads to your Linux development computer 2 Build PADS on your development computer 1 Enter the command make menuconfig from the root PADS directory lt Your PADS path gt 2 Enter make from the root PADS directory lt Your PADS path gt The directory lt Your PADS path gt build_warp root will contain the mount point to boot the software 3 Enter the command make image from the root PADS directory lt Your PADS path gt This will create the kernel image 4 Ensure a tftp server is installed on your development computer see Setting up TFTP and NFS pg 9 for information 5 Copy the file lt Your PADS path gt images kernel wrp to the tftpboot directory on your development computer 6 Ensure that NFS is installed and running on your development computer refer to Setting up TFTP and NFS pg 9 for information 7 On your development machine modify the file etc exports file with the appropriate information 8 Use the serial cable to con
101. if any are the property of their respective holders DISCLAIMER This document is provided to you for informational purposes only and is believed to be accurate as of the date of its publication and is subject to change without notice PIKA Technologies Inc assumes no responsibility for any errors or omissions in this document and shall have no obligation to you as a result of having made this document available to you or based upon the information it contains 2 26 2010 2 1 0 403 User Guide PIKA Application Development Suite PADS Contacting PIKA Technologies Customer Care For support issues phone or e mail our Customer Care department at the following Tel 1 613 591 1555 PAX 1 613 591 9295 Email support pikatech com International Headquarters PIKA Technologies Inc 535 Legget Drive Suite 400 Ottawa Ontario Canada K2K 3B8 Tel 1 613 591 1555 FAX 1 613 591 9295 Email sales pikatech com Internet Visit our website at www pikatechnologies com for the latest news product announcements downloads online community documentation updates and contact information User Guide 2 26 2010 2 1 0 403 3 2 Assumed Knowledge PIKA Application Development Suite PADS 3 Introduction The PIKA Application Development Suite PADS is a development environment that allows users to create applications for the PIKA WARP the Appliance Guide Organization Introduction Describes the purpose and
102. ill be ignored If any of the images in the IMAGE_DIR have an invalid or corrupted trailer the process with be aborted There can be only one flash inc file across the designated locations otherwise the process will abort If there are multiple images of the same type in the IMAGE_DIR for example multiple ramdisk images the version with the latest creation timestamp in the trailer is used If any of the currently running images match an image in IMAGE_DIR the matching image s will not be written to flash again Any images that do not match what is currently running will still be written If the autoflash process fails after beginning to update the images after the point at which all pre checks are complete and backups have been created autoflash will not run the next time it is triggered for example during the next reboot This ensures that the system can return to a state where there is an opportunity to correct the situation causing the failure When autoflash is triggered once again either by rebooting the system or executing the command autoflash from the command line it will attempt to run e Autoflash cannot be used when running from NFS Instructions To use the autoflash feature perform the following steps 1 Create the directory flash on the device of your choice SD card USB device or persistent file system and create the file flash inc in the directory 2 Set IMAGE_DIR to the path where the ne
103. ill function without Zaptel Zaptel clocking improves the performance of Asterisk when used with PIKA hardware Asterisk MeetMe conferencing will not function on the appliance without Zaptel clocking Refer to www asterisk org for information and support This package enables Asterisk to use the appliance hardware FXO FXS and BRI ports audio line in and line out ports The channel driver augments the clocking supported provided by Zaptel The channel driver utilizes the HMP package to control the appliance hardware Configuration settings for the channel driver are located in the file persistent etc asterisk pika conf Documentation for the configuration file is located at http www pikatechnologies com english View asp mp 463 amp x 605 Select the link for chan_pika html User Guide 25 PIKA Application Development Suite PADS 7 4 Asterisk and Related Packages Astmanproxy astmanproxy Asterisk LCD This package installs the astmanproxy application which uses the library Asterisk Management Interface AMI to display Asterisk call status information on the appliance LCD The application is enabled at system startup If Asterisk is stopped for any reason the LCD will display LCD waiting for Asterisk as the astmanproxy application attempts to connect with Asterisk If a phone or trunk is in use before the astmanproxy application starts the status on the display for that line will not be reflected until the next time th
104. images and manage data backup and restore e warploader refer to Writing Software Images to Flash Using the Warploader pg 80 e utility to write individual images to flash memory while the appliance is running e warptrailer refer to Creating Software Images pg 63 e utility for the development computer to display the trailer information of an image 7 10 Debugging Utilities The GDB debugger is available to provide standard Linux debugging capabilities It can be selected from the Utilities menu and the package directory name is gdb By default all executables in the ramdisk are stripped of symbols when the software is built to reduce the image size To make symbols available for debugging select the menu option Do Not Strip Executables to include unstripped binaries for debugging Including this package and unstripped binaries greatly increases the size of the image and should only be used during development Ensure that your system is set up to boot from NFS when using this package Debugging Asterisk To get a proper stack trace you must modify the default Asterisk build settings Ensure that you start with a fresh compile of Asterisk by doing a make asterisk clean e Select Asterisk Custom Settings from the PADS main menu During the compile at the beginning of the Asterisk compile you will be presented with a menu to configure Asterisk e Select 10 Compiler Flags and check DONT_OPTIMIZE and optionally MALLO
105. in etc networking conf for production systems and the U Boot environment variable ipaddr should be set to deflt The following table shows the settings in etc networking conf and their default values Setting Usage Factory Preset Value IP_LAN IP address to configure on the network 192 168 1 80 interface NOTE If the DHCP client is selected from the Networking menu in PADS and no DHCP server is available on the network an IP address in the range 169 254 x y will be assigned Information about the DHCP client can be found in Network Applications pg 28 for more information User Guide 2 26 2010 2 1 0 403 12 4 Displaying Information on the LCD PIKA Application Development Suite PADS NETMASK_LAN Netmask to configure on the network 255 255 255 0 interface relative to IP_LAN GATEWAY_LAN IP Address of the default route 192 168 1 1 DHCP_LAN Use DHCP to configure networking yes yes no DNS_LAN IP address of the DNS server to use none HOSTNAME Name by which this host should be warp known DOMAIN_LAN Domain name of the local network none entry not present in the file by default The following U Boot environment variables for network configuration must be set for development Environment Usage Variable gatewayip IP Address of the default route Netmask to configure on the network interface relative to ipaddr IP address to configure on the network interface IP address of your development computer
106. ince it is application specific The PK_LCD_TPikaEvent structure is the basic vehicle for passing asynchronous data to the user application User Guide 103 PK_LCD_TLCDInfo PIKA Application Development Suite PADS 15 2 LCD Structures Unions and Enumerations 15 2 1 PK_LCD_TLCDConfig The PK_LCD_TLCDConfig structure is used by PK_LCD_GetConfig pg 118 and PK_LCD_SetConfig pg 121 function to retrieve and set the configuration of the LCD display typedef struct PK_UINT orientation PK_UINT mode PK_UINT shiftTime PK_UINT blinkTime PK_UINT brightness PK_LCD_TLCDConfig Members Members orientation mode shiftTime blinkTime brightness Description Determines the shift direction and the orientation of the characters rotated 180 degrees or normal Default is PK_LCD_ORIENTATION_NORMAL pg 109 Display mode of the LCD text mode or bitmap mode Default is PK _LCD_DISPLAY_MODE_TEXT pg 109 The interval between shifts in ms only used in text mode Default is PK_LCD_SHIFT_INTERVAL_DEFAULT pg 110 500 ms The interval between blinks in ms only used in bitmap mode Default is PK_LCD_BLINK_INTERVAL_DEFAULT pg 107 500 ms The brightness of the LCD background lighting Default is PK_LCD_BRIGHTNESS_100 pg 108 15 2 2 PK_LCD_TLCDInfo The PK_LCD_TLCD Info structure is used by PK_LCD_GetLCD Information function to retrieve read only information describing the dimensions o
107. ing SSH server software is included in the factory default software load The warploader is included in the default software shipped with the appliance The kernel ramdisk and persistent file system images can all be replaced in flash memory either with images you have built using PADS or with images downloaded from PIKA s website http www pikatechnologies com appliancedownloads WARNING If the warploader is used to update the ramdisk after previously updating it with either the autoflash utility or U Boot the system may fail to boot if the new image is larger than the previous image We strongly recommend that you do not use the warploader The basic steps are 1 Create the images on your development computer by running make image from the top level PADS directory lt Your PADS path gt 2 Copy the images from your development computer to the appliance 3 Execute the warploader command on the appliance supplying the image name 4 Reboot the appliance and enter the command run nand_boot from the U Boot prompt These step are explained in more detail below To write software to flash using the warploader the software image must be located in a directory on the appliance The file system where the directory is located must have sufficient space for the image s Depending on the size of the image it is possible that it will not fit in either the ramdisk or tmp If the size of an image exceeds the available space
108. inly for small or embedded systems Embedded systems often use processors that are not the regular x86 processors used on a typical PC such as PowerPC which is used on the appliance PADS is also a package selection framework It allows users to select from a set of packages each of which provides a framework to build a self contained piece of functionality from source code The set of packages provided in PADS includes those developed by PIKA plus third party open source packages selected by PIKA to provide additional useful functions for the appliance Additional packages may be added by developers Package selection is controlled by a menu system The packages selected determine the software capabilities of the appliance Each package has its own configuration settings and makefile Package configuration includes the menu settings whether the package is part of the default configuration plus any functional dependencies on other packages The makefile defines the package version how the package source is obtained and how to build the package which typically includes settings to cross compile the package source code for the appliance target architecture The mechanism used to obtain the source code is package specific and is determined by code owners who make their open source software available PADS supports two mechanisms to retrieve package source code 1 As tarballs from third party sites or PIKA s FTP site 2 From SVN repositories eith
109. ions LOG_ERR error conditions LOG_WARNING warning conditions LOG_NOTICE normal but significant condition LOG_INFO informational message 2 26 2010 2 1 0 403 User Guide 75 PIKA Application Development Suite PADS 12 3 Network Settings LOG_DEBUG debug level message The use of debug level logging will significantly degrade the performance of the appliance Network Settings Network information for the appliance can be set either in U Boot or in the file etc networking conf This section explains the relationship and interactions between them and when to use each of them When the U Boot environment variable ipaddr is set to deflt the factory preset value network settings are based on the information in etc networking conf Changes to the network settings should be made by editing the file etc networking conf During development the network information in U Boot must be set in order to boot from NFS and to replace software images in the flash memory using U Boot If the U Boot environment variable ipaddr does not have a valid IP address NFS will not work the system will fail to boot and will return to the U Boot prompt The U Boot settings can only be changed by returning to the U Boot prompt when connected via the serial port Network settings are always used entirely from either etc networking conf or from U Boot a combination of the information is never used Network configuration information should be set
110. is package provides utilities to assist in formatting and checking ext2 and ext3 files systems which may be required to use the SD card or a USB key which by default are typically formatted as FAT with Asterisk Two utilities are provided e e2fsck e Used to check a Linux second extended file system ext2fs Note that in general it is not safe to run e2fsck on 30 User Guide 2 26 2010 2 1 0 403 7 9 Software Update Utilities PIKA Application Development Suite PADS mounted file systems However even if it is safe to do so the results printed by e2fsck are not valid if the file system is mounted If e2fsck asks whether or not you should check a file system which is mounted the only correct answer is no e mk2fs e Used to create an ext2 or ext3 filesystem usually in a disk partition Scripts format sd and format usb are provided to format the SD to ext3 and the USB to ext2 format The following table shows the usage of the utilities and the scripts Before using these utilities ensure that the corresponding device is unmounted according to the instructions below In all of the examples the commands are executed at the Linux prompt on the appliance Purpose Unmounts partition 1 on the SD and formats a single partition on an SD card to ext3 Unmounts partition 1 on the USB drive and formats a single partition on a USB drive to ext2 umount dev mmeblk0p1 Unmounts partition 1 on the SD and does a sanity check on the file syst
111. ker Depending on whether the package uses a configure script these variables may be required when executing make from within the mk file The ARCH and CROSS_COMPILE variables may also be specified These may only be necessary if the makefile performs different steps based on the architecture Variable Description ARCH powerpe Indicates the processor architecture CROSS_COMPILE ppc_4xxFP Cross compile architecture to use from the toolchain TARGET_CROSS BASE_DIR toolchain usr bin powerpc linux Path to the cross compile tools TARGET_CC TARGET_CROSS gcc Location of the C C compiler TARGET_CXX TARGET_CROSS Location of the C compiler Typically only TARGET_CC or TARGET_CXX would be used TARGET_AR TARGET_CROSS ar Location of the ar archive tool Example This example is taken from the dropbear mk file Rules are indicated in bold The rule DL_DIR SSH_SOURCE obtains the file from the FTP site specified using the variables defined previously in the mk file e The file is a tarball so it is unpacked as part of the rule SSH_DIR unpacked e The dropbear package source has a configure script which is called in the rule SSH_DIR configured The SSH_CONFIGURE_OPTS variable defines the options to pass to the script to indicate the environment The main rule dropbear does the following Compiles and installs the the software using the compile and install rules defined in the Makefile with the dropb
112. l be returned 15 10 PK_LCD_EnableLogs The PK_LCD_EnableLogs function enables debug logging in PK_LCD PK_STATUS PK_API PK_LCD_EnableLogs IN TPikaHandle lcdHandle Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function 116 User Guide 2 26 2010 2 1 0 403 15 12 PK_LCD_EVENT_GetText PIKA Application Development Suite PADS PK_SUCCESS The function succeeded Remarks All the logs go to a file named pikalcdapilogs txt in the directory defined by PKH_LOGS_DIR system varible with var log pika as default value 15 11 PK_LCD_ERROR_GetText The PK_LCD_ERROR_GetText function returns the name of the status code in a user provided buffer PK_CHAR PK_API PK_LCD_ERROR_GetText IN PK_STATUS status IN PK_CHAR buffer IN PK_SIZE_T size Parameters Parameters Description status The status code of the error to be retrieved buffer The address of the buffer used to retrieve the status code name information size The size of the buffer in bytes Return Values Return Values Description buffer The pointer to the buffer passed in by the caller Remarks This function allows the user application to log PK_STATUS codes by name rather than an obscure id No
113. liance hardware and the GrandPrix high level API An application can use this library to display information on the appliance LCD Asterisk uses it to display the call status If you have a custom application that writes to the LCD the astmanproxy package described in section Asterisk pg 23 should not be selected as the applications will overwrite each other s data For information about using the API refer to section Displaying Information on the LCD pg 77 User Guide 2 26 2010 2 1 0 403 7 4 Asterisk and Related Packages PIKA Application Development Suite PADS Asterisk and Related Packages The following packages are required to use the appliance as an Asterisk PBX All packages are included in the default software for the appliance 2 26 2010 2 1 0 403 User Guide 23 24 PIKA Application Development Suite PADS 7 4 Asterisk and Related Packages Component Package Dependencies Description Directory Name Asterisk asterisk none Asterisk is an open source PBX and can be used on the appliance as the version core of an IP or hybrid PBX switching calls managing routes enabling 1 4 24 1 features and connecting callers with the outside world over IP BRI and POTS Asterisk can be used on its own for VoIP only functionality Refer to www astetisk org for information and support Asterisk is a registered trademark of Digium Asterisk is started automatically at system startup It runs under the con
114. lighting is 25 percent The brightness of the LCD back lighting is 50 percent The brightness of the LCD back lighting is 75 percent The display mode of the LCD is bitmap mode The display mode of the LCD is text mode Maximum length of an event name Maximum length of a status code name The orientation of the LCD is normal The orientation of the LCD is reversed Convenience definition for the full screen region Default LCD shift interval in ms Maximum LCD shift interval in ms Minimum LCD shift interval in ms Number of characters in the LCD display line buffer i e the maximum number of characters that can be displayed when scrolling The maximum number of characters that can be displayed on a single line of the LCD without scrolling Maximum number of display lines in text mode 15 4 1 PK_LCD_BITMAP_HEIGHT Maximum number of vertical pixels in bitmap mode define PK_LCD_BITMAP_HEIGHT 32 15 4 2 PK_LCD_BITMAP_WIDTH Maximum number of horizontal pixels in bitmap mode define PK_LCD_BITMAP_ WIDTH 160 15 4 3 PK_LCD_BLINK_INTERVAL_DEFAULT Default LCD blink interval in ms define PK_LCD_BLINK_INTERVAL_DEFAULT 500 Default LCD blink interval in ms 2 26 2010 2 1 0 403 User Guide 107 PK_LCD_DISPLAY_MODE_BITMAP PIKA Application Development Suite PADS 15 4 LCD Constants 15 4 4 PK_LCD_BLINK_INTERVAL_MAX Maximum LCD blink interval in ms define PK_LCD_BLINK_INTERVAL_ MAX 50
115. luded with the chan_pika package and is installed to the directory usr sbin By default whenever new hardware is detected all the files generated by pikacf are overwritten bin sh AE AE AE AE AE FE AE E AE AE FE FE AE AE AE E AE AE E AE AE FE FE E E AE ea a Ea a aa AE AE AEE This script generates the following files etc pika pikagp cfg etc pika pikagp_aoh cfg etc pika aohscan new etc asterisk pika conf Copyright 2002 2009 PIKA Technologies Inc All rights reserved HERE HEHEHE HH HEHE HHH HEE EE HEH HEH EE EE EEE HE HEHE EE HEHE HE ETE PIKACF which pikacf User Guide 2 26 2010 2 1 0 403 12 9 Modifying the Hardware Discovery Script PIKA Application Development Suite PADS PIKACF_SCAN pikacf query PIKACF_HW pikacf defaults if z SPIKACF then Glue Verro Corle mot iwo SLACAN ere lp Ea if e etc asterisk aohscan new then PIKACF_SCAN pikacf query etc asterisk aohscan new iP aL echo Checking for hardware changes SPIKACF_SCAN gt dev null if S ne 0 then echo Hardware has changed updating configuration SPIKACF_HW gt dev null if S ne 0 then echo Failed to update configuration files EA else echo No hardware changes detected fi This script may be modified as required Note that the directory usr sbin is located in the ramdisk so if aohscan is modified you must update the ramdisk image to one containing the modif
116. mail setup If Asterisk is configured to send voicemail files to users via email a mail server to forward the emails is required DHCP dheped yes This option includes a DHCP client which attempts to communicate with a Client DHCP server at system startup If there is no response from a DHCP server within twenty seconds this client will assign a pseudo random IP address in the range 169 254 x y This ensures that the appliance is accessible using SSH and does not require the use of a serial cable The IP address chosen will be displayed on the LCD Once you have logged into the appliance proper network settings should be configured according to the instructions in section Network Setup in the PIKA WARP the Appliance User Guide If this package is not included the DHCP client included with Busybox will be used The Busybox client will not assign an IP address if a DHCP server is not available The IP address shown on the LCD will be 0 0 0 0 and a serial cable will be required to access the appliance ext2 File System Utilities for USB and SD Media This package is located in the Utilities menu and the package directory name is e2fsprogs It has no dependencies While the appliance supports different types of files systems any file system used by Asterisk must have file locking capability The file system supported on the appliance with this capability is the Linux second extended file system ext2 and thirt extended file system ext3 Th
117. mber of global variables are used in the mk files They can be found in lt Your PADS path gt package Makefile in The following table describes the variables and their usage Variable Value BASE_DIR lt Your PADS Path gt DL_DIR BASE_DIR dl BUILD_DIR BASE_DIR build_warp TARGET_DIR BUILD_DIR root PERSISTENT_STORAGE 2 26 2010 2 1 0 403 BUILD_DIR root persistent User Guide Description Directory where you downloaded or checked out PADS code Download directory for package source Directory used for compiling packages The root file system basis for the ramdisk image and the NFS mount point Directory for the persistent file system basis for the y p y g persistent file system image NOTE The value for this variable can change depending on whether the option Persistent File System on Flash is selected in the Advanced Options Menu pg 38 Refer to Using the Persistent File Systems from Flash pg 86 for details about this option 49 Variables PIKA Application Development Suite PADS 10 1 The Package mk File PERSISTENT_STORAGE1 BUILD_DIR root persistent1 Directory for the first additional persistent storage area NOTE The value for this variable can change depending on whether the option Persistent File System on Flash is selected in the Advanced Options Menu pg 38 Refer to Using the Persistent File Systems from Flash pg 86 for details about this option PERSISTENT_
118. munication settings to pass to the kernel at boot time This information is appended to the existing bootargs value Do not change this value Default file name of the kernel image to load from TFTP which is used when booting from NFS Ensure that the file kernel wrp is copied to tftpboot on your development computer before booting from NFS Command to boot from NFS do not change this value Instructions used when booting the kernel from flash memory Do not change this value User Guide 12 7 U Boot Environment Variables echo eth0 warp 10 setenv bootargs root dev nfs rw nfsroot serverip rootpath setenv bootargs root dev ram rw ramdisk_size ramdisk_size 130000 setenv bootargs bootargs ip ipaddr serverip gatewayip netmask hostname netdev off panic 1 setenv bootargs bootargs console ttyS0 baudrate kernel wrp tftp 200000 bootfile run nfsargs addip addtty bootm nand read jffs2 2000000 0 200000 2 26 2010 2 1 0 403 12 8 Retrieving System Identifcation Information load_nand_ramdisk Instructions used when reading the ramdisk from flash nand_boot serverip ipaddr gatewayip netmask rootpath ethact ver PIKA Application Development Suite PADS load_nand_ramdisk nand read_ jffs2 memory into RAM The parameters for nand read jffs2 2200000 200000 3000000 are the following e address in RAM to start writing e address in NAND to
119. n Development Suite PADS 9 4 Managing the Ramdisk Image Size the ramdisk you may still need to make some adjustments This section describes options to handle this situation Image Creation The command make image creates a compressed image The actual size of the image can vary based on the compression rate when the image is created which depends on the type of files in the image When the ramdisk image is built PADS dynamically calculates the uncompressed size of the image applies an overhead factor and uses the total size to create an image that optimizes RAM usage The overhead factor accounts for file system overhead approximately 15 20 and extra space for files created in the root file system at run time The overhead factor is specified by the value indicated in Root ramdisk overhead in the Advanced Options section of the PADS menu The default factor is 40 This means that 40 of the uncompressed size of the image will be added to obtain the final image size If you add new packages or files and the following error appears while building the images the overhead factor is inadequate bin genext2fs couldn t allocate a block no free space make image Error 1 If this occurs there are two options available 1 Move some files to the additional persistent flash memory refer to Using the Additional Persistent Flash Memory pg 41 2 Increase the size of the overhead factor Caution should be exercised when inc
120. n Fed Zone 3 Izhevsk Russian Fed Zone 4 Ekaterinburg Russian Fed Zone 5 Novosibirsk Russian Fed Zone 6 Krasnojarsk Russian Fed Zone 7 Irkutsk Russian Fed Zone 8 Yakatsk Russian Fed Zone 9 Vladivostok Rwanda Saint Pierre amp Miquelon San Marino Sao Tome and Principe Saudi Arabia Senegal Sierra Leone 2 26 2010 2 1 0 403 CT5 CT 10 CT4 CT5 CT 8 S ee re Se eae CT 9 CET 1CEST PWTOPST EUTIEUTDST UCT4 UCT 3 UCT 4 EET 2EETDST MST 3MDT RFT 2RFTDST RFT 11RFTDST RFT 12RFTDST RFT 3RFTDST RFT 4RFTDST RFT 5RFTDST RFT 6RFTDST RFT 7RFTDST RFT 8RFTDST RFT 9RFTDST RFT 10RFTDST UCT 2 NAST3NADT CET 1CEST UCT UCT 3 UCT User Guide 131 PIKA Application Development Suite PADS Serbia The Seychelles Singapore Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia South Korea Spain Spain Canary Islands Sri Lanka St Helena St Kitts Nevis St Lucia St Vincent and the Grenadines Sudan Suriname Swaziland Sweden Switzerland Syria Tahiti Taiwan Tajikistan Tanzania Thailand Togo Tonga Trinidad and Tobago User Guide 16 CET 1CEST UCT 4 UCT 8 CET 1CEST CET 1CEST UCT 11 UCT 3 SAST 2 UCT3 KST CET 1CEST WETOWETDST CT 5 30 CT CT4 CT4 CT4 CT 2 CT3 U U U U U U U U CT 2 CET 1CEST MEZ 1MESZ SST 2SDT CT10 CT 8 CT 5 CT 3 CT 7 CT Ge Ste SSG aie i et CT 13 TIST4 2 26 2010 2 1
121. nction disables debug logging in PK_LCD The PK_LCD_DisplayBitmap function displays a bitmap on the LCD in the specified region The PK_LCD_DisplayString displays a string to the specified line on the LCD The PK_LCD_EnableLogs function enables debug logging in PK_LCD The PK_LCD_ERROR_GetText function returns the name of the status code in a user provided buffer The PK_LCD_EVENT_GetText function returns the name of the event in a user provided buffer The PK_LCD_GetConfig function retrieves the current configuration settings of the specified LCD The PK_LCD_GetInfo function retrieves the capability information of the specified LCD The PK_LCD_Open function allocates a LCD object and returns its handle to the calling routine The PK_LCD_ResetEventHandler function reset the callback function used to notify events generated by LCD The PK_LCD_SetBlink function will set a region in the LCD to blink with the speed specified by the displayBlinkTime parameter in the configure struct The PK_LCD_SetConfig function sets the configuration settings of the specified LCD The PK_LCD_SetEventHandler function sets the callback function for notifying events generated by LCD The PK_LCD_SetFontLib function sets the bitmap library of the ASCII characters to replace to the default one The PK_LCD_UnsetBlink function will cancel the blink operation previously set by the PK_LCD_SetBlink pg 120 function call User Guide 2 26 2010 2
122. nect your development computer to the appliance 9 Start minicom on your development computer to access the serial console on the appliance Re boot the appliance and press a key to enter U Boot 10 Once in U Boot set the following variables using the setenv and saveenv commands ipaddr gatewayip netmask e serverip the IP of your Linux development computer e rootpath lt lt Your PADS path gt build_warp root on your Linux development computer refer to Running the Software from NFS pg 13 for more information 11 From the U Boot prompt type run net_nfs to boot the appliance 96 User Guide 2 26 2010 2 1 0 403 14 PIKA Application Development Suite PADS 14 Troubleshooting The following section lists some common problems and solutions If you have a problem not described in this section please check the FAQ and Troubleshooting sections on the PIKA Technologies web site http www pikatechnologies com appliancedownloads NFS The following are common NFS errors e NFS error 5 indicates that the nfsd service is not started on your development computer Check that the service is running and configured to start when your development computer is booted e NFS error 13 indicates that your NFS path cannot be found Check that the path in etc exports matches the rootpath environment variable in U Boot and that the path specified contains a valid mount point If you changed any information in etc exports run e
123. nity to abort the reboot at this point All steps including reboots and backup restoration have completed successfully The time to cancel the reboot has expired The system will now reboot System reboot will not occur because the LCD button was pressed within the 10 second wait interval No further actions will occur This signals the beginning of the autoflash procedure Images will not be written to flash because the LCD button was pressed during the 10 second wait interval No further actions will occut Images are being verified using the trailer information The requested data could not be backed up This may be because there was insufficient space available or there was a problem creating the backup file on the device The process will halt Refer to the file flash log in the flash directory for more information Backups were requested but the directory used for autoflash has read only permissions or if using an SD card the lock switch is closed and backup information cannot be saved The process will continue without creating and restoring backup information If this is not the desired behaviour disable the locking mechanism before using autoflash There are multiple locations with a file flash inc A single instance is permitted The process will halt The previous autoflash attempt failed This may occur if there was a failure while writing any of the images or if there was a failure while restoring the backup fil
124. oot You 2 26 2010 2 1 0 403 User Guide 99 PIKA Application Development Suite PADS 14 will need to return to the U Boot prompt and update the image using U Boot Autoflash Status and failure information for the autoflash procedure can be found in the log file flash log located in the flash directory Problem Solution Autoflash doesn t run Ensure that the directory called flash exists in one of the designated locations mnt usb mnt sd persistent and that the directory has a file called flash inc Ensure that there is only one flash inc among the designated locations Ensure that the IMAGE_DIR entry if present in the file flash inc specifies a valid directory Verify that there is only one IMAGE_DIR specified in flash inc The previous attempt at autoflash failed Refer to the flash log file for information about the failure After correcting the situation that caused the failure rerun the autoflash procedure Ensure that there is sufficient space on the device Ensure that the number of entries to backup is less than 255 Ensure that the lock mechanism for the device is disabled Check if the images match those already running on the system The flash log file will indicate that the images match mount mounting dev sdal on mnt usb failed No such device or address appears in the output on the serial console at system startup This message is normal if there is no USB inserted
125. opment Suite PADS Embedded Systems Overview The appliance is an embedded system designed to function as a small IP Analog Digital PBX or to run small computer telephony applications This section describes some embedded system concepts you will need to understand in order to develop software for the appliance An embedded system is a combination of computer circuitry and software designed to perform a narrow range of pre defined tasks as opposed to a general purpose computer which is intended to perform multiple tasks Embedded systems do not usually have any of the typical computer peripheral devices such as a keyboard display monitor mass storage e g hard disk drives etc or any kind of user interface software This can make it possible to greatly reduce the complexity size and cost as well as increase the robustness of embedded systems as compared with general purpose systems The lack of peripheral devices and narrow range of functions can also contribute to a lower power consumption Embedded systems are often required to provide real time response In contrast to general purpose computers for which very few processor architectures are used mostly the x86 embedded systems typically utilize numerous competing processor architectures PowerPC ARM etc The software written for embedded systems may be referred to as firmware and is stored in read only memory or flash memory chips rather than a disk drive It often runs wit
126. opment Suite PADS 15 6 Errors 15 6 1 PK_LCD_ERROR_BASE_GENERAL General Error Codes define PK_LCD_ERROR_BASE GENERAL 0x0000 15 6 2 PK_LCD_ERROR_DEVICE_INVALID_HANDLE The handle provided is not valid define PK_LCD_ERROR_DEVICE_INVALID_HANDLE 0x2003 15 6 3 PK_LCD_ERROR_LCD_INVALID_BLINK_TIME The blinkTime parameter in the PK_LCD_TLCDConfig pg 104 is invalid define PK_LCD_ERROR_LCD_INVALID_BLINK_TIME 0x4404 15 6 4 PK_LCD_ERROR_LCD_INVALID_BRIGHTNESS The brightness parameter in the PK_LCD_TLCDConfig pg 104 is invalid define PK_LCD_ERROR_LCD_INVALID_BRIGHINESS 0x4405 15 6 5 PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE The mode parameter in the PK_LCD_TLCDConfig pg 104 is invalid define PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE 0x4402 15 6 6 PK_LCD_ERROR_LCD_INVALID_LINE_NUMBER The line Number parameter passed in is invalid define PK_LCD_ERROR_LCD_INVALID_LINE_NUMBER 0x4406 15 6 7 PK_LCD_ERROR_LCD_INVALID_ORIENTATION The orientation parameter in the PK_LCD_TLCDConfig pg 104 is invalid tdefine PK_LCD_ERROR_LCD_INVALID_ORIENTATION 0x4401 112 User Guide 2 26 2010 2 1 0 403 15 7 PK_LCD_DisplayBitmap PIKA Application Development Suite PADS 15 6 8 PK_LCD_ERROR_LCD_INVALID_REGION_HORIZONTAL The horizontal region parameter passed in is invalid define PK_LCD_ERROR_LCD_INVALID_REGION_HORIZO
127. or USB device e g mkdir mnt usb flash ensure that the device is inserted into the appliance and mounted in the file system Alternatively you may insert the device into a PC and create the directory in the usual manner for the operating system running on the PC When the autoflash utility runs it will write any images in the IMAGE_DIR directory to flash IMAGE_DIR must specify a directory not an individual file If IMAGE_DIR is not specified the autoflash application will search for image files in the directory where the file flash inc is located Only one IMAGE_DIR may be specified The process will abort if there are multiple entries To use the backup function add a BACKUP entry to flash inc with a list of directories and or files to back up each separated by a space in the list There may be multiple BACKUP entries up to a maximum of 255 If a directory is specified the backup will include all files in the directory tree that is backup is recursive It is only useful to backup files located on the persistent file systems persistent persistent and persistent2 Backups of files on the ramdisk will be lost the next time the system reboots For example to back up configuration files the backup entry should specify persistent etc rather than etc Backups are stored temporarily in the directory specified by IMAGE_DIR and the data will be restored once the update is completed If there is insufficient space to backup the data r
128. or the Appliance 12 BusyBox 19 Busybox Configuration Menu 36 Compile Time Dependencies 55 Configuring Serial Access 10 Contacting PIKA Technologies 2 Copyright Information 1 Creating Software Images 63 daemontools 20 Debugging Utilities 32 Design Guidelines for an Embedded System 40 Developing Software for the Appliance 40 Development System Setup and Configuration 8 Displaying Information on the LCD 77 2 26 2010 2 1 0 403 Embedded Systems Overview 5 Errors 111 Events 115 ext2 File System Utilities for USB and SD Media 30 Extra Packages 39 File System Layout 71 Flash Memory Partition Layout 61 Frequently Asked Questions 96 Getting Started with PADS 8 How do I run software from NFS 96 Introduction 3 Kernel Configuration Menu 35 LCD Constants 106 LCD Structures Unions and Enumerations 103 PK_LCD_BITMAP_HEIGHT 107 PK_LCD_BITMAP_WIDTH 107 PK_LCD_BLINK_INTERVAL_DEFAULT 107 PK_LCD_BLINK_INTERVAL_MAX 108 PK_LCD_BLINK_INTERVAL_MIN 108 PK_LCD_BRIGHTNESS_0 108 User Guide PIKA Application Development Suite PADS 17 PK_LCD_BRIGHTNESS_100 108 PK_LCD_BRIGHTNESS_25 108 PK_LCD_BRIGHTNESS_50 108 PK_LCD_BRIGHTNESS_75 108 PK_LCD_Clear 103 PK_LCD_Close 106 PK_LCD_DisableLogs 110 PK_LCD_DISPLAY_MODE_BITMAP 109 PK_LCD_DISPLAY_MODE_TEXT 109 PK_LCD_DisplayBitmap 114 PK_LCD_DisplayString 115 PK_LCD_EnableLogs 116 PK_LCD_ERROR_BASE_GENERAL 112 PK_LCD_ERROR_DEVICE_INVALID_HANDLE 112 PK_LC
129. ore the contents are not preserved across system reboots The var log portion of the file system is configured as a temporary file system and its size is limited to 4 Kb to avoid consuming excess RAM on the appliance Note that enabling debug logs may quickly consume the available space limiting the amount of information captured By default all Asterisk logs are written to var log asterisk Logs for PIKA software are directed to var log pika The following sections describe some options for directing logs to alternate locations so that they are available should the system reboot unexpectedly or if the logs will consume more than the allocated space in var log Log setup as described below is done at initialization time Using the SD Card for Logging To direct logs to the SD card for permanent storage the following changes are required The SD card must be inserted at system startup PIKA HMP In the file persistent etc localenv change the following line export PRKH_LOGS_DIR var log pika to export PRKH_LOGS_DIR mnt sd lt your log directory name gt PIKA GrandPrix In the file persistent etc localenv change the following line export PXX_LOGS_DIR var log pika 2 26 2010 2 1 0 403 User Guide 73 PIKA Application Development Suite PADS 12 2 Logging to export PXX_LOGS_DIR mnt sd lt your log directory name gt You must reboot for these changes to take effect Asterisk In etc asterisk asterisk conf
130. orresponding column There are total 256 spaces in the library hence the size of the total library is 256 6 1536 bytes 2 26 2010 2 1 0 403 User Guide 123 PIKA Application Development Suite PADS 15 21 PK_LCD_UnsetBlink 15 21 PK_LCD_UnsetBlink The PK_LCD_UnsetBlink function will cancel the blink operation previously set by the PK_LCD_SetBlink pg 120 function call PK_STATUS PK_API PK_LCD_UnsetBlink IN TPikaHandle lcdHandle IN PK_LCD_TLCDRegion region 3 Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 region pointer to the PK_LCD_TLCDRegion pg 105 defines the area to unset the blinking Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg The region parameter passed in is NULL 113 PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg The LCD is configured in text mode This function should only be 112 called in the bitmap mode PK_LCD_ERROR_LCD_INVALID_REGION_HORIZONTAL The sum of the horizontalPosition parameter and the horizontalWidth pg 113 parameter in region is larger than the maximum number of horizontal pixels The region is too big to be displayed The maximum number of horizontal pixels can be retrieved by PK_LCD_GetInfo pg 119 0 PK_LCD_ERROR_LCD_
131. ou may access the appliance either from your serial client or SSH The following warploader commands are executed at the Linux prompt on the appliance The syntax is wartploader F lt filename gt The following commands assume that you have copied the image to tmp on the appliance Any of the default images created in PADS will fit into tmp but if you are writing multiple images you may need to delete the previous image to free space before the next image is copied to the directory Image Partition Warploader command type name kernel kernel watploader tmp kernel wrp ramdisk root warploader tmp ramdisk wrp User Guide 2 26 2010 2 1 0 403 12 5 Alternative Methods for Writing Images to PIKA Application Development Suite PADS Writing Software Images to Flash Using the persistent persistent Unless your system is running with the persistent file system on NFS you must file unmount the persistent file system before replacing it The warploader will return an system error if you have not unmounted the filesystem If there are services running that have files open on the persistent file system you will need to stop those services before unmounting For example if httpd is running on the system it will have files open on the system To kill the processes running in the factory default software e killall httpd e killall tftpd e killall astmanproxy e sve d service asterisk Ensure that any users logged in do not
132. ow experimental options shows packages that are under development The packages are unsupported and should not be used t Package Selection Menu When the menu option Package Selection for the Target is selected from the top level menu the following menu is displayed Each of the packages under this menu and the sub menus is described in Software Packages Available in PADS pg 17 The gt indicates a sub menu press the enter key when the item is selected to enter the underlying menu Package Selection for the Target Arrow keys navigate the menu lt Enter gt selects submenus gt Highlighted letters are hotkeys Pressing lt Y gt selectes a feature while lt N gt will exclude a feature Press lt Esc gt lt Esc gt to exit lt gt for Help lt gt for Search Legend feature is selected feature is imezone info NEW ull timezone info NEW dev RON Daemon PIKA Drivers and SDKs IKA HMP IKA LCD Library API Asterisk aptel Clocking Support sterisk 1 4 x sterisk Custom Settings IKA Channel Driver for Asterisk sterisk Manager Proxy pplications gt N tworking gt orwarding SMTP None gt Thesnee amples gt xtra Packages Unsupported gt lt x Exit gt lt Help gt Extra Packages Extra Packages provides menu access to all packages in http swn pikatech com pads extra_packages Packages are automatically retrieved and displayed in the menu Any selected package
133. pecific settings e var run limited to 1 M e var log limited to 4 M e tmp limited to 36 M A temporary file system can be useful as a method to control RAM usage Refer to Managing the Ramdisk Image Size pg 45 for more information To create a new temporary file system perform the following steps 1 Create the mount point in the ramdisk This must be done before the ramdisk image is created and written to flash A directory cannot be added to a ramdisk while it is running as changes will be lost on the next reboot e For example to add var local as a tmpfs on the appliance on your development computer create the directory lt You PADS path gt build_warp root var local 2 On your development computer add an entry to lt You PADS path gt build_warp root persistent etc fstab For example to make var local a temporary file system add the following entry tmpfs vat local tmpfs size 1m 00 3 When the ramdisk containing the mount point is run and the persistent file system has the updated etc fstab the 2 26 2010 2 1 0 403 User Guide 71 PIKA Application Development Suite PADS 12 1 File System Layout new tmpfs can be used To change the size of an existing file system the size parameter may be adjusted accordingly Size can be specified in either megabytes m or kilobytes k Changes to the size in persistent etc fstab do not take effect until the next reboot Entries in persistent etc fstab also specif
134. r can be retrieved using the PIKA HMP API function PRH_BOARD_GetInfo The PISA HMP package must be included to use the API For more information about using the PIKA HMP SDK refer to the documentation available at SDK downloads amp docs for HMP Boards on the PIKA website This information can also be retrieved by executing the following command from the appliance command line This may be useful when writing scripts for the appliance cat sys class pika pikal serial Modifying the Hardware Discovery Script Hardware discovery is responsible for setting up the PIKA Asterisk and PIKA GP configuration files based on the hardware present in the system It provides a default configuration to minimize the work required to properly configure PIKA software to work with Asterisk The pikacf utility which is included with the chan_pika package is used to generate the default configuration files It has various command line options that enable it to be used in either in scripts or in interactive mode This section describes the command line options that may be useful when writing scripts The interactive prompts are described in the section Advanced Configuration in the PIKA Warp the Appliance User Guide The following files are created e etc pika pikagp cfg e etc pika pikagp_aoh cfg e etc asterisk pika conf e etc pika aohscan new NOTE Before using pikacf ensure that Asterisk is not running To stop Asterisk svc d setv
135. railer for validation purposes The following trailer fields are important CRC used to verify that the image is valid before writing it to flash time of image creation in conjunction with the image version used to determine if the image to be written to flash matches what is already running on the system image version in conjunction with the time used to determine if the image to be written to flash matches what is already running on the system image type used to determine the partition to which the image will be written image size in hexadecimal used to ensure that the image fits into the partition ramdisk size ramdisk only used to optimize the amount of RAM that will be consumed when the ramdisk is loaded into memory The tool warptrailer can be used on your development computer to view the trailer The executable is located in lt Your PADS path gt utils To view the trailer for the an image execute the command utils warptrailer images lt image name gt wtp When the command make image executes the following images will be created in lt Your PADS path gt images Images with a trailer e kernel wrp e ramdisk wrp e persistent wrp e persistentl wrp e persistent2 wrp Images without a trailer for backward compatibility located in lt Your PADS path gt images no_trailer 2 26 2010 2 1 0 403 User Guide 63 PIKA Application Development Suite PADS culmage warp kernel e uRamdisk ramdisk
136. reasing the size of the overhead factor as it has a direct impact on the amount of RAM used and will reduce the RAM available for runtime operations Should you wish to increase the ramdisk image size perform the following steps Inthe PADS menu enter a new value for the Root ramdisk overhead Enter the command make image on your development computer from the directory lt Your PADS path gt it is not necessary to completely rebuild PADS Repeat the above steps until the image is successfully created After successfully creating an image it is still possible that the overhead factor is too small The image will boot but there may be insufficient space to write new files such as logs into the file system Some trial and error may be required to provide sufficient overhead for additional files added at runtime Booting the Image At boot time U Boot decompresses the ramdisk image in flash and loads it into RAM In U boot the value of the environment variable ramdisk_size indicates the number of bytes in hexadecimal that will be written from NAND into RAM Both the autoflash utility and U Boot dynamically update this value to optimize RAM usage such that only the amount of RAM required is set aside when the ramdisk is written to flash 46 User Guide 2 26 2010 2 1 0 403 9 4 Managing the Ramdisk Image Size PIKA Application Development Suite PADS NOTE The warploader does not update the ramdisk_size Using the warploader
137. refer to Initialization Sequence pg 42 for information to configure the appliance for proper operation These files are copied into place at build time 7 1 3 BusyBox BusyBox combines tiny versions of many common UNIX utilities into a single small executable It provides minimalist replacements for most of the utilities usually found in GNU coreutils util linux etc The utilities in BusyBox generally have fewer options than their full featured GNU cousins however the options that are included provide the expected functionality and behave very much like their GNU counterparts BusyBox has been written with size optimization and limited resources in mind It is also extremely modular so you can easily include or exclude commands or features at compile time This makes it easy to customize your embedded systems BusyBox provides a fairly complete POSIX environment for any small or embedded system For more information or Busybox support consult www busybox net The appliance uses Busybox version 1 10 3 Refer to section Busybox Configuration Menu pg 36 for information about selecting additional BusyBox components The BusyBox package directory is lt Your PADS path gt package busybox 2 26 2010 2 1 0 403 User Guide 19 PIKA Application Development Suite PADS 7 2 Linux Utilities daemontools The daemontools software provides the ability to start and monitor services The tools can do the following e restart a servi
138. s pg 63 Describes how to build images e Using the Autoflash Feature pg 65 Describes how to update the images in the NAND flash 11 1 Flash Memory Partition Layout There are two flash memory chips on the appliance The following sections show the layout of each flash chip and provide information about updating the software in each chip 11 1 1 NAND Flash This flash memory is 256 megabyes in size and is used for software user applications and data that can be built through PADS e kernel 2 Megabytes e ramdisk 62 Megabytes e persistent file system 64 Megabytes e persistent 1 and persistent 2 are intended for user defined persistent storage 64 Megabytes each The kernel and the ramdisk are uncompressed and loaded from flash memory into RAM as part of the boot sequence The persistent storage sections are not loaded into RAM files are accessed directly from the flash memory for both reading and writing 2 26 2010 2 1 0 403 User Guide 61 NOR Flash PIKA Application Development Suite PADS NAND Flash 256M offset pooo 0o00 kernel kernel wrp root ramdisk wrp persistent persistent wrp persistent 1 persistent1 wrp persistent 2 persistent2 wrp 0000 OO1F 0020 O3FF 0400 O3FF 0800 OBFF ocoo OFFF 0000 FFFF 0000 FFFF 0000 FFFF 0000 FFFF 0000 FFFF 0020 O3E0 0400 0400 0400 0000 0000 o000 0000 0000 11 1 Flash Memory
139. s for example inserting the USB device or SD card into a running system where autoflash is running but there is no information displayed on the serial console or to an SSH session To avoid conflict for the use of the display the astmanproxy application refer to Asterisk and Related Packages pg 23 for information is disabled while autoflash is running Any user applications that use the LCD may still overwrite the autoflash output The following table describes the various messages that may be displayed Message Description Checking for The autoflash utility is checking the designated locations see above for the file flash inc and Images the images specified by IMAGE_DIR in flash inc No Images Found There are no images and or a flash inc file in any of the designated locations No further actions will occur Failure An image had a valid trailer but the image failed the CRC check The process will halt Ensure Invalid Image that the file was copied properly to the appropriate location and that there were no errors during the copy process Found lt gt images Indicates the number of images found in the location specified by IMAGE_DIR in flash inc All images match The file flash inc was found but all the images specified match the currently running images no flash required No further actions will occur Performing Backup The files and directories to backup are in the process of being saved Restoring Backup
140. s run It also defines the menu subsections Creating the Menu Entry 56 The file Config in for each package defines the menu entry and menu dependencies The following should be specified in the file e e The PADS internal package name The string shown on the menu The depends entry which indicates the relationship to other packages This entry may be omitted if the package has no relationships The default entry indicates whether the package is selected in the menu by default The help entry indicates the information that will be displayed when lt Help gt is selected while the cursor selection is on the package menu item Dependencies Dependencies are specified by a depends entry Specifying dependencies in this manner controls whether the given menu item will be displayed based on whether the required packages are selected Multiple dependencies can be specified as well as exclusions It is important to specify dependencies at the menu level to ensure that packages that are mutually exclusive cannot both be selected Entry Result depends If package X is not selected the package will not be displayed in the menu and therefore PADS_PACKAGE _ X cannot be selected Example astmanproxy Config in The astmanproxy package requires the asterisk package and therefore cannot be selected without the asterisk package depends Both package X and Y must be selected for the package to be displayed and avail
141. s the main menu arget Architecture PIKA Warp Appliance The menu item Target Architecture PIKA Warp Appliance indicates that the currently selected architecture is PIKA WARP the Appliance At this time there is only one Target Architecture supported in PADS The next sections describe the menus e Kernel Configuration e Busybox Configuration e Advanced Options e Package Selection for the Target 34 User Guide 2 26 2010 2 1 0 403 8 1 Kernel Configuration Menu PIKA Application Development Suite PADS Kernel Configuration Menu The operating system kernel software has been customized for the appliance architecture This menu option provides the ability to further customize the kernel features used with the appliance To use additional operating system features select Kernel Configuration and you will be presented with the following menu PIKA Appliance Development Suite PADS Configuration Arrow keys navigate the menu lt Enter gt selects submenus gt Highlighted letters are hotkeys Pressing lt Y gt selectes a feature while lt N gt will exclude a featu Target Architecture Configuration featu Use the arrow keys to navigate this window or press the hotkey of the item you wish to select followed by the lt SPACE BAR gt Press lt gt for additional information about this option commended trings ustom Kernel Options Recommended Kernel Settings is the default option Most users should stay wit
142. s well as bypass mode to access the HMP SDK For more information refer to the GrandPrix and HMP documentation which is available at SDK downloads amp docs for HMP Boards on the PIKA website User Application Peeeseeessesetesseesssesessy ponnnonnnnanasansnanasanssam PIKA High Level API Pa GED library PIKA HMP Drivers and SDK Base Software kernel skeleton file system Busybox 7 1 Base Software The appliance base software is composed of the following packages e Linux kernel pg 19 e skeleton file system pg 19 18 User Guide 2 26 2010 2 1 0 403 7 1 Base Software PIKA Application Development Suite PADS daemontools e BusyBox pg 19 e daemontools pg 20 for Linux service management 7 1 1 Linux Kernel The appliance uses a customized version of the standard Linux kernel version 2 6 31 7 Additional features can be added using the Kernel Configuration Menu pg 35 The kernel package directory is lt Your PADS path gt package linux 7 1 2 Skeleton File System The package referred to as the skeleton is the base for the ext2 file system that resides in RAM at run time It is laid out in a typical Linux file system structure The skeleton includes cross compiled versions of standard library files as well as device nodes The skeleton package directory lt Your PADS path gt package skeleton contains system configuration files and scripts including those required for initialization
143. s_host_key install m 664 package dropbear dropbear_dss_host_key SSH_ETC f SSH_ETC dropbear_rsa_host_key install m 664 package dropbear dropbear_rsa_host_key SSH_ETC install m 775 D package dropbear run TARGET_DIR service dropbear run echo Dropbear version SSH_VER gt gt PERSISTENT_STORAGE Vversion_info txt dropbear clean if test d SSH_DIR then MAKE C SSH_DIR clean fi RM r SSH_ETC RM r TARGET_DIR service dropbear 54 User Guide 2 26 2010 2 1 0 403 10 2 Adding Your Package to the Menu PIKA Application Development Suite PADS dropbear dirclean dropbeat clean RM r SSH_DIR 10 1 3 Compile Time Dependencies Compile time dependencies should be specified on the TARGETS line at the bottom of the mk file This line adds to the list of packages to compile and also specifies additional packages that must be compiled before the target The mk should first check if the package has been selected from the menu Specifying dependencies at the menu level refer to Adding Your Package to the Menu pg 55 for more information will ensure that the required dependencies are present but will not enforce compile build order If dependencies are not specified in this section build order is alphabetical Specifying the dependency here will cause the package dependencies to be built regardless of whether they were selected using the menu Example This example
144. scope of the guide and references to related documents Embedded Systems Overview pg 5 High level description of embedded system concepts PADS Overview pg 6 High level overview of PADS Getting Started with PADS pg 8 Describes how to set up your development system and build and run your first software load for the appliance Software Package Information pg 17 Describes the packages available through PADS Navigating the PADS Menu pg 34 Describes how to use the PADS menu to select packages Developing Software for the Appliance pg 40 Design guidelines for the appliance and how to build your application using PADS Adding a Package to PADS pg 48 Describes how to use PADS to cross compile your application and make it available from the menu Using Flash Memory to Run Your Application pg 61 Describes the flash memory on the appliance and how to update the software in flash Advanced Topics pg 71 Technical details about the appliance and additional package development information Frequently Asked Questions pg 96 Answers to typical users questions Troubleshooting pg 97 Typical problems and their solutions Appendix A LCD API Reference pg 102 API reference for updating the appliance LCD display Appendix B Timezone Codes pg 125 3 1 Purpose and Scope The PIKA Application Development Suite PADS is the software component of PIKA WARP the Appliance It offers developers the
145. t when possible instead of pressing the reset button or unplugging the power cable 42 User Guide 2 26 2010 2 1 0 403 9 3 System Initialization PIKA Application Development Suite PADS Initialization for the appliance is controlled by the rc S script included with the skeleton package The following table describes the main actions in tc S Action Mount the base file systems including the persistent file system Create softlinks between files in persistent etc and etc set HOSTNAME mount all partitions except those marked noauto in fstab mount the SD mount the USB installs the PIKA LCD driver executes the autoflash utility execute scripts in persistent autorun in ascending numerical order start the watchdog execute commands in tc local 2 26 2010 2 1 0 403 Description Only the base file system can be mounted from this script the file persistent etc fstab defines the other file systems Persistent configuration files are linked into etc for normal system operation Refer to Network Settings pg 76 for information about when this value is used Mounting options for partitions in fstab may specify auto mount automatically at system startup noauto do not mount automatically at system startup it can be mounted manually later size mount the file system automatically with the size specified limits the amount of RAM that can be used for this file system Refer to
146. target MUST completely remove the package source directory from the BUILD_DIR The configured and main package target rules will typically require settings to cross compile your application Different versions of the compiler and linker are required in order to cross compile for the PowerPC as a development computer will only have versions suitable for an x86 processor The toolchain included with PADS provides versions of the compiler and linker that are required to build applications for the PowerPC Cross Compile Settings in the configured Rule If your package has a configure script there are typically options that can be passed into the script to define your environment Typical variables include the following e host powerpc linux e target powerpc linux prefix TARGET_DIR usr 52 User Guide 2 26 2010 2 1 0 403 10 1 The Package mk File PIKA Application Development Suite PADS Rules e Most applications and libraries install into usr local by default however this directory is not present on the appliance and the libraries are located in TARGET_DIR usr e with libraryX TARGET_DIR usr If your application requires a external library the location on the appliance should be specified otherwise it will be linked against the version on your development computer Cross Compile Settings in the Main Package Rule The PADS environment uses the following variables to specify the location of compiler and lin
147. tem If a device is removed from the system the device table is updated accordingly This functionality allows hot insertion of an SD card or USB device into a running system Refer to File System Layout pg 71 for more information This package is required to use the autoflash feature and should always be enabled Only advanced users who understand the consequences should disable this feature crond The cron daemon provides the ability to schedule jobs commands or shell scripts to run automatically at a certain time or date Crontab is the program used to install uninstall or list the tables used to drive the cron daemon This package uses the cron daemon and crontab utility from Busybox and includes a startup script to set up the directories required for cron to function e persistent var spool cron crontabs e persistent vat spool cron Information about using cron and crontab can be found in the man pages of any standard Linux distribution man pages are not available on the appliance to save space The Busybox documentation lists the supported options PIKA Drivers and SDKs PIKA provides drivers and SDKs to enable user applications to control the appliance hardware and to write telephony applications 2 26 2010 2 1 0 403 User Guide 21 22 Package Directory Name hmp grandprix PIKA Application Development Suite PADS 7 4 Asterisk and Related Packages Dependencies Description HMP This packa
148. tes Use the PK_LCD_ERROR_MAX_NAME_LENGTH pg 109 constant when allocating the buffer to hold the status code name 15 12 PK_LCD_EVENT_GetText The PK_LCD_EVENT_GetText function returns the name of the event in a user provided buffer PK_CHAR PK_API PK_LCD_EVENT_GetText IN PK_UINT eventid IN PK_CHAR buffer IN PK_SIZE_T size 2 26 2010 2 1 0 403 User Guide 117 PIKA Application Development Suite PADS 15 13 PK_LCD_GetConfig Parameters Parameters Description eventId The event id to be retrieved buffer The address of the buffer used to retrieve the event name information size The size of the buffer in bytes Return Values Return Values Description buffer The pointer to the buffer passed in by the caller Remarks This function allows the user application to log incoming events by name rather than an obscure numeric value Notes Use the PK_LCD_EVENT_MAX_NAME_LENGTH pg 109 constant when allocating the buffer to hold the event name 15 13 PK_LCD_GetConfig The PK_LCD_GetConfig function retrieves the current configuration settings of the specified LCD PK_STATUS PK_API PK_LCD_GetConfig IN TPikaHandle lcdHandle OUT PK_LCD_TLCDConfig lcdConfig Parameters Parameters Description lcdHandle The LCD handle returned by PK_LCD_Open pg 119 lcdConfig The address of the PK_LCD_TLCDConfig pg 104 structure used to return the LCD configuration information Return Values
149. the configuration file bin sh d var www In s persistent var www vat www echo Starting HTTPD httpd c etc httpd conf h var www htdocs NTP uses both an autorun and a run script The autorun script S32ntpd shows that it executes a command that must run before the ntpd service starts bin sh The ntpd service is started and monitored by the daemontools The action in this script sets the date initially because we want the time to be correct before starting daemontools or svstat will report bogus times After system initialization it is up to the ntpd service to maintain the correct time The file etc ntp conf specifies the servers that the ntpd service will use for syncronization For information about the daemontools and ntp refer to the PADS User Guide ntpd q takes too long so we use ntpdate instead ntpdate 0 pool ntp org The run script for ntpd starts the ntpd service bin sh logger Running ntpd exec ust sbin ntpd g n 2 gt amp 1 Managing the Ramdisk Image Size As described previously memory usage is an important consideration for system performance Depending on how you have organized your software you may find that there are issues with the size of the ramdisk when the image is built PADS and the autoflash utility have features to help manage the ramdisk size However depending on the contents of 2 26 2010 2 1 0 403 User Guide PIKA Applicatio
150. the file name must reflect the priority of your package initialization in relation to other packages the number should be higher than that of the packages that must initialize before yours Multiple packages can use the same number e Ensure that the initialization script file is executable The script should include a command indicating the service it is starting e Add the script to the directory persistent autorun as one of the steps in the main target rule in your package mk file 2 If you would like your service to be controlled using dameontools refer to Linux Service Management pg 20 for details a run script can contain initialization instructions e Create a file called run which contains the commands to initialize and start your service Ensure that the run file has executable permissions e Add a line in the lt package gt mk file to copy the run file to TARGET_DIR service lt your service name gt run If you would like to log service information perform the following steps e Create a file called log run which uses the multilog command to specify where you would like the logs to be stored e g var log lt your service name gt and include it under your package directory e Add a line in the lt package gt mk file to copy the log run file to TARGET_DIR service lt your service name gt log run 3 For system level initialization add instructions to rc local 4 Modify rc S if there are system
151. the line on the LCD that the string will be displayed Return Values Return Values Description PK_LCD_ERROR_DEVICE_INVALID_HANDLE pg 112 The IcdHandle parameter does not refer to the LCD previously opened with the PK_LCD_Open pg 119 function PK_LCD_ERROR_NULL_PARAMETER_SPECIFIED pg The string parameter passed in is NULL 113 PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg The LCD is configured in bitmap mode It cannot display a string of 112 characters in this mode PK_LCD_ERROR_LCD_INVALID_LINE_NUMBER pg 112 The line number specified is too big It should be less than the value of numOfLines within the PK_LCD_TLCDInfo pg 104 struct retrieved by PK_LCD_GetInfo pg 119 function PK_SUCCESS The function succeeded Remarks This function displays a string of characters on the specified line of the LCD Before the string is displayed the line of the LCD will be cleared If the length of the string is larger than PK_LCD_TEXT_LINE_BUFFER_LENGTH pg 110 only the first PK_LCD_TEXT_LINE_BUFFER_LENGTH pg 110 of characters will be displayed If the length of the string is larger than PK_LCD_TEXT_LINE_LENGTH pg 110 the string will be scrolled across the LCD with the shift interval specified by the shiftTime parameter in the configure structure Notes This function can only be called when the LCD is configured in the text mode Otherwise PK_LCD_ERROR_LCD_INVALID_DISPLAY_MODE pg 112 error wil
152. the prompts to enter and confirm the new password Password information is preserved across reboots An SSH service is included in the default software on the appliance and can also be used to login to the appliance Ensure that you have configured the appliance for network access using the instructions in Network Setup in the Appliance User Guide for more information 6 5 Making a First Asterisk Call To verify that your software is functioning correctly you can use Asterisk to make a test call Plug a standard phone set into the built in FXS port and dial extension 1000 This will connect you to the Asterisk echo test recording Refer to Making Asterisk Calls in the PIKA WARP the Appliance User Guide for other Asterisk extensions available for the appliance User Guide 2 26 2010 2 1 0 403 7 PIKA Application Development Suite PADS 7 Software Package Information This section describes the software packages that are available in PADS including the package menu name the package directory name relative to lt Your PADS path gt package and important information about using the package For information about selecting packages using PADS refer to the section Navigating the PADS Menu pg 34 The types of packages available in PADS ate packages developed by PIKA Technologies to support the appliance hardware or to facilitate telephony application development on the appliance third party packages chosen to add flexibility
153. to use for NFS and TFTP The file etc HOSTNAME will be used for the hostname in the following situations e the U Boot environment variable ipaddr is set to deflt and there is no value for HOSTNAME in etc networking conf to use a different hostname change the value in etc networking conf e the U Boot environment variable ipaddr is a valid IP address to use a different hostname change the value in etc HOSTNAME Displaying Information on the LCD Factory Preset Value 0 0 0 0 255 255 255 0 deflt 0 0 0 0 The package PIKA LCD Library API provides an interface for applications to display information on the appliance 2 26 2010 2 1 0 403 User Guide 77 PIKA Application Development Suite PADS 12 4 Displaying Information on the LCD LCD At this time the API only supports a single application using the LCD display If multiple applications attempt to write to the display each application will overwrite other applications information By default the astmanproxy application uses the LCD to display Asterisk call status information If another application wishes to use the LCD Asterisk must not be included in the software running on the appliance The PIKA HMP IVR Sample Application refer to Samples pg 33 for information is a non Asterisk sample application that provides an example of updating the LCD with call status information To prepare the LCD for use the user application uses the function
154. toflash feature refer to Using the Autoflash Feature pg 65 for information can be used to update U Boot and the FPGA Copy the images from your development computer to one of the designated locations and execute the command autoflash from the command line To replace the FPGA and U Boot using the warploader you must transfer the images from your development computer to the appliance using a file transfer protocol such as SCP or TFTP The following instructions which are executed on the appliance assume that you have copied your images into tmp on the appliance Warploader Command watploader F tmp u boot wrp warploader F tmp fpga lt fpega version gt wrp To replace the FPGA and U Boot from U Boot copy the images to tftpboot on your development computer and enter the following commands at the U Boot prompt U Boot Command update uboot u boot wrp update fpga fpga lt fpea version gt wrp NOTE When using U Boot version 1 3 0 74 and older to update the images you must use a U Boot image file without a trailer u boot bin vs u boot wrp The update command will fail if an image file with a trailer is specified Using the Persistent File Systems from Flash When running from NFS by default the persistent file system resides on your development computer because it is expected that developers will use NFS for primary development In this case the following directories are used for the User Guide 2 26 2010
155. trol of the asterisk user as opposed to the root user Asterisk is controlled and monitored by Linux Service Management pg 20 Using the stop commands at the Asterisk console will not stop Asterisk as the service management software will automatically restart it To stop Asterisk execute the following at the Linux prompt on the appliance svc d service asterisk To start Asterisk execute the following at the Linux prompt on the appliance svc u service asterisk Note that executing any of the restart commands from the Asterisk console will still restart Asterisk as expected Refer to Making Asterisk Calls in the Appliance User Guide for a list of default extensions supplied to use the appliance hardware Section Advanced Configuration in the Appliance User Guide provides appliance specific information about Asterisk configuration If Asterisk is configured to send voicemail files to users via email a mail server to forward the emails is required Refer to Network Applications pg 28 for a list of available mail server packages User Guide 2 26 2010 2 1 0 403 7 4 Asterisk and Related Packages Zaptel zaptel none version 1 4 9 2 PIKA chan_pika HMP Zaptel channel driver version 3 8 x 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS While the appliance provides the hardware clock Zaptel provides clocking support specifically for Asterisk While most features of Asterisk w
156. tten using default values and the override_defaults ini will be created but will not contain any fields An error will be logged in etc pika pikacflog Any unrecognized values in the file specified will be ignored for example an incorrectly spelled configuration key The default value will be used for the unrecognized key and a warning will be appended to etc pika pikacf log indicating that the value was ignored Whenever the configuration files are regenerated the old configuration files will be renamed as follows pika conf lt index gt pikagp cfg lt index gt and pikagp_aoh cfg lt index gt Note that the same index value will be used for all files Index numbers will be incremented each time the files are regenerated NOTE The level configuration key in the logs section may not be configured using the defaults option The default value of none will always be used for the logging level Do not generate pika conf syntax pikacf noasterisk Runs pikacf in interactive mode but will generate only the GP configuration files The file etc asterisk pika conf will not be generated This option can be used in conjunction with the auto option to run without prompts the defaults option so that only the PIKA configuration files are generated and with the output option to generate the GP configuration files in an alternate location Example 94 The default hardware discovery script called aohscan is inc
157. uide EIST6EIDT CST 8 CT 7 CT 6 30 CT5 CT 1 CT10 CT6 Cp i Ce ee Ss ees S CT CET 1CEST UCT5 UCT4 EET 2EETDST CET 1CEST CET 1CEST CT 3 CT4 CT5 U U UCT4 U UCT6 EST 2EDT UCT6 UCT 1 UCT 3 EET 2EETDST UCT 3 WETOWETDST UCT 12 EET 2EETDST CET 1CEST SAT3 127 PIKA Application Development Suite PADS French Polynesia Gabon The Gambia Georgia Germany Ghana Gibraltar Greece Greenland Scorsbysund Greenland Thule Grenada Guadeloupe Guam Guatemala Guinea Bissau Guyana Haiti Hawaii Honduras Hong Kong Hungary Iceland India Indonesia Central Indonesia East Indonesia West Tran Traq Ireland Israel Italy User Guide 16 UCT10 UCT 1 UCT EUT 4EUTDST MEZ 1MESZ UCT CET 1CEST EET 2EETDST EUTIEUTDST AST4ADT CT4 CT4 CT 10 CT6 CT Gee e eS Lear re CT3 EST5EDT UCT10 UCT6 UCT 8 CET 1CEST CT CT 5 30 CT 8 CT 9 CT 7 U U U U U U CT 3 30 IST 3IDT GMTOBST IST 2IDT CET 1CEST 2 26 2010 2 1 0 403 16 Jamaica Japan Johnston Islands Jordan Juan Fernandez Islands Kazakhstan Kenya Kiribati Kuwait Kyrgyzstan Laos Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Luxembourg Macao Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Mariana Islands Martinique Mauritania Mauritius 2 26 2010 2 1 0 403 PIKA Application Development Suite PADS
158. ve Methods for Writing Images to Warploader Flags The warploader utility has a set of command line options that may be useful Description Display help Overrides the deprecated warning As of PADS release 2 1 x it must be specified to use the tool Verbose Dry run Checks the trailer information against the image and displays success or failure It will not write the images Force Writes the image without validating it against the trailer information This option must be used to write images that do not have a trailer Partition name Provided for backward compatibility this option must be used in conjunction with the the f option to write images without trailer information Possible lt partition name gt values root ramdisk partition kernel kernel partition persistent persistent partition persistent first additional persistent partition persistent2 second additional persistent partition Writing Software Images to Flash Using U Boot To use U Boot to write software images into flash memory you must connect the appliance to your development computer using the serial cable Return to the U Boot prompt by rebooting the appliance and pressing any key during the boot sequence as described in Installing and Running the Software pg 13 Ensure that the U Boot environment variables are set as described In particular the variable ipaddr must be set to a valid IP address and not deflt The update
159. w images are located 3 If required set BACKUP to specify a list of directories and files to backup and restore e We recommend that the backup list should include the file persistent etc networking conf 4 Copy the images from your development computer to the directory specified by IMAGE_DIR in the flash inc file Ensure that there is sufficient space for all the files 5 Use one of the following methods to initiate the autoflash process Ifusing an SD card or USB device insert the media into an appliance that is running e With the device inserted or if using the location persistent flash reboot the system e With the device inserted or if using the location persistent flash execute the command autoflash from an SSH or serial console session 2 26 2010 2 1 0 403 User Guide 67 PIKA Application Development Suite PADS 11 3 Using the Autoflash Feature If the system is interrupted in any way during the autoflash process pressing the reset button disconnecting the power entering ctrl C when running form the command line the images may not be written to flash properly your system will not boot and you must return to U Boot to repair your system refer to section Writing Images to Flash Using U Boot pg 84 or boot instead from NFS LCD Output 68 Status information is displayed on the LCD during the autoflash process The LCD is the most reliable source of progress information as there are certain situation
160. ware from flash memory or via a network file system NFS located on your development computer The section Running the Software from NFS pg 13 explains how to use NFS to run the software Ensure that the NFS service is installed on your development computer using the appropriate package installation mechanism for your Linux distribution Specify your NFS path by adding the following line in the file etc exports you may need to create the file lt Your PADS path gt is the location of your PADS soutce code refer to section Building Software for the Appliance pg 12 for more information lt Your PADS path gt build_warp root rw no_root_squash no_subtree_check Using the appropriate commands for your Linux distribution ensure that the nfs service is running and set to start at boot time 5 1 3 Configuring Serial Access A serial connection to the appliance is required to access the boot loader console in order to set the boot loader environment variables and to view any output from the boot sequence or run time output from applications The sections below describe the required steps to connect your development computer to the appliance using the serial cable provided with the appliance development kit and how to configure your serial client Connecting the Serial Cable Ensure that the appliance is powered off Remove the screws on each of the side panels on the appliance 10 User Guide 2 26 2010 2 1 0 403 6
161. will be included at compile time NOTE Extra packages are not supported by PIKA They are provided as is to help customers use these packages in a cross compile environment 2 26 2010 2 1 0 403 User Guide 39 PIKA Application Development Suite PADS 9 1 Design Guidelines for an Embedded System 9 Developing Software for the Appliance This section provides information about developing your application for an embedded system e Design Guidelines for an Embedded System pg 40 Describes items to consider when writing an application for an embedded system e Using the Additional Persistent Flash Memory pg 41 Describes how to use the optional sections of flash memory e System Initialization pg 42 Describes system initialization and how to include initialization steps for your application e Managing the Ramdisk Image Size pg 45 Describes how to handle larger ramdisks Design Guidelines for an Embedded System User applications should be designed to take into account the limitations and considerations of embedded systems compared to a standard PC This section provides some guidelines for designing user applications for the appliance The appliance is intended for dedicated telephony applications and the available resources are sufficient for this use However unlike a regular PC which is intended for a wide variety of applications the appliance has limited resources to run many applications simult
162. wrp Note that if the system is interrupted in any way during the update pressing the reset button disconnecting the power pressing Ctrl C at the command line your system will not boot and you must return to U Boot to repair your system by updating the flash or boot instead from NFS Ensure that the bootemd environment variable is set to run nand_boot and enter the command reset at the U Boot prompt to boot the appliance using the new images Updating U Boot and the FPGA The FPGA and U Boot images in the NOR should not be replaced except under the direction of PIKA Technologies either through Customer Care pg 2 or by written instructions PADS cannot build the FPGA PIKA Technologies supplies the image file To build the U Boot software using PADS from lt Your PADS path gt enter the following command 2 26 2010 2 1 0 403 User Guide 85 86 PIKA Application Development Suite PADS 12 6 Using the Persistent File Systems from Flash make uboot The file u boot wrp will be created in lt Your PADS path gt images The file u boot bin located in lt Your PADS path gt images no_trailer is available for backward compatibility when running U Boot versions 1 3 0 74 and older NOTE When using U Boot version 1 3 0 74 and older to update the images you must use a U Boot image file without a trailer u boot bin versus u boot wrp The update command will fail if an image file with a trailer is specified The au
163. xportfs a on your development computer When attempting to start the NFS service the following error appears Starting NFS quotas Cannot register service RPC Unable to receive errno Connection refused Check if the portmap service is running ps ax grep portmap If not start the portmap service using the appropriate command for your Linux distribution e g service portmap start Ensure that it is configured to start when the system is booted NFS and TFTP The message Remote system error No route to host may indicate that a firewall is interfering with access to your development computer To resolve this issue either disable the firewall or configure the firewall to allow these services Firewall configuration is beyond the scope of this document Note that SELinux must be disabled to use NFS and TFTP SSH The message dbclient exited string too long when passing an RSA key file to the SSH client dbclient included with the dropbear package indicates that the authentication keys used are not compatible with dropbear 2 26 2010 2 1 0 403 User Guide 97 PIKA Application Development Suite PADS 14 Dropbear is a subset of the full SSH functionality When the SSH client on the appliance is used to access another system running a fully featured SSH server the private authentication keys supplied by the server require a conversion step to be compatible with dropbear Execute the following command on the appl
164. y Script Displays available boards ports and licenses in an ini based format Example Board_0 id 0 type Analog Gateway serial PIK 258 00048 nb_fxo 0 nb_fxs 5 lines_fxs 1 5 Board_1 id 1 type Digital Gateway serial PIK 258 00048 nb_span 2 licenses tdm 16 fxo 10 fxs 9 fax 9 voip 100 Hardware comparison syntax pikacf query lt file gt Queries the hardware compares it to the information stored in the file specified and writes the results to the file If the file path contains spaces enclose the path text in double quotes The output will indicate only if the hardware has changed no details about the changes are provided The file included with the query option must use the following ini based syntax Board_0 id 0 type Analog Gateway serial PIK 258 00048 nb_fxo 0 nb_fxs 5 lines_fxs 1 5 92 User Guide 2 26 2010 2 1 0 403 12 9 Modifying the Hardware Discovery Script PIKA Application Development Suite PADS Board_1 id 1 type Digital Gateway setial PIK 258 00048 nb_span 2 licenses tdm 16 fxo 10 fxs 9 fax 9 voip 100 g729 0 If the query option does not specify a file the hardware information will be compared to the contents of the file etc pika aohscan new If the aohscan new file or the file specfied by the user does not exist pikacf will create the aohscan new file in the default location or the file specified by the user in the location specified If
165. y the file system type and whether the file system will be automatically mounted at system startup File systems indicated as noauto will not be mounted automatically Note that the device must be present at system startup in order to mount automatically If the device is not present there will be an error shown on the console NOTE If there is an SD card and or a USB device inserted at system startup there is an entry in etc rc S that mounts them even though the default entry in persistent etc fstab is noauto The custom appliance SD driver handles the case where the SD is not present at system startup and prevents errors from showing on the console If there is no USB device inserted in the system the output on the serial console at boot time will indicate that the USB failed to mount This message can be ignored unless there is in fact a USB device inserted into the system For the file system to mount successfully the format of the device must match the format specified in etc fstab Mounting will fail if the formats do not match The default entry for the file system type is auto in persistent etc fstab which allows the operating system to auto detect the file system type and ensure that it is mounted properly We strongly recommend that you use the default setting The following shows the default entries in persistent etc fstab Four different types of file systems are used tmpfs described above e ext2 ext3 refer
Download Pdf Manuals
Related Search
Related Contents
Cuisinart CPT-122 User's Manual USER'S GUIDE to SOFTWARE 詳しくはこちら(PDF形式、1300KB Journée Auto-représentation 14 mars 2014 Bedienungsanleitung PC-Sprechstelle - Ela-Data Acontecimientos destacadosAbre en nueva ventana MANUALE DI ISTRUZIONE PER SALDATRICE A FILO instrucciones de seguridad Vestax PMC-CX Musical Instrument User Manual Samsung Samsung C6620 User Manual Copyright © All rights reserved.
Failed to retrieve file