Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Problem with send UDP package on TizenRT #87

Open
umaciek opened this issue Aug 28, 2017 · 5 comments
Open

Problem with send UDP package on TizenRT #87

umaciek opened this issue Aug 28, 2017 · 5 comments

Comments

@umaciek
Copy link

umaciek commented Aug 28, 2017

I try to use function uv_udp_send from UDP support but I have a problem and always receive -1.

size = sendto(handle->io_watcher.fd, req->bufs->base,

The same function on Raspberry Pi work correct but on TizenRT UDP package isn't sending.

Are you sure that UDP work correct? I don't see any test for UDP in project. Could you add tests or simple example to confirm that UDP works correct?

@glistening
Copy link

@umaciek Could you check again after #88 is landed?

@umaciek
Copy link
Author

umaciek commented Aug 29, 2017

@glistening I tested with your patch and now function always return 0 and UDP package isn't send

@zherczeg
Copy link

Do you use this function directly?

The following small test works on RPi2 and NuttX:

var dgram = require('dgram');

var port = 12345;

var server = dgram.createSocket('udp4');

server.on('message', function(data, rinfo) {
  console.log('server got data : ' + data);
});

server.bind(port);

var client = dgram.createSocket('udp4');
client.send("hello", port, 'localhost');

NuttX shell output:

nsh> iotjs /test/run_pass/udp.js
server got data : hello

@pmarcinkiew
Copy link
Contributor

See: jerryscript-project/iotjs#1171 These UDP errors can be caused by invalid address string conversions similar to recorded in my debugging session.

@glistening
Copy link

@umaciek Does @zherczeg and @pmarcinkiew 's comment help you? I can send udp packet using IoT.js on TizenRT. If you still have problem, please give us the full test source.

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

No branches or pull requests

4 participants