Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

New protocol information and refactoring #5

@markubiak

Description

@markubiak

Over the last few days I've been working on getting the MiniDSP 2x4 HD to talk to my Raspberry Pi and have it display the current volume, mute, input, etc. on a 14-segment alphanumeric display. It is working fine, but with significant and structural modifications to the code that I would never commit. Here is the information I found out.
The _getMasterStatus() command in device.js sends [0x05, 0xFF, 0xDA, 0x02]. I realized that any command starting with [0x05, 0xFF] results in the read of essentially a block of memory from 0x00 to 0xFF, with each element having 16 bits of data associated with it. This data is read by giving the starting address and number of elements to return. The current volume is stored at 0xDA and the mute status is stored at 0xDB. So the above command requests the volume and mute status. By fuzzing this block, I figured out that the current selected input is actually stored at 0xD9, right before the volume. Changing the command to [0x05, 0xFF, 0xD9, 0x03] now sends back, in order, the current input index, volume, and mute status.
Where this gets weird is what the MiniDSP sends back upon a change. If the volume changes, the board sends back the original [0x05, 0xFF, 0xDA, VOL, MUTE]. However, if input changes, it seems as if the board sends back [0x05, 0xFF, 0xA9, INPUT]. I can't quite figure out why, but I have also never tried to reverse engineer anything like this before so some advice would be wonderful. Once we figure out what's going on a bit better, I'd be happy to write or rewrite portions of device.js to reflect the extra information available.
The next step would be exposing device.js. Since your package.json points to a nonexistent index.js, I cannot manually call any javascript functions without directly instantiating device.js. I'd rather write some code so that these classes are properly exported and can be accessed from a simple require('minidsp'); I have a very ugly index.js that does this in an extremely hacky manner. If you couldn't already tell I'm not a huge JS guy so this is all a bit bizzare to me.
Anyways, let me know how I can help out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions