This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

File: (null), Line: 0, Error code: 4

I'm using Python bindings 0.5.0 and the connectivity app. On one of our machines that is running tests with the satck/dongle we see it fail a lot with a scrolling of this message from the DLL (our registered handler in python gets it with a severity code of 4)

What is this error? It's not recoverable

  • I am not familiar with running connectivity but I do know defining "DEBUG" in your preprocessor for firmware and including app_error.c allows me to inspect the p_file_name and line number variables. Often they get optimized away. The most common scenarios I see (if this is an NRF_ERROR_NO_MEM) are insufficient timer or pstorage allocations.

  • um, this is an official build from Nordic. The C code that is running on the Dongle was compiled by Nordic and provided in the 0.5.0 bindings driver package. Can a Nordic rep comment on why the driver can fail with no debug output on the released image? If the bindings have a way to get called back with these errors then there should be information in them and a doc that describes how to decode it.

  • Hi Jim, Could you let me know more about the condition when you got the issue ?

    You got the same error message as in this case, that was clarified as the issue with the buffer overflow when receiving data on the PC. Could you try to follow the suggestion in the case ?

  • so if I understand this correctly the DLL doesn't have enough memory allocated for incoming message buffers, correct? Why isn't this configurable since on most PCs memory is a lot cheaper than on embedded systems. Is there a spec on how long python can take to get events out of the DLL? I can move some code around on my python to queue events from the DLL and then on a separate python thread manage the data, however python is a single threaded system. Only one real thread and the python interpreter schedules a slice of byte code from each python thread to execute. At some point things are going to slow down enough for this fail spiral to hit. I'm thinking that the one computer that this is happening to has slow down issues. When that happens I start getting one of these messages every connection interval flooding my database.

  • Hi Jim,

    No, the DLL doesn't have any flow control, so if you can't process the packet as fast as the coming rate, you will receive the error code 4. However, it's possible to increase the buffer, which can remedy but not fix the issue. You can modify and build the ble_driver from its source.

Related