Keil 5.28 MDK using Oryx-Embedded

Has anyone had success using the Oryx Embedded suite CycloneTCP, SSL, and Crypto?  It works most of the time, but it definitely is not robust.  From time to time, the SMTP routines hang indefinitely at different points without any timeouts.  There are always glitches with ethernet transactions, but waiting indefinitely for an event is bad code design, obviously.  And, since they charge a licensing fee for private development, it makes it doubly worse.  Bugs are one thing.  Bad code design is another.

  • Hello dodge55,

    This is Clement from Oryx technical support. We would be grateful if you could share some more information about your code / platform

    - Version of the Software Pack (1.9.4 or earlier version)?

    - Hardware platform of reference evaluation board?

    - RTOS-based or bare-metal operation?

    Can you send your test project to support -at- oryx-embedded.com so we can reproduce your exact issue?

    Thank you,

    Clement

  • Dear Sutton,

    If you experience any issue, I think the most efficient way to solve it is to carry cross-tests:

    a.) We have prepared a secure SMTP client demo project that matchs your hardware plateform (LPC21xx with 32kB RAM + ENC28J60 SPI-driven Ethernet controller). Since µVision version 5 format does not support ARM7, here is a standalone uv4 project you can open with your Keil MDK-ARM v5.28. You will find some recommendations hereafter to start the demo.
    https://www.oryx-embedded.com/download_temp/mcb2140_smtp_client_demo_v1_9_4.zip

    b.) Since your company makes use of the GPLv2 license, please publish a link to the public repository to your GPLv2 project. This way, the community and our support team can have a review and test it. This will make support far more efficient. We will revert to you if we found anything in your project that can explain the observed issue.


    Recommendations to the run the reference demo project v1_9_4:

    1.) The demo runs the following hardware:
    - Keil MCB2130 or MCB2140 evaluation board => http://www.keil.com/mcb2140
    - ENC28J60 daughter board (MIKROE-971) => https://www.mikroe.com/eth-click

    2.) The connection between the 2 boards is as follows:

    MIKROE board        MCB2140 board
    GND                     GND
    3V3                       3V3
    SDI             <--      P0.19 (MOSI1) as your board
    SD0            -->      P0.18 (MISO1) as your board
    SCK           <--      P0.17 (SCK1) as your board
    CS              <--      P0.20 instead of your CPLD
    RST           <--      P0.21
    INT             -->      P0.22


    3.) Customize the SMTP configuration in src/smtp_client_test.c (SMTP server, login, password, sender, recipient, email body, etc). You can also configure the communication timeout you want (the default value of APP_SMTP_TIMEOUT is 20s)

    4.) Compile and run the program

    5.) Connect a RS232 terminal to P1/COM1 (57600 bauds)

    6.) Make sure the LED P1.16 is flashing once per second, and that you can see the greeting message in the terminal:

    ***********************************
    *** CycloneTCP SMTP Client Demo ***
    ***********************************
    Copyright: 2010-2018 Oryx Embedded SARL
    Compiled: Jul 23 2019 12:03:08
    Target: LPC2148
    
    Initializing ENC28J60 Ethernet controller...
    ENC28J60 revision ID: 0x06
    Initializing DHCP client...
    Starting DHCP client...
    SMTP client test initialization...


    7.) Connect an Ethernet cable and wait for an IP address (DHCP process):

    Link is up (eth0)...
      Link speed = 10 Mbps
      Duplex mode = Full-Duplex
    101ms: DHCP client SELECTING state
    2s 106ms: DHCP client REQUESTING state
    2s 306ms: DHCP client PROBING state
    
    DHCP configuration:
      Lease Start Time = 2s 306ms
      Lease Time = 604800s
      T1 = 302400s
      T2 = 529200s
      IPv4 Address = 192.168.0.138
      Subnet Mask = 255.255.255.0
      Default Gateway = 192.168.0.1
      DNS Server 1 = 192.168.0.1
      DNS Server 2 = 0.0.0.0
      MTU = 1500
    


    8.) Press S2 user button to send an email:

    Sending DNS message (32 bytes)...
    DNS message received (86 bytes)...
    Host name successfully resolved to 173.194.76.109...
    Connecting to SMTP server 173.194.76.109...
    SMTP server: 220 smtp.gmail.com ESMTP 4sm100991149wro.78 - gsmtp
    SMTP client: EHLO [127.0.0.1]
    SMTP server: 250-smtp.gmail.com at your service, [109.190.139.41]
    SMTP server: 250-SIZE 35882577
    SMTP server: 250-8BITMIME
    SMTP server: 250-STARTTLS
    SMTP server: 250-ENHANCEDSTATUSCODES
    SMTP server: 250-PIPELINING
    SMTP server: 250-CHUNKING
    SMTP server: 250 SMTPUTF8
    SMTP client: STARTTLS
    SMTP server: 220 2.0.0 Ready to start TLS
    SMTP Client: TLS initialization callback
    Sending ClientHello message (102 bytes)...
    ServerHello message received (82 bytes)...
    Certificate message received (2295 bytes)...
    ServerKeyExchange message received (296 bytes)...
    ServerHelloDone message received (0 bytes)...
    Sending ClientKeyExchange message (33 bytes)...
    Sending ChangeCipherSpec message (1 bytes)...
    Sending Finished message (12 bytes)...
    ChangeCipherSpec message received (1 bytes)...
    Finished message received (12 bytes)...
    SMTP client: EHLO [127.0.0.1]
    SMTP server: 250-smtp.gmail.com at your service, [109.190.139.41]
    SMTP server: 250-SIZE 35882577
    SMTP server: 250-8BITMIME
    SMTP server: 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
    SMTP server: 250-ENHANCEDSTATUSCODES
    SMTP server: 250-PIPELINING
    SMTP server: 250-CHUNKING
    SMTP server: 250 SMTPUTF8
    SMTP client: AUTH LOGIN
    ...
    ...
    SMTP client: QUIT
    SMTP server: 221 2.0.0 closing connection 4sm100991149wro.78 - gsmtp
    Sending Alert message (2 bytes)...
      01 00


    9.) The src/main.c and src/smtp_client_test.c are 100% user code. You can modify them as needed.

    Kind regards,

    Clement

More questions in this forum