To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.spyboticsOpen lugnet.robotics.spybotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Spybotics / 366
365  |  367
Subject: 
Spybot communication with Java
Newsgroups: 
lugnet.robotics.spybotics
Date: 
Fri, 17 Sep 2004 00:56:57 GMT
Viewed: 
6646 times
  
Hello Everybody,

I am writing a java application for 'junior' programmers (my Son) to control the
Spybot.  My application will support simple commands similar to logo.  But I am
having some difficulty in getting my java app to talk with the Spybot.  My
application is being developed under Linux, but should operate under any OS with
Java comms installed.

Firstly, sending a raw command to the Spybot such as 0x10 to see if it is alive.
Using NQC we send a packet (unsigned bytes in an array) 0x98 0x10 0x58 (the last
58 being a check sum to add up to 256).  Also, when you observe the dongle, you
get one bright pulse of light for each write to the serial port.

Now, when I run my application I send the same packet as an array of bytes, but
I don't get a response back from the Spybot.  When I watch the dongle, I get
about three short mid-strength pulses of light.

When running under Windows I am using a serial port monitor (Sermon) to watch
serial comms activity.  Under NQC I can see both packets (sent and received),
but my app only shows a packet being sent, never a packet from the Spybot in
reply.  Also, the packet being sent from my app appears the same as the packet
from NQC.

Has anybody been able to talk to the Spybot in Java?

I have been looking at the source for NQC (but my c++ is not very good) and also
looking at a couple of java apps that write to the RCX.  It appears my port
settings are OK, but I think there is something wrong with the way the packet is
sent.

Any help would be appreciated.

Thanks,

Allen



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR