![]() |
Forum Index : Microcontroller and PC projects : PicoMiteWEB alphas a19+: now with added jokes (i.e. HTTPS)
![]() ![]() |
|||||
Author | Message | ||||
Pluto Guru ![]() Joined: 09/06/2017 Location: FinlandPosts: 375 |
I have sucessfully tested Matherp's Remote Thermostat Control System V1.0. Tested first without DS18B20 connected and all seemed ok (except the missing temperatures). Connected then a DS18B20...no reasonable temperature...connected an other DS18B20 with the same result. Tested probably 10pcs from different batches. option list PicoMite MMBasic Version 5.07.07a20 OPTION WIFI HuaHuaNisse, *********** OPTION TCP SERVER PORT 80 > WEB NTP 2 ntp address 162.159.200.123 got ntp response: 03/03/2023 20:33:18 > PRINT "Temperature: " TEMPR(4) Temperature: -1800.0625 > PRINT "Temperature: " TEMPR(4) Temperature: -1673.0625 > PRINT "Temperature: " TEMPR(4) Temperature: -1536.0625 > PRINT "Temperature: " TEMPR(4) Temperature: 1853.8125 > Switched over to a PicoMiteVGA module and all sensors gave correct readings. (Same sensors and 4.7k pull-up to 3.3V). Anybody else having problems with Pico W 5.07.07a20?? /Pluto |
||||
Hans![]() Senior Member ![]() Joined: 18/10/2022 Location: CanadaPosts: 116 |
Hi all; Yes I am, and I am sorry for the lack of evidence presented here but I am currently on the road. My problem is some difference from a18 to a20 that causes the TEXT 0,0,"Some Text",L,1 to no longer display on my ssd1306I2C. The module is detected with "I2C Detect.bas", gives no errors when "option lcdpanel, ssd1306i2c,L" is declared and no error for the afore mentioned TEXT command just nothing happens. Same program, same option configuration as a18. If needed I will provide more details, just ask what you need to see Peter and I will supply it. Thanks, Hans ... ![]() |
||||
Pluto Guru ![]() Joined: 09/06/2017 Location: FinlandPosts: 375 |
DS18B20: Changed CPU SPEED to 252000 kHz...and the temperature readings are OK ![]() Shouldn't it also be OK at the default CPU SPEED??? /Pluto |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3348 |
"USB device malfunctioned" A week or so ago my PicoMiteWeb Pico started giving this message. No COM port is provided. When I plug in the USB connector to the PC with the button pressed to try to reflash, I get the same message. If I plug and wait 15 seconds or so (longer than usual, I think), the heartbeat LED flashes as normal, but with no COM port I can't connect. If I ping what appears to be the IP number, 192.168.1.225, I get replies. If I unplug, no replies; plug back in, replies. When I plug it in, in Device Manager, I get "Unknown USB Device (Device descriptor Request Failed). I tried plugging it into another laptop, and it worked once, but after power cycling I get the same error repeatedly. I had several other Pico_Ws, so started work on them, but I'm back now looking at this one. Any ideas about how I might try to recover? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2579 |
This is a long shot, but worth a try (untested). If the issue is the CPU speed set higher than that particular chip likes try putting it in the freezer for a while. Then quickly hook it up and if it runs set the CPU speed to 126MHz. Speed will be important! Option "B" cover it in thin plastic and press an ice cube on the chip. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
The pico USB seems to be fussy about any activity on the USB hub when it is trying to enunciate. I occasionally have to plug a fussy module into a hub that doesn't have any other device plugged into. My UPS and a device that runs a FTDI USB-TTL are the biggest culprits here. Jim VK7JH MMedit |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3348 |
I have done this with nothing else plugged in to my laptop's USB ports (and also with other picomites successfully plugged in). I just tried it plugging in to a powered USB hub, and it worked--I have access to the ">" prompt. Thanks very much for the suggestion. EDIT: it did work that time, but on power-cycling it again fails. ~ Edited 2023-03-07 03:50 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
I was caught yesterday. Plugged a pico into the same hub as an in-use pico. The new pico failed. Dropped the connection to the first pico (but still plugged in and running) and this time the second pico was recognised. Jim VK7JH MMedit |
||||
damos Regular Member ![]() Joined: 15/04/2016 Location: AustraliaPosts: 74 |
Peter made a reference to TLS support. Has anyone managed to get a HTTPS connection to a WebMite? I can't do a JS fetch on a page that is hosted on HTTPS as it is blocked. I am building an application that talks to a back office that must be HTTPS but I would like to communicate with local devices from that page. |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2579 |
If memory serves** Peter said HTTPS needs more resources than a WebMite can spare. ** getting less accurate. Edited 2025-05-12 13:04 by phil99 |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
TLS support was dropped in V5.7.8 due to ongoing stability issues. VK7JH MMedit |
||||
damos Regular Member ![]() Joined: 15/04/2016 Location: AustraliaPosts: 74 |
Thanks for the feedback. I decided to not worry about the HTTPS. The application will be React Native for Android but should work in iOS or other platforms so technically it does not need to use HTTPs on the main application. Not having to use native Java/Kotlin/Swift code makes the system so much easier as it can be debugged on any environment using just a browser. There is a secondary issue of CORS for anyone wishing to do this. The browser will block fetch calls to any IP address that is not the server hosting the current page. For those who haven't encountered CORS before it is designed to stop hackers but makes our lives a little more complex. If you are accessing an endpoint at the same address as the web page, it all works, but if it is different, the browser just blocks it unless CORS is used. The browser is asking the server if it is ok to call Javascript code with the response. If the server does not respond with permission the response is blocked even if the data is send by the server. To get it working: In Javascript: var url = [your device url]; var init = { mode: "cors" } fetch(url, init).then(response => [your code]) On the WebMite you need to add the header "Access-Control-Allow-Origin: *". I constructed my own headers and then used WCP TCP SEND to send the data. LongString clear data%() LongString append data%(),"HTTP/1.1 200 OK"+Chr$(13)+Chr$(10) LongString append data%(),"Access-Control-Allow-Origin: *"+Chr$(13)+Chr$(10) LongString append data%(),Chr$(13)+Chr$(10) LongString append data%(), [Your data] for a%=1 to MM.Info(MAX CONNECTIONS) WEB TCP read a$,buff%() p%=LInStr(buff%(),"GET") t%=LInStr(buff%(),"HTTP") If (p%<>0) And (t%>p%) Then WEB TCP send a%,data%() WEB TCP close a% Endif NEXT a% |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |