ts-7000
[Top] [All Lists]

[ts-7000] Re: USB serial gadget

To:
Subject: [ts-7000] Re: USB serial gadget
From: "Jon L" <>
Date: Wed, 13 Jan 2010 15:22:41 -0000
Debian GNU/Linux 5.0
ts7500 login: root
Last login: Wed Jan 13 09:43:42 UTC 2010 from dhpc-1060l.dhpc.local on pts/0
Linux ts7500 2.6.24.4 #55 Fri Aug 7 11:20:02 MST 2009 armv4l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
ts7500:~# cd /home/jon/programs/sjinn/

ts7500:/home/jon/programs/sjinn# ls -alF g* *.sh
-rw-r----- 1 root    root      640 Jan 12 13:02 gmakefile
-rwxr-xr-x 1 root    root    26852 Jan 12 15:33 grs232*
-rw-r----- 1 jleslie jleslie  1735 Jan  7 15:50 grs232.h
-rw-r----- 1 jleslie jleslie 14068 Jan 12 13:03 grs232ctl.c
-rw-r--r-- 1 root    root     9516 Jan 12 13:09 grs232ctl.o
-rw-r----- 1 jleslie jleslie  8333 Jan 12 15:33 grs232main.c
-rw-r--r-- 1 root    root     4732 Jan 12 15:33 grs232main.o
-rw-r----- 1 jleslie jleslie 12926 Jan 12 13:09 grs232opts.c
-rw-r--r-- 1 root    root     9884 Jan 12 13:09 grs232opts.o
-rwxr-xr-x 1 root    root      114 Jan 12 16:03 test_run_gps.sh*
-rwxr-xr-x 1 root    root      255 Jan  7 14:23 uart0_setup.sh*
-rwxr-xr-x 1 root    root      255 Jan  8 15:36 uart1_setup.sh*
ts7500:/home/jon/programs/sjinn# make -f gmakefile clean
rm -f grs232 *.o
ts7500:/home/jon/programs/sjinn# make -f gmakefile
gcc -c grs232opts.c  -pg -Wall
gcc -c grs232main.c  -pg -Wall
gcc -c grs232ctl.c  -pg -Wall
gcc -o grs232 grs232opts.o grs232main.o grs232ctl.o  -pg -Wall  -lm
ts7500:/home/jon/programs/sjinn#


ts7500:/home/jon/programs/sjinn# ./uart0_setup.sh
+ pgrep -f 'xuartctl --port 0' -l
++ pgrep -f 'xuartctl --port 0'
+ XUARTID=
+ kill
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or ki
++ xuartctl --port 0 --server --speed 4800
++ cut -d= -f2
+ PAR1=/dev/pts/2
+ echo /dev/pts/2
/dev/pts/2
+ ln -sf /dev/pts/2 /dev/uart0
++ pgrep -f 'xuartctl --port 0'
+ XUARTID=1026
+ echo 1026
1026



ts7500:/home/jon/programs/sjinn# ./test_run_gps.sh
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -12
rs232_main: speed value: -12
rs232_main: speed value: -12
rs232_main: speed value: -14
rs232_main: speed value: -14
rs232_main: speed value: -12

^C

ts7500:/home/jon/programs/sjinn# ./test_run_gps.sh --verbose
/dev/uart0 4800 8n1 wait 1.100000 seconds
read 500/500 characters after
$GPGGA,144552.289,,,,,0,00,,,M,0.0,M,,0000*56

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144552.289,V,,,,,,,130110,,*2D

$GPGGA,144553.289,,,,,0,00,,,M,0.0,M,,0000*57

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144553.289,V,,,,,,,130110,,*2C

$GPGGA,144554.289,,,,,0,00,,,M,0.0,M,,0000*50

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPGSV,3,1,11,17,71,049,,04,65,253,,20,34,058,,28,32,161,*70

$GPGSV,3,2,11,02,25,243,,09,16,278,,27,16,275,,12,13,319,*73

$GPGSV,3,3,11,32,12,038,,23,02,094,,11,02,067,*4D

$GPRMC,144554.28
rs232_main: speed value: -14
wait 1.100000 seconds
read 487/500 characters after
9,V,,,,,,,130110,,*2B

$GPGGA,144555.289,,,,,0,00,,,M,0.0,M,,0000*51

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144555.289,V,,,,,,,130110,,*2A

$GPGGA,144556.289,,,,,0,00,,,M,0.0,M,,0000*52

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144556.289,V,,,,,,,130110,,*29

$GPGGA,144557.289,,,,,0,00,,,M,0.0,M,,0000*53

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144557.289,V,,,,,,,130110,,*28

$GPGGA,144558.289,,,,,0,00,,,M,0.0,M,,0000*5C

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144558.289,V,,,,,,,130110,,*27


rs232_main: speed value: -14
wait 1.100000 seconds
read 291/500 characters after
$GPGGA,144559.289,,,,,0,00,,,M,0.0,M,,0000*5D

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPGSV,3,1,11,17,71,049,,04,65,253,,20,34,058,,28,32,161,*70

$GPGSV,3,2,11,02,25,243,,09,16,278,,27,16,275,,12,13,319,*73

$GPGSV,3,3,11,32,12,038,,23,02,094,,11,02,067,*4D

$GPRMC,144559.289,V,,,,,,,130110,,*26


rs232_main: speed value: -14
wait 1.100000 seconds
read 131/500 characters after
$GPGGA,144600.289,,,,,0,00,,,M,0.0,M,,0000*52

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144600.289,V,,,,,,,130110,,*29

$GPGGA,144601.2
rs232_main: Not enough GPS satellites
 rs232_main: speed value: -12
wait 1.100000 seconds
read 170/500 characters after
89,,,,,0,00,,,M,0.0,M,,0000*53

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPRMC,144601.289,V,,,,,,,130110,,*28

$GPGGA,144602.289,,,,,0,00,,,M,0.0,M,,0000*50

$GPGSA,A,1,,,,,,,,,,,,


^C
ts7500:/home/jon/programs/sjinn#
ts7500:/home/jon/programs/sjinn#
ts7500:/home/jon/programs/sjinn#


--- In  "Jon L" <> wrote:
>
> I can't help you with the USB port on the TS-7500, (although I'd love to see 
> some software/hardware that would do the job,) but I have just finished a 
> plain old regular RS232 UART port on pins (5,6) (7,8) and (19,20)  (UART0, 
> console, UART1 respectively) that work just fine. Reads and writes to the 
> UART's no problem, and I'll be adding the log file to disk very shortly.  You 
> are welcome to that solution if you like.  
> 
> Why exactly do you want to go through the USB port for Serial RS232 
> communcations?  I apologize in advance for this question.  I know you are 
> looking for a USB solution and I know personally I hate when people offer 
> different solutions; however I do have what I believe is a complete 
> example/solution using the straight DIO pins for Serial communcations that 
> I've already tested on a TS-7500 using the debian linux OS. 
> 
> I would like in general to know more about using the USB ports also, but for 
> me it was much more straight forward to use an old fashioned UART on pins.  
> 
> 
> 
> --- In  Erik Brom <ewbrom@> wrote:
> >
> > Hi,
> > I already use the RS-232 to USB adapters with the product now.   The 
> > product I'm trying to create will talk to the legacy device serially 
> > and store the data on the SD card for later retrieval.
> > 
> > I want to start with the USB serial client for a few reasons:
> > - a way to learn about the TS-7500, and prove that the TS-7500 talks 
> > to the device.  If the legacy software on the PC successfully talks 
> > to the device through the TS-7500, then I get a warm and fuzzy that 
> > the com port is set up right.
> > - a way to learn how to use the USB client port.
> > - Once I get this far, I'll have a starting point for the actual 
> > production software that will run on the TS-7500.  The USB client 
> > port may or may not be part of the final product.
> > - I could use the USB serial port as a debugging aid, as previously 
> > discussed in this thread.
> > 
> > Thanks for this link too: > http://www.linux-usb.org/gadget/
> > 
> > Thanks,
> > Erik
> > 
> > 
> > 
> > At 10:13 AM 01/12/10, you wrote:
> > >Let me see if I got this.  Your legacy device has an RS-232 port 
> > >e.g. with a DB-9 connector on it.  You want to talk to it via a USB port.
> > >
> > >If it's just that, then there are a number of USB-to-Serial 
> > >converters.  Keyspan is one.
> > >
> > >Digi sells RF modems which would let you make the device wireless.
> > >
> > >But, if you're trying to network the device, then you'd need something 
> > >else.
> > >
> > >
> > >
> > >--- In  "naturalwatt" <martin@> wrote:
> > > >
> > > >
> > > >
> > > > --- In  "ewbrom" <ewbrom@> wrote:
> > > > >
> > > > > Hi,
> > > > > I just purchased an TS-7500, which I'm planning to use to 
> > > remotely access a legacy serial instrument.  It is currently used 
> > > with custom Windows software.
> > > > >
> > > > > To get started, and as a debugging aid, I would like to make 
> > > the USB device port look like a generic serial port to the 
> > > PC.  Initially, I'll just pass the serial stream through to one of 
> > > the serial ports.  Later, I'll use it to monitor the coms.
> > > > >
> > > > > I assume this gadget is out there, I would appreciate it if 
> > > someone could point me to it.
> > > > >
> > > > > Alternately, a virtual serial port over Ethernet would also work.
> > > > >
> > > > > Thanks,
> > > > > Erik
> > > > >
> > > >
> > > > This is something I'm also interested in.  There's some good 
> > > > information on
> > > > http://www.linux-usb.org/gadget/
> > > > and the option of running ethernet-over-usb looks promising.
> > > >
> > > > Martin
> > > >
> > >
> > >
> > >
> > >
> > >------------------------------------
> > >
> > >Yahoo! Groups Links
> > >
> > >
> > >
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU