Search found 8 matches

by zeb
Wed May 01, 2019 7:03 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

Re: usocket and uselect reboots board

okay - so my thinking is that the ping -> response cycle is returning something that makes the socket.recv() function do it's thing and allowing the code to progress while still accepting actual messages from the server with data in it - im still pretty new at the whole python and networking thing s...
by zeb
Wed May 01, 2019 6:57 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

Re: usocket and uselect reboots board

again - further madness here (i think - i might be wrong)
if i do a

Code: Select all

client.ping()
before doing

Code: Select all

client.check_msg()
the code behaves as expected
by zeb
Wed May 01, 2019 6:52 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

Re: usocket and uselect reboots board

okay, so the plot kind of thickens I rewrote my code to use MQTT - whenever i use client.check_msg() the code hangs like when im doing my own TCP stuff - it seems that something is broken in the way OpenMV handles tcp sockets ... as far as i can tell the mqtt check_msg function should return immedia...
by zeb
Wed May 01, 2019 4:10 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

Re: usocket and uselect reboots board

i might have misunderstood something basic about tcp sockets :) i got the timeout to work but now i get access denied when attempting to read from the socket again do i need to open the connection again to keep reading from the socket? the funny thing is that if i disable the timeout i can keep comm...
by zeb
Mon Apr 29, 2019 7:26 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

Re: usocket and uselect reboots board

i cant for the life of me make this nonblocking - neither settimeout or setblocking commands are doing anything
the openmv cam is the client and server is written in nodejs, do i need something on the server side to fix this?
by zeb
Mon Apr 15, 2019 5:13 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

Re: usocket and uselect reboots board

I should probably note that any function in the uselect library ive tried reboot the board -

Code: Select all

uselect.select 
for instance also reboots
by zeb
Mon Apr 15, 2019 5:12 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

Re: usocket and uselect reboots board

hmm, doesnt seem im allowed to write the script here - i tried commenting with it - but i keep getting an error about "/posting.php" But anyways - the code ive attached is just a test script that connects to a wifi then to a tcp server (i wrote one in nodejs - but any tcp server should do) as soon a...
by zeb
Fri Apr 12, 2019 3:37 am
Forum: Technical Discussion
Topic: usocket and uselect reboots board
Replies: 10
Views: 2377

usocket and uselect reboots board

Hi guys Im doing a project where im using tcp sockets on the openMV - that actually works quite well but the usocket.recv() is a blocking operation. Following general suggestions online in how to do non blocking tcp in python i found the "select" session - and found the uselect library in openMVs mi...

Go to advanced search