Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Webmite V5.07.08 betas : UDP and other stuff
Page 2 of 5 | |||||
Author | Message | ||||
andreas Senior Member Joined: 07/12/2020 Location: GermanyPosts: 207 |
hi Volhout, this option was not created by will but seems to occur as soon as you start using the library after a "library save" -andreas |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 145 |
What am I doing wrong? I'm trying to load a .html file with WebMite Version 5.07.08b1 and get a Error : Not enough memory. This works with .bas, .ico, .jpg files with load and save. Jan |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 145 |
> files A:/ <DIR> . <DIR> .. 20:39 30-05-2023 4 bootcount 20:32 30-05-2023 267 favicon.ico 20:29 30-05-2023 1353 simpleweb.bas 20:31 30-05-2023 2833 small.jpg 23:35 22-03-2023 896 test4.html 20:22 30-05-2023 528 web_ntp_zomer_winter.bas 20:26 30-05-2023 1010 web_tcp.bas 20:27 30-05-2023 221 web_udp.bas 2 directories, 8 files, 585728 bytes free > option list WebMite MMBasic Version 5.07.08b1 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP4,GP5 OPTION COLOURCODE ON OPTION DISPLAY 40, 90 OPTION SDCARD GP15 OPTION RTC AUTO ENABLE > new > load "test4.html" Error : Not enough memory > Jan |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
Hi Jan, Works for me. Did you edit this file before ? Is this a file that you copied onto the a:/ drive from another system ? I can only think the file is corrupt in some way. Try if you can transfer it to a PC (MMCC file transfer) and check file size. You can also try CPU RESTART and try again with the build in editor. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4247 |
This is a working version for Europe. Yes, using the weather app is easier. But I wanted to try myself. Finally see use of the EPOCH() function in MMBasic. Never to old to learn.... ' IsDst() uses global date$ and time$ to determine if today is daylight savings. ' The algorithm uses the european transition at last sunday in March and October at 02:00 am ' Volhout Print IsDst() End Function IsDst() 'uses time$ and date$ Local m,o,md,od,d,y,dd$ 'this is today, this hour d=Epoch(Date$+" "+Time$) y=Val(Right$(Date$,4)) 'start of dst on last sunday in March in current year at 02:00 md=31-dow%(y,3,31) 'March has 31 days dd$=Str$(md,2,0)+"-03-"+Str$(y) m=Epoch(dd$+" 02:00:00") 'end of dst on last sunday in October in current year at 02:00 od=31-dow%(y,10,31) 'October has 31 days dd$=Str$(od,2,0)+"-10-"+Str$(y) o=Epoch(dd$+" 02:00:00") IsDst = (m<d) And (o>d) End Function Function dow%(y,m,d) 'day of week 'returns day of the week (0 sunday .. 6 saturday) Local t%(11)=(0,3,2,5,0,3,5,1,4,6,2,4) If m<3 Then y=y-1 dow%=(y+y\4-y\100+y\400+t%(m-1)+d) Mod 7 End Function Edited 2023-05-31 05:22 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
andreas Senior Member Joined: 07/12/2020 Location: GermanyPosts: 207 |
LIBRARY_FLASH_SIZE 14000 findings > library delete > option list WebMite MMBasic Version 5.07.07 OPTION AUTORUN 3 OPTION COLOURCODE ON OPTION DISPLAY 50, 100 OPTION WIFI FritzBox, ********************* OPTION TELNET CONSOLE ON > library save Library Saved 184 bytes > option list WebMite MMBasic Version 5.07.07 OPTION AUTORUN 3 OPTION LIBRARY_FLASH_SIZE 14000 OPTION COLOURCODE ON OPTION DISPLAY 50, 100 OPTION WIFI FritzBox, ********************* OPTION TELNET CONSOLE ON -andreas |
||||
aFox Regular Member Joined: 28/02/2023 Location: GermanyPosts: 76 |
Hi Peter Why do you shrink the payload from official (RFC 768) around 65,000 bytes to 255 characters? Could you increase the limit to 512 bytes by LONGSTRING because the already implemented TFTP uses also a fixed data length of 512 bytes up to the penultimate packet? Bests Gregor |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
I have used UDP a fair amount to send data from sensors to an accumulator. The messages are quite short--usually less than 30 characters including a 12-character date/time stamp. What is your use-case for more than 255 characters? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9127 |
The only sensible way to do interrupt driven receive is to use a string variable, hence 255 chars. This isn't going to change. |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 897 |
The library is fixed size of 1 flash slot which can vary between the various Picos (Picomite,PicomiteVGA,Webmite). OPTION LIBRARY_FLASH_SIZE in the printout is actually showing the library start address.It should just be used as an indication that you are using the library. Latest F4 Latest H7 |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
This version does not seem to work with Telnet. I get "Connection refused". Going back to 5.07.07 - everything is fine. Geoff Geoff Graham - http://geoffg.net |
||||
aFox Regular Member Joined: 28/02/2023 Location: GermanyPosts: 76 |
The next documentation should refer to this circumstance. Gregor |
||||
ville56 Regular Member Joined: 08/06/2022 Location: AustriaPosts: 95 |
Geoff, are you sure you have OPTION TELNET CONSOLE ON as 5.07.08b1 works with telnet for me without any issue. Had all kind of network issues with 5.07.08b0. Maybe clear_flash is worth a try. I also think that 08b1 needs more attepts to connect to my Fritzbox as the final 07 version. Have no idea what the reason could be, as the log in the router is not very informative, but it may be in conjunction with my repeater mesh. Reagrds, Gerald 73 de OE1HGA, Gerald |
||||
JanVolk Senior Member Joined: 28/01/2023 Location: NetherlandsPosts: 145 |
Volhout, It is true that there was an error in my html file and I have corrected it. Now works fine with html and Notepad++. Also updated the Custom syntax highlighting for PicoMite and MMB4W which works very fast and nice. Especially the search and replace function in Notepad++ is useful. Jan |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
My mistake, I had an issue with the WebMite's startup. V5.07.08b1 now works fine. Geoff Geoff Graham - http://geoffg.net |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9127 |
V5.07.08b2 WebMiteV5.07.08b2.zip Fixes memory leak in WEB MQTT connect |
||||
andreas Senior Member Joined: 07/12/2020 Location: GermanyPosts: 207 |
confirmed! "General RAM" is not increasing! Thank you Peter! -andreas |
||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 351 |
Hello Peter, I don't check the forum for a few days and then you come along with the fulfilment of my wishes. And you didn't want to work on a new version right away ;-) Version WebMiteV5.07.08b2 is great! UDP works without problems. With TCP I still have a (comprehension) problem. How can I determine whether a TCP connection has been established to the WebMite without having to receive anything (i.e. without the client sending anything)? Because without an existing connection, the WebMite cannot send without crashing. The crash happens even if I send and the connection is terminated from the client side :-( Hence my question about the possibility to check this "connection status" or to react to it. Matthias |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3802 |
If you could check, it would still be a "race" condition, wouldn't it? (Where the connection could be terminated between the check and whatever the program did based on the check saying it's connected.) John Edited 2023-06-04 23:23 by JohnS |
||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 351 |
Hi John, you are right, but not yet. I would like to get information about the status that a TCP connection exists and I am allowed to send, see also here: https://en.wikipedia.org/wiki/Transmission_Control_Protocol#Connection_establishment Of course the sending can fail because the connection is broken, but it should not crash the WebMite, maybe a timeout occurs and the status changes to "no connection", then I can stop sending. I'm not thinking of using it as a web server/website, but for other services. Like I said, UDP works great! With TCP it still hangs a bit... At the moment I am responding to a WEB interrupt and just remembering that I can send now. This works so far for testing. I can send for minutes, but it needs a character from the client to start - to trigger the interrupt. As I said, closing the connection from the client side causes a crash, because i am still sending. So I hope for the help of @Peter Matthias Adding: this shows it even better... https://upload.wikimedia.org/wikipedia/commons/f/f6/Tcp_state_diagram_fixed_new.svg Edited 2023-06-05 01:35 by homa |
||||
Page 2 of 5 |
Print this page |