Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mihini-dev] Wiki Suggestions / telnet on port 2000

Gah , sorry for the typo Marcelo!

 

I have opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=414044 against Koneki/TM so as to update the default value of the REST API port to 8357

 

Benjamin

 

De : mihini-dev-bounces@xxxxxxxxxxx [mailto:mihini-dev-bounces@xxxxxxxxxxx] De la part de mnerys@xxxxxxxxxx
Envoyé : mardi 30 juillet 2013 19:03
À : Mihini project developer discussions
Objet : Re: [mihini-dev] Wiki Suggestions / telnet on port 2000

 

Cool. It worked. For other people trying to do the same, please note that instead of using:

config.agent.rest.port=8080

You should use:

agent.config.rest.port=8080

I got some nil values when using the config.agent and realized I should use agent.config . There was a typo.

Then:
WEB-INFO: Starting web server on port 8080

After this, I could use Koneki and do the "Export Lua Application Package".

I'll create another thread soon regarding the lua gpio package, which is my next doubt. :)

Best,

Marcelo Nery dos Santos
Research Software Engineer

Phone: 55-21-2132-3663
E-mail: mnerys@xxxxxxxxxx

Av. Pasteur 146 & 138
Rio De Janeiro, RJ
22290-240 - Brazil




From:        Benjamin Cabé <bcabe@xxxxxxxxxxxxxxxxxx>
To:        Mihini project developer discussions <mihini-dev@xxxxxxxxxxx>
Date:        07/29/2013 07:49 PM
Subject:        Re: [mihini-dev] Wiki Suggestions / telnet on port 2000
Sent by:        mihini-dev-bounces@xxxxxxxxxxx





Marcelo,

The communication between the IDE and Mihini is done over the HTTP REST interface.
This support is still very early stages and looks like the default port for the REST server was changed in Mihini recently (and it is hard-coded in Koneki at the moment, unfortunately)

Can you use the shell to change the default port to 8080?
config.agent.rest.port=8080

I believe this should do the trick. You can check that this has correctly been taken into account from the logs when you’ll restart Mihini (Starting web server on port...)

Let me know if that helps
Benjamin.


mnerys@xxxxxxxxxx a écrit :


Thanks Benjamin!

The issue that I am facing now is related to LDT not being able to "export" a Lua Application Package to my "build from source". I thought that once the telnet 2000 worked, this would work easily.


I tried to launch Mihini with:

1.

sudo ./bin/appmon_daemon -a /home/pi/mihini/start.sh -w /home/pi/mihini -u pi -g pi -n 5 2>&1 | logger -t Mihini &

and

2.

sudo ./bin/appmon_daemon -a /home/pi/mihini/start.sh -w /home/pi/mihini -u root -g root -n 5 2>&1 | logger -t Mihini &


but in both cases, I get an error like on the attachment: "Unable to run export. Unable to install package. The target server failed to respond"




Any debugging steps recommended?


Thanks,

Marcelo Nery dos Santos
Research Software Engineer

Phone: 55-21-2132-3663
E-mail:
mnerys@xxxxxxxxxx

Av. Pasteur 146 & 138
Rio de Janeiro, RJ
22290-240 - Brazil




From:        
Benjamin Cabé <bcabe@xxxxxxxxxxxxxxxxxx>
To:        
Mihini project developer discussions <mihini-dev@xxxxxxxxxxx>
Date:        
07/29/2013 05:29 PM
Subject:        
Re: [mihini-dev] Wiki Suggestions / telnet on port 2000
Sent by:        
mihini-dev-bounces@xxxxxxxxxxx





Wow thanks for all the valuable input Marcelo!

Looks like there are inconsistencies here and there in the wiki. We’ll definitely have a look. FWIW, feel free to directly edit the wiki should you find trivial errors or feel like adding hints that you think would be useful to everybody – it would be much appreciated! (make gpio is a good example of such a possible addition)

 
The telnet shell listens on the “localhost” interface by default. You want to add
shell.address = '*' in your defaultconfig.lua (or you can change that directly from the shell when you manage to connect locally, by doing agent.config.shell.address = '*' – but note this setting will be lost if you scratch your local storage (persist/ folder of the mihini install))
 
Benjamin.

 
De :
mihini-dev-bounces@xxxxxxxxxxx [mailto:mihini-dev-bounces@xxxxxxxxxxx] De la part de mnerys@xxxxxxxxxx
Envoyé :
lundi 29 juillet 2013 22:14
À :
Mihini project developer discussions
Objet :
[mihini-dev] Wiki Suggestions / telnet on port 2000

 
Hi Guilhem/All,


To make my message easier to digest, I'll focus my feedback on this page:

http://wiki.eclipse.org/Mihini/Build_Mihini

where one can read:

# Move the result of the build
in your HOME
$
mv runtime ~/mihini

Followed by:

$
cd ~/mihini
$ ./runtime/start.
sh

I believe that the intention in NOT really to have a file like "
~/mihini/runtime/start.sh" and instead have something like "~/mihini/start.sh". If a step-by-step guide is being provided and the idea is to have a "runtime" in "~mihini", maybe there should be a "mkdir mihini" at some earlier point, but other instructions (like http://wiki.eclipse.org/Mihini/Run_Mihini_on_an_Open_Hardware_platform : sudo ./bin/appmon_daemon -a /home/pi/mihini/start.sh ...) makes me believe otherwise (that there should be no "runtime" inside "~/mihini").

Assuming the idea is to get the "runtime" contents and place them as "~/mihini", then there should be no "runtime" before the "start.sh" call. I hope I made myself clear. :)


--


Next, after the "start.sh" is invoked on the "Check that everything works" section and the user verifies the output, it would be great to put a note stating whether he should leave the service running or not (before going back to the main tutorial). I assume the user should stop Mihini, since on the Main Tutorial he'll be going to Step 2 (Configuring Mihini) and then Step 3 (Starting Mihini). So, a note about this would make it more clear if he should kill the recently launched process or not.


--


On the "Run the compilation" section, maybe you can update to include the recently added gpio module. I tested it here and a "make gpio" right after "make modbus_serial" worked like a charm.


--


Last, but not least, right after running the "start.sh", it would be great to add some verification info, like suggesting the user to use "telnet localhost 2000" and/or "telnet <raspberry_pi_IP> 2000" from the Pi and from an external host to validate the service is accessible or not. On my tests here, at this point the only successful telnet is the "telnet localhost 2000" from the Pi itself. When I try the IP, no telnet works (neither form the Pi, nor external). Firewall should not be an issue, since I can successfully use ssh to connect to the Pi. Debugging info on this can be seen below.


--


Killing the start.sh (with ctrl+c) and doing:

cd ~/mihini/lua/agent

mv defaultconfig.lua defaultconfig.lua.bak

wget
https://raw.github.com/nim65s/mihini-repo/CPack/porting/raspberrypi-linaro/agent/defaultconfig.lua
mv platform.lua platform.lua.bak

wget https://raw.github.com/nim65s/mihini-repo/CPack/porting/raspberrypi-linaro/agent/platform.lua
cd ~/mihini

./start.sh


did not resolve the issue with the connection. From a remote machine, I still get:


telnet 9.7.229.151 2000

Trying 9.7.229.151...

telnet: connect to address 9.7.229.151: Connection refused

telnet: Unable to connect to remote host


and nothing new appears on the console there the start.sh is running.


ssh
pi@9.7.229.151 works fine.

Thanks!


--


pi@raspberrypi ~/mihini $ ./start.sh
2013-07-29 19:48:20 GENERAL-INFO: ************************************************************

2013-07-29 19:48:20 GENERAL-INFO: Starting Agent ...

2013-07-29 19:48:20 GENERAL-INFO:      Agent: 0.9-DEV - Build: 7d6b3c7

2013-07-29 19:48:20 GENERAL-INFO:      Lua VM: Lua 5.1.4 (+meta pairs/ipairs) (+patch-lua-5.1.4-3)

2013-07-29 19:48:20 GENERAL-INFO:      System: Linux raspberrypi 3.6.11+ #456 PREEMPT Mon May 20 17:42:15 BST 2013 armv6l

2013-07-29 19:48:20 GENERAL-INFO: ************************************************************

2013-07-29 19:48:20 GENERAL-INFO: Migration executed successfully

2013-07-29 19:48:20 GENERAL-INFO: Device ID = "012345678901234"

2013-07-29 19:48:20 GENERAL-INFO: Module [AssetConnector] initialized

2013-07-29 19:48:20 SHELL-INFO: Binding a shell server at address ?localhost, port 2000

2013-07-29 19:48:20 GENERAL-INFO: Module [Lua Shell] initialized

2013-07-29 19:48:20 GENERAL-INFO: Module [DummyNetman] initialized

2013-07-29 19:48:20 GENERAL-INFO: Module [Lua RPC] initialized

2013-07-29 19:48:20 WEB-INFO: Starting web server on port 8357

2013-07-29 19:48:20 GENERAL-INFO: Module [Rest] initialized

2013-07-29 19:48:20 SRVCON-INFO: Server URL = "">
2013-07-29 19:48:20 GENERAL-INFO: Module [ServerConnector] initialized

2013-07-29 19:48:20 GENERAL-INFO: Module [DataManagement] initialized

2013-07-29 19:48:20 ASSCON-INFO: Connection received from asset [table: 0x6934e0] at '<local ipc=table: 0x6b7c78>:0'

2013-07-29 19:48:20 ASSCON-INFO: Asset registered, name="@sys", id=table: 0x6934e0.

2013-07-29 19:48:20 GENERAL-INFO: Module [DeviceManagement] initialized

2013-07-29 19:48:20 GENERAL-INFO: Module [Update] initialized

2013-07-29 19:48:20 GENERAL-INFO: Agent successfully initialized

2013-07-29 19:48:50 DATAMGR-INFO: flushing policy "default"

2013-07-29 19:48:50 DATAMGR-INFO: flushing policy "now"

2013-07-29 19:48:50 DATAMGR-INFO: flushing policy "on_boot"

2013-07-29 19:49:16 SHELL-INFO: Shell connection from client (127.0.0.1)

2013-07-29 19:49:30 SHELL-INFO: Shell connection closed

Best,

Marcelo Nery dos Santos
Research Software Engineer

Phone: 55-21-2132-3663
E-mail:
mnerys@xxxxxxxxxx

Av. Pasteur 146 & 138
Rio de Janeiro, RJ
22290-240 - Brazil



_______________________________________________
mihini-dev mailing list
mihini-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/mihini-dev
_______________________________________________
mihini-dev mailing list
mihini-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mihini-dev


Back to the top