For Newbies : How i made my iPAQ 3630 talk via the IR port 
Author Message
 For Newbies : How i made my iPAQ 3630 talk via the IR port

This is how i made my iPAQ 3630 able to comunicate via IR port (in my eVB
prog)

ALL WRITTEN HER APPLIES ONLY TO :

PC :
 PC Win98SE + MS eVB 3.0
 "IRmate 210" IR tranciver on Com 2 port
 MS Hyperteminal

PDA :
 iPAQ 3630
 rev. lev. 1.0
 rom date 03/08/01
 rom rev. 1.77.00 ENG
 OS version: 3.0   ( win CE )
----------------------------------------------------------------------------
--

On Form1 you place :

 3 Command buttons
 1 Textbox
 1 Listbox
 1 Comm controller ( Project > Components... > MS CE Comm Controller 3.0 )

In eVB you change thees properies on Comm1 comm :

 CommPort = 2       (applies to iPAQ's only ?!?! )
 RTreshold = 1
 Settings = 9600,N,8,1

This is the eVB code :
'-------------------------------------  eVB code
start ------------------------

Option Explicit

Private Sub Comm1_OnComm()
   'add inncomming character to List1 listbox
     Label3.Caption = Now
    If Comm1.CommEvent = 2 Then Call addchar(Comm1.Input)

End Sub

Private Sub Command1_Click()
    'open Com 2 port (IR)
    Comm1.PortOpen = True

End Sub

Private Sub Command2_Click()
     'send text1.text to IR port
    Comm1.Output = Text1.Text

End Sub

Private Sub Command3_Click()
    'close ComPort 2 (IR)
    Comm1.PortOpen = False
End Sub

Private Sub Form_Load()

End Sub
Private Sub addchar(da)
    List1.AddItem da

End Sub
Private Sub Form_OKClick()
    App.End
End Sub
'---------------------------------------- eVB code
end ------------------------------

Set up your other IR tranciver  to 9600,N,8,1
You may use Hyperteminal on a PC whit IR on a comport

How to use this :

 1. Clk Command1 to open IR port
 2  Type in the text in Text1 you want to send
 3. Clk Command2 to send

 (repeat  step 2 - 3 )

 Inncoming charaters  will be dispayed in List1 listbox
 ( 1 char \ line )

 4. When session is ended, clk Command3 to close IR port.

Some experiens i have made before getting this far :

 I use my {*filter*} to diagnostic if the IR port is flashing out light
 Human eys are not able to see IR light but a {*filter*} can , and it
 shows you IR as blue light in your {*filter*} application ,

 If you use Commport 3 (instead of 2) on the iPAQ for comunication
 the iPAQ will not send the text in Text1 textbox but it will send
 1200 byte in attempt to establish a connection using some kind'a
 protocol \ carrier ( TCP-IR , IRda , Network - - - hell, i don't know. I
have captured
 the 1200bytes in a file if someone want it :-)

 I had to set Comm1.RThreshold to 1   (not 0 [the default] ) in order
 to make the On_comm event trig when a char is recived .

 When your appl use com2 on the iPAQ it looks like it interfers whit
 eVB and Acitve sync. The eVB -- iPAQ dialog can get messed up
 a bit, but removing iPAQ from cradle or repower iPAQ gets you
 'online' again. Sometime eVB needs to wait for com-timeout.
 And other ppl have mention the need to press the reset button on the
 iPAQ when your realy stuck :-)  ( But i did not have thees problems
 when used com3 on the iPAQ [ both com2 and com3 emtts light
 on the IR port ] )

 I also have a theory : using speeds slower then 9600 messes up
 the IR talk or gives you no talk at all ! ( I agree : make's no sence !
 if you think hardwire-com : the slower the better )

There are much more to learn and concider reg serial comunication, so this
is only meant as a start for those who gets no IR COM ACTION at all !

Please don't mind all my English syntax errors: This was not written for you
corecture readers, BUT to help newbies save 2 days (and night) head-banging
;-)

....And i don't enclose my e-mail : I allready get 20 mail's pr day telling
me how
to get richer or make my {*filter*} larger. I'm quit happy as it is  :-)

Quote:
>Cheeeeers<

Reg. A.Pedersen Norway


Sun, 03 Apr 2005 08:21:59 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Comm Control ( IPAQ-IR <-> IR-t68i )

2. Need information about print via IR port

3. Talking to external devices via Serial Port (MSCOM.OCX)

4. IR control in iPAQ using eVB

5. Finding COM Ports - Mouse dies when VB talks to its COM Port

6. IR Device on COM Port

7. COM PORT / IR REMOTE CONTROL

8. Read IR Remote from Serial Port

9. IR Port Programming

10. Help reading IR port

11. Question: VB Libraries IR Com Port control?

12. IR Port

 

 
Powered by phpBB® Forum Software