USB串行通信提供奇怪的输出 [英] USB-Serial communication giving strange output

查看:96
本文介绍了USB串行通信提供奇怪的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从汞分析仪(Seefelder-Messtechnik汞分析仪3000)中获取数据,该数据将输出输出到OSX 10.10笔记本电脑的9针R232串行端口.

I'm trying to get data from a mercury analyzer (Seefelder-Messtechnik Hg Analyzer 3000) that gives output to a 9-pin R232 serial port to my OSX 10.10 laptop.

我已按照此处描述的步骤安装PL-2303驱动程序: http://pbxbook.com/other/mac-tty.html

I've followed the steps described here to install the PL-2303 driver: http://pbxbook.com/other/mac-tty.html

设备手册( http://www.seefelder-messtechnik .com/V71-3-02-21e.pdf )将通信协议列为"9600波特,8个数据位,1个停止位,无日志, 没有奇偶校验".

The device manual (http://www.seefelder-messtechnik.com/V71-3-02-21e.pdf) lists the communication protocol as "9600 Baud, 8 data bit, 1 stop bit, no log, no parities".

我尝试使用屏幕"命令从设备读取:

I attempt to read from the device by using the 'screen' command:

screen /dev/tty.usbserial 9600

结果是一串看似无意义的字符,它们以规则的时间间隔打印到屏幕上:

The result is a string of seemingly non-sensical characters that print to the screen in a regular interval:

8b4 b 8b48bs 8G 8b 8 8 8 < 8 8 b KW \b 8b b b b b KW K 8b \G < 8 �8b�"��΁�[؁��؉��.bG 3 ˁG \K [W pb 8 ΁8 \pa ʁ.c t��8�h¡�38b�8�q�؁����\�8���bS�8b8�8�q���X��8��<��£8���2�8�����ؖ�ؖ�ؖ�8bS��\�܉�ؖ����[S�8��s���fq�8�����������8fq����������S ܊ b b.؉ S K ݎ S b b S S \ KS S ؊. \S 1S \b S ؉\\ذ KS \ S  bS ؉ 1S ؊ [؂ \ز ؉\ ؂ ز \ i $ \ $ \ 8 $ \ \ . ×Xk B 7 \k \X < 8Xkz Yj L H.\ ]j ,k: Yj ؈

�8b4����b��8b48bs��8G�8b�8���8������8����< 8�8��b��KW��\b����8b����b� �b�b����KW�K �8b��\G�� �<���8�8b�"��΁�[؁��؉���bG�3�ˁ�G��\K��[W�pb�8��΁8ʱ�\pa���ʁ�c t��8�h¡�38b�8�q�؁����\�8���bS�8b8�8�q���X��8��<��£8���2�8�����ؖ�ؖ�ؖ�8bS��\�܉�ؖ����[S�8��s���fq�8�����������8fq����������S�܊��b���b�؉����\���S��K���ݎ����S��b��b��S����S�\������KS��S�؊��\S�1S�\b�S�؉�\�ذ����KS�\����S����bS�؉�����1S�؊��[؂����ز������؉\�؂��ز��\����i���$\�$���\��8���$��\�\����܂�زXk�B��7��\k�\X�<��8Xkz��Yj��L�������H�\���]j�،k:��Yj�؈��

我也尝试过使用'minicom'而不是屏幕,并得到了不同的结果(?] ???ܰ?? Yk ?? 2"),但也没有意义.我看到还有另一个类似于我的SO查询仍未解决:显示了奇怪的字符在OSX串行通讯期间

I've also tried using 'minicom' rather than screen, and get a different ("?]???ܰ??Yk??2"), but also non-sensical result. I saw that there was another SO query similar to mine that remains unsolved: weird characters displayed during serial communication OSX

有什么秘诀吗?在我看来,我没有正确解释输出,但是我不知道下一步该怎么做.

Any tips? It looks to me that I'm not interpreting the output correctly, but I don't know what to try next.

推荐答案

解决方案是从机器上以更高的波特率(〜57600)进行读取,尽管手册和在线参考书中都这样说.以57600波特读取时,结果纯文本且可用.感谢您的想法!

The solution was to read from the machine at a higher baud rate (~57600), despite what the manual and online reference said. Reading at 57600 baud made the result plain-text and usable. Thanks for your ideas!

这篇关于USB串行通信提供奇怪的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆