You were probably expecting this...
Okay, I've looked at the source code and I'm slowly beginning to understand how it works. But since I'm looking at it from the "inside out" as it were (starting with the restartplayer() function and then finding all the bits that
it calls), I'm slightly confused about how to proceed.
I'm not sure how much more work I want to put into this. Here's what I'm after:
I want to be able to plug a string of hard-coded writebyte() statements into DOWNLOAD.C that will reboot the player. I'm wondering whether this is even possible.
I think I can construct a hard-coded reboot packet in a pretty straightforward fashion. But that's just the packet itself. Then I need to append a 16-bit CRC on the end of the packet. Even that's do-able, especially since the packet will be hard-coded.
But what I'm not sure about is whether any handshaking needs to go on before the packet itself can be sent. When I try to just send the raw packet, nothing happens on the player. I'm not sure whether it's because I've got the CRC wrong, or if it's because the player isn't listening at all because I haven't done the right handshaking to make it listen for a packet in the first place.
Here is what I think needs to be sent to the player, correct me if I'm wrong (all multi-byte values send LSB first):
PSOH = 02 00
Datasize = 07 00
Opcode = 0C
Type = 0
Packet_ID = (four-byte value, minimum value of 43, exact number unimportant)
Command = 00 00
Param0 = 02 00 (restart_unit, possibly 02 F0 for restart_in_slumber)
Param1 = 00 00
Param2 = 00
CRC = ?? ??
If I get the CRC right, can I just throw those bytes down the serial cable, or is there more handshaking needed before the player will listen to that packet?
I'm also assuming that if I get the CRC wrong, the player will ignore the packet. Is this correct?
If I don't have to do any handshaking, then I'll take the time to work out the CRC and send it. If there's handshaking involved, then I'm just going to drop this idea and let the user cycle the power themselves.
___________
Tony Fabris