David Brownlee wrote:
On Sat, 3 Sept 2022 at 12:14, Staffan Thomén<staf...@shangtai.net> wrote:
Nevermind, I rewrote my program in C and umodem works perfectly fine,
although I do note that I had to use O_NONBLOCK, something the
GFCFlasher program explicitly omits.
Glad to hear you found a solution. Could it be down to default port
settings across different systems?
Nah, I found out later after having twiddled with my code some more that
it wasn't actually accepting my command, I was receiving but not sending
(hence why O_NONBLOCK worked). Turns out that the serial protocol is
little-endian and it was upset with me for sending messages that I said
were 0x9000 bytes long, not 0x9... :-)
Would you be using https://phoscon.de/en/conbee2/ ? Looks interesting
- I have a bunch of hue lights/sensors/plugs and use
https://github.com/bahamas10/hueadm to poke at them from my NetBSD box
as needed (such as a script to ensure the printer plug is on before
printing, or to gradually turn down some lights at night :) but I've
always wondered what other options might be provided by poking at the
individual devices more directly...
Exactly that ConBee II. The device seems really nice (and you get the
protocol docs! although they don't mention the litte-endian bit..), and
it does talk to some philips hue plugs I bought; I could control them
when I plugged the conbee into my windows PC and used the official software.
While I got into this whole replace-my-433MHz-system-with-zigbee thing I
also bought one of the usb connected CC2531 boards and it seems to also
use umodem. They're a bit tricky though because TI designates the chip
as a zigbee-sniffer, so you have to flash them using some pins on the
board in order to use them as a controller. Haven't really looked at
that yet and I don't have a programmer (but maybe I could convince an
arduino to do the programming).
Both of these could be of interest to you, I'm not sure if the hue (or
even zigbee, I haven't been doing my homework :-) allows more than one
controller though, could be interesting to find out.
I'm not sure where I'm going with this project yet, it was a fun
diversion trying to talk to the conebee, but zigbee is a whole thing
itself and my code can only request the firmware version from the device
so far (and handle unsolicited messages from the device).
Code can be found here: https://git.shangtai.net/staffan/cdeconz/ (this
url will not be permanent, the official software is called deconz and I
don't want to confuse my code with theirs)
Feel free to grab a copy if you want to play with it though :-)
Cheers,
Staffan