开发板调试DHCP笔记记录

Linux udhcpc/udhcpd 移植 参考文档: http://blog.chinaunix.net/uid-14704264-id-4272838.html https://www.cnblogs.com/chenfulin5/p/9481249.html 若系统busybox 自带了 udhcpc 和 udhcpd 工具 udhcpc 作为客户端工具,用于动态获取IP; udhcpd 作为服务器工具,用于动态分配IP; 若系统内没有带udhcpc 和udhcpd工具,就需重新编译并移植这两个工具至开发板。 下载 udhcpc 阅读详情

测试反映设备DHCP不可用。这可是相当严重的一个问题,对此,我不得不重视起来。本以为是很简单的一个问题,没有想到,来来回回的折腾了半天多。

在我们的设备中采用命令工具udhcpc 自动获取ip 地址,当用户设置动态获取IP后,设备启动时,会调用udhcpc命令。

首先,我从打印分析开始, 以下是执行命令后给出的打印。

udhcpc (v0.9.9-pre) started
Jan  1 00:36:44 udhcpc[694]: udhcpc (v0.9.9-pre) started
m
Jan  1 00:36:44 udhcpc[694]: [truncated] m

从打印上看,在刚开始执行时就得到一个中断错误truncated,在网络上以相关关键字,dhcp + udhcpc + truncated 查找,均得不到有用的信息。但在查找的过程中,对udhcpc命令有了更进一步的认识。


我猜测有问题的地方可能出错地方有三处:1 udhcpc 命令有问题  2 busybox  3 内核。

首先从猜测点1 开始排查,拷贝一朋友可用的udhcpc文件到我们的系统中(开发环境相同),发现还是给出相同的错误提示。此时我估计着可能是busybox 和内核 有问题。

如果是busybox和内核的问题,对我来说,排查起来,更是无从下手。想了想,决定还是从udhcpc着手,udhcpc 是一个开源的软件, 我可以从源码上分析到底是哪一步出错。

于是从网络上下载了udhcp-0.9.9_pre20041216.tar.bz2源码,下载编绎后,生成可执行文件udhcpc ,nfs远程mount后, 执行./udhcpc 同样给出与之前一样的提示错误。

一步步的定位分析, 最终定位到错误处。  

 if (

RK3566开发板KICKPI K11实战:串口调试、刷机、联网与SSH配置全记录 在嵌入式开发中,串口调试是板卡与开发者之间的第一座桥梁,它不仅是观察底层启动日志的窗口,更是定位硬件问题的关键手段。固件刷写则决定了系统能否正常运行,涉及引导加载器、分区表与存储介质等多层概念,需要理解Loader与MaskROM模式的差异。而网络配置与SSH远程登录,则实现了从本地调试到远程开发的效率跃升,让开发板真正融入日常开发流程。本文以RK3566平台的开源开发板KICKPI K11为对象,完整记录了从串口连接、Uboot日志分析、固件烧录到Linux系统下有线/无线联网、DNS配置、SSH密钥登录 阅读详情

相关推荐

【嵌入式实战】STM32+Lwip 实现 DHCP+HostName 的调试技巧与排错指南

本文详细介绍了在STM32嵌入式系统中使用Lwip协议栈实现DHCP和HostName的调试技巧与排错方法。通过硬件环境搭建、CubeMX配置、HostName实现及常见问题排查等内容,帮助开发者快速解决网络配置难题,提升设备联网效率。特别适用于工业自动化和智能家居等嵌入式应用场景。

weixin_30267785的博客 295

DSP:6678开发板NDK网口通信完整实现(附源码)

如果出现图片打不开,或是显示异常,请点击下方链接阅读原文!!! DSP:6678开发板NDK网口通信完整实现(附源码) - 子木的文章 - 知乎 https://zhuanlan.zhihu.com/p/85110735 如果本文对你有所帮助,请点个赞啦!!! 下一篇会在这基础上加FFT 的功能!!! //*********************...

qq_41687938的博客 6720

鸿蒙OpenHarmony【轻量系统 运行】 (基于Hi3861开发板)

由于Hi3861为WLAN模组,您可以在版本编译及烧录后,通过如下操作,使开发板实现联网功能。复位Hi3861 WLAN模组,终端界面显示“ready to OS start”,则启动成功。Hi3861 WLAN模组复位成功示意图依次执行如下AT命令,启动STA模式,连接指定AP热点,并开启DHCP功能。查看Hi3861 WLAN模组与网关联通是否正常,如下图所示。Hi3861 WLAN模组联网成功示意图。

m0_62167422的博客 1791

udhcpc源码

udhcp源码,直接make即可编译gcc版本,如果需要交叉编译,需要修改makefile里面的CROSS_COMPILE即可,亲测可用哟

udhcp-0.9.8

udhcp-0.9.8 在高版本编译器下会有小bug,已经修复。

win11本地部署openclaw实操第1集

OpenClaw 是一款开源、本地优先、可自托管的 AI 智能体(AI Agent)网关 / 自动化框架,核心是让 AI 从 “只聊天、给建议” 变成 “能在你电脑上真做事” 的数字助手。

weixin_44626085的博客 7126

论文阅读——Bayesian Knowledge Fusion(贝叶斯知识融合)

该篇论文解决了不确定环境中的信息融合问题。想象一下,有多位专家针对同一情况构建概率模型,我们希望汇总他们提供的信息。直接合并每个信息可能会遇到几个问题。例如,专家们可能不同意某个事件发生的概率,或者他们可能不同意两个事件之间因果关系的方向(例如,一个人认为 A 导致 B,而另一个人认为 B 导致 A)。他们甚至可能不同意概率网络中一组变量之间的整个依赖结构。

qq_64164071的博客 1496

《UDS协议从入门到精通》系列——图解0x14:清除诊断信息

图解0x14:清除诊断信息,简洁易懂,迅速上手!

车载系统攻城狮 4824

【WorkBuddy专栏50】代码开发技术体系深度分析——前端、后端、全栈、移动端、数据工程,WB和CODEBUDDY谁更擅长?

【WorkBuddy专栏50】代码开发技术体系深度分析——前端、后端、全栈、移动端、数据工程,WB和CODEBUDDY谁更擅长?

AI人人懂 237

【WRF模拟】保存wrf输出文件到指定目录+仅输出指定空间域/变量文件

修改wrf命令以更改指定输出文件目录等

WW、forever的博客 543

【AI编程干货】Vibe Coding 技巧(适用于AI编程IDE)

用 AI 写代码这件事门槛低,谁都能对着对话框输入几句话让它生成代码,但生成的东西能不能用、出了问题能不能兜住,这中间的差距比想象中大得多。 我从去年开始把 AI 编码工具作为主力开发手段,中间经历过项目失控、代码雪崩、反复返工,慢慢摸索出一套相对稳定的工作方式。这篇把核心的五个习惯拆开聊聊,都是实际项目里验证过的。

blues_C的博客 621

量化交易:如何在QMT中运行Python策略并在VSCode中高效调试?

哈喽,大家好,我是木头左!

木头大左的博客 3758

【数据分享】12.5米分辨率DEM地形数据(分省)

该数据来源于NASA地球科学数据网站(https://nasadaacs.eos.nasa.gov/),是ALOS卫星获取的高精度地形数据。该数据由于精度高,包括全省范围的数据和省内每个城市范围的数据!

JData_Engineer的博客 2171

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

深度学习工具包 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&#39;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(&#39;DeepLearnToolbox&#39;));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(&#39;state&#39;,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&#39;); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand(&#39;state&#39;,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 = &#39;sigm&#39;;%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, &#39;Too big error&#39;);```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(&#39;state&#39;,0)sae = saesetup([784 100]);sae.ae{1}.activation_function = &#39;sigm&#39;;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)&#39;)% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;;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, &#39;Too big error&#39;);```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x&#39;,28,28,60000))/255;test_x = double(reshape(test_x&#39;,28,28,10000))/255;train_y = double(train_y&#39;);test_y = double(test_y&#39;);%% 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&#39;ll get around 1.2% errorrand(&#39;state&#39;,0)cnn.layers = { struct(&#39;type&#39;, &#39;i&#39;) %input layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 6, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 2) %sub sampling layer struct(&#39;type&#39;, &#39;c&#39;, &#39;outputmaps&#39;, 12, &#39;kernelsize&#39;, 5) %convolution layer struct(&#39;type&#39;, &#39;s&#39;, &#39;scale&#39;, 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, &#39;Too big error&#39;);```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(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex2 neural net with L2 weight decayrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex3 neural net with dropoutrand(&#39;state&#39;,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, &#39;Too big error&#39;);%% ex4 neural net with sigmoid activation functionrand(&#39;state&#39;,0)nn = nnsetup([784 100 10]);nn.activation_function = &#39;sigm&#39;; % 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, &#39;Too big error&#39;);%% ex5 plotting functionalityrand(&#39;state&#39;,0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);%% 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(&#39;state&#39;,0)nn = nnsetup([784 20 10]); nn.output = &#39;softmax&#39;; % 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, &#39;Too big error&#39;);```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 第一次面试他人
下一篇: goAhead 2.5嵌入式web服务器移植到arm9 2440 + linux中
dcdcmin
博客等级 码龄16年 35粉丝 19原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值