Memory Error with sendto

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
retep.relleum
Posts: 2
Joined: Sat Apr 18, 2020 6:22 am

Memory Error with sendto

Post by retep.relleum » Sun Jun 14, 2020 6:45 am

Hallo

I have a problem with udp sockets
if i use self.__sock.sendto(self.__buffer, server_addressS) i get a a Error

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 27, in <module>
File "/lib/uPySip/sipMachine.py", line 185, in loop
File "/lib/uPySip/sipMachine.py", line 550, in __send
OSError: [Errno 12] ENOMEM

if i use gc.collect() after self.__sock.sendto(self.__buffer, server_addressS) then it works. But i can not runn each time the collect then the packages mus be send each 0.02s

the code is on Github https://github.com/RetepRelleum/uPyVoip ... Machine.py

regards Peter

retep.relleum
Posts: 2
Joined: Sat Apr 18, 2020 6:22 am

Re: Memory Error with sendto

Post by retep.relleum » Wed Jun 17, 2020 6:27 pm

:D Wow I have solved my Problem

Code: Select all

machine.freq(240000000) 
and

Code: Select all

 if i%20==0:  #Bad solution 
 	gc.collect()
 
 

Post Reply