Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Serial-Ports Linux / Psion Link Protocol

 [1/2] from: fsievert::uos::de at: 13-Nov-2003 8:57


Hi! If you want to use the serial ports with linux, the following function could help. Rebol does not set all serial-parameters correctly. Use the set-serial-port function to the port after it is opened to fix it. You have to use latest BETA-Version of REBOL because it needs the set-browser-path feature. If you want to use browse within your program, you will have to set-browser-path again after using this function. USAGE: port: open/direct/binary [scheme: 'serial rts-cts: no speed: 115600] set-serial-port port Maybe you will want to use this, too: if find [3 4] system/version/4 [ system/ports/serial: [ttyS0 ttyS1] ] Is someone interested in my psion-protocol (read psion://port1/c/..) or psion-backup.r to transfer files from/to Psion-S5 devices? CU Frank set-serial-port: func [port /local] [ if system/version = 1.2.10.4.2 [ set-browser-path "bash" browse rejoin [ {-c "stty --file /dev/} pick system/ports/serial to-integer skip form port/device 4 { } either port/rts-cts [""] ["-"] {crtscts } {cs} any [port/data-bits 8] { } either 2 = port/stop-bits [""] ["-"] {cstopb } switch/default port/parity [ none ["-parenb"] odd ["parenb parodd"] even ["parenb -parodd"] ] [ "-parenb" ] { } { -ixon -ixoff ispeed } port/speed { ospeed } port/speed {"} ] ] ]

 [2/2] from: amicom:sonic at: 14-Nov-2003 9:25


Frank, I use my Psion S5 every day and I do keep my work log on it, so it would be handy to have the psion:// protocol to help automate the process. Now if you have functions to convert Psion Sheet files to CSV and CSV files back to Psion Sheet, that would be even better! ;-) I worked on reverse-engineering the Psion Sheet file format, but that was years ago and I don't know what I did with the source. It wasn't 100% complete in any case. Thanks! Bohdan "Bo" Lechnowsky Lechnowsky Technical Consulting At 08:57 AM 11/13/03 +0100, you wrote: