Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Missing serial and bluetooth documentation in 4.1.3?

Missing serial and bluetooth documentation in 4.1.3?

Discuss OrbForms Designer and PocketC Architect

Missing serial and bluetooth documentation in 4.1.3?

Postby kruiter on Fri Jan 04, 2008 4:13 pm

Hi
I'm a newbe to Orbforms though I have been developing software and firmware for longer than I really want to admit. I have only been able to find minimal documentation regarding serial or bluetooth communication in my version of OrbForms (4.1.3). I have searched through the forums and I see questions about these topics but the answers always point back to documentation which is referred to as complete and helpful. I know that I am missing an example program (chat.c) which was previously included, but I don't know what else might be missing. For sure the help topics are structured slightly differently than they were in the past. I see also posts in which members have successfully done exactly what I want to do, but they don't give answers any of my questions...which also leads me to suspect that they may have been using documentation I don't have.
What I need to do is to use OrbForms to connect via bluetooth on a Treo650 or Tungsten, through a bluetooth to serial module, to a embedded serial device. The questions I have are:
-Does the serial feature support bluetooth on this generation of handhelds?
-Can the PDA using the serial feature act as bluetooth client or server or both?
-If client operation is possible, how is discovery done? If server operation how is the server ID set?
-I don't see any discussion about how threads or blocking work in this environment. Normally what I like to do on the recieve side is to have a seperate receive thread that sleeps either unti rx data comes in or sleeps for a fixed period of time and the checks for rx data. In an event driven environment like this something like that is pretty much necessary. I mean you don't want to go into a infinte look at ondraw checking for rx data and shut down the rest of the system. If I do a recvwait does that block or does it fall through and create an event when the rx data comes in or when the wait timer expires? If it blocks how can I put it in its own thread? I want to rx data and have my user interface running at the same time.
-I think in prior generations of this product there must have been documention that describes how additional serial features, such as managing the control lines, are implemented, but I don't see it here.
Thanks in advance for your help.
kruiter
 
Posts: 3
Joined: Fri Jan 04, 2008 3:37 pm

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby dewey on Mon Jan 07, 2008 8:28 am

- The bluetooth support is limited to the rfcomm protocol. What OrbC provides is only what is possible with the standard serial APIs. If additional fiddling with the Bluetooth virtual driver is required for your scenario, I don't know that it will be possible without writing a native add-in.
- The Palm OS does not support multiple threads. The Palm OS does include the concept of a wakeup handler, but this is not able to be used by an OrbC application.

Sorry I couldn't be more helpful.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby kruiter on Mon Jan 07, 2008 11:50 pm

Thanks. Is there some way I can get a copy of chat.c? Is it included as an examble in some other package?
I'll try to look at the palm serial API to figure out how it manages all these other details.....
kruiter
 
Posts: 3
Joined: Fri Jan 04, 2008 3:37 pm

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby kruiter on Tue Jan 08, 2008 9:21 pm

Ok, I'll just answer my own questions here, in case someone else needs this info later...

-Does the serial feature support bluetooth on this generation of handhelds?
Yup, works fine.
-Can the PDA using the serial feature act as bluetooth client or server or both?
Seems to be client, which it should be
-If client operation is possible, how is discovery done? If server operation how is the server ID set?
When you call open the O/S automatically peforms discovery and then opens a list box prompting you to select a server
-I don't see any discussion about how threads or blocking work in this environment. Normally what I like to do on the recieve side is to have a seperate receive thread that sleeps either unti rx data comes in or sleeps for a fixed period of time and the checks for rx data. In an event driven environment like this something like that is pretty much necessary. I mean you don't want to go into a infinte look at ondraw checking for rx data and shut down the rest of the system. If I do a recvwait does that block or does it fall through and create an event when the rx data comes in or when the wait timer expires? If it blocks how can I put it in its own thread? I want to rx data and have my user interface running at the same time.
There is provision for timers, which create timer events. Read the buffer at the timer events
kruiter
 
Posts: 3
Joined: Fri Jan 04, 2008 3:37 pm

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby Rudi on Sat Jan 19, 2008 1:35 pm

there are two possible ways to do something and dont block the user interface.

Method #1 is using the timer events, this method is very easy but evtl. not fast enough (eg for really fast serial data reading).

After starting the timer with xxxForm.timer(periode) you needs a handler:

handler xxxform.ontimer() {
DoSomething();
// ATTENTION! This is needed fpr running the event again:
if(i_dont_like_end_my_task) xxxform.timer(periode)
}

Method #2 is for running a loop and dont lock the userinterface.

You need a bool variable:

bool breakmyloop = false;

you have something like a stop button on your form with this function:

handler stopbutton.onselect()
{
breakmyloop = true;
}

You have your function with the blocking loop
// my function
for(;;) {
// do something ... this loop normaly blocks the gui
...
// do this to events your UI
events(false);
if(breakmyloop) break;
}


Best regards,
Rudi
Rudi
 
Posts: 33
Joined: Thu Feb 12, 2004 2:42 pm
Location: Germany

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby Rudi on Sat Jan 19, 2008 2:30 pm

there are two possible ways to do something and dont block the user interface.

Method #1 is using the timer events, this method is very easy but evtl. not fast enough (eg for really fast serial data reading).

After starting the timer with xxxForm.timer(periode) you needs a handler:

handler xxxform.ontimer() {
DoSomething();
// ATTENTION! This is needed fpr running the event again:
if(i_dont_like_end_my_task) xxxform.timer(periode)
}

Method #2 is for running a loop and dont lock the userinterface.

You need a bool variable:

bool breakmyloop = false;

you have something like a stop button on your form with this function:

handler stopbutton.onselect()
{
breakmyloop = true;
}

You have your function with the blocking loop
// my function
for(;;) {
// do something ... this loop normaly blocks the gui
...
// do this to events your UI
events(false);
if(breakmyloop) break;
}


Best regards,
Rudi
Rudi
 
Posts: 33
Joined: Thu Feb 12, 2004 2:42 pm
Location: Germany

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby Rudi on Sat Jan 19, 2008 2:30 pm

there are two possible ways to do something and dont block the user interface.

Method #1 is using the timer events, this method is very easy but evtl. not fast enough (eg for really fast serial data reading).

After starting the timer with xxxForm.timer(periode) you needs a handler:

handler xxxform.ontimer() {
DoSomething();
// ATTENTION! This is needed fpr running the event again:
if(i_dont_like_end_my_task) xxxform.timer(periode)
}

Method #2 is for running a loop and dont lock the userinterface.

You need a bool variable:

bool breakmyloop = false;

you have something like a stop button on your form with this function:

handler stopbutton.onselect()
{
breakmyloop = true;
}

You have your function with the blocking loop
// my function
for(;;) {
// do something ... this loop normaly blocks the gui
...
// do this to events your UI
events(false);
if(breakmyloop) break;
}


Best regards,
Rudi
Rudi
 
Posts: 33
Joined: Thu Feb 12, 2004 2:42 pm
Location: Germany

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby Rudi on Sat Jan 19, 2008 2:31 pm

there are two possible ways to do something and dont block the user interface.

Method #1 is using the timer events, this method is very easy but evtl. not fast enough (eg for really fast serial data reading).

After starting the timer with xxxForm.timer(periode) you needs a handler:

handler xxxform.ontimer() {
DoSomething();
// ATTENTION! This is needed for running the event again:
if(i_dont_like_end_my_task) xxxform.timer(periode);
}

Method #2 is for running a loop and dont lock the userinterface.

You need a bool variable:

bool breakmyloop = false;

you have something like a stop button on your form with this function:

handler stopbutton.onselect()
{
breakmyloop = true;
}

You have your function with the blocking loop
// my function
for(;;) {
// do something ... this loop normaly blocks the gui
...
// do this to events your UI
events(false);
if(breakmyloop) break;
}


Best regards,
Rudi
Rudi
 
Posts: 33
Joined: Thu Feb 12, 2004 2:42 pm
Location: Germany

Re: Missing serial and bluetooth documentation in 4.1.3?

Postby Rudi on Sat Jan 19, 2008 3:15 pm

sorry about the many posts from me, but the forumserver answered with an error after pressing the submit button.
Rudi
 
Posts: 33
Joined: Thu Feb 12, 2004 2:42 pm
Location: Germany


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 0 guests

cron