From owner-freebsd-questions@FreeBSD.ORG Mon Sep 5 08:07:38 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 658DA16A41F for ; Mon, 5 Sep 2005 08:07:38 +0000 (GMT) (envelope-from paulh@bdug.org.au) Received: from mail.bdug.org.au (mail.bdug.org.au [202.72.170.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FF2B43D45 for ; Mon, 5 Sep 2005 08:07:32 +0000 (GMT) (envelope-from paulh@bdug.org.au) Received: from localhost (localhost.bdug.org.au [127.0.0.1]) by mail.bdug.org.au (Postfix) with ESMTP id 83BFBDE0 for ; Mon, 5 Sep 2005 16:07:17 +0800 (WST) Received: from mail.bdug.org.au ([127.0.0.1]) by localhost (ant.bdug.org.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14707-08 for ; Mon, 5 Sep 2005 16:07:06 +0800 (WST) Received: from w2k2 (unknown [192.168.0.102]) by mail.bdug.org.au (Postfix) with ESMTP id CC536DD8 for ; Mon, 5 Sep 2005 16:07:06 +0800 (WST) From: "Paul Hamilton" To: Date: Mon, 5 Sep 2005 16:08:51 +0800 Message-ID: <043801c5b1f1$0d0281f0$6600a8c0@w2k2> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Virus-Scanned: amavisd-new at bdug.org.au Subject: Serial Port data dumping program X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2005 08:07:38 -0000 Hi, I am trying to debug a Mini SSC FreeBSD program that I am trying to = write. It would be nice to be able to be able to see what is being transmitted. = It would help in the debugging of my program. Here is a link to a Windows based Mini SSC program: http://www.rentron.com/Mini-ssc.htm Using this, I can control the = servo, so I know the hardware and cables work etc. I have been using the 'minicom' port to dump the received data. = However, it doesn't seem to collect the data properly. Data coming in should be in accordance with the SSC protocol, ie: =20 byte 1: 0xFF // sync byte byte 2: 0x01 - 0x25f //servo address byte 3: 0x00 - 0x255 // servo position Here is a dump of the collected data (via minicom): #hexdump minicom.cap 0000000 45ff 49ff 4cff 50ff 53ff 57ff 5aff 57ff 0000010 53ff 50ff 4cff 49ff 45ff 45ff 01ff ff82 0000020 8101 01ff ff80 8202 02ff ff81 8002 03ff 0000030 ff83 8203 03ff ff81 8003 7fff 7fff 7eff 0000040 01ff ff7f 7f02 03ff ff7f ff7f 8001 02ff 0000050 ff80 8003 04ff ff80 ff80 8006 07ff 0080 Looking at the first row of data, it is only showing two bytes, sync and servo position. Rows 020 and 030, shows some servo addresses, but sometimes, together! Both the mini-ssc.exe and minicom program are = using 9600 8n1, so why is it showing this? Is there something I have missed = in the setup of minicom? Looks like this is a serial buffer problem. Is there a better program I could use to display the incoming serial = data in hex? NOTE: I only use two wires, signal ground and Tx Data (connected to the = Rx Data). The servo does respond correctly, so I know the serial data must = be in the correct 3 byte format. Looking fwd to your thoughts. Cheers, Paul Hamilton