3050311118 发表于 2014-7-8 21:53:12

想把Ymodem功能集成到自己的小软件中,找了个Lrzsz,感觉不...

想把Ymodem功能集成到自己的小软件中,找了个Lrzsz,感觉不错,
lrzsz有linux功能的项目源码   于是下载下来试验下可以移植到其他平台 比如mingw,或者arm设备
Ubuntu 编译完之后
sz rz命令可以用   但是出了一个问题   我想用USB转串口的他默认的不知道是啥子的串口号
命令行也不知道怎么把 串口设备路径穿进去   看了下help估计传不了
我想用我的usb转串口线该怎么使用的   

aozima 发表于 2014-7-8 22:18:30

99%的软件都支持--help

既然是自己用源代码编译的,那这还是事吗?

3050311118 发表于 2014-7-9 05:59:33

aozima 发表于 2014-7-8 22:18
99%的软件都支持

既然是自己用源代码编译的,那这还是事吗?

太多代码,源代码搜索了文字中包含"/dev"关键字 搜出来两个文件就只有两个个地方
-D, --null                  write all received data to /dev/null\n\
name_static=(char *) strdup("/dev/null");

本人linux两个月前刚开始接触   比较蹩脚目前在只会 ubuntu 下下载源码包然后   ./configure --prefex make make install 这个层次   正在学习中
感觉linux挺有意思ubuntu,mingw,openwrt都在搞。

网上找不到指定串口号资料 我看到网上是跟minicom结合的用minicom指定串口号的但是我想lrzsz能独立进行ymodem传输来给我的STM32 Ymodem方式的IAP
目前工作重点在单片机,不想在linux代码上折腾太多,我想这种linux上的软件应该可以直接指定串口号参数就像avrdude。

lsz--help 没有看到串口指定信息
lsz version 0.12.20
Usage: lsz file ...
   or: lsz -{c|i} COMMAND
Send file(s) with ZMODEM/YMODEM/XMODEM protocol
    (X) = option applies to XMODEM only
    (Y) = option applies to YMODEM only
    (Z) = option applies to ZMODEM only
-+, --append                append to existing destination file (Z)
-2, --twostop               use 2 stop bits
-4, --try-4k                go up to 4K blocksize
      --start-4k            start with 4K blocksize (doesn't try 8)
-8, --try-8k                go up to 8K blocksize
      --start-8k            start with 8K blocksize
-a, --ascii               ASCII transfer (change CR/LF to LF)
-b, --binary                binary transfer
-B, --bufsize N             buffer N bytes (N==auto: buffer whole file)
-c, --command COMMAND       execute remote command COMMAND (Z)
-C, --command-tries N       try N times to execute a command (Z)
-d, --dot-to-slash          change '.' to '/' in pathnames (Y/Z)
      --delay-startup N       sleep N seconds before doing anything
-e, --escape                escape all control characters (Z)
-E, --rename                force receiver to rename files it already has
-f, --full-path             send full pathname (Y/Z)
-i, --immediate-command CMD send remote CMD, return immediately (Z)
-h, --help                  print this usage message
-k, --1k                  send 1024 byte packets (X)
-L, --packetlen N         limit subpacket length to N bytes (Z)
-l, --framelen N            limit frame length to N bytes (l>=L) (Z)
-m, --min-bps N             stop transmission if BPS below N
-M, --min-bps-time N          for at least N seconds (default: 120)
-n, --newer               send file if source newer (Z)
-N, --newer-or-longer       send file if source newer or longer (Z)
-o, --16-bit-crc            use 16 bit CRC instead of 32 bit CRC (Z)
-O, --disable-timeouts      disable timeout code, wait forever
-p, --protect               protect existing destination file (Z)
-r, --resume                resume interrupted file transfer (Z)
-R, --restricted            restricted, more secure mode
-q, --quiet               quiet (no progress reports)
-s, --stop-at {HH:MM|+N}    stop transmission at HH:MM or in N seconds
      --tcp                   build a TCP connection to transmit files
      --tcp-server            open socket, wait for connection
-u, --unlink                unlink file after transmission
-U, --unrestrict            turn off restricted mode (if allowed to)
-v, --verbose               be verbose, provide debugging information
-w, --windowsize N          Window is N bytes (Z)
-X, --xmodem                use XMODEM protocol
-y, --overwrite             overwrite existing files
-Y, --overwrite-or-skip   overwrite existing files, else skip
      --ymodem                use YMODEM protocol
-Z, --zmodem                use ZMODEM protocol
页: [1]
查看完整版本: 想把Ymodem功能集成到自己的小软件中,找了个Lrzsz,感觉不...