惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - febird

改进 GAE cpedialog 博客程序的一些细节 Python 格式化输出时间字符串函数 strftime 从IEEE802.1到IEEE802.22 CodeWarrior for Freescale S12 开发Tips - febird 第一个 Android 程序 [资料] IPv6主机地址 Web中使用MSCOMM32.OCX读写串口(2) Matlab中Timer的使用 Matlab多窗口传值问题(GUI) My Matlab Tips (Unfinished) Matlab中使用Plot函数动态画图方法总结 Matlab GUIDE使用总结--Matlab GUI界面 Matlab Deploy工具的使用--Matlab生成可执行文件 使用matlab作为图表绘制工具--Matlab使用入门 基于DE2 与Nios II的音频录放系统的设计-软件篇 基于DE2 与Nios II的音频录放系统的设计-系统篇 GMail今天更换外观了-支持主题 Google WebMaster网站验证错误(404返回成功)解决方法 Febird.co.cc 恢复正常访问
Web中使用MSCOMM32.OCX读写串口
febird · 2008-12-21 · via 博客园 - febird

 最近帮一个老师收尾一个射频卡项目,主要是应用层的,就是使用串口和单片机通信。但是这个要求很变态,需要使用Web来读写串口,但是我考虑自己写一个 ActiveX控件,但是用C++写一个纯COM+麻烦,后来看到有任用.NET来写ActiveX,但是要求客户端要装.NET FX,抓狂之下,找到了 MSCOMM32.OCX

简单的HTML+JS代码:

Code

 
但是有一个问题,使用脚本的方式调用MSCOMM32 ,发送单字节的 数据不能超过 7FH,这个问题如果在强类型的 VB中,可以以字节数组的方式发送,凡是在script中,都是弱类型的,尝试了各种办法,甚至还Javascript和VBsvript混合使用,使用 VBS的各种 字符串操作函数,最终没有解决。

如果大家找到方法,请告诉我啊!

 测试代码:

Code