Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Writing IR data transmitter / receiver for Pocket PC 2003 (VB.Net)

Writing IR data transmitter / receiver for Pocket PC 2003 (VB.Net)

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Codemonkey85
    wrote on last edited by
    #1

    Hello, I am trying to write a program for my Pocket PC 2003 edition, which can receive and / or transmit IR data. I know that depending on the device, I will need to know some very specific information to properly send the data that I will want to send. However, for the time being, I would be happy just knowing how to send any old bytes of data that I choose. The problem mainly lies in the fact that I don't know Socket programming, I guess. So far all I have is:

    Dim IR As Socket = New Socket(AddressFamily.Irda, SocketType.Stream, ProtocolType.Unspecified)

    Where do I go from here, if I wanted to use the Socket I declared (IR) to send or receive data through my Pocket PC's IR port?

    As I sit here, I contemplate the last words of Socrates: "I drank what?". Pokémon Pearl Friend Code: 4554-2418-6836

    D 1 Reply Last reply
    0
    • C Codemonkey85

      Hello, I am trying to write a program for my Pocket PC 2003 edition, which can receive and / or transmit IR data. I know that depending on the device, I will need to know some very specific information to properly send the data that I will want to send. However, for the time being, I would be happy just knowing how to send any old bytes of data that I choose. The problem mainly lies in the fact that I don't know Socket programming, I guess. So far all I have is:

      Dim IR As Socket = New Socket(AddressFamily.Irda, SocketType.Stream, ProtocolType.Unspecified)

      Where do I go from here, if I wanted to use the Socket I declared (IR) to send or receive data through my Pocket PC's IR port?

      As I sit here, I contemplate the last words of Socrates: "I drank what?". Pokémon Pearl Friend Code: 4554-2418-6836

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Mind you, I have no IR or mobile development experience... How you do this depends on how the IR device is exposed to you. You'll either be using Sockets or you might have to switch to using serial communications (COM1, COM2, ...) to talk to the other machine. You might gleen some information on how to do this from this article[^].

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      C 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Mind you, I have no IR or mobile development experience... How you do this depends on how the IR device is exposed to you. You'll either be using Sockets or you might have to switch to using serial communications (COM1, COM2, ...) to talk to the other machine. You might gleen some information on how to do this from this article[^].

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        C Offline
        C Offline
        Codemonkey85
        wrote on last edited by
        #3

        I have been trying to use socket communications so far, but whether I use that or serial communications, I'm having trouble just setting the connection up in the first place. I've actually been trying to understand how to use either in a desktop setting as well, to no avail. For the socket communication option, I am having problems defining the EndPoint for the Socket.Connect method. This is what I have so far:

            Dim IR As Socket = New Socket(AddressFamily.Irda, SocketType.Stream, ProtocolType.Unspecified)
        
            Dim EP As System.Net.EndPoint
        
            Dim SA As System.Net.SocketAddress
        
            SA = New System.Net.SocketAddress(AddressFamily.Irda, 1)
        
            EP.Create(SA)
        
            IR.Connect(EP)
        
            IR.Send(New Byte() {1})
        
            IR.Close()
        

        This doesn't work because the EndPoint (EP) has not been assigned a value. EndPoint also does not use a New constructor, so I guess I'm just not sure how to declare it. I would just use the IRDA namespace, but my project is (like so many others') meant to communicate with remote controls and other "dumb" IR devices, rather than communicating with another Pocket PC or Windows based device. I realize the complications involved in communicating with such a device, but right now my main concern is even being able to send or receive any data at all. I figure I'll sort out the data format after that. Anyway, I don't know C++, but I will check out that link and see if I understand it.

        As I sit here, I contemplate the last words of Socrates: "I drank what?". Pokémon Pearl Friend Code: 4554-2418-6836

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups