• AVR Freaks

Hot!wolfmqtt_demo project appears incomplete

Author
RyanF
Starting Member
  • Total Posts : 20
  • Reward points : 0
  • Joined: 2017/04/11 06:31:29
  • Location: 0
  • Status: offline
2020/05/15 06:56:16 (permalink)
0

wolfmqtt_demo project appears incomplete

Hi
 
I was trying out the wolfmqtt_demo project as found in *your installation folder*\net\apps\wolfmqtt_demo\firmware 
 
I followed the instructions on microchip-mplab-harmony.github.io/net/frames.html?frmname=topic&frmfile=00352.html
 
The project compiles fine, I download to the  PIC32MZ EF Starter Kit and connect the terminal port (U2)
 
I get messages telling me TCP is running, MQTT commands have been created and I see my ip assignment, all good.
 
I then try the console commands as shown in the documentation (start stop etc), nothing, no response.
 
Looking into the code of the example, there is no mqtt client code and no uart console code, all it appears to be is a mqtt template with no client implementation .
 
Has anybody got this demo working?
 
BTW I am using MpLab X 5.35, XC32 2.4, Harmony 3, PIC32MZ EF Starter Kit
 
Any advice appreciated.
 
 
#1

8 Replies Related Threads

    rainad
    Moderator
    • Total Posts : 1402
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/15 08:16:17 (permalink)
    0
    What response do you get to the commands:
    > mqtt broker
    >mqtt port
    If these commands respond properly, then everything should be OK.
    Try
    > mqtt broker mqtt.eclipse.org
    as probably the default broker that you have (iot.eclipse.org) is no longer running.
    And then:
    >mqtt start
     
     
     
    post edited by rainad - 2020/05/15 08:17:22
    #2
    RyanF
    Starting Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2017/04/11 06:31:29
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/15 08:24:11 (permalink)
    0
    Hi rainad
     
    I get no response to any commands on the uart port.
     
    I dont even get a response to mqtt help:
     
    Interface PIC32INT on host MCHPBOARD_E - NBNS disabled
    Created the mqtt Commands
    PIC32INT IP Address: 0.0.0.0
    PIC32INT IP Address: 192.168.100.10
    mqtt help
     
    As you see, no response to mqtt help.
     
    I dont see any code in the app related to the UASRT or mqtt client.
     
    It seems it is missing (or I am looking at the wrong example).
     
    I changed the broker to a fixed ip as I am running mosquitto on a test pc @ 192.168.100.12.
     
    Regards
     
     
    #3
    rainad
    Moderator
    • Total Posts : 1402
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/15 08:36:32 (permalink)
    0
    Is there any reply to non mqtt commands, like:
    >netinfo
    >macinfo
     
    Is the console working at all?
     
    #4
    RyanF
    Starting Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2017/04/11 06:31:29
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/15 08:42:15 (permalink)
    0
    Hi
     
    It does not respond to any command.
     
    I do see the tcp initializing console messages at power up, so the tcp stack is running, uart is configured
     
    But if I look in the code, I dont see anything active relating to mqtt client or even the uart console commands for the client.
     
    I dont think the files are present in this example.
     
    Which example did you use?
     
    #5
    rainad
    Moderator
    • Total Posts : 1402
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/15 08:58:21 (permalink)
    0
    Do you have app_mqtt_commands.c, app_mqtt_task.c and app_mqtt_task.h as part of your project?
    Most likely yes.
    Just make a comparison between github repo and what you have in the wolfmqtt_demo.
    But it seems you have other issues. Do you get a DHCP address,does the board respond to pings?
     
     
    #6
    RyanF
    Starting Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2017/04/11 06:31:29
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/15 09:06:35 (permalink)
    0
    Hi
     
    Yes, I have app_mqtt_commands.c, app_mqtt_task.c and app_mqtt_task.h.
     
    I have also copied the repo project, still the same.
     
    I dont see anywhere in those 3 files where the uart interaction occurs, I also dont see anything to do with client config.
     
    The wolf site refers to mqtt_client .c & h.Given that the Harmony project uses the wolf library, I would have expected to see these files present.
     
    I am using static ip's and ping works.
     
     
     
     
    #7
    rainad
    Moderator
    • Total Posts : 1402
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/15 09:50:17 (permalink)
    5 (1)
    The console (which uses the UART) transmits messages through SYS_CONSOLE_PRINT/MESSAGE calls. You can check that those calls are working. For example, when the application starts, you should see a message from the TCP/IP stack that it initialized itself and is running.
    Please post a screen shot of your console once the application starts.
     
    The mqtt demo (and the other modules accepting commands) use the system command processor.
    That one also uses the UART console to output its results.
    It looks like that one (partially) works OK, since it's accepting commands.
    Something seems to be wrong with the output of the command result, since you don't get any result, no matter what command you enter.
    The tx side seems to be working though if you see on the terminal the command you typed - unless you turned on the local echo on your terminal. Turn that off, that may be misleading, thinking that the board actually receives the commands.
     
    Also check that your terminal sends a CRLF sequence after each command. This is how command lines are supposed to end.
    Test this by pressing a key for a long time, see if you get a message 'buffer exceeded' or similar.
     
    If still does not work, I suggest you use a different application for now and try to understand what's wrong with your console and/or command processor.
    Just use the web_net_mpfs_demo for the PIC32MZEF ESK, let's see how that one is behaving.
    post edited by rainad - 2020/05/15 13:09:18
    #8
    RyanF
    Starting Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2017/04/11 06:31:29
    • Location: 0
    • Status: offline
    Re: wolfmqtt_demo project appears incomplete 2020/05/18 06:46:35 (permalink)
    4 (1)
    Ok , found the problem.
     
    CR & LF were turned off in my terminal emulator program.
    I normally leave them enabled but for whatever reason they were reset to off.
     
    all works fine and as expected.
     
    I expected to find the uart/terminal code in the user files (app.c etc), when I saw they weren't there so I assumed that the project was incomplete.
     
    Thank you rainad for taking the time to help.
     
    Regards
    #9
    Jump to:
    © 2020 APG vNext Commercial Version 4.5