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 - How do you use the IR port?

How do you use the IR port?

Discuss PocketC for Palm OS (including Desktop Edition)

Postby Moonlite on Fri Jan 26, 2001 3:17 pm

I tried using the Serial Chat on two Visors, but it didn't seem to work. I though that was how you sent stuff through the IR port. Does anyone know how to send data over the IR port? I'd like to not use the any extra libraries if possible.
Moonlite
 
Posts: 9
Joined: Sun Jan 21, 2001 2:11 pm

Postby Farmer Al on Fri Jan 26, 2001 3:37 pm

On the smae vein, will the port recieve at the same time??

Allen
Farmer Al
 
Posts: 4
Joined: Fri Jan 26, 2001 2:51 pm

Postby Moonlite on Fri Jan 26, 2001 7:56 pm

BTW, I was trying the serial I/O stuff, with the setting at 8N1C (whatever's in the Serial Chat sample).
Moonlite
 
Posts: 9
Joined: Sun Jan 21, 2001 2:11 pm

Postby jstadolnik on Fri Jan 26, 2001 8:34 pm

The reason the code is not working is because the UART (serial controller) in the dragonball processor on your palm has to be kicked into IR mode.

Currently, the only way of doing this is with the serIR() function in the PToolbox library.

And, yes you can send and receive data at the same time. The receive data is buffered, but the buffer is of a fixed size. So you should do reads frequently.

Joe
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Moonlite on Sat Jan 27, 2001 1:57 am

What are the correct settings for serIR() if I want to send/recieve? I've modified Serial Chat to test it, but 3 and 11 don't seem to work.
Moonlite
 
Posts: 9
Joined: Sun Jan 21, 2001 2:11 pm

Postby jstadolnik on Sat Jan 27, 2001 2:24 am

Try using serial mode "8N1N". That should do it.

Joe
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby Moonlite on Sat Jan 27, 2001 6:16 pm

Thanks! It now works with Serial Chat... but does anyone know how how to send/recieve strings? I want to send/recieve both 5 and 299 char strings over the IR Port. I kind of guessed, but it's not really working.

Also, do you have to use serIR(0) after using the IR port? Or does it turn if off automaticly? Just wondering...

To sum it up: Does anyone know who to send/reccieve strings over the IR port? (Hopefully without pointers)



Edited by - Moonlite on 01/28/2001 11:19:02
Moonlite
 
Posts: 9
Joined: Sun Jan 21, 2001 2:11 pm

Postby SyPDA on Sun Jan 28, 2001 8:29 pm

Could you please post the modified serial chat routine here? I'm trying to do the same thing but had no luck so far.

Did you test it with two Palm units? Has anyone tried to send IR commands (e.g. 'atz') to a IR mobile phone?
SyPDA
 
Posts: 94
Joined: Tue Dec 05, 2000 8:08 am
Location: Germany

Postby Moonlite on Sun Jan 28, 2001 9:06 pm

I used my Visor Deluxe and my friend's Visor. Here is the modified version:

//Serial Chat
library "PToolboxLib"
main(){
int ret;
clear();
puts("Serial Chat\n");
ret = seropen(57600, "8N1N", 50);
serIR(3);
...

That is the only part I changed. And once again, does anyone know an easy way (or a way that works) to send and recieve strings over the IR port? Please?
Moonlite
 
Posts: 9
Joined: Sun Jan 21, 2001 2:11 pm

Postby jstadolnik on Mon Jan 29, 2001 1:09 am

You will have to convert your strings to/from arrays of chars to do it.

Check out the following PocketC built-in functions: strtoc, ctostr, sersenda, and serrecva.

You should use the serIR(0) call when you are done. This disengages serial IR mode (though the OS may do this automatically, but you shouldn't count on that).

Joe



Edited by - jstadolnik on 01/28/2001 19:14:02
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 3 guests

cron