How to get the lua_interactive on my WMP 100


I have a development board for an WMP 100.

I want to test LUA. If i understood the tutorials right, first of all i have to flash an extra firmware on my device.

Where can i get this firmware? Can i flash it with DWLWin?

in M2MStudio, there’s a sample called lua_interactive. Build it, download it, follow the manual instructions to establish an IP route between your development PC and your WMP

Okay thx.

I built it, downloaded it to my WPM and then started the applikation with at+wopen=1.

But i cannot establish a connection to the WMP via PPP. I configured everything as described in the lua tutorial, but when i try to connect, i get Error777: The modem on the remote computer is not ready (something like this)…

  • have you checked on the serial shell that it says “[UART1]: open: -> DISCONNECTED [UART1]: PPP start: -> PPP CONNECTING [UART1]: startsrv: -> CONNECTING” before going silent?
  • if it’s silent (that is, waiting for PPP connection), have you closed selima so it stops monopolizing the COM port?
  • have you tried rebooting Windows? (it goes a bit nervous when you make it plays with COM ports; apparently Microsoft doesn’t consider reliable serial cables support to be a major strategic goal for its future…)
[LUAW] Starting telnet server
[WIP] new TCPSERVER 0x180eeee8
[UART1]: startsrv: -> CONNECTING
[LUAW] SIGNAL [thread 0x180e3f08].die

I don’t know, what is selima. I use the hyper terminal to speak with my WMP, and it is closed when i try to connect.

Are these traces taken from UART1? If so, you have an issue indeed: after “-> CONNECTING”, UART1 should have switched to DATA mode to wait for a PPP connection. When in DATA mode, traces must be muted on the corresponding UART.

Is that a specific limitation for PPP and/or Lua?

In general, it is ceratinly possible for a UART to be used by both Traces and the application’s comms…

See: viewtopic.php?f=53&t=2509&p=11123&hilit=external+com#p11123

How can i tell the lua-main-application to switch uart1 to data mode?

you’ve already told it, with the “wip.bearer_client(UART1, )”: it starts the PPP bearer on UART1, which in turn switches UART1 to DATA. But the fact that you still see logs arrivin on UART1 after the “-> CONNECTING” seems to mean that the switch failed. Maybe you have more info in the TMT traces? (or maybe the traces you posted came from another port than UART1?)

yes the traces in my quote came from uart1, when i started the lua-application via hypper terminal.

but before trying to connect via tcp/ip, i close the hyper terminal. if i don’t close it before, i got a different error message that tells me, that the modem/link is already in use…

/* Start PPP server on UART2 */

    "global ('LOCAL_ADDR', 'PEER_ADDR', 'PPP_UART', 'LOGIN', "
    "        'PASSWORD', 'DOWNLOAD_CONFIG') "

    "LOCAL_ADDR = LOCAL_ADDR or '' "
    "PEER_ADDR  = PEER_ADDR  or '' "
    "PPP_UART   = PPP_UART   or 'UART1' "
    "LOGIN      = LOGIN      or 'wipuser' "
    "PASSWORD   = PASSWORD   or '123456' "

    "  protocol = 'http', "
    "  host     = PEER_ADDR, "
    "  port     = 8765 } "

if found this snippet in the appli.c of the OATLUA_PLUGIN.

will the ppp server start on UART1 or UART2 ??

unless you’ve got special settings overridden in your flash objects (but you’d know it, it doesn’t happen by accident), that’s going to serve on UART1. And anyway, your WIP traces clearly say “[UART1]: startsrv: -> CONNECTING”, so it is started on UART1.

so where can i find the problem?
what would you suggest me to figure out or test.

i just want to establish the ppp link, so i can start exploring the lua-plugin :frowning:

Well I asked you a couple of questions you didn’t answer :slight_smile: Most notably, can you confirm that you get traces on UART1 after “[UART1]: startsrv: -> CONNECTING”? If so, then the modem somehow fails to switch UART1 to PPP, which is something I’ve never heard of; can you remind me which version of the plug-in and which sample sources you’re trying to use?

A much more user-friendly alternative is to get a Fastrack with Ethernet; PPP over serial ports is and will remain a pain in the back under Windows.