Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailbox support #9

Closed
ffissore opened this issue Dec 21, 2013 · 10 comments
Closed

Mailbox support #9

ffissore opened this issue Dec 21, 2013 · 10 comments
Labels

Comments

@ffissore
Copy link
Contributor

Mailbox features are currently usable only from the Arduino side, neither the REST api nor the bridgeclient.py module make it available

@ffissore
Copy link
Contributor Author

Also update the documentation, since 128 is not the max value but rather the default value. This should be a separate issue, but it should also be opened AFTER this one gets fixed
http://arduino.cc/en/Reference/YunMailboxReadMessage

@Fede85
Copy link
Contributor

Fede85 commented Feb 5, 2014

The following two pull requests add the support to add messages to the AVR incoming queue from the the REST api from URL formatted like "http://arduino.local/mailbox/messageToBeAddedToTheQueue":

Linino: arduino/linino#25
YunWebUI: arduino/YunWebUI#4

@gregoriusus
Copy link

Anything new regarding Mailbox in python bridge?

@tigoe
Copy link
Member

tigoe commented Feb 16, 2014

It appears to be working after the last patches Federico applied, from what I can see.

t.

On Feb 16, 2014, at 12:28 PM, gregoriusus notifications@github.com wrote:

Anything new regarding Mailbox in python bridge?


Reply to this email directly or view it on GitHub.

@gregoriusus
Copy link

As I can there are two changes in index.lua and httpd.conf. Can I just overwrite this two files and mailbox.py will work?

@ffissore
Copy link
Contributor Author

Yes

@gregoriusus
Copy link

Updated 2 files, reboot arduino and run my python code. On import statement i get error:
Traceback (most recent call last):
File "code.py", line 7, in
from mailbox import Mailbox as mailbox
File "/usr/lib/python2.7/bridge/mailbox.py", line 32, in
json_server = TCPJSONServer('127.0.0.1', 5700)
File "/usr/lib/python2.7/bridge/tcp.py", line 158, in init
TCPServer.init(self, port, address)
File "/usr/lib/python2.7/bridge/tcp.py", line 85, in init
utils.try_bind(server, address, port)
File "/usr/lib/python2.7/bridge/utils.py", line 38, in try_bind
return socket.bind((address, port))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 125] Address already in use

It looks like mailbox.py tries to open tcp server on port 5700, although it is already opened.

@ffissore
Copy link
Contributor Author

What's "code.py" ? Mailbox is intended to be used by Bridge as a part of it, not to be embedded into other python programs. Bridgeclient is missing that feature. I'll track the feature with an issue and make it implemented

@gregoriusus
Copy link

Oh, I see. code.py is my code. I thought that I need to import it. Basically bridge client will have this method implemented?. Will wait for implementation and test it then.

@ffissore
Copy link
Contributor Author

Yes we are working on extending bridgeclient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants