4622 Commits

Author SHA1 Message Date
wilberforce
fd590f08ba update ESP32 Branch to UDP, copy UDP code from linux 2017-08-31 10:49:10 +12:00
Gordon Williams
9635ae2475 Merge pull request #1235 from opichals/server-addmembership
Introduced sockerserver:serverAddMembership
2017-08-30 08:19:07 +01:00
Gordon Williams
cbefe32f98 Merge pull request #1234 from opichals/date-timezone-fixups
Date timezone handling fixes.
2017-08-30 08:17:25 +01:00
Standa Opichal
07c75edeb3 Introduced socketserver:serverAddMembership
This avoids the HTTP_NAME_OPTIONS_VAR server property leaking the
socketserver.c local abstraction.
2017-08-29 22:26:16 +02:00
Standa Opichal
925f7bb6d4 Date timezone handling fixes.
No tz-containing date strings are considered of local timezone.
No time-containing date strings are considered GMT.
2017-08-29 21:54:57 +02:00
Gordon Williams
52a1309f80 Merge pull request #1198 from opichals/espruino-udp
UDP support
2017-08-29 15:48:48 +01:00
Gordon Williams
89074ff534 release 1v94 RELEASE_1V94 2017-08-29 14:08:50 +01:00
Gordon Williams
8a230ad5bb Disable Graphics.createCallback on devices with small amounts of flash memory - rarely used on those devices and fixes HYSTM32_28 build 2017-08-29 12:55:23 +01:00
Gordon Williams
d644eab626 STM32: Remove the 'utility timer' from the list of available PWM pins, fixing A0/1/2 PWM on F4 (fix #1229) 2017-08-29 12:18:46 +01:00
Standa Opichal
aa75f14ebb Disable startMDNS() in favor of mDNS.js
Without this the esp8266 uses the mdns port 5353 and silently ignores
any message to be received mDNS.js.
2017-08-25 23:49:43 +02:00
Standa Opichal
f3378c4a8d Added size to UDP buf header.
This is in order to be able to call several socket.send() calls
to different targets synchronously.

The format changed to host/32:port/16:size/16:[data/??].
2017-08-25 23:49:03 +02:00
Standa Opichal
2ae6041697 DBG instead of jsWarn where appropriate 2017-08-25 23:48:18 +02:00
Standa Opichal
54412b268a SocketType parameters in net->send/recv/createsocket
And also in their callers (netSend/Recv/CreateSocket).
2017-08-25 23:48:18 +02:00
Standa Opichal
1b139eb547 UDP host:port embedded in send/recv buf 2017-08-25 23:48:18 +02:00
Standa Opichal
e4bcd3f2db Separated UDP/TCP socketserver handling
Not using stream for UDP receiveData, calling dgram_messageCallback()
instead.
2017-08-25 23:48:18 +02:00
Standa Opichal
7497a604e4 Added dgram_socket test
socketIdle() from in dgram_bind (after previous dgram_close)
2017-08-25 23:48:18 +02:00
Standa Opichal
ae79c96cd3 Drop big UDP packets for esp8266
This proved to be the cure for stalling the 8266 and allowed
the chip to successfully answer .local queries for more than
a day on a local network where some of the mDNS packets are
more than 1kB long.
2017-08-25 23:48:18 +02:00
Standa Opichal
68e8297bb2 Async socket.bind() support
socket.bind(port, boundSocket => { ... });
2017-08-25 23:48:18 +02:00
Standa Opichal
bc3d4cbb46 Passing addMembership() args to net.createsocket
Limited to a single membership, handled in target specific createsocket
which is provided with the 'options' object to get multicastGroup and
multicastIp from. Also due to the way the arguments are passed to the
net.createsocket the socket.addMembership() needs to be called before
socket.bind().

Added SO_REUSEPORT so that binding e.g. to mDNS port 5353 is possible
on an osx machine.
2017-08-25 23:48:18 +02:00
Standa Opichal
5ae2923909 Working UDP on esp8266 target 2017-08-25 23:48:18 +02:00
Standa Opichal
08256ec65c Dual socket.on('data'/'message') possible. 2017-08-25 23:48:18 +02:00
Standa Opichal
f3a2e566ad netRecv to use recvfrom to get replyTo address
Provided the second 'data' event `info` argument to be able to reply
(message origin host/port combination).
Added dgram_send `options` and other jsvUnlock() calls to avoid memleaks
2017-08-25 23:48:18 +02:00
Standa Opichal
f0b9396997 New dgramSocket.send(msg, ...), .bind(port)
The send() method contains the destination host/port which is
put into the connection.opt (options) structure and later used
for the sendto() within net->send() call (network_linux).
2017-08-25 23:48:18 +02:00
Standa Opichal
df54f21935 Introduced SocketType ST_UDP
Initial attempt only, able to send UDP data using socket.write().
2017-08-25 23:48:18 +02:00
Gordon Williams
602a7999fe fix build regression 2017-08-24 12:50:56 +01:00
Gordon Williams
b0f1873fff Add an argument to reset. reset(true) will now cause all Flash memory to be cleared as well.
Puck.js: Holding down the button while booting (past the the 5 LED flashes) will now cause data saved in Flash to be cleared
2017-08-24 12:48:26 +01:00
Gordon Williams
db8e2e4544 tweak docs 2017-08-24 12:18:38 +01:00
Gordon Williams
9af09408fe Merge pull request #1225 from lanselambor/master
Merge pull request #1 from espruino/master
2017-08-24 12:16:27 +01:00
lanselambor
9cd6c92d0f added function setLEDPower to jswrap_wio_lte.c/h 2017-08-24 19:14:32 +08:00
Gordon Williams
b49b6a3642 add badge to travis builds 2017-08-23 17:38:35 +01:00
Gordon Williams
8fc672bc33 If >1 button, set pin state correctly at boot/reset 2017-08-23 14:56:25 +01:00
Gordon Williams
7b70d0ee96 Fix issue drawing on right-hand side of rotated graphics where H>W (regression in 1v93) 2017-08-22 12:07:23 +01:00
Gordon Williams
8040d15d68 allow 'edit' to search harder for functions to edit 2017-08-21 17:31:24 +01:00
Gordon Williams
7237347960 Fix recent memory leak regression during module loading 2017-08-21 16:23:49 +01:00
Gordon Williams
74a6ffaaa0 Slightly more aggressive idle GC on most platforms (at 5% free)
Don't warn the user when we had to run a GC pass during execution
2017-08-21 16:20:09 +01:00
Gordon Williams
793365db4c process.memory() now reports time taken for GC and vars GC'd 2017-08-21 15:48:27 +01:00
Gordon Williams
cfa8c64638 nRF5x: Fix typo so we wake every 4 min for RTC, not 0.25 sec! 2017-08-21 15:47:09 +01:00
Gordon Williams
74e7c360a1 add ability to set badge contrast 2017-08-21 15:02:06 +01:00
Gordon Williams
d12f41814b slight build tweaks 2017-08-21 10:35:55 +01:00
Gordon Williams
ffd96ae3ed Merge pull request #1223 from espruino/ESP32
Fix ESP32 travis build
2017-08-21 10:31:31 +01:00
wilberforce
7d1bfb6d85 increase ADC to 2 2017-08-20 14:06:50 +12:00
wilberforce
f50868c126 Add pyserial import for python - required for esptool for ESP32 build 2017-08-20 11:10:48 +12:00
wilberforce
b442b79b2a Merge remote-tracking branch 'origin/master' into ESP32 2017-08-20 11:09:05 +12:00
wilberforce
5a4fa5a035 add pyserial import 2017-08-20 11:05:04 +12:00
wilberforce
1547b9591f set adc to 2 so board generate works 2017-08-20 11:01:56 +12:00
wilberforce
9e114c54af travis testing 2017-08-20 10:38:18 +12:00
Gordon Williams
ca383cf3a0 Merge pull request #1222 from espruino/ESP32
Add package python-serial
2017-08-19 09:43:05 +01:00
wilberforce
ba4c089165 Add package python-serial 2017-08-19 10:14:09 +12:00
Gordon Williams
b0a282dbb4 save a few bytes of flash on chips with <=1 ADC 2017-08-18 11:54:42 +01:00
Gordon Williams
676779c1f8 Ensure that we don't try and handle any other timeout event if we were bonding 2017-08-18 08:44:49 +01:00