Yes its the trailing newline i think so

echo -en "\xFF"

would work


On Tue, Aug 28, 2012 at 7:39 PM, Tom Kuiper <kui...@jpl.nasa.gov> wrote:

> **
> On 08/28/2012 10:22 AM, Adam Barta wrote:
>
> If you are running tcpborphserver2 on the roach then you can use the
> following commands to write and read from registers through the tcp
> interface on port 7147.
>
> ?wordwrite register-name word-offset payload
> ?write register-name register-offset payload
> ?wordread register-name word-offset length
> ?bulkread register-name [register-offset [byte-count]]
>
> I'm familiar with that.  Thanks.
>
> Is there a reason you would like to use the files?
>
> Generally speaking, the ROACH is on a private network and the controller
> host is behind a firewall.  Also, the network link can be pretty bad at
> times. 100 kbps or even as low as 50 kbps.  That could be because I'm at
> home using DSL or because I'm using a Deep Space Network circuit at a time
> when some huge higher-priority data transfer is in progress.  I can really
> cut down on the traffic is I use sshfs to mount the ROACH file system
> locally.
>
> This seemed to work for me
> root@192:/proc/389/hw/ioreg# cat sys_scratchpad | hd
> 00000000  12 34 56 78                                       |.4Vx|
> 00000004
>
> root@192:/proc/389/hw/ioreg# echo -e \FF\FF > sys_scratchpad
> root@192:/proc/389/hw/ioreg# cat sys_scratchpad | hd
> 00000000  46 46 46 46                                       |FFFF|
> 00000004
>
> That works for me too.  It tells me that the firmware is acting as it
> should.  Thanks for the tip.
>
> Hope this helps
>
> Note quite there yet, though.  Notice that what was stored are ASCII
> symbols.  It isn't just because of a missing 'x':
>
> root@roach1:/proc/1174/hw/ioreg# echo -e \01\00 > trig_adc0
> root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
> 00000000  30 31 30 30                                       |0100|
> 00000004
> root@roach1:/proc/1174/hw/ioreg# echo -e \x01\x00 > trig_adc0
> root@roach1:/proc/1174/hw/ioreg# cat trig_adc0 | hd
> 00000000  78 30 31 78                                       |x01x|
> 00000004
>
> But this hangs:
> root@roach1:/proc/1174/hw/ioreg# echo -e \\x01\\x00 > trig_adc0
>
> Regards
>
> Tom
>
>
>


-- 
*Adam Barta*
c: +27 72 105 8611
e: a...@ska.ac.za
w: www.ska.ac.za

Reply via email to