webOS Nation Forums >  webOS apps and software >  webOS development > Use luna-send command in an app
Use luna-send command in an app

  Reply
 
LinkBack Thread Tools Display Modes
Old 09/22/2011, 07:05 AM   #1 (permalink)
Member
 
Join Date: Sep 2011
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Use luna-send command in an app

Hi all;

I am trying to set a quick app with the equivalent of a luna-send command. (The command works well from novaterm) and was wondering how to get this done. Is there a standard way to call these types of commands from a .js file?

Any help would be greatly appreciated!


Thanks,

EffBe
EffBe is offline   Reply With Quote
Old 09/22/2011, 07:17 AM   #2 (permalink)
Member
 
Join Date: Apr 2007
Location: in
Posts: 188
Likes Received: 15
Thanks: 72
Thanked 31 Times in 18 Posts
Default

What is it that you are trying to accomplish via luna-send? Isn't there an equivalent in the framework, that you can make use of in your JS?
sara.ramli is offline   Reply With Quote
Old 09/22/2011, 07:26 AM   #3 (permalink)
Member
 
Join Date: Sep 2011
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Using Luna-send i can manage my proxy settings with the following command:

luna-send -n 1 palm://com.palm.connectionmanager/configureNwProxies '{"action":"add","proxyInfo":{"proxyScope":"default","proxyServer":"intern
et-proxy.mycompany.com","proxyPort":80}}'

I'm looking for a way to use this with an app; on a button handler for example

Cheers
EffBe is offline   Reply With Quote
Old 09/22/2011, 07:33 AM   #4 (permalink)
Member
 
Join Date: Jan 2007
Location: Iceland
Posts: 2,294
Likes Received: 46
Thanks: 686
Thanked 733 Times in 483 Posts
Default

That's brilliant.

I'd try to setup a foundations call, look through the source code of a palm app for an example. You might actually need to be from a com.palm.app to make the call. You could probably patch the wifi preferences app.
frantid is offline   Reply With Quote
Old 09/22/2011, 08:07 AM   #5 (permalink)
Member
 
Join Date: Sep 2011
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yep; sounds like what I am trying to achieve... any suggestions where I can find a sample app; or the wifi preference app?
EffBe is offline   Reply With Quote
Old 09/22/2011, 08:59 AM   #6 (permalink)
Member
 
Join Date: Jan 2007
Location: Iceland
Posts: 2,294
Likes Received: 46
Thanks: 686
Thanked 733 Times in 483 Posts
Default

Quote:
Originally Posted by EffBe View Post
Yep; sounds like what I am trying to achieve... any suggestions where I can find a sample app; or the wifi preference app?
try here:

Code:
\usr\palm\applications\com.palm.app.wifi\
Just peeking at it, there are several connection manager calls in the app to follow.
__________________
French Pre3, UK Pre2, US Veer, German gsm Pre, 680, garmin ique 3600 & still have my working palm pilot 1000 with the 1 Mb adapter


Please remove UberCalendar and google sync behavior patches prior to system updates.

patch Google calendar sync behavior for 2.x.x and TouchPad (Tweaks enabled)

Preference guide for MetaView's UberCalendar patch
frantid is offline   Reply With Quote
Old 09/23/2011, 01:08 PM   #7 (permalink)
Member
 
Join Date: Apr 2007
Location: in
Posts: 188
Likes Received: 15
Thanks: 72
Thanked 31 Times in 18 Posts
Default

Quote:
Originally Posted by EffBe View Post
Yep; sounds like what I am trying to achieve... any suggestions where I can find a sample app; or the wifi preference app?
An example here as well:
https://developer.palm.com/content/a...palm-call.html

Not sure if the call has to be from within a palm app.
__________________
Selling an AZERTY Pre3
sara.ramli is offline   Reply With Quote
Old 09/23/2011, 01:52 PM   #8 (permalink)
Member
 
Join Date: Oct 2009
Location: Berlin
Posts: 2,440
Likes Received: 76
Thanks: 517
Thanked 759 Times in 433 Posts
Default

A lot of "luna-send" commands are prohibited to be called from apps outside the palm.com domain.
You can try to set your appid to begin with palm.com or write a unjailed service to do the luna-send call.
preware, govnah, dr.battery and so on are sample who do do that:
WebOS-Internals.org
EDIT: must be com.palm sorry
__________________
Dr. Battery

Last edited by somline; 09/25/2011 at 06:18 AM.
somline is offline   Reply With Quote
Old 09/23/2011, 01:53 PM   #9 (permalink)
Member
 
noseph's Avatar
 
Join Date: Feb 2010
Location: Massachusetts
Posts: 693
Likes Received: 57
Thanks: 127
Thanked 96 Times in 90 Posts
Default

EffBe you might want to contact copystring he has a beta http://forums.precentral.net/hp-touc...ml#post3170999 here. Sent you a PM.
__________________
Quidquid Latine dictum sit, altum sonatur.

Palm III -> Palm V -> Viewsonic Pocket PC V36 -> Treo 650 -> Samsung i760 ->
Palm Pre Plus -> Palm Pre 2 & HP TouchPad

WebOS 2.1.0 VZW Pre 2
CM9 Alpha 2 Official Nightly HP TouchPad

Twitter: @noseph47
noseph is offline   Reply With Quote
Old 09/24/2011, 06:47 PM   #10 (permalink)
Homebrew Developer
 
Join Date: Sep 2011
Posts: 13
Likes Received: 11
Thanks: 0
Thanked 16 Times in 6 Posts
Default

Hi,

I've developed an app to change proxy server settings and would like to distribute it through the precentral feed on Preware. How would I go about that?
rob_hh is offline   Reply With Quote
Old 09/26/2011, 11:49 AM   #11 (permalink)
Member
 
Join Date: Sep 2011
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks all! I did get around to create a call to the com.palm connection manager; my app is now fully working! Anyone interrested in testing; let me know!

I'll try to find a way to put it in Preware...if someone feels like helping out... let me know!
EffBe is offline   Reply With Quote
Old 09/26/2011, 12:42 PM   #12 (permalink)
Member
 
noseph's Avatar
 
Join Date: Feb 2010
Location: Massachusetts
Posts: 693
Likes Received: 57
Thanks: 127
Thanked 96 Times in 90 Posts
Default

Quote:
Originally Posted by EffBe View Post
Thanks all! I did get around to create a call to the com.palm connection manager; my app is now fully working! Anyone interrested in testing; let me know!

I'll try to find a way to put it in Preware...if someone feels like helping out... let me know!
Sure I would be happy to test another Proxy setting app. It would be nice if the settings were global (email, HP App Catalog etc) and not just for the web app.
__________________
Quidquid Latine dictum sit, altum sonatur.

Palm III -> Palm V -> Viewsonic Pocket PC V36 -> Treo 650 -> Samsung i760 ->
Palm Pre Plus -> Palm Pre 2 & HP TouchPad

WebOS 2.1.0 VZW Pre 2
CM9 Alpha 2 Official Nightly HP TouchPad

Twitter: @noseph47
noseph is offline   Reply With Quote
Old 09/26/2011, 07:30 PM   #13 (permalink)
Member
 
Join Date: Sep 2011
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This version is only for the web app but I'm working on an ip_tables modifier that should handle all web requests (or at least any port 80/443 requests...)

@noseph; will send you the package in a provate message.
EffBe is offline   Reply With Quote
Reply

 

Tags
luna-send

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0