Hijack v441

Posted by: mlord

Hijack v441 - 26/11/2005 04:44

Hijack v441 is now available. PLEASE READ before downloading:

This version (finally) implements full separation of the player software from the physical serial port, so that apps like Empire et al. can have exclusive use of the port without interference to/from the player software, for both transmit and receive directions.

Kernel messages still go to the serial port, though.
I can change that, if desired. Opinions?

The (new!) default now is to isolate the player from the serial port. This means you will not see player messages on the serial console, and hitting "q", or "Control^C", or anything else will have ZERO effect -- since the player is no longer receiving those characters.

Sending "serial" commands via /proc/empeg_notify, or khttpd, or kftpd, all still works fine, of course.

The Hijack menu has a Serial Port Assignment entry, which is now maintained separately for AC vs. DC power modes (car vs. home). The default is now Apps Use Serial Port, which gives the default behaviour described above.

Selecting Player Uses Serial Port connects the player to the serial port (on the next restart/reboot), totally unfiltered -- even the serial "notify" messages then appear (and are NO LONGER captured by Hijack in this mode).

I recommend people stick with Apps Use Serial Port, as this is the only mode where /proc/empeg_notify works (lots of apps require this).

Questions?

Go for it.
Posted by: RobotCaleb

Re: Hijack v441 - 26/11/2005 05:22

Quote:
Kernel messages still go to the serial port, though.


Meaning that an upgrade/downgrade through serial will still work, I'm assuming?
Posted by: matthew_k

Re: Hijack v441 - 26/11/2005 05:31

If I want to drop to a shell, (not that my everyday computer even has a serial port at this point), I have to change to player uses serial port, reboot, and then press Q? Or install a telnet deamon.

I'm not complaining, just wondering.

Plantir with bluetooth is sounding tempting. Though my girlfriend already complains about the amount of things I keep in my pockets, I suspect a Treo might push her over the edge.

Matthew
Posted by: Roger

Re: Hijack v441 - 26/11/2005 06:24

Quote:
Meaning that an upgrade/downgrade through serial will still work, I'm assuming?


Serial upgrades are handled by the boot block in the EEPROM. At this point, the kernel's not running yet, so it's a moot point.
Posted by: RobotCaleb

Re: Hijack v441 - 26/11/2005 06:38

Roger, errr... Roger.
Posted by: cushman

Re: Hijack v441 - 26/11/2005 10:34

Damn, Mark, you are fast. Thanks a TON!
Posted by: mlord

Re: Hijack v441 - 26/11/2005 13:20

Quote:
If I want to drop to a shell, (not that my everyday computer even has a serial port at this point), I have to change to player uses serial port, reboot, and then press Q? Or install a telnet deamon.


Pretty much, yes.

But there does seem to be an issue in testing this morning -- I'm not sure that "serial" commands are actually getting to the player software (from places like the web interface).. Hopefully I'll find/fix that sometime today.

Cheers
Posted by: mlord

Hijack v442 - 26/11/2005 14:27

Hijack v442 is now released.

This version fixes a simple bug from v441, so that "serial commands" from the web interface et al. now work again.

Cheers
Posted by: mlord

Re: Hijack v44[12] -- techie details - 26/11/2005 15:11

Here's how this new scheme works:

Hijack creates a new tty device: /proc/ttyH (under /proc/, since we cannot easily write to /dev/). The H is for Hijack.

Whenever the program /empeg/bin/player is launched, the stdin stdout and stderr streams are closed (disconnecting them from the console), and then reopened as /proc/ttyH. Any subsequent open of /dev/ttyS1 by the player program is also redirected to /proc/ttyH.

The new /proc/ttyH device has it's own tty driver code, in drivers/char/tty_io.c. This code simply passes outgoing strings to Hijack for "notify" parsing, and receives characters injected by Hijack from the web interface and pals.

Cheers
Posted by: FireFox31

Re: Hijack v441 - 26/11/2005 21:18

How should we get to the command prompt via Telnet if our Hijack 442 player gets sick? It won't boot enough to let us reenable player-to-serial communication, so we're stranded, right? If it's this sick, could it receive serial commands from the other interfaces you're describing?

Clearly, I know little about all this. Maybe this could clarify for others with similar low level of empeg software knowledge.
Posted by: bonzi

Re: Hijack v441 - 26/11/2005 23:29

As far as I understand, in extreme circumstances one can always downgrade to stock kernel, bacause, as Roger pointed out, firmware uploads are handled before the kernel gets booted.
Posted by: mlord

Re: Hijack v441 - 27/11/2005 01:25

Quote:

How should we get to the command prompt via Telnet if our Hijack 442 player gets sick?



Same way as normal: push and hold the knob or the menu button on the remote. From the Hijack menu, then change the serial setting.

Hijack runs from boot time onward (since it is the kernel), long before the player s/w is alive.

If you're worried about your telnetd not working, then.. no change from earlier Hijack versions: plug in the serial cable when telnetd isn't working.

-ml
Posted by: V99

Re: Hijack v441 - 27/11/2005 05:53

Quote:

Kernel messages still go to the serial port, though.
I can change that, if desired. Opinions?




I'd prefer if kernel/boot messages were silenced too, so that remote VFDs connected by serial don't get all the boot log displayed (or worse, garbage when the VFD isn't 115.2kbps) on startup.
Posted by: schofiel

Re: Hijack v441 - 27/11/2005 09:31

Over.
Posted by: FireFox31

Re: Hijack v441 - 27/11/2005 12:53

Awesome, thanks.
Posted by: Roger

Re: Hijack v441 - 27/11/2005 19:10

Quote:
Over.


I once sent a text to Hugo saying "Wilco" -- I think we were working out which pub to meet in that evening. Given that his phone at the time displayed the sender's name above the text, it was mildly amusing.