完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
设备:PIC32 MX运行TCPIP栈,USB控制台等其他无关的东西。我把IP地址硬编码成和谐并烧掉固件。该设备运行良好,并响应网络查询。如果我将PC与TeraTerm连接到USB端口,PIC提供管理控制台,在这里我可以执行以下命令来改变IP地址:“SEtiP PIC32 TIN 192.1680.32 255.255.255.0”,一旦我这样做,PIC现在被切换到新的IP地址。问题是当卡重新启动或电源循环时,IP地址回落到一个是硬编码的和谐。这是不好的。我们不可能通过每一张产生的卡片来协调IP地址。现场安装程序需要能够设置IP并拥有它。有人找到解决这个问题的办法吗?
以上来自于百度翻译 以下为原文 Device: PIC32MX running TCPIP stack, USB console, and other stuff which is irrelevant. I hardcode the IP address into HARMony and burn the firmware. The device works fine and responds to network queries. If I connect a PC with TeraTerm to the USB port, the PIC serves up a management console where I can execute the following command to change the IP address on the fly: "setip PIC32INT 192.168.0.32 255.255.255.0" Once I do this the PIC is now switched to the new IP address. The problem comes when the card is rebooted or power cycled, the IP address falls back to the one which was hard coded by Harmony. This is no good. We can't possibly set the IP addresses through Harmony for every single card that gets produced. The field installer needs to be able to set the IP and have it stick. Has anybody found a solution to this problem? |
|
相关推荐
6个回答
|
|
和谐不储存地址。你需要把它保存到Flash、EEPROM或是哪里。
以上来自于百度翻译 以下为原文 Harmony does not store the address. You need to save it to flash, eeprom or where ever. |
|
|
|
和谐与此无关,只是作为代码生成器。当被编译并被烧成固件时,被输入到程序中的IP被硬编码到程序Flash中。我的意思是,你可以通过USB控制台重写IP地址,但是当电源运行时,过乘值就会消失。我正在寻找一种技术来动态地覆盖Flash中的IP地址,以便在上电或重新启动后返回。我无法确定如何找到IP地址存储在哪里,b)写入Flash。
以上来自于百度翻译 以下为原文 Harmony has nothing to do with this except as a code generator. The IP which is entered into Harmony is hard coded into the program flash when it's compiled and burned to firmware. What I'm saying is that you can over-ride the IP address through the USB console but the over-ride value goes away when the power does. I'm looking for a technique to dynamically overwrite the IP address in flash so that it comes back after power-up or reboot. I can't figure out how to a) find where the IP address is stored, b) write to flash. |
|
|
|
为了启动TCP/IP协议栈,您需要一个包含静态IP地址的初始化数据结构,除此之外,更改应用程序的启动,以便从外部存储、内部闪存位置、SD卡等获取IP地址,然后启动TCP/IP STAC。在运行时更改IP地址时,使用控制台或其他方法,添加代码以将新的IP地址保存到所使用的存储区,以便在下一次重置时将其重新拾取。
以上来自于百度翻译 以下为原文 To start the TCP/IP stack you need an initialization data structure that contains the static IP address, among other things. Change the start of your application so that it retrieves the IP address from an external storage, internal flash location, SD card, etc., etc., and then start the TCP/IP stack with the right address. When changing the IP address at run time, using the console or other means, add code to save that new IP address to that storage that you're using, so it picks it up at the next reset. |
|
|
|
这听起来是个好主意。我看了我的代码,我正在调用这个系统变量来获得IP:TCPIpNETWorksDeFultTypIdAddiSsIdx0,如果我能找出Flash中的来自哪里,我就可以在那里推新IP地址。
以上来自于百度翻译 以下为原文 That sounds like a good idea. I looked at my code and I'm calling on this system variable to get the IP: TCPIP_NETWORK_DEFAULT_IP_ADDRESS_IDX0 If I could just figure out where that is coming from in flash, I might be able to push the new IP address there. |
|
|
|
它可能是一个已经被定义的常数,所以它会直接嵌入到调用中。你必须修改代码,把它变成一个来自Flash中已知地址的变量。很多人以前可能已经这样做过。一个论坛搜索可能会发现他们做了什么…
以上来自于百度翻译 以下为原文 It's probably a constant that has been #defined, so will be embedded straight into the call. You'll have to modify the code to change it into a variable coming from a known address in FLASH. Lots of people have probably done this before. A forum search may turn up what they did... |
|
|
|
它不是来自Flash。你需要为它找个地方,你需要把它储存起来。你们有储藏室吗?如果没有,你需要阅读如何保存到片上闪存。
以上来自于百度翻译 以下为原文 It is Not coming from Flash. YOU need to make a Place for it and YOU Need to Store it. DO you have Storage? If not YOU will need to read up on how to save it to the on Chip Flash. |
|
|
|
只有小组成员才能发言,加入小组>>
5250 浏览 9 评论
2037 浏览 8 评论
1958 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2266 浏览 5 评论
788浏览 1评论
680浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
609浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
685浏览 0评论
582浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-29 08:08 , Processed in 1.713910 second(s), Total 56, Slave 50 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号