Jump to content

help with port sensing program

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
16 replies to this topic

#1
rppprez

rppprez

    Newbie

  • Members
  • PipPip
  • 11 posts
hello everybody i'm quite new and i hoping i can get some assistance. i am using a xbee pro wireless device it uses xtcu software to interface with the pc via the usb. i'm not understanding their software to well but i am trying to create a c/c++ program to capture the signal when it is sent to the pc. And after it captures the signal it would then execute the rest of the program and when it is done executing the program returns and acknoledgement of some kind. My problem is i not sure if it is possible using the xbee pro (xctu software) If anyone can help it would be greatly appreciated

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
Do you have the right drivers? An SDK? What version of C++ are you using? More importantly, what OS?

#3
rppprez

rppprez

    Newbie

  • Members
  • PipPip
  • 11 posts
ok i am using windows and i am using visual studio but i do have sdk but i'm not sure if i can create a program to do this

#4
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
The SDK should come with documentation. Could you give us a link to where you got the SDK, so we can look through it a bit?

#5
rppprez

rppprez

    Newbie

  • Members
  • PipPip
  • 11 posts
the link to the documention for the device is http://http://ftp1.d...15.4_v1.xAx.pdf thanks for all your help

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
It looks like you need to send commands to the device to set a timer, check the device state every time the timer fires, and handle accordingly. The stuff you need is in the section titled API Operation. API stands for Application Programming Interface, so I'm guessing that's what you need.

EDIT: First you need to figure out what port to send the commands on, and what port to listen on. This means you need to use WinSock.

#7
rppprez

rppprez

    Newbie

  • Members
  • PipPip
  • 11 posts
I have been reading the documentation and i am still miffed. if you have any idea how i should go about starting this program it would be greatly appreciated +

thanks for your help in advanced

#8
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
I have no familiarity with whatever this thingy is, so I don't know any more than you do. Steps you do need to take (from what I gather, at least)

1) Establish contact with the device using a specific port that should be mentioned somewhere in the documentation
2) Send a trap command
3) Wait for the device to send data
4) Process data
5) Go to step 2 or 3, depending on how the device works.

WinSock Tutorials & Resources

#9
MeTh0Dz

MeTh0Dz

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,119 posts
You can use CreateFile(), WriteFile(), ReadFile() and Input/Output Controls to directly manipulate the device.

#10
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
But how would you specify the device to write to, unless it assigns itself a drive letter or you know its DOS name?

#11
rppprez

rppprez

    Newbie

  • Members
  • PipPip
  • 11 posts
thats one of my problems i'm not exactly sure how to catch the data coming in I know it connects to the usb port via the development board. then it uses a program called xctu. But i'm not sure how the data is then distributed by that program.

#12
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,720 posts
So what does this thing do, anyway?