Skip to content

Commit

Permalink
Mac instructions and launchd support. Couple of documentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Petersen committed May 8, 2014
1 parent 11b2978 commit 0a5266b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,21 @@ NOTE: The OpenSSL dev package is needed in order to compile with SSL support.
3. sudo cp ser2sock /usr/local/bin/
4. sudo cp -R etc/ser2sock /etc/
5. Make changes to /etc/ser2sock/ser2sock.conf as needed.
6. If using SSL generate certificates
7. sudo cp init/ser2sock /etc/init.d/
8. sudo update-rc.d ser2sock defaults
9. sudo /etc/init.d/ser2sock start
6. sudo cp init/ser2sock /etc/init.d/
7. sudo update-rc.d ser2sock defaults
8. sudo /etc/init.d/ser2sock start

Installation (Mac OS X)
=======================

1. ./configure
2. make
3. sudo mkdir -p /usr/local/bin
4. sudo cp ser2sock /usr/local/bin
5. Change the 'device' setting in /etc/ser2sock/ser2sock.conf.
6. sudo cp init/ser2sock.plist /System/Library/LaunchAgents/
7. sudo launchctl load /System/Library/LaunchAgents/ser2sock.plist
8. sudo launchctl start ser2sock

Usage
=====
Expand All @@ -33,7 +44,7 @@ options
-i IP bind to a specific ip address; default is ALL
-b baudrate set baud rate; defaults to 9600
-d daemonize
-0 raw device mode no !SER2SOCK info messages
-0 raw device mode - no info messages
-t send terminal init string
-g debug level 0-3
-c keep incoming connections when a serial device is disconnected
Expand Down
2 changes: 1 addition & 1 deletion etc/ser2sock/ser2sock.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ port = 10000
raw_device_mode = 0

# Keep incoming connections open when the serial device is disconnected? Default: 0
#preserve_connections = 0
preserve_connections = 1

# Delay (in milliseconds) between attempts to open the serial device. Default: 5000
#device_open_delay = 5000
14 changes: 14 additions & 0 deletions init/ser2sock.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http:https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>ser2sock</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/ser2sock</string>
</array>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ser2sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ void show_help(const char *appName)
" -i IP bind to a specific ip address; default is ALL\n"
" -b baudrate set baud rate; defaults to 9600\n"
" -d daemonize\n"
" -0 raw device mode no !SER2SOCK info messages\n"
" -0 raw device mode - no info messages\n"
" -t send terminal init string\n"
" -g debug level 0-3\n"
" -c keep incoming connections when a serial device is disconnected\n"
Expand Down

0 comments on commit 0a5266b

Please sign in to comment.