http://qs1969.pair.com?node_id=11124724


in reply to Re: Controlling USB on Raspberry Pi
in thread Controlling USB on Raspberry Pi

Do you have the datasheet for the USB module? USB is simply a serial interface, for which you can use my RPi::Serial module.

You need the communication specification so you know how to set up the serial interface, as well as what you need to send to the unit to trigger high/low states of each relay on the board.

I've never even heard of a USB relay breakout board before, let alone used one, but I do have vast experience communicating over USB/serial to dozens of other device types, which is why I stuck with the GPIO scenario.

Replies are listed 'Best First'.
Re^3: Controlling USB on Raspberry Pi
by Bod (Curate) on Dec 05, 2020 at 23:47 UTC

    Do you have the datasheet for the USB module?

    Not at present but I have a module on order and I'm hoping it will come with some clues as to what needs to happen to make it operate.

      Here's a hard learned tip... when purchasing electronic devices for these types of projects, *always* ensure that you have a datasheet up front that you can review to ensure that it seems reasonably sane, and that you can understand at least the core information it contains.

      I have written software across several languages for over a hundred random ICs and devices, and the only thing worse than no documentation, is poorly written documentation that is incorrect (nothing like the fun of debugging an IC to learn after three days of head-desking that the damned documentation failed to mention overlapping registers!).

      Hopefully this device comes with proper docs, but in the future, solidify that fact up front if you carry on doing projects like this.

        Your fears were correct 😕

        The module has arrived with no datasheet...

        So next step will be to connect it to the USB port on a laptop and find some software to use the USB and attempt to find what the module needs.