Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Wishlist: Add support for Leonardo Live www.livetrack24.com
Goto page Previous  1, 2
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> WishList
View previous topic :: View next topic  

Do you think this is a good idea?
Yes
71%
 71%  [ 30 ]
No
28%
 28%  [ 12 ]
Total Votes : 42

Author Message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Sat Mar 03, 2012 6:50 pm    Post subject: Reply with quote

Here's a devbuild with included hecl-net module. It contains some preliminary support for hecl-based plugins, I've described briefly in wiki: Plugins

The most difficult part is hecl script "debugging". I'm thinking about providing some logging mechanism to allow plugin developers log whatever they to help debug problems... other ideas are of course welcome.

http://www.trekbuddy.net/dev/2012-03-03/index.php
(Please note that Load Map and Load Atlas were merged into single Maps command)
Back to top
View user's profile Send private message
Yablos



Joined: 05 Apr 2011
Posts: 8
Location: Czech

PostPosted: Tue Mar 06, 2012 7:00 am    Post subject: HECL - plugin Reply with quote

Hi, so if iam right, with HECL/plugin it will work like:

1) on event raised (based on time interval every 5minutes...) connect to network(gprs/edge etc.)
2) send/post HTTP request to specified URL with custom ID
3) disconnect from network
and goto 1)

Important is point 3 and 1, because of battery use. Being connected for all time is not good idea Wink

Is it mentioned like this? Idea

_________________
Yablos
Back to top
View user's profile Send private message Visit poster's website
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Tue Mar 06, 2012 10:10 am    Post subject: Reply with quote

- it is up to the plugin how often it will open connection and send position update somewhere with http command
- network connection is closed immediately after response is received (or error occurs), that's how HECL http command work; how long will the device keep data connection actice is another thing I'm afraid
Back to top
View user's profile Send private message
Yablos



Joined: 05 Apr 2011
Posts: 8
Location: Czech

PostPosted: Tue Mar 06, 2012 10:59 am    Post subject: Reply with quote

kruch wrote:
.... how long will the device keep data connection actice is another thing I'm afraid


In most devices, data connection is closed when process is closed.... unfortunately, iam afraid, that "initiating process" in this case will be whole TB, not the plugin, so it will stay connected all time.

Point is to act as "modem".
- Dial number(network connection)
- open data connection to the http server and send
- close data connection to the http server after timeout,error,rq, or something
- immediately drop line(network connection): Maybe some sort of command at end of loop can correctly do that.

So i have to try google and code some small test .... Smile

_________________
Yablos
Back to top
View user's profile Send private message Visit poster's website
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Tue Mar 06, 2012 11:29 am    Post subject: Reply with quote

I will test it tonight.
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Wed Mar 07, 2012 11:17 pm    Post subject: Reply with quote

You were right - data connection is kept alive until TB is closed. Tested on N6720c (S60 3rd).
Sad
Back to top
View user's profile Send private message
Yablos



Joined: 05 Apr 2011
Posts: 8
Location: Czech

PostPosted: Thu Mar 08, 2012 1:53 pm    Post subject: Reply with quote

kruch wrote:
You were right - data connection is kept alive until TB is closed. Tested on N6720c (S60 3rd).
Sad


Next small question maybe, how is the HECL implemented, if you call connection.close();
?
If there is no "global" keep alive in j2me/hecl,then mobile os should close connection after timeout of inactivity byself.

does it really call xxx.close(); Question

_________________
Yablos
Back to top
View user's profile Send private message Visit poster's website
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5662

PostPosted: Thu Mar 08, 2012 3:00 pm    Post subject: Reply with quote

I've reorganized original HECL code for http, so it differs a little from the sources available at hecl.org, but close() should be called. I also tried to add extra header

Code:
connection.setRequestProperty("Connection", "close");


but it did not help.

Modified HECL's HttpRequest.java attached.



HttpRequest.java
 Description:

Download
 Filename:  HttpRequest.java
 Filesize:  16.43 KB
 Downloaded:  25 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> WishList All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group