Sunday, 11 March 2018
J2ME FTP class for EHS6 and BGS5 modules
J2ME implementation of FTP class for EHS6 and BGS5 modules.
protected void startApp() throws MIDletStateChangeException {
log = createLogger(FtpExampleApp.class, ILogger.DEBUG);
// Create ftp object with your GPRS settings, GPRS_APN, GPRS_USER, GPRS_PASS, GPRS_TIMEOUT
FtpClient ftp = new FtpClient("internet","gprs_user","gprs_pass",45);
ftp.setLogger(this.createLogger(FtpClient.class, ILogger.DEBUG));
try {
// make connection to you ftp server
ftp.open("ftp.yourserver.nl", (short)21, "ftpuser", "ftppass");
log.log(ILogger.DEBUG, "Uploading file to FTP...");
// Upload file to ftp server
ftp.putFile("upload.txt", "uploaded.txt", FtpClient.MODE_ASCII, false);
ftp.changeDir("test");
log.log(ILogger.DEBUG, "Downloading file from FTP current /test directory ");
// Download some other file from fto server to EHS6
ftp.getFile("downloaded.txt", "log.txt", FtpClient.MODE_ASCII);
ftp.close();
} catch (FtpException e) {
log.log(ILogger.ERROR, e.getMessage());
} catch (IOException e) {
log.log(ILogger.ERROR, e.getMessage());
}
destroyApp(true);
}
protected void startApp() throws MIDletStateChangeException {
log = createLogger(FtpExampleApp.class, ILogger.DEBUG);
// Create ftp object with your GPRS settings, GPRS_APN, GPRS_USER, GPRS_PASS, GPRS_TIMEOUT
FtpClient ftp = new FtpClient("internet","gprs_user","gprs_pass",45);
ftp.setLogger(this.createLogger(FtpClient.class, ILogger.DEBUG));
try {
// make connection to you ftp server
ftp.open("ftp.yourserver.nl", (short)21, "ftpuser", "ftppass");
log.log(ILogger.DEBUG, "Uploading file to FTP...");
// Upload file to ftp server
ftp.putFile("upload.txt", "uploaded.txt", FtpClient.MODE_ASCII, false);
ftp.changeDir("test");
log.log(ILogger.DEBUG, "Downloading file from FTP current /test directory ");
// Download some other file from fto server to EHS6
ftp.getFile("downloaded.txt", "log.txt", FtpClient.MODE_ASCII);
ftp.close();
} catch (FtpException e) {
log.log(ILogger.ERROR, e.getMessage());
} catch (IOException e) {
log.log(ILogger.ERROR, e.getMessage());
}
destroyApp(true);
}
J2ME email class for EHS6, BGS
J2ME implementation of email protocols that can be used on EHS6 and BGS5 modules.
In this package we provide SMTP, POP3, IMAP implementation in J2ME.
Here is example code for using SMTP class for EHS6 :
protected void startApp() throws MIDletStateChangeException {
log = createLogger(EmailTest.class, ILogger.DEBUG);
SmtpClient smtpClient = null;
try {
smtpClient = new SmtpClient("ehs6.demo@gmail.com", createLogger(SmtpClient.class,ILogger.DEBUG));
if(!smtpClient.connected()) {
// MAIL_SERVER, SMTP_PORT, SSL, APN, GPRS_USER, GPRS_PASS, SMTP_USER, SMTP_PASS
smtpClient.open("smtp.gmail.nl",463,true,"internet","","","smtpuser","smtppass");
}
log.log(ILogger.DEBUG, "putting message together...");
// FROM_ADDRESS, TO_ADDRESS, SUBJECT_TEXT
Message message = new Message("from@address", "to@address", "Email from EHS6 with SSL");
message.beginTextMessage();
message.addBodyLine("EHS6 email test message");
message.closeMessage();
smtpClient.sendMessage(message);
} catch (Exception e) {
log.log(ILogger.ERROR, "ERR sending email!");
e.printStackTrace();
}
finally {
if (null != smtpClient) { try { smtpClient.close(); }
catch (Exception ex) { }
}
smtpClient = null;
destroyApp(true);
}
}
In this package we provide SMTP, POP3, IMAP implementation in J2ME.
Here is example code for using SMTP class for EHS6 :
protected void startApp() throws MIDletStateChangeException {
log = createLogger(EmailTest.class, ILogger.DEBUG);
SmtpClient smtpClient = null;
try {
smtpClient = new SmtpClient("ehs6.demo@gmail.com", createLogger(SmtpClient.class,ILogger.DEBUG));
if(!smtpClient.connected()) {
// MAIL_SERVER, SMTP_PORT, SSL, APN, GPRS_USER, GPRS_PASS, SMTP_USER, SMTP_PASS
smtpClient.open("smtp.gmail.nl",463,true,"internet","","","smtpuser","smtppass");
}
log.log(ILogger.DEBUG, "putting message together...");
// FROM_ADDRESS, TO_ADDRESS, SUBJECT_TEXT
Message message = new Message("from@address", "to@address", "Email from EHS6 with SSL");
message.beginTextMessage();
message.addBodyLine("EHS6 email test message");
message.closeMessage();
smtpClient.sendMessage(message);
} catch (Exception e) {
log.log(ILogger.ERROR, "ERR sending email!");
e.printStackTrace();
}
finally {
if (null != smtpClient) { try { smtpClient.close(); }
catch (Exception ex) { }
}
smtpClient = null;
destroyApp(true);
}
}
Thursday, 1 March 2018
EHS6 concept board hardware
Features;
Power supply by USB interface
Ease of access to EHS6 modules
On-board Java module
On-board Penta-band antenna
Mini SIM card
Shield interface
8 GPIO lines with level shifters
4 ADC inputs
Compatible with a range of Arduino shields
GSM/GPRS (Mobile Communications) - Enclosed
Wednesday, 28 February 2018
Gemalto EHS6 terminal with J2ME programming
The EHS6 is the 5th generation of Gemalto M2M’s Java embedded machine-to-machine (M2M) modules, which have simplified highly efficient, end-to end industrial communication for the last decade. Gemalto’s Java strategy enables customers and partners to leverage the massive Java ecosystem by offering a powerful ARM11 architecture to reduce complexity and speed application integration. The tiny EHS6 module offers the latest Java ME 3.2 client runtime platform optimized for resource- constrained M2M applications. It significantly reduces total cost of ownership (TCO) and time to market by sharing internal resources such as memory, a large existing code base and proven software building blocks.
- Global 3G with Java embedded.
- 3GPP Rel.7 Compliant Protocol Stack
- Five Bands UMTS (WCDMA/FDD): 800, 850, 900, 1900 and 2100 MHz
- Quad-Band GSM: 850, 900, 1800 and 1900 MHz
- SIM Application Toolkit, letter class “b”, “c”, “e”
- Control via standardized and extended ATcommands (Hayes, TS 27.007 and 27.005)
- TCP/IP stack access via AT command and transparent TCP services
- Operating temperature: -40 to +90 °C
- Dimenstions: 27.6 x 25.4 x 2.3 mm
Online training with EHS6, BGS5 modules and eclipse
I can provide online training in EHS6 and BGS5 to get your programming with this module up to speed. Training can be done in skype or google hangouts.
In training we will go through
- General concepts of this module and possibilities and limitations
- How to setup basic eclipse project, compile and deploy application for EHS6 or BGS5
- How to make internet connection from module
- How to use GSM AT commands in EHS6 and BGS5
- How to do remote OTAP software update in EHS6 and BGS5
After this training of few hours you should be able to get started with your project in no time.
If you are interested in EHS6 and BGS5 training please send me email about the price and your
preferences of topics.
Friday, 16 February 2018
NTP source code
Your post here Your post here Your post here Your post here Your post here Your post here Your post here Your post here Your post here Your post here
var width = 0;
var $itemMenu = $('.menu li:has(ul)');
$(window).resize(function() {
width = $(window).width();
if ( $('.menu').is(':hidden') & width > 768) {
$('.menu').show();
};
if ( $itemMenu.find('ul').is(':visible')) {
$itemMenu.find('ul').slideUp();
$itemMenu.find('.fa-angle-down').removeClass('rotate180');
};
});
Subscribe to:
Posts (Atom)