2009/9/9 Ronald Tallent <[email protected]>:
> Hey everyone,
>
> I just got setup with SHR and I love it! Most everything works out of the
> box. Just one thing I'm working on and that's getting a command to run over
> SSH. What I want to do is set up a script on my laptop that will issue the
> following commands to the gta02:
>
> 1) power on the bluetooth
> 2) sdptool add SP
> 3) rfcomm -r watch 0 1 sh -c "gpspipe -r >/dev/rfcomm0"
>
> For the purpose of getting the Neo to route GPS NMEA data over bluetooth.
> Then the script would fire up up the rfcomm on the laptop.
>
> Everything works except step 3. For some reason when I use the command:
>
> cmd | ssh r...@neo rfcomm -r watch 0 1 sh -c "gpspipe -r >/dev/rfcomm0" &
>
> it executes the command and starts two processes running on the neo:
>
> 2152 ?        S      0:00 sh -c rfcomm -r watch 0 1 sh -c gpspipe -r
>>/dev/rfcomm0
> 2155 ?        S      0:00 rfcomm -r watch 0 1 sh -c gpspipe -r
>
> Obviously the actual rfcomm command isn't routing the output to
> /dev/rfcomm0. Any ideas how I can get this command to run properly? Or if
> there's a forum or something I should be asking this on, let me know and
> I'll try there.

The sh processl opens /dev/rfcomm0 and redirects rfcomm's fd 1 to that
file. You should see that if you do "ls -l
/proc/<pid-of-rfcomm-here>/fd". You don't see that in the ps-output.
_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user

Reply via email to