完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我正在使用PIC32 MX795F512L微控制器和使用USB接口与外部PC通信。CLI接口,我用来配置一些组件或读取,例如电压或温度在Windows PC上使用超终端工作。我也使用Linux。Ubuntu和MINICM的所有工作都很好,就像我的Windows PC.上的超级终端一样,微控制器通过USB连接到Linux PC,在/DEV/I下可以通过TTYACM0找到它们。我想通过微控制器的CLI配置PCI的一些改写器,因为它需要一个大量的时间每字节做这个字节,我想编程一个小的BASH文件来自动配置重发器。我的问题是,我不能通过回音命令与微控制器进行通信,例如ECHO’TEMP’/GD//DEV/TTACACM0,并通过CAT/DEV/TTYA显示微控制器的输出。我的问题是:如何在不使用MICICOM的情况下通过终端与微控制器进行通信。我希望论坛上的任何人能在这方面帮助我。
以上来自于百度翻译 以下为原文 Hi everyone, I'm working with a PIC32MX795F512L microcontroller and using the USB interface to communicate with an external PC. The CLI interface which I use to configure some componentes or to read out e.g. voltages or temperatures works fine with HyperTerminal on a Windows PC. I use also Linux e.g. Ubuntu and with Minicom everything works fine as with HyperTerminal on my Windows PC. The microcontroller is connected via USB to the linux PC and under /dev/ I can find them via ttyACM0. I want to configure some redrivers for PCIe via my CLI from the microcontroller, due to the fact that it needs a lot of time do this byte per byte I want to programm a small bash file to configure the redrivers automatically. My problem is that I can not communicate with the microcontroller via echo commands e.g. echo 'temp' > /dev/ttyACM0 and to display the output from the microcontroller via cat /dev/ttyACM0. My question is: How can I communicate with the microcontroller via terminal without using minicom. I hope anyone here on this forum plattform can help me at this matter. Thanks in advance. ChrisBr |
|
相关推荐
2个回答
|
|
谢谢你的快速回答ANDSRM,用ECHO将“简单”发送给微控制器,并将一些数据并行存储到具有输出的.txt文件中。PyStAy也是一个好主意,但我不打算在过去使用Python,如果我们可以使用BASH或C,那对我就更好了。为了更好地理解我想做的事情:我有一个用于PoE模块的载板,在船上我们有4个PCIE改写器,我们想把它们配置成使用PCIE插件板。在我们改变了PCIE改写器的配置之后,我们必须重新启动系统并检查LSPI VV输出,看看加法板在最大链路速度和最大生成时是否工作良好。LSPI—VV的结果应该用BASH脚本进行分析,并存储到一个文件中,该文件可以在所有测试之后进行分析,以查看ReDube的哪些配置是好的,哪些是不工作的。
以上来自于百度翻译 以下为原文 Thanks for your fast answer andersm, with echo it would be "easy" to send some commands to the microcontroller and to store some data in parallel into a .txt file with some output. Is it possible to this also with expect? pySerial is also a good idea but I don't program python in the past and if we can use bash or C it would be better for me. For a better understanding what I want to do: I have a carrier board for a COMe module and onboard we have 4 PCIe redrivers and we want to configure them to use PCIe add in boards. After we have changed the configuration of the PCIe redrivers we have to restart the system and check the lspi -vv output to see if the add boards works fine with the max link speed and the max generation. The result from lspi -vv should be analysed by the bash script and stored into an file which can be analysed after all tests to see which configuration from redriver were good and which don't work. BR, ChrisBr |
|
|
|
只有小组成员才能发言,加入小组>>
5162 浏览 9 评论
2000 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3172 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
731浏览 1评论
613浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
503浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
629浏览 0评论
527浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-23 04:50 , Processed in 1.217224 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号