Monday 24 September 2012

Entry Point method of Telium application


void entry(void)   ---> In entry.c file
{
object_info_t info;
/// Recording services
ObjectGetInfo(OBJECT_TYPE_APPLI, ApplicationGetCurrent(),&info);
give_interface(info.application_type, NULL, NULL);
strcpy(info.name," MhLottery ");
memcpy(appName,info.name,OBJECT_NAME_LEN);
appName[OBJECT_NAME_LEN] = '\0';

}

Entry points are application’s functions lunched by the manager on events as :
– Reset
– Key pressed
– Clock (cyclic execution)
– Magnetic card swiped
– Smart card inserted
– File received
– It is also possible to create your own event using IAM mechanism…
Application must record services for all entry points at application boot
2 types of entry point (EP)
– Polling EP : Manager polls all applications (broadcast)
• Polling order is performed according to a defined priority
– Selecting EP : Manager gives focus to one application
At the end of each entry point, application must return to Manager

int after_reset(NO_SEGMENT no, void *p1, S_TRANSOUT *param_out)
{
          ------------
      ----------------
}


– Activated on each terminal reset (Polling according to priority)
– No data coming from Manager
– Data to return to Manager
• S_TRANSOUT
» If previous transaction was interrupted
– Application reset processing
• Check if cold reset (after downloading) or warm reset (no downloading)
• Initialise data and create disks
• Latest moment to call RegisterPowerFailure()
• Load and Open all mandatory Dlls
» Note that these 2 last cases Dll and RegisterPowerFailure() can also be moved to
entry() function, just after the service registering command.

Device Tamper detection


Any tempering attempt :
– Clear the secret areas
– Display a warning message (“Alert irruption” blinking)
– Lock the keyboard
– Reactivation of the terminal needed (Recovery tool)
– :-) product is activated
– :-( product is deactivated

Tuesday 18 September 2012

Getting Start with EFT930G Terminal
















 SAGEM EFT930G POS Terminal we have to do the following:

  1. Look inside the folder where you installed the Telium SDK  in C:\Program Files\SDK30\SDK 9.4.0\. now go toComponent\OS folder. At that Folder you will see  m31 files. If your terminal is for MOCK-UP, upload the EFT930_MOCKUP.M31 and if it is for production, upload the file EFT930_DIR_PROD.M31
  2. When uploading is finished, “Disconnect” the terminal. The terminal will reboot and returns to LLT mode.
  3. Now the time to load managers file. It is also necessary for handling other application for running.
  4. “Connect” the terminal again, but this time, look for the \Component\Manager folder. In this folder, there are 4 flavors to choose from: EFT930_export_PROD.M31, EFT930_health_PROD.M31,EFT930_interne_PROD.M31, and EFT930_spain_PROD.M31. In our case, we usually select interne or export. Upload the selected telium manager by dragging the file.
  5. Disconnect the terminal. When the terminal reboots, it will ask for several parameters (if the application will be using GPRS radio, do not forget to select GPRS to AUTO and fill up the APN)
  6. When loading of manager is finished, the terminal will reboot again but this time the words “LOAD APPLICATION” will be displayed on screen.


Saturday 11 August 2012

How to Print BarCode in Telium 930G code


Hey check out this Lord Shiva App at:
Get it on Google Play
Syntax :

 int PrintBarCode128 (unsigned char *Message,int Xsize, int Ysize, int Direction, int
alignment, int PrintValue) ;
Include : <BarCode.h>

Description :
                   This function prints a string of characters in the Code128 norm.
Parameters :
       unsigned char *Message     :     message to print (Ascii characters)
                              i nt Xsize     :     width of 1 unit in pixels (width of 1 black bar or white bar)
                               int Ysize     :     height of 1 unit in pixels (height of 1 black bar or white bar)
                          int Direction    :      direction of the barcode ( 0: horizontal, 1:vertical)
                         int alignment     :      justification of the barcode (0: left, 1: center, 2: right)
                       int PrintValue     :       print the value of the barcode (0 : no, 1: yes)


Example : Print a centered barcode that contains the message “Test” :

unsigned char *String = “Test”;
int X = 2; // widht: 2 pixels
int Y = 50; // height:50 pixels
FILE *hPrinter;
hPrinter = fopen( "PRINTER", "w" );
//Horizontal, centered and value printed
PrintBarCode128(String, X, Y, 0, 1, 1);
fclose(hPrinter);



Sunday 24 June 2012

How to parse the responce with strtok()methd

strtok()

 #include <string.h> 


method prototype :
 
char *strtok( char *str1, const char *str2 );
Description:
The strtok() function returns a pointer to the next "token" in str1, where str2 contains the delimiters that determine the token. strtok() returns NULL if no token is found. In order to convert a string to tokens, the first call to strtok() should have str1 point to the string to be tokenized. All calls after this should have str1 be NULL.
Example:
char str[] = "this  # is  # our #  country";
char delims[] = "#";
char *result = NULL;
result = strtok( str, delims );
while( result != NULL ) {
    printf( "result is \"%s\"\n", result );
    result = strtok( NULL, delims );
}

OUTPUT:
  result is "this "
  result is " is  "
  result is " our "
  result is " country"

Thursday 7 June 2012

How to convert bmp images to hex string

To print image in telium application,do these things...

1-When you will install telium package ..
2-you get a directary name -Bmp convertor

Ptah: 
\SDK30\TDS 6.2.1\tools\Bmp convertor \ConvertBmp


3-Use this tool to convert your image..
Note: Image size should be proper given in telium manual .

link..
http://devraj-it.blogspot.in/2012/06/how-to-send-http-request.html