How to POST external bytestream?

Cannot get the following to work:

import zrna.zr_pb2 as zr
c=zr.ConfigurationByteStream()
c.data=bytes.fromhex('0000000000d5b720010000c1c4000e2004000205000040000051ff0ff12ac1010502400000082ade010202ff2a8a020d40000040f08205f082050008082a00')
z.post("/circuit/bytestream", c)

==> z.bytestream() still returns the previous bytestream

It should work, I probably oversaw something simple.

Hey @mcleinn. Glancing back at the client library code I’m not remembering how to make this work off the top of my head. I need to check something in the firmware to get the full answer.

One tricky aspect of this is that the “circuit” in question might have some other random configuration (of modules, etc). I can’t remember off the top of my head if directly substituting a bytestream like this is supported or not.

This may simply be a bug as well. Let me confirm.

1 Like

The API endpoint doc seems to indicate it should be possible:
"Get configuration bytestream. Push an external bytestream."
In any case, for my evolutionary algorithm project it would be a very handy function to have.