完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我使用的是和声1.10,试图让新的SMTPC模块在我的应用程序中正常工作。如果我设置跳过TLS标志,我可以使用Comcast电子邮件帐户发送电子邮件,没有问题。但是,如果我尝试使用TLS,在消息查询报告状态开始TLS通信之后,整个事情都会冻结。(TCPPIpSMTPC.MasaGeStAtgTLS)和我的意思是冻结整个应用程序硬。没有超时,甚至返回到我的AppStasks-()。在TLS关闭的应用程序中,一切似乎都很好。我还尝试了一个带有TLS ON的Gmail帐户,得到了完全相同的结果。我不能让Gmail在没有TLS的情况下工作,但我甚至不知道Gmail会在没有它的情况下工作。我只是不断地得到一个FROXY拒绝结果。有人能用TLS成功使用SMTPC吗?
以上来自于百度翻译 以下为原文 I am using HARMony 1.10 and trying to get the new SMTPC module working properly in my app. I am able to use a comcast email account to send emails with no problem if I set the SKIP TLS flag. (TCPIP_SMTPC_MAIL_FLAGS = 0x0020) However, if I try to use TLS the whole things freezes up after the message query reports status starting TLS communication. (TCPIP_SMTPC_MESSAGE_STAT_TLS) and I mean freezes the whole app hard. Not timing out, or even returning back to my APP_Tasks(). Everything seems to work fine in the app with TLS off. I also tried a GMAIL account with the TLS on and got the exact same result. I can't get gmail to work without TLS, though, but I don't know even GMAIL will work without it. I just keep getting a FROM_REJECT result. Anyone able to use SMTPC successfully with TLS? |
|
相关推荐
17个回答
|
|
|
感谢您的回复。我添加了WOLFSSL库(通过MHC),并使用了它的默认设置。以前从未使用过,所以我不确定是否需要修改这些设置。我已经启动了SNTP并验证了正在运行。即连接和获得有效的UTC邮票。也增加堆大小…几乎翻了一倍(在MHC项目配置XC32(全局选项))到目前为止,我的应用程序的行为没有变化。当我尝试做TLS时,它仍然锁起来。我启用了调试消息,结果发现在启动TLS之后,应用程序正在抛出下面的异常:“通用异常指令总线错误(原因=6,ADDR=0)”。
以上来自于百度翻译 以下为原文 Thank you for the reply. I added the wolfSSL library (via MHC) and used it's default settings. Never used this before so not sure if I need to modify these settings. I have SNTP up and verified to be running. i.e. connecting and getting valid UTC stamps. Also increased the heap size ...nearly doubled (under MHC project configuration XC32 (Global Options) ) So far no change in the behavior of my app. Still locks up when trying to do TLS. I enabled debug messages and it turns out the app is throwing the following exception right after starting TLS: "General Exception Instruction bus error (cause=6, addr=0)" |
|
|
|
|
|
你能试试WebGyNETSkyVelnVMMMPFS演示应用程序吗?其中一个具有正确配置的WOLFSSL和TLS,很可能是某个配置问题。
以上来自于百度翻译 以下为原文 Can you please try the web_net_server_nvm_mpfs demo app? That one has the wolfSSL and TLS properly configured. Most likely is a configuration problem somewhere. |
|
|
|
|
|
我认为你是对的,但是,这个项目不容易在我的硬件上运行,所以我一直在尝试将它的设置与我的项目中的设置进行比较。我必须使用HTTP网络服务器而不是HTTP服务器只使用TLS来处理电子邮件吗?切换到Net Server意味着重写CuthyHutpJNET.App.c文件的一个主要代码端口。再次感谢。
以上来自于百度翻译 以下为原文 I think you are right but, that project doesn't easily run on my hardware so I've been trying to compare the settings in there to the settings in my project. Do I have to use the HTTP NET Server versus the just the HTTP Server to have TLS work with emails only? Switching to the NET Server means a major code port to rewrite the custom_http_net_app.c file. Thanks again. |
|
|
|
|
|
不,我并不是想把你的项目切换到HTTPNET。我只是想检查一下,如果WOLFSSL被正确配置,你就有了TLS并运行。如果你没有ESK或者WebSynNETHyppServer演示很难在你的板上移植,那么另一种方法是比较SytSyCopig.h或m。HC文件在2个项目之间,检查是否遗漏了任何配置参数。检查WOLFSSL和NETYPURS符号,可能会发现一些不一致性。
以上来自于百度翻译 以下为原文 No, I didn't mean to switch your project to http_net. I wanted just to check that if the wolfSSL is configured properly you have TLS up and running. If you don't have a ESK or the web_net_http_server demo is difficult to port on your board, then another way is to compare the system_config.h or the .mhc files between the 2 projects and check if you miss any configuration parameters. Check for WOLFSSL and NET_PRES symbols, maybe you spot some inconsistencies. |
|
|
|
|
|
没有变化,只是花了相当多的时间试图匹配WebSythNETServEnnVMMMPFS项目与我的设置。它们似乎是相同的:-示例项目使用SMTP模块而不是SMTPC模块,它也使用HTTP Net Server,在示例项目中,我在SytSyCyf.h中找不到任何WOLFSSL设置,而只有匹配的2个NETPYPRES设置。在系统配置中包括NETYPrasyEngCixC胶(.c.h)的头文件,在这个例子中有一堆在我的项目中没有生成的函数,可能是因为我没有使用HTTP网络服务器。以防万一,我把这些文件中的所有代码添加到我的项目中。所有的东西都编译好了,但是当我尝试使用TLS时,我仍然有例外。在这一点上,我仍然想知道SMTPC(不是SMTP)模块是否已经被测试过正确地使用TLS。想知道有没有人让这个工作?
以上来自于百度翻译 以下为原文 No change yet Just spent quite a bit of time trying to match the settings on web_net_server_nvm_mpfs project with mine. They seem to be identical except: -the example project uses the SMTP module rather than the SMTPC module and -it uses the HTTP Net Server Also, in the example project I could not find any WOLFSSL settings in the system_config.h and only 2 NET_PRES settings that I match. Interestingly, there is a source/header file included under the system config called net_pres_enc_glue (.c .h) that in the example has a bunch of functions that were not generated in my project - maybe because I'm not using the HTTP Net Server. Just in case this was the issue, I added all the code in these files into my project. Everything compiled OK but I still get the exception when I try to use TLS. At this point, I'm still wondering if the SMTPC (not the SMTP) module has been tested to work with TLS properly. Wondering if anyone has gotten this to work? |
|
|
|
|
|
你需要在NETPrimeSkyCuxCalp.c中添加函数——它们是TPC/IP和WOR-SLSI之间的接口,通过在MHC生成器运行之后将一个工作演示SSL项目与矿山进行比较发现。MHC不添加这些函数。也有一些表需要在StimultIn.c中更新,它们是接口到NETA Pro的函数。Apple;NETPrimeStaskObjs0dS.D.&;NETPRESTRANSObjuts0DS,.pTrimObjutsObj.=;NETPRESTRANSObjOT0DC,.pPROVONTURSTOSDS= NULL,//PPROVOONTURSTOSSC= NULL,PPROVNOOSTETCSSC= =和NETYPROSPIN EngvestRealcliclit0,,PPROVObjutsDDS=NULL,pPROVONDECUSTORC DC=NULL,},},至少,这是我必须做什么!
以上来自于百度翻译 以下为原文 you need to add the functions in net_pres_enc_glue.c - they are the interfacet between tpc/ip and wolf ssl I found that by comparing a working demo ssl project with mine after mhc generator had been run. mhc doesn't add those funtions. there are also some tables that may need updating in system_init.c, they are the funtions that interface to net_pres. my change was to .pProvObject_sc static const NET_PRES_INST_DATA netPresCfgs[] = { { .pTransObject_ss = &netPresTransObject0SS, .pTransObject_sc = &netPresTransObject0SC, .pTransObject_ds = &netPresTransObject0DS, .pTransObject_dc = &netPresTransObject0DC, .pProvObject_ss = NULL, //.pProvObject_sc = NULL, .pProvObject_sc = &net_pres_EncProviderStreamClient0, .pProvObject_ds = NULL, .pProvObject_dc = NULL, }, }; at least, that's what I had to do! |
|
|
|
|
|
我使用SMTPC.C,在端口465和端口587上都使用Gmail进行工作。SMTPC没有示例应用程序,但是您可以阅读文档,根据需要设置配置参数,准备所有字段的邮件处理程序。然后调用发送函数并验证结果。错误代码会告诉你问题是什么。如果在StulySigFig .h中声明的套接字的数量足够,则需要额外的套接字。
以上来自于百度翻译 以下为原文 I am using smtpc.c and works fine with gmail on both ports 465 and 587. There are no example apps for smtpc but you can read the documentation, set the config params as needed, prepare the mail handler with all fields. Then call the send function and verify the result. The error codes will tell you what the problem is. Be sure the number of sockets declared in system_config.h is enough, you will need additional sockets for that. |
|
|
|
|
|
网络演示(NETAYPRES)层是必要的,你提到的胶水代码是由MHC添加的,如果你选择它。如上所述,这是允许TCP/IP栈使用WOLFSSL加密的层,并且您还需要选择WOLFSSL——参见项目中的第三方配置。对于所有这些设置,我建议您先尝试一下标准WebGyNETServer…除此之外,还需要为项目选择SMTPC,默认情况下只启用SMTP。在.MHC文件中,应该有很多符号从OpjyToLoWfsSLIX和NETPyPrsig开始。在项目中也应该有这些。而且,是的,SMTPC模块已经过测试。
以上来自于百度翻译 以下为原文 The network presentation (NET_PRES) layer is needed and the glue code that you mention is added by MHC if you select it. As mentioned above, this is the layer that allows the TCP/IP stack to use the wolfSSL encryption. And you need to select wolfSSL as well - see the 3rd party configuration in the project. For all these settings I suggested that you give a try first to the standard web_net_server... demo app. On top of this, SMTPC needs to be selected for the project, by default just SMTP is enabled. Look in the .mhc file, there should be lots of symbols starting with CONFIG_WOLFSSL_ and NET_PRES_. You should have those in your project too. And yes, the SMTPC module has been tested. Attached Image(s) |
|
|
|
|
|
谢谢您的回复。既然SMTPTC是新的,知道TLS已经成功地与它一起工作是有帮助的。在第四次重新启动项目之后,我想,最终得到配置,适当的代码被链接进去。不再有例外!当然,现在TLS失败了,报告ASTPIPI SMTPCA RESULTSLSA失败的结果是“TLS会话协商失败”。使用端口587的几种不同邮件服务的结果相同。港口465只是时间。任何人都愿意帮助一个可怜的硬件家伙(我),并给我一些提示,可能会发生什么错误在这里?我希望不要深入挖掘TLS如何使这一切工作。再次感谢回复!
以上来自于百度翻译 以下为原文 Thank you for the replies. Since SMPTC is new, knowing that TLS has been successfully made to work properly with it is helpful. After restarting the project for the 4th time and, I guess, getting the configuration right finally, the appropriate code was linked in. No longer getting the exception! Of course, now TLS is failing with the result being reported as TCPIP_SMTPC_RES_TLS_FAILED - "TLS Session negotiation failed". Same result for several different mail services using port 587. Port 465 just times out. Anyone care to help a poor hardware guy (me) and give me some hints about what might be going wrong here? I was hoping not to have to dig deep into how TLS functions to get this all working. Thanks again for the replies! |
|
|
|
|
|
如果您在Gmail帐户上,请确保该帐户被配置为“允许不太安全的应用程序”,否则它只能与OAuth-2一起使用。此设置在Gmail帐户中,处于安全设置中。我不知道Comcast帐户,它可能有类似的东西,它只接受从可信设备连接。
以上来自于百度翻译 以下为原文 If you are on the gmail account, be sure that the account is configured to "Allow less secure apps", otherwise it works only with OAuth-2. This setting is in gmail account, in security settings. I don't know about Comcast account, it may have something similar where it accepts to connect only from trusted devices. |
|
|
|
|
|
谢谢阿德里安。我检查了这个设置,是的(允许不太安全的应用程序)。我想知道是否还有一些事情需要用键/加密来完成,或者一旦你链接到代码中,它就自动处理了。
以上来自于百度翻译 以下为原文 Thanks Adrian. I checked this setting and yes it is on (allows less secure apps). I'm wondering if there is something further that has to be done with keys/encryption or if once you link in the code it's all handled automatically. |
|
|
|
|
|
你选了2048把钥匙吗?Gmail不会接受较小的值,否则,虽然在应用程序目录中没有使用SMTPC的例子,但在堆栈本身中有一些示例。在框架目录中搜索发送器函数,您应该找到它。有一些代码用SMTPC发送电子邮件。
以上来自于百度翻译 以下为原文 Did you select a 2048 key? Gmail won't accept lesser values. Otherwise, while there are no examples using smtpc in the apps directory, there are some examples in the stack itself. Do a search for the sender function in framework directory and you should find it. There is some code there sending email with smtpc. |
|
|
|
|
|
Seeh,每当我尝试用和谐来实现一个新的软件特性时,我会想起两件事:1)我是新手。2)文档是多么不足。我仔细回顾了SMTPC模块文档,找不到任何对密钥大小的引用。也似乎看不到任何地方在MHC的地方,这是明确设置。我在哪里设置这个?我在表示层-支持客户端证书-变量名中设置了选项。我想这只是HTTP的东西。一般来说,似乎WOLFSSL可能需要配置,但我不知道该怎么做。我会去寻找你提到的例子,看看它是否有任何暗示。(谢谢):非常感谢。
以上来自于百度翻译 以下为原文 Sheesh, every time I try to implement a new software feature with harmony I'm reminded of two things: 1) what a sw novice I am ....and 2) how insufficient documentation is. I have looked back carefully over the SMTPC module documentation and can't find any reference to key size. Also can't seem to see any place in MHC where this is explicitly set. Where would I set this? I did set the option in Presentation Layer -SUPPORT CLIENT CERTIFICATE - Variable Name .... to client_cert_der_2048but I assumed this is just for HTTP stuff. In general, it seems WolfSSL might need to be configured but I'm not sure where how to do that. I will go search for the examples you mention and see if that has any hints. (TGIF sad: Thanks much. |
|
|
|
|
|
您应该有一些文件NETApPrimeCytTySt.c,它选择证书和密钥。证书本身在一个文件CLSTyTest.h(例如应用程序)中。但是,看起来您使用了2048个。对于配置SMTPC,在StimulyIn.c中,您应该声明一个TCPIPSI-SMTPCYMULTEFEXCONFIG常量结构,用适当的值初始化。然后,您应该将它添加到由TCPIpHyTaskGyIn()函数初始化的TCPPIpStaskMuleEclipse CONFIG表中。当发送电子邮件时,端口587的TCPPIpSMTPCPCMyLayFravaFig TLS设置为端口465,TCPPIpSMTPCPCMelayFraveCelpTytTLS用于端口
以上来自于百度翻译 以下为原文 You should have some file net_pres_cert_store.c which selects the certificates and keys. The certificates themselves are in a file certs_test.h (for example application). But it looks like you used the 2048 one. As about configuring the smtpc, in system_init.c you should declare a TCPIP_SMTPC_MODULE_CONFIG constant structure, initialized with proper values. Then you should add it to your TCPIP_STACK_MODULE_CONFIG table which is initialized by TCPIP_STACK_Init() function. When sending the e-mails set the flag TCPIP_SMTPC_MAIL_FLAG_FORCE_TLS for port 587 and TCPIP_SMTPC_MAIL_FLAG_CONNECT_TLS for port 465 |
|
|
|
|
|
再次感谢您的回复。我已经尝试了FrimeTLS标志(以及几乎所有其他标志和端口的组合),但是没有变化。我仍然得到TLS会话协商失败的结果。在StultInI.c中有一个TCPIPSIMSTPCYMULTEFIXCONFIG结构,它是用配置文件头中的y*定义初始化的。大概都是由MHC生成的。我回去发现了一个旧的以太网启动器套件,同时运行了WebSynNETServer NVMMMPFET和WebSyServEnvMMMPFS演示软件1.10,我不能让其中任何一个发送任何电子邮件(甚至非TLS),但我记得让它们与以前的版本一起工作。和谐的NS。我不想浪费太多的时间调试演示代码和演示硬件,因为我的硬件工作,并已经发送邮件与非TLS连接。你提到确保足够的套接字被宣布。我定义为10的HaveTCPipTCP*Max套接字。这就是你所指的价值,足够高吗?谢谢。
以上来自于百度翻译 以下为原文 Thanks again for the responses. I have tried the FORCE_TLS flag (and just about every other combination of flags and ports) but no change. I still get the TLS session negotiation failed result. There is a TCPIP_SMTPC_MODULE_CONFIG struct in the system_init.c and it is initialized with the #defines in the config header... presumably all generated by the MHC. I went back and found an old Ethernet Starter Kit and ran both the web_net_server_nvm_mpfs and the web_server_nvm_mpfs demos with Harmony 1.10 and I can't get either of these to send any email (even non-TLS) but I remember getting them to work with previous versions of harmony. Don't want to waste too much time debugging with demo code and demo hardware since my hardware works and already does send mail with Non TLS connections. You mentioned making sure enough sockets are declared. I have TCPIP_TCP_MAX_SOCKETS defined as 10. Is this the value you are referring to and is this high enough? Thanks. |
|
|
|
|
|
是的,TCPIPPTCPXMAX插座。当我在船上运行很少的服务器时,10对我来说是不够的。它无法打开更多的HTTP服务器套接字。但是,因为它说它无法协商TLS会话,所以它似乎通过了打开一个套接字的步骤。也许你应该在这里发布你的网络胶粘代码。
以上来自于百度翻译 以下为原文 Yes, TCPIP_TCP_MAX_SOCKETS. 10 was not enough for me when running few servers on board. It failed to open more http server sockets. But, since it says it fails to negotiate TLS sessions, it seems to pass this step of opening a socket. Maybe you should post your net glue code here. |
|
|
|
|
|
我假设你是指在NETYPraseCynCux.h和.c中生成的代码。我将它与示例项目WebSynTyServ.NVMMMPFS中的代码进行了比较。看起来像是生成了相同的代码。这里是标题:ExtEnnEngPrasePosivRealServices NETSypRePosivRealStServer 0;ExtNETByPrasePosivServices NETSypRePosivRealStruclit0;BooNETPrasePosivRealSerServIn0(StuttNETPrimePrimeToStuppAd*TrasObjor);EtPrimeServestPosialServer Open0(UntPrTrStRunShandle,ValuePosivDealDebug);BooNETPrimeServices ServistInED0()Cclipse Open0(UntPrTrStRtHundle,ValuePosivDealDATA);BooNETPrimePosivRealCurclitNeNeDe0();NETA PrimeCysEnsithSturnEntPrasyPvestRealServer AcctR0(ValuePosivDealDATA);NETA PrimeSeCaseStices状态NETSypRePosivCurrclieNoTeleT0(ValuePosivDeDATA);ReSnValpFieldCalutalCoutoE0(ValuePosivDealDATA);,Unt8*t*缓冲区,uut1616t大小);32位NETPrasePosivRead Read Read 0(ValuePosivDeDATA);下一步,我必须开始用WiReSARK捕获数据包,看看它崩溃的地方,但是,这太乏味了。谢谢你的帮助。非常感激。
以上来自于百度翻译 以下为原文 I'm assuming you mean the code generated in net_pres_enc_glue.h and .c? I compared this to the code in sample project web_net_server_nvm_mpfs. It looks like the same code is generated. Here's the header: extern NET_PRES_EncProviderObject net_pres_EncProviderStreamServer0; extern NET_PRES_EncProviderObject net_pres_EncProviderStreamClient0; bool NET_PRES_EncProviderStreamServerInit0(struct _NET_PRES_TransportObject * transObject); bool NET_PRES_EncProviderStreamServerDeinit0(); bool NET_PRES_EncProviderStreamServerOpen0(uintptr_t transHandle, void * providerData); bool NET_PRES_EncProviderStreamServerIsInited0(); bool NET_PRES_EncProviderStreamClientInit0(struct _NET_PRES_TransportObject * transObject); bool NET_PRES_EncProviderStreamClientDeinit0(); bool NET_PRES_EncProviderStreamClientOpen0(uintptr_t transHandle, void * providerData); bool NET_PRES_EncProviderStreamClientIsInited0(); NET_PRES_EncSessionStatus NET_PRES_EncProviderServerAccept0(void * providerData); NET_PRES_EncSessionStatus NET_PRES_EncProviderClientConnect0(void * providerData); NET_PRES_EncSessionStatus NET_PRES_EncProviderConnectionClose0(void * providerData); int32_t NET_PRES_EncProviderWrite0(void * providerData, const uint8_t * buffer, uint16_t size); uint16_t NET_PRES_EncProviderWriteReady0(void * providerData, uint16_t reqSize, uint16_t minSize); int32_t NET_PRES_EncProviderRead0(void * providerData, uint8_t * buffer, uint16_t size); int32_t NET_PRES_EncProviderReadReady0(void * providerData); int32_t NET_PRES_EncProviderPeek0(void * providerData, uint8_t * buffer, uint16_t size); Frankly, I've hit a wall finding easy solutions. Next I'll have to start capturing packets with Wireshark to try to see where it's breaking down, but ugh, that's tedious. Thanks for the help. Much appreciated. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
494 浏览 0 评论
5807 浏览 9 评论
2347 浏览 8 评论
2235 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3542 浏览 3 评论
1150浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1117浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
885浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
495浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-11 04:29 , Processed in 1.327764 second(s), Total 104, Slave 87 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3070