/linux/Midge
Midge
Midge is related/derived from OpenWRT.
How to free up /dev/ttyS0 while still having a chance to log in on this port.
By default /dev/ttyS0 and /dev/ttyS1 (accessable via hardware mod) have terminal access on them. This is not what you want if you want to talk to anything but a terminal on these ports. Of course, you could disable the getty line in /etc/inittab. However, this is problematic if you have a networking problem, you cannot log in via a terminal.
The solution: Comment out the existing line in /etc/inittab for /dev/ttyS0 and insert the lines below instead:
#Give us one go, 10 sec, to login on ttyS0 then free up the port.
ttyS0::once:/sbin/getty -t 10 -L ttyS0 115200 vt100
This gives you, once the board has finished booting, a 10 second window to log in. Timeout defined by the "-t 10". The word "once" replaces the more usual "respawn" parameter, once we log out getty will not respawn (restart).
Useful references
- Build midge root
- SunspotUseful site, especially for IO.
- Where to buy in the UK.(I'm not a sales person, just a customer!)