当前位置:网站首页>Embedded System Development Notes 79: why should I get the IP address of the local network card
Embedded System Development Notes 79: why should I get the IP address of the local network card
2022-07-01 04:02:00 【snmplink】
《 Integrated practice of embedded system 》 Series column Introduction
《 Integrated practice of embedded system 》 A series of columns will be published in 《 Integrated development of embedded system 》 Based on the column , The knowledge of embedded system development is systematically introduced in the form of actual combat 、 Skill 、 Skills and sublimated design ideas .
The author strives to make every small column under this series of columns self-contained , Complete a real project practice , Solve the actual needs of a real application . Topics involved in this column , It all comes from the author's years of project practice .
This column series covers the following body of knowledge :Ubuntu、Python、STM32、C++、VSCode、CPLD、FPGA、Verilog HDL、 Altium Designer.
The knowledge system covered in this series of columns Schematic diagram will be provided for hardware , The software part will provide the source code , For readers' reference .
Welcome your valuable comments on this series of columns , I must accept it with an open mind , You are also welcome to ask questions about the contents of this column , I will answer it within my power .
Last , What I need to explain to you is this series of articles The schematic diagram and program source code provided by us are free (free) Use , No restrictions . But all the articles in this column belong to snmplink original , Please follow Creative Commons Copyright agreement , Without the permission of the blogger , Shall not be reproduced , Shall not be used for any commercial purpose ( Including but not limited to book publishing ).
List of articles
Preface
This article is 《 Get the local network card IP Address 》 The first of the column 1 An article , I will talk about in this article “ Why should I get the local network card IP Address ”, as well as “ Get the local network card IP Address ” The basic design idea of , On this basis, the specific knowledge arrangement of this column is given , After reading this column , Further systematic learning can be carried out according to the actual needs of individuals .
One 、 Demonstration effect
When the project is completed , The effect shown in the figure below can be achieved , After the application starts , Will prompt “ Please select the communication network card ” Dialog box , The user selects the corresponding network card to communicate with the device , After correct selection , Enter the main interface of the application .
Two 、 Basic knowledge required
The knowledge you need to master to read this column is as follows :
Python
PyQt
Supplement to basic knowledge , May refer to Integrated development of embedded system special column
3、 ... and 、 Why should I get the local network card IP Address
1、 How to get equipment IP Address ?
The topic comes from the actual project needs , Under the LAN , How can we get the equipment quickly IP Address . for instance , You are an equipment maintenance personnel arriving at the equipment installation site , You need to use a laptop or mobile phone to set up your device , But you forgot the device at this time IP Address , How should you operate ?
In general , We can take 3 Methods , Get the device IP Address :
1、 adopt USB、 A serial port 、485 Get by mouth, etc IP Address
This method does not require equipment IP Address can communicate with the device , But additional interfaces and wiring are needed , It's troublesome to use .
2、 Reset the device
This method first resets the device , Restore its default IP Address , Then apply the default IP Address , Set up the device . This seems simple , Just use the network cable , But after setting , Restore the original settings , Unless the original settings have been backed up , Otherwise, it can be used , Also extremely inconvenient .
3、 The equipment automatically submits IP Address
This method directly uses Ethernet to operate the device , There is no need to reset the device , And let the device make its own IP Submit the address , The main use is IPV4 Broadcast technology of . This is the easiest way , It is also the most widely used .
2、 How to get the local network card IP Address
As mentioned earlier , adopt IPV4 Broadcast technology of , Enables the device to automatically submit its own IP Address , But the first thing we need to do is broadcast on the LAN “ Upload IP Address ” command , If this computer has only one network device ( For example, network card ), Then directly send the broadcast command to this device .
however , Many computers own multiple network devices , for example , My computer itself has many network devices , As shown in the figure below . therefore , How to confirm which network device sends the broadcast command is an urgent problem to be solved .
To solve this problem , We need to start the program , Search all network devices on this computer IP Address , And provide it to users , Let them choose , Confirm the network equipment connected to the equipment .
Four 、 The content of this column
This column will explain how to use Python Language search to all network devices on this computer , actually , Searching the core code of the local network device is very simple , However, this column will explain all the technical details of realizing this application in the form of a complete example , Including the following :
1、 application Qt Designer Design the main interface
(1) The article links : Embedded System Development Notes 80: application Qt Designer Design the main interface
(2) Design skills available
stay VS Code Start in Qt Designer
Use Qt Designer Design the main interface
Run the basic code of the main interface
Set the title bar
Set icon
The main interface is displayed in the middle of the screen
2、 Use Dialog Component design prompt dialog box
(1) The article links : Embedded System Development Notes 81: Use Dialog Component design prompt dialog box
(2) Design skills available
stay Qt Designer To establish Dialog Dialog box
stay Qt Designer Set up signals and slots for components
Reference... In the application Dialog Dialog box
Call and display... In the main form Dialog Dialog box
Modal dialog
The window size cannot be changed
3、 Get the of all network devices on this computer IP Address
4、 Communication between windows
边栏推荐
- 【无标题】
- [party benefits] jsonobject to string, leave blank
- Valid @suppresswarnings warning name
- Coinbase in a bear market: losses, layoffs, stock price plunges
- 241. Design priorities for operational expressions
- DO280管理应用部署--RC
- 【TA-霜狼_may-《百人计划》】1.2.1 向量基础
- 431. encode n-ary tree as binary tree DFS
- 72. 编辑距离
- 类和对象收尾
猜你喜欢

431. encode n-ary tree as binary tree DFS

Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products

[TA frost wolf \u may - "hundred people plan"] 2.1 color space
![[ta- frost wolf \u may- hundred people plan] 2.2 model and material space](/img/93/95ee3d4389ffd227559dc8b3207e1d.png)
[ta- frost wolf \u may- hundred people plan] 2.2 model and material space

定了!2022京东全球科技探索者大会之京东云峰会7月13日北京见

Go learning --- unit test subtest
![[ta - Frost Wolf May - 100 people plan] 1.2.1 base vectorielle](/img/94/99090ea91082a385968e071ef3766c.png)
[ta - Frost Wolf May - 100 people plan] 1.2.1 base vectorielle

Spock单元测试框架介绍及在美团优选的实践___第一章

Use of JMeter counters

Volley parsing data shows networking failure
随机推荐
[EI conference] the Third International Conference on nanomaterials and nanotechnology in 2022 (nanomt 2022)
392. judgment subsequence
It's settled! 2022 JD cloud summit of JD global technology Explorer conference see you in Beijing on July 13
206.反转链表
PageObject模式解析及案例
采购数智化爆发在即,支出宝'3+2'体系助力企业打造核心竞争优势
Web components series (VIII) -- custom component style settings
Hololens2 development environment building and deploying apps
JMeter learning notes 2 - brief introduction to graphical interface
Jenkins自动清理构建历史
Libevent Library Learning
Quickly filter data such as clock in time and date: Excel filter to find whether a certain time point is within a certain time period
6. zigzag transformation
All in one 1086: Jiaogu conjecture
高并发下接口幂等性如何保证?
The problem of integrating Alibaba cloud SMS: non static methods cannot be referenced from the static context
8. string conversion integer (ATOI)
【EI检索】2022年第六届材料工程与先进制造技术国际会议(MEAMT 2022)重要信息会议网址:www.meamt.org会议时间:2022年9月23-25日召开地点:中国南京截稿时间:2
Unexpected token o in JSON at position 1, JSON parsing problem
【TA-霜狼_may-《百人计划》】2.3 常用函数介绍