在实际的开发过程中,遇到过这么一种困境。
手机的SD卡坏了,ADB也有问题,只有串口能连上,需要更新手机里面的某些文件调试。
这种情况在工厂生产的过程中经常会出现,工厂生产的时候有可能还没来得及焊接USB和SD卡相关器件。
Busybox 提供了一个rx的程序,可以很方便得从串口获得数据并存成文件。
1.利用secure crt 软件连接手机的串口。
2.输入如下的命令
#busybox rx <file_name>
然后在secure crt的菜单中选择发送Xmodem即可。

墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
8.9k累计阅读
9k平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄19年
在实际的开发过程中,遇到过这么一种困境。
手机的SD卡坏了,ADB也有问题,只有串口能连上,需要更新手机里面的某些文件调试。
这种情况在工厂生产的过程中经常会出现,工厂生产的时候有可能还没来得及焊接USB和SD卡相关器件。
Busybox 提供了一个rx的程序,可以很方便得从串口获得数据并存成文件。
1.利用secure crt 软件连接手机的串口。
2.输入如下的命令
#busybox rx <file_name>
然后在secure crt的菜单中选择发送Xmodem即可。

安卓与串口通信-modbus篇
Modbus 是一种应用层报文传输协议,由 Modicon 公司在 1979 年发布,是为了解决 PLC 通信而研发的协议。因为 Modbus 是开源的且无著作权要求、易于部署维护、可靠性强的特性,所以 Modbus 已经成为工业领域通信协议事实上的业界标准,并且现在是工业电子设备之间常用的连接方式。由于 Modbus 定义的只是应用层的报文协议,所以它可以使用串口(RS232、RS485)、以太网作为物理层接口。Modbus 分为三种传输模式:RTU、ASII、TCP。
busybox rx 命令
rx命令使用xmodem传送文件,只需要串口线就传送。 在文件系统输入如下命令,传送文件到板子上,板子上保存文件的名称为file rx file 在secureCRT中选择Transfer->Send Xmodem。选择要传送的文件即可。 root@freescale ~$ rx file CCC Starting xmodem transfer. Press Ctrl+C to ca...
安卓通过串口控制zigbee
安卓通过串口控制zigbee
Android 关于BLE蓝牙用Xmodem协议升级蓝牙固件
最近公司安排了一个BLE升级固件的任务,要用Xmodem协议,搞的我赶紧去补这块的知识。 首先我用的是第三方bluetoothkit 进行连接的。 不知道的小伙伴可以去github先了解一下。https://github.com/dingjikerbo/Android-BluetoothKit 其实连接什么的我就不做介绍了。 利用这个Xmodem协议升级的时候我发现有些坑。 1.安...
Android串口开发与硬件利用1K Xmodem协议远程升级
Android利用Android串口开发与硬件利用1K Xmodem协议远程升级,Android串口232开发,硬件利用1K Xmodem协议进行远程升级
Anaconda离线创建python环境
既然是离线创建python环境,就需要有一个已经创建好的python环境。所以我们有两台win10的机器,分别是A和B。两台机器都安装了anaconda。其中A可以连网,因此我们在A上创建好一个python2.7的环境py27,然后将py27移植(安装)到B上。B连不连网都无所谓。 一、机器上A上创建python2.7的环境py27 有两种方法: 方法1:使用Anaconda的图形界面。首先,点击Environments->Create,然后输入要创建的环境名称"py27",然后选择2.7,如图
linux串口烧录程序下载,Ubuntu 串口工具Minicom使用 及 DNW镜像烧录
Ubuntu 串口工具minicom使用 及 dnw镜像烧录(主要针对Android210开发板)。一。Minicom 使用Ubuntu下也有串口通信工具,比如Minicom,kermit。这里说明Minicom的使用。(1)安装suodo apt-get install minicom(2)启动Minicom启动必须以root权限。启动命令:sudo minicom(3)串口配置执行启动命令su...
第1.1节 构网型 vs. 跟网型:根本区别与技术原理
构网型与跟网型变流器的本质区别在于控制哲学与等效模型。跟网型变流器采用"电压跟随,电流注入"策略,等效为受控电流源,依赖电网电压作为参考,在弱电网下存在稳定性问题。构网型变流器采用"自主同步,电压构建"策略,等效为受控电压源,能主动构建电压和频率,具备自主运行、黑启动和电网支撑能力。两者的核心差异体现在同步机制、电网依赖性、故障行为和系统支撑等方面。构网型变流器更适合高比例新能源、弱电网和微电网场景,是未来电力系统的重要发展方向。
Android USB串口传输数据
前言: 之前介绍了485串口传输数据,使用了https://github.com/cepr/android-serialport-api,本节课我们介绍usb串口数据传输。 使用usb串口传输数据的第三方库:https://github.com/mik3y/usb-serial-for-android 一、集成 1、首先我们下载下来demo,然后找到里面的usbSerialForA...
【时空数据分析#06】实战:基于Python与ArcGIS的NDVI长期趋势制图与分级
本文详细介绍了基于Python与ArcGIS进行NDVI长期趋势制图与分级分析的完整工作流。通过整合MODIS卫星数据,利用ArcGIS进行空间处理与栅格转换,结合Python进行时序统计与趋势计算,最终生成直观的植被变化趋势分级图,为生态评估与环境监测提供可靠的空间分析工具。
SAP移动类型
SAP移动类型移动类型定义 移动类型定义
安卓AndroidOTGUSB串口通信资源文件:让开发更便捷
安卓AndroidOTGUSB串口通信资源文件:让开发更便捷 【下载地址】安卓AndroidOTGUSB串口通信资源文件 该项目为安卓开发者提供了完整的OTG USB串口通信解决方案,支持Cp2102、FT232R CDC/ACM芯片,适用于Android 3.1及以上版本。通过Android USB Host API,...
基于FPGA与红外成像的眼动追踪系统设计与实现(教学向)
本文详细介绍了基于FPGA与红外成像的眼动追踪系统设计与实现。通过红外摄像头采集图像,利用FPGA进行实时图像处理和红外瞳孔追踪,结合Verilog编程实现多目标检测与瞳孔定位。该系统适用于嵌入式视觉教学,展示了硬件搭建、算法优化及实时显示的完整流程。
Android USB转串口编程
安卓手机的对外通信接口就只有USB跟音频口,我们可采用其进行与外设进行通信。今天,我们来讲讲安卓手机利用USB接口与外设进行通信。此时,有两种情况。第一:USB(手机)<--->USB(外设),就是手机与外设直接通过USB线进行通讯。第二:USB(手机)<--->UART(外设),即手机与外设通过USB转接成串口,再与外设通信。外设,说白了就是单片机,单片机端直接通过US...
【推荐100个unity插件之7】使用BehaviorDesigner插件制作BOSS的AI行为树
Behavior Designer是一个行为树插件,是一款为了让策划,程序员,美术人员方便使用的可视化编辑器。Behavior Designer提供了强大的AP1可以让你轻松的创建tasks(任务),配合uScript和PlayMaker这样的插件,可以不费吹灰之力就能够创建出强大的Al系统,而无需写行代码。(不懂PlayMaker的,我后面在单独出文章介绍一下,可以期待一下)
基于应用谱减法进行语音去噪的算法
在上述代码中首先通过读取语音信号和噪声信号,将两个信号都转换为频域信号,然后计算出语音信号在各频率下的功率谱和噪声信号在各频率下的功率谱,并基于此计算信噪比,接着根据信噪比计算出阈值,并将低于阈值的能量对应的频段进行清零操作,最终实现去噪处理,最后将处理后的信号转换回时域信号。该算法采用谱减法进行降噪处理,能有效地去除语音信号中的噪声,但是在实际应用中,该方法也存在一些问题,如会对语音信号的高频部分产生影响,所以需要在应用过程中进行适当的调整。
Android代码-安卓串口示例:串口通信的利器
Android代码-安卓串口示例:串口通信的利器 去发现同类优质开源项目:https://gitcode.com/ 在Android开发领域,串口通信一直是一个较为特殊且重要的功能。今天,我们要为大家介绍的是一个名为“Android代码-安卓串口示例”的开源项目,它将为Android串口编程带来极大便利。 项目介绍 “Android代码-安卓串口示例”项目,即AndroidSerialPortSa...
移动端实战指南:深入理解 & 接入 IAB OMSDK
OMSDK(OpenMeasurementSDK)是IABTechLab推出的标准化测量工具,用于统一移动端/原生App广告的可见性和验证流程。其核心包括Native库(采集设备数据)和OMID JavaScript层(实现通信),通过标准化接口让开发者只需接入一套SDK即可兼容多个测量厂商,减少冲突和性能损耗。v1.4版本强化了对CTV和原生App场景的支持,而v1.5新增了画中画检测等功能。集成流程需通过IAB技术实验室注册下载,并遵循严格的命名空间规则。测试阶段需嵌入验证脚本并通过指定工具验证
debug,日志,串口传输文件
程序日志,文件互传
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
VC中sqlite的使用
在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示
【免费下载】 Android安卓手机串口调试助手:移动时代的调试利器
Android安卓手机串口调试助手:移动时代的调试利器 【下载地址】Android安卓手机串口调试助手 Android安卓手机串口调试助手 项目地址: https://gitcode.com/open-source-toolkit...
华为的C语言编程规范.pdf
华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。
Unity3D安卓端串口通信
U3D串口通讯安卓端
大中型超市收银系统(可直接运行)
光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开
Android 串口开发记录
在我们的认识中Android系统是手机系统,它的物理接口一般只有usb host接口(之前的手机还有耳机接口,不过近几年取消了)。4、创建包名:android_serialport_api,并把SerialPort.java拷贝进去,SerialPort.java已经封装了串口的打开、配置、读写和关闭串口的方法,我们直接调用即可。2、创建AS工程,在mian目录下创建jniLibs目录,并将刚刚找到的libs文件夹中的三个文件拷贝进去。这里使用的是虚拟串口,具体方法将在下一篇文章中讲解。
Android硬件通信之 串口通信
串口通信
7538
6205
495
3248
1万+

被折叠的 条评论
为什么被折叠?



