Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

MESSAGE ACKNOWLEDGED -- The Pershing II missiles have been launched.


computers / comp.sys.raspberry-pi / Anyone familiar with PICO Pi SDK and networking?

SubjectAuthor
* Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
+* Re: Anyone familiar with PICO Pi SDK and networking?Theo
|`- Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
`* Re: Anyone familiar with PICO Pi SDK and networking?David Taylor
 `* Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
  +* Re: Anyone familiar with PICO Pi SDK and networking?David Taylor
  |+- Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
  |`* Re: Anyone familiar with PICO Pi SDK and networking?Pancho
  | `- Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
  `* Re: Anyone familiar with PICO Pi SDK and networking?Theo
   +* Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
   |`* Re: Anyone familiar with PICO Pi SDK and networking?David Taylor
   | `* Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
   |  +- Re: Anyone familiar with PICO Pi SDK and networking?Pancho
   |  +- Re: Anyone familiar with PICO Pi SDK and networking?Lew Pitcher
   |  `* Re: Anyone familiar with PICO Pi SDK and networking?David Taylor
   |   `* Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher
   |    `- Re: Anyone familiar with PICO Pi SDK and networking?David Taylor
   `* Re: Anyone familiar with PICO Pi SDK and networking?scott
    `- Re: Anyone familiar with PICO Pi SDK and networking?The Natural Philosopher

1
Anyone familiar with PICO Pi SDK and networking?

<ucl72j$2b5m3$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7081&group=comp.sys.raspberry-pi#7081

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Anyone familiar with PICO Pi SDK and networking?
Date: Tue, 29 Aug 2023 17:40:51 +0100
Organization: A little, after lunch
Lines: 104
Message-ID: <ucl72j$2b5m3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 29 Aug 2023 16:40:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fbc35335f25c5baa1c849c054c5b5bdc";
logging-data="2463427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RWfc741aOUx4odoIqkvFkvKxgD7Xtzag="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:kpyzfwD/YexluPxi/zSSa7dXdbM=
Content-Language: en-GB
 by: The Natural Philosop - Tue, 29 Aug 2023 16:40 UTC

I decided to have a PICO day today. Well that's 8 hours of my life I
wont get back struggling with the appalling lack of documentation for
the PICO W and its toolkit, and for a piece of software that Poettering
would be proud of in terms of its utterly unnecessary complexity, bugs
and lack of documentation.

I refer to *cmake*.

I have got the SDK as far as I can tell up and running with LWIP and the
various CY_43_ARCH libraries are concerned, and can compile and install
code that runs and access GPIO pins and so on, and prints cheerful
messages to teh console, but s far as networking is concerned the moment
I try and connect to wifi, I get compile errors deep in the stack.

everything works until I add the last line..

#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
#include "hardware/adc.h"
#include "lwip/tcp.h"
#include "lwip/netif.h"
#include "lwip/pbuf.h"
....

int ret;
stdio_init_all();
if (cyw43_arch_init_with_country(CYW43_COUNTRY_UK))
{
printf("Wi-Fi init failed");
return -1;
}
cyw43_arch_enable_sta_mode();
// doesn't compile
ret = cyw43_arch_wifi_connect_timeout_ms(ssid, password,
CYW43_AUTH_WPA2_AES_PSK, 10000);
=======================================
When the make process barfs with :
/opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c: In function
'cyw43_cb_tcpip_init':
/opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:209:5: warning: implicit
declaration of function 'netif_set_hostname'; did you mean
'netif_set_down'? [-Wimplicit-function-declaration]
209 | netif_set_hostname(n, CYW43_HOST_NAME);
| ^~~~~~~~~~~~~~~~~~
| netif_set_down
/opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c: In function
'cyw43_cb_tcpip_deinit':
/opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:32: error:
'netif_list' undeclared (first use in this function); did you mean
'netif_find'?
252 | for (struct netif *netif = netif_list; netif != NULL; netif
= netif->next) {
| ^~~~~~~~~~
| netif_find
/opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:32: note: each
undeclared identifier is reported only once for each function it appears in
/opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:72: error: 'struct
netif' has no member named 'next'
252 | for (struct netif *netif = netif_list; netif != NULL; netif
= netif->next)

Blah blah blah.

Clearly its not finding a header file,(netif.h) but it's there and on
the path.

Currently the magic spells in the CMakefiles.txt are
=================================

cmake_minimum_required(VERSION 3.13)

include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)

project(thermometer C CXX ASM)

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(PICO_BOARD pico_w)

pico_sdk_init()

add_executable(${PROJECT_NAME} main.c)

pico_add_extra_outputs(${PROJECT_NAME})

target_link_libraries(${PROJECT_NAME} pico_stdlib hardware_adc pico_lwip
pico_cyw43_arch_lwip_poll )

pico_enable_stdio_usb(${PROJECT_NAME} 1)
pico_enable_stdio_uart(${PROJECT_NAME} 0)

Anyone have any clue how to fix this?
Answers of the category 'why not use python?' will be treated with the
contempt they deserve.

--
"Anyone who believes that the laws of physics are mere social
conventions is invited to try transgressing those conventions from the
windows of my apartment. (I live on the twenty-first floor.) "

Alan Sokal

Re: Anyone familiar with PICO Pi SDK and networking?

<Otj*I54oz@news.chiark.greenend.org.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7082&group=comp.sys.raspberry-pi#7082

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsfeed.xs3.de!callisto.xs3.de!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: 29 Aug 2023 19:31:36 +0100 (BST)
Organization: University of Cambridge, England
Message-ID: <Otj*I54oz@news.chiark.greenend.org.uk>
References: <ucl72j$2b5m3$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="9651"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Tue, 29 Aug 2023 18:31 UTC

The Natural Philosopher <tnp@invalid.invalid> wrote:
> When the make process barfs with :
> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c: In function
> 'cyw43_cb_tcpip_init':
> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:209:5: warning: implicit
> declaration of function 'netif_set_hostname'; did you mean
> 'netif_set_down'? [-Wimplicit-function-declaration]
> 209 | netif_set_hostname(n, CYW43_HOST_NAME);
> | ^~~~~~~~~~~~~~~~~~
> | netif_set_down
> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c: In function
> 'cyw43_cb_tcpip_deinit':
> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:32: error:
> 'netif_list' undeclared (first use in this function); did you mean
> 'netif_find'?
> 252 | for (struct netif *netif = netif_list; netif != NULL; netif
> = netif->next) {
> | ^~~~~~~~~~
> | netif_find
> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:32: note: each
> undeclared identifier is reported only once for each function it appears in
> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:72: error: 'struct
> netif' has no member named 'next'
> 252 | for (struct netif *netif = netif_list; netif != NULL; netif
> = netif->next)
>
>
> Blah blah blah.
>
> Clearly its not finding a header file,(netif.h) but it's there and on
> the path.

It's failing building the Pico library (specifically LWIP), not your code.
So the #include in your code doesn't make any difference.

https://forums.raspberrypi.com/viewtopic.php?p=2017292#p2017292
suggests that a later version of the library fixes it.

Not sure where you got the library from, but if you downloaded a packaged
version maybe try the most recent git sources?

I haven't used the Pico, but as a general rule I like to use Platformio as a
tool to abstract away all the weird device-specific toolchain stuff. They
have lots of fancy GUI tools, but PlatformIO Core is a simple(r) command
line build environment. Although it does use Python (as the build system,
not for the code).

Theo

Re: Anyone familiar with PICO Pi SDK and networking?

<ucll01$2d7va$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7083&group=comp.sys.raspberry-pi#7083

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Tue, 29 Aug 2023 21:38:24 +0100
Organization: A little, after lunch
Lines: 74
Message-ID: <ucll01$2d7va$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me>
<Otj*I54oz@news.chiark.greenend.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 29 Aug 2023 20:38:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fbc35335f25c5baa1c849c054c5b5bdc";
logging-data="2531306"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19AdV1XjxK8jMy80ZApepT4p/hI/I4Fpvo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:6DHsNl7DG/7T11B4IqgZ5LlgOKk=
In-Reply-To: <Otj*I54oz@news.chiark.greenend.org.uk>
Content-Language: en-GB
 by: The Natural Philosop - Tue, 29 Aug 2023 20:38 UTC

On 29/08/2023 19:31, Theo wrote:
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> When the make process barfs with :
>> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c: In function
>> 'cyw43_cb_tcpip_init':
>> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:209:5: warning: implicit
>> declaration of function 'netif_set_hostname'; did you mean
>> 'netif_set_down'? [-Wimplicit-function-declaration]
>> 209 | netif_set_hostname(n, CYW43_HOST_NAME);
>> | ^~~~~~~~~~~~~~~~~~
>> | netif_set_down
>> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c: In function
>> 'cyw43_cb_tcpip_deinit':
>> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:32: error:
>> 'netif_list' undeclared (first use in this function); did you mean
>> 'netif_find'?
>> 252 | for (struct netif *netif = netif_list; netif != NULL; netif
>> = netif->next) {
>> | ^~~~~~~~~~
>> | netif_find
>> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:32: note: each
>> undeclared identifier is reported only once for each function it appears in
>> /opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:252:72: error: 'struct
>> netif' has no member named 'next'
>> 252 | for (struct netif *netif = netif_list; netif != NULL; netif
>> = netif->next)
>>
>>
>> Blah blah blah.
>>
>> Clearly its not finding a header file,(netif.h) but it's there and on
>> the path.
>
> It's failing building the Pico library (specifically LWIP), not your code.
> So the #include in your code doesn't make any difference.
>
It's very weird, because Ive got a bit further, but the toolkit is still
saying it cant find netif_set_hostname

/opt/pico-sdk/lib/cyw43-driver/src/cyw43_lwip.c:209:5: warning:
implicit declaration of function 'netif_set_hostname'

BUT that is a macro that is defined in a file its definitely including
cos I hacked that source file

#define CYW43_LWIP 1
#include "cyw43.h"

and in cyw43.h

we see...

#if CYW43_LWIP
#include "lwip/netif.h"
#include "lwip/dhcp.h"
#endif

and that macro is defined in lwip/netif.h

...er. ah. ok
I hacked through it. lwipopts.h needs
#define LWIP_NETIF_HOSTNAME 1

before netif.h will set that macro.

and then all seems to work. Well it compiles anyway.

What a shoddy load of crud.

--
The New Left are the people they warned you about.

Re: Anyone familiar with PICO Pi SDK and networking?

<ucmcn9$2jpbn$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7088&group=comp.sys.raspberry-pi#7088

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 04:23:21 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <ucmcn9$2jpbn$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 30 Aug 2023 03:23:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="571c186532b1b206756d2cbc41702943";
logging-data="2745719"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/s+XrsNqq5AS8afHtO9f5zHPBaty0DbiY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:Yj1fVHY9NAgGHjaJUGvkBTEMhYo=
Content-Language: en-GB
In-Reply-To: <ucl72j$2b5m3$1@dont-email.me>
 by: David Taylor - Wed, 30 Aug 2023 03:23 UTC

On 29/08/2023 17:40, The Natural Philosopher wrote:
> I decided to have a PICO day today. Well that's 8 hours of my life I
> wont get back struggling with the appalling lack of documentation for
> the PICO W and its toolkit, and for a piece of software that Poettering
> would be proud of in terms of its utterly unnecessary complexity, bugs
> and lack of documentation.

You might like to try MicroPython instead.
--
Cheers,
David
Web: https://www.satsignal.eu

Re: Anyone familiar with PICO Pi SDK and networking?

<ucmpda$2l7ku$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7089&group=comp.sys.raspberry-pi#7089

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 07:59:53 +0100
Organization: A little, after lunch
Lines: 68
Message-ID: <ucmpda$2l7ku$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 06:59:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="225265a57941d491218170067512a24b";
logging-data="2793118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iBnFFFTKQx3pxAVFXG1HN5Wq4cS55bc0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:aofPZiMXu652jrXQJ5d7n6LJZv8=
In-Reply-To: <ucmcn9$2jpbn$1@dont-email.me>
Content-Language: en-GB
 by: The Natural Philosop - Wed, 30 Aug 2023 06:59 UTC

On 30/08/2023 04:23, David Taylor wrote:
> On 29/08/2023 17:40, The Natural Philosopher wrote:
>> I decided to have a PICO day today. Well that's 8 hours of my life I
>> wont get back struggling with the appalling lack of documentation for
>> the PICO W and its toolkit, and for a piece of software that Poettering
>> would be proud of in terms of its utterly unnecessary complexity, bugs
>> and lack of documentation.
>
> You might like to try MicroPython instead.

I don't think you read my original post.

"Anyone who suggests Python will be treated with the contempt that they
deserve." :-)

The problem with Python is that by and large it has bugs that no one can
fix.

At least now if I have stumbled my way through the LWIP and Cmake
morass, I probably have a chance to write code very fast.

It's the old old story, Online are a hundred articles citing the same
examples, and a programmers mumblings that contain the truth that is
however unfortunately only comprehensible to other people 100% familiar
with the code. There is *nothing in between*. Just the odd hint here and
there that you have to piece together to reveals the truth.

The key elements to be understood is that Cmake builds a makefile and a
compile environment, from CMakefiles.txt and it's buggy. Rule #1 is
whenever you invoke it, destroy everything it has built first
(essentially the entire contents of the 'build' directory) because you
cannot guarantee it wont preserve something you don't want.

The second key piece if information that is not highlighted anywhere, is
that when using LWIP library for network, there is a file called
lwipopts.h that you have to edit to select what elements you compile in
from the source, because the libraries exist as source only. And as I
discovered there are hidden dependencies that are not handled well. I am
not using hostnames, but somewhere in the code, these are required by
the library. You cannot actually compile the TCP without them. And you
might also have reasonably thought that if you wanted DHCP the stack
would *automatically* include UDP support.

Er, no.

In short TCP/IP on the Pico has been hacked from the LWIP sources
till it *mostly* works, on a fine day with a following wind, but it is
absolutely unstable, in the Linux sense. Python has presumably used it
as a networking layer and hidden the worst of its ugliness, but it is
still there.

Ah well. Twas ever thus. 99% of the time fighting poor documentation by
clever programmers who didn't get the bugs out because that was too *boring*

Anyone else yearn for the days of a five line C program, followed by CC
<source.c> and ./a.out?

Many thanks to the one person who at least understood the question, and
pointed me in a slightly more fruitful direction.

Next step is to see if it can establish a WiFi connection...

--
It’s easier to fool people than to convince them that they have been fooled.
Mark Twain

Re: Anyone familiar with PICO Pi SDK and networking?

<ucms11$2jpbo$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7091&group=comp.sys.raspberry-pi#7091

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 08:44:33 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <ucms11$2jpbo$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 07:44:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="571c186532b1b206756d2cbc41702943";
logging-data="2745720"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UzB7GqbkcsOd7FIYckSdzCg1yciv/9iY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:IeKy19KQO/xiZRHcuhCW222MWKc=
In-Reply-To: <ucmpda$2l7ku$1@dont-email.me>
Content-Language: en-GB
 by: David Taylor - Wed, 30 Aug 2023 07:44 UTC

On 30/08/2023 07:59, The Natural Philosopher wrote:
> I don't think you read my original post.
>
> "Anyone who suggests Python will be treated with the contempt that they
> deserve." 😄
>
> The problem with Python is that by and large it has bugs that no one can
> fix.

Ah, no, I missed that. Too near the end of the post?

Ys, there are bugs, but I treat the Pico as a relatively new device with new
software, and not as a device I would expect to run 24x7 without error. What I
have found is that the Pico is sometimes supplied pre-mounted on some other
board, further reducing the reach of the already small Wi-Fi antenna, and I
read that 2xAA batteries may not be enough to power the Wi-Fi hardware.

On the other hand, the RPi Zero (2) W is something which will run 24x7
reliably. Perhaps that might suit your project better?

BTW: even though I haven't used MicroPython before, I have found development
rapid and easy due to the large number of examples and the easy of using the
IDE - no need to make and upload uf2 files after every change.
--
Cheers,
David
Web: https://www.satsignal.eu

Re: Anyone familiar with PICO Pi SDK and networking?

<ucmtbr$2lnrc$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7092&group=comp.sys.raspberry-pi#7092

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 09:07:23 +0100
Organization: A little, after lunch
Lines: 43
Message-ID: <ucmtbr$2lnrc$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <ucms11$2jpbo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 08:07:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="225265a57941d491218170067512a24b";
logging-data="2809708"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18k0nqmQwLyoSlVtyUtoOSf9woBl3VEyC0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:ltc4O9+H9UKiKBYSmPpb7qH1xxE=
Content-Language: en-GB
In-Reply-To: <ucms11$2jpbo$1@dont-email.me>
 by: The Natural Philosop - Wed, 30 Aug 2023 08:07 UTC

On 30/08/2023 08:44, David Taylor wrote:
> On 30/08/2023 07:59, The Natural Philosopher wrote:
>> I don't think you read my  original post.
>>
>> "Anyone who suggests Python will be treated with the contempt that they
>> deserve." 😄
>>
>> The problem with Python is that by and large it has bugs that no one can
>> fix.
>
> Ah, no, I missed that.  Too near the end of the post?
>
> Ys, there are bugs, but I treat the Pico as a relatively new device with
> new software, and not as a device I would expect to run 24x7 without
> error.  What I have found is that the Pico is sometimes supplied
> pre-mounted on some other board, further reducing the reach of the
> already small Wi-Fi antenna, and I read that 2xAA batteries may not be
> enough to power the Wi-Fi hardware.
>
> On the other hand, the RPi Zero (2) W is something which will run 24x7
> reliably.  Perhaps that might suit your project better?
>
> BTW: even though I haven't used MicroPython before, I have found
> development rapid and easy due to the large number of examples and the
> easy of using the IDE - no need to make and upload uf2 files after every
> change.

Yes. There is that.

Note to self. Wifi SSIDs are case sensitive. Finally got a connection...

And glory be to God, there is something calling itself PicoW in the DHCP
table on the router.

I wonder how to set the hostname...

--
When plunder becomes a way of life for a group of men in a society, over
the course of time they create for themselves a legal system that
authorizes it and a moral code that glorifies it.

Frédéric Bastiat

Re: Anyone familiar with PICO Pi SDK and networking?

<ucmuft$2lp3p$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7093&group=comp.sys.raspberry-pi#7093

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Pancho.J...@proton.me (Pancho)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 09:26:37 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ucmuft$2lp3p$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <ucms11$2jpbo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 08:26:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2adba5c0590d2298c86fafdff3242ba9";
logging-data="2811001"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wkvJyhTcTH9ejLukc1G+9YtzE1JmLCLM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:z3yRNOx4oC8tR6+jeD/XYgvckhI=
In-Reply-To: <ucms11$2jpbo$1@dont-email.me>
Content-Language: en-GB
 by: Pancho - Wed, 30 Aug 2023 08:26 UTC

On 30/08/2023 08:44, David Taylor wrote:
> On 30/08/2023 07:59, The Natural Philosopher wrote:
>> I don't think you read my  original post.
>>
>> "Anyone who suggests Python will be treated with the contempt that they
>> deserve." 😄
>>
>> The problem with Python is that by and large it has bugs that no one can
>> fix.
>
> Ah, no, I missed that.  Too near the end of the post?
>

I missed it, too!

TNP, have you considered using Python?

Re: Anyone familiar with PICO Pi SDK and networking?

<ucmuqt$2lumd$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7094&group=comp.sys.raspberry-pi#7094

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 09:32:29 +0100
Organization: A little, after lunch
Lines: 33
Message-ID: <ucmuqt$2lumd$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <ucms11$2jpbo$1@dont-email.me>
<ucmuft$2lp3p$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 08:32:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="225265a57941d491218170067512a24b";
logging-data="2816717"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fLrFHbSbUZ7gkNiKPEG5lRQKszn6qdxI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:ZknXI+/jE+nB56IfpyghTEf6tKk=
In-Reply-To: <ucmuft$2lp3p$1@dont-email.me>
Content-Language: en-GB
 by: The Natural Philosop - Wed, 30 Aug 2023 08:32 UTC

On 30/08/2023 09:26, Pancho wrote:
> On 30/08/2023 08:44, David Taylor wrote:
>> On 30/08/2023 07:59, The Natural Philosopher wrote:
>>> I don't think you read my  original post.
>>>
>>> "Anyone who suggests Python will be treated with the contempt that they
>>> deserve." 😄
>>>
>>> The problem with Python is that by and large it has bugs that no one can
>>> fix.
>>
>> Ah, no, I missed that.  Too near the end of the post?
>>
>
> I missed it, too!
>
> TNP, have you considered using Python?
>
>
Dont push your luck Pancho!

I will say this. In python you cannot set the hostname. In C you can.
My DHCP table now says not PicoW, but 'Upstairs'.

Inch by bloody inch this cheap POS is starting to behave itself.

--
"In our post-modern world, climate science is not powerful because it is
true: it is true because it is powerful."

Lucas Bergkamp

Re: Anyone familiar with PICO Pi SDK and networking?

<Ptj*Xm8oz@news.chiark.greenend.org.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7096&group=comp.sys.raspberry-pi#7096

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.chmurka.net!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: 30 Aug 2023 10:32:53 +0100 (BST)
Organization: University of Cambridge, England
Message-ID: <Ptj*Xm8oz@news.chiark.greenend.org.uk>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me> <ucmpda$2l7ku$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="31152"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Wed, 30 Aug 2023 09:32 UTC

The Natural Philosopher <tnp@invalid.invalid> wrote:
> It's the old old story, Online are a hundred articles citing the same
> examples, and a programmers mumblings that contain the truth that is
> however unfortunately only comprehensible to other people 100% familiar
> with the code. There is *nothing in between*. Just the odd hint here and
> there that you have to piece together to reveals the truth.

For the record, this is a pretty standard 'embedded' development experience.
Every vendor has some degree of proprietary libraries and/or toolchain, and
each vendor has a relatively small community of users. Some of whom have a
hotline to the vendor's support staff which the rest of us don't.

So the platform is much less well tested than the standard Linux/glibc/gcc
flow. Troubles like this aren't unusual in this environment.

Arduino on Atmega is probably the most beaten path in the embedded space -
but less popular Arduino platforms suffer from similar creakiness.

Pico seems like it has devs who care about the user experience, rather than
the typical vendor throwing things over the wall. But no doubt it will take
time to mature (like first few years of the RPi 1), especially if you're
using a less popular language.

Theo

Re: Anyone familiar with PICO Pi SDK and networking?

<ucnngv$2pigp$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7097&group=comp.sys.raspberry-pi#7097

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 16:33:51 +0100
Organization: A little, after lunch
Lines: 52
Message-ID: <ucnngv$2pigp$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 30 Aug 2023 15:33:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="225265a57941d491218170067512a24b";
logging-data="2935321"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+msoF1b+cUtBEzmgZWVb+3M1FoC4W/FRA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:RfKh5K6QdVBFawJ/gXK2Corl6ZY=
In-Reply-To: <Ptj*Xm8oz@news.chiark.greenend.org.uk>
Content-Language: en-GB
 by: The Natural Philosop - Wed, 30 Aug 2023 15:33 UTC

On 30/08/2023 10:32, Theo wrote:
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> It's the old old story, Online are a hundred articles citing the same
>> examples, and a programmers mumblings that contain the truth that is
>> however unfortunately only comprehensible to other people 100% familiar
>> with the code. There is *nothing in between*. Just the odd hint here and
>> there that you have to piece together to reveals the truth.
>
> For the record, this is a pretty standard 'embedded' development experience.
> Every vendor has some degree of proprietary libraries and/or toolchain, and
> each vendor has a relatively small community of users. Some of whom have a
> hotline to the vendor's support staff which the rest of us don't.
>
> So the platform is much less well tested than the standard Linux/glibc/gcc
> flow. Troubles like this aren't unusual in this environment.
>
> Arduino on Atmega is probably the most beaten path in the embedded space -
> but less popular Arduino platforms suffer from similar creakiness.
>
> Pico seems like it has devs who care about the user experience, rather than
> the typical vendor throwing things over the wall. But no doubt it will take
> time to mature (like first few years of the RPi 1), especially if you're
> using a less popular language.
>
> Theo

I think you are completely right.

Well, for the record I stumbled through and now have at least the
networking bit working.

It is extremely sketchy as far as documentation goes if you stray any
way from the examples.

But a bit of second guessing now has a PICO W that starts up. connects
to wifi, with a unique hostname, reads a thoroughly useless temperature
from its chip, and sends its IP address, its hostname and location plus
temperature and a voltage to a remote server on the PI Zero W.

I used hints from another piece of code, but in the end I built the
thing from the raw LWIP API.

--
Those who want slavery should have the grace to name it by its proper
name. They must face the full meaning of that which they are advocating
or condoning; the full, exact, specific meaning of collectivism, of its
logical implications, of the principles upon which it is based, and of
the ultimate consequences to which these principles will lead. They must
face it, then decide whether this is what they want or not.

Ayn Rand.

Re: Anyone familiar with PICO Pi SDK and networking?

<ucnts4$2jpbo$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7098&group=comp.sys.raspberry-pi#7098

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 18:22:12 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <ucnts4$2jpbo$2@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<ucnngv$2pigp$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 30 Aug 2023 17:22:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="571c186532b1b206756d2cbc41702943";
logging-data="2745720"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wMuUFeKW352wgGtTgerN/VUrFQXpdl9Y="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:5+BZihdwAYXigGIcpZuOtyoyQlM=
In-Reply-To: <ucnngv$2pigp$1@dont-email.me>
Content-Language: en-GB
 by: David Taylor - Wed, 30 Aug 2023 17:22 UTC

On 30/08/2023 16:33, The Natural Philosopher wrote:
> But a bit of second guessing now has a PICO W that starts up. connects
> to wifi, with a unique hostname, reads a thoroughly useless temperature
> from its chip, and sends its IP address, its hostname and location plus
> temperature and a voltage to a remote server on the PI Zero W.

I added an external temperature sensor for that very reason!

For the messaging I used MQTT with a NodeRED server running an a RasPi-3B. I
would have preferred to use SNMP but couldn't find a satisfactory
implementation for the Pico.
--
Cheers,
David
Web: https://www.satsignal.eu

Re: Anyone familiar with PICO Pi SDK and networking?

<ucnv4v$2qs6v$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7099&group=comp.sys.raspberry-pi#7099

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 18:43:58 +0100
Organization: A little, after lunch
Lines: 50
Message-ID: <ucnv4v$2qs6v$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<ucnngv$2pigp$1@dont-email.me> <ucnts4$2jpbo$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 17:43:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="225265a57941d491218170067512a24b";
logging-data="2978015"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0F/Vut1KtAa3GEGko9wOUrOdbw4Ty1gI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:9gnA89BtwWIOkeJMz+fnevFkq7A=
In-Reply-To: <ucnts4$2jpbo$2@dont-email.me>
Content-Language: en-GB
 by: The Natural Philosop - Wed, 30 Aug 2023 17:43 UTC

On 30/08/2023 18:22, David Taylor wrote:
> On 30/08/2023 16:33, The Natural Philosopher wrote:
>> But a bit of second guessing now has a PICO W that starts up. connects
>> to wifi, with a unique hostname, reads a thoroughly useless temperature
>> from its chip, and sends its IP address, its hostname and location plus
>> temperature and a voltage to a remote server on the PI Zero W.
>
> I added an external temperature sensor for that very reason!
>
Already on order!

> For the messaging I used MQTT with a NodeRED server running an a
> RasPi-3B.  I would have preferred to use SNMP but couldn't find a
> satisfactory implementation for the Pico.

Well LWIP includes an SNMP library but FFS for a custom app a text file
is quite adequate....my thermometer assembles 4 lines of text then sends
them to a socket. End of story.

...what is MOTT?

I wrote an utterly trivial daemon to run under Xinetd on the PI zero W
that listens for the data, and just puts it in a file. Where the web
server and the background daemon can read it.

I am strictly old school. As few 3rd party tools as possible, because,
as I found with the SDK and cmake, you spend longer learning how to use
the darned things than writing a low level piece of code.

I still cannot believe that with the TCP/IP, the code is 650kB+

It's pushing towards the limit of the PICO.

Oh and by the way for other people considering using the pico

- the uf2 file vanishes once its booted,
- placing a uf2 file in the pseudo usb drive causes it to reboot
- but not always as cleanly as one would like. I have found strange
things in the serial buffer unless its rebooted cleanly with a
subsequent power down.
- the only way to configure the damn thing is to patch the uf2 file, it
seems. I haven't tried this yet. I hope they have not checksummed it.

--
Truth welcomes investigation because truth knows investigation will lead
to converts. It is deception that uses all the other techniques.

Re: Anyone familiar with PICO Pi SDK and networking?

<uco2pv$2qqin$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7100&group=comp.sys.raspberry-pi#7100

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Pancho.J...@proton.me (Pancho)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 19:46:24 +0100
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <uco2pv$2qqin$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<ucnngv$2pigp$1@dont-email.me> <ucnts4$2jpbo$2@dont-email.me>
<ucnv4v$2qs6v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 18:46:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2adba5c0590d2298c86fafdff3242ba9";
logging-data="2976343"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1BOVx9vYNF6SZU41KB0B3bbo1RDhcm9w="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:D07U1vFpMp7j851r5lsYcc6car8=
Content-Language: en-GB
In-Reply-To: <ucnv4v$2qs6v$1@dont-email.me>
 by: Pancho - Wed, 30 Aug 2023 18:46 UTC

On 30/08/2023 18:43, The Natural Philosopher wrote:
> On 30/08/2023 18:22, David Taylor wrote:
>> On 30/08/2023 16:33, The Natural Philosopher wrote:
>>> But a bit of second guessing now has a PICO W that starts up. connects
>>> to wifi, with a unique hostname, reads a thoroughly useless temperature
>>> from its chip, and sends its IP address, its hostname and location plus
>>> temperature and a voltage to a remote server on the PI Zero W.
>>
>> I added an external temperature sensor for that very reason!
>>
> Already on order!
>
>> For the messaging I used MQTT with a NodeRED server running an a
>> RasPi-3B.  I would have preferred to use SNMP but couldn't find a
>> satisfactory implementation for the Pico.
>
> Well LWIP includes an SNMP library but FFS for a custom app a text file
> is quite adequate....my thermometer assembles 4 lines of text then sends
> them to a socket. End of story.
>
>
> ..what is MOTT?
>

A message queue service, used to be called mosquito. I have one running
under docker on a rpi3 for all my home automation devices, smart plugs
etc, connected to Domoticz.

https://mqtt.org/

It runs, I think very little about it. I guess having a buffer service
between sensors and the presentation web server is useful, but it's
something forced upon me, rather than something I would proactively use.

You can use third party tools to interrogate it, which I guess is a plus.

Re: Anyone familiar with PICO Pi SDK and networking?

<uco5kq$2qkba$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7101&group=comp.sys.raspberry-pi#7101

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Wed, 30 Aug 2023 19:34:51 -0000 (UTC)
Organization: The Pitcher Digital Freehold
Lines: 22
Message-ID: <uco5kq$2qkba$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<ucnngv$2pigp$1@dont-email.me> <ucnts4$2jpbo$2@dont-email.me>
<ucnv4v$2qs6v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 19:34:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="979466420f7fea7960bdd457fef98170";
logging-data="2969962"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++s3EcAi1ssgehHAvuZ8WFG6K2L/Ap70s="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:q/eIx/3ca1+t0yESySGqGfsHaZg=
 by: Lew Pitcher - Wed, 30 Aug 2023 19:34 UTC

On Wed, 30 Aug 2023 18:43:58 +0100, The Natural Philosopher wrote:
[snip]
> ..what is MOTT?

Well, https://mqtt.org/ says that
"MQTT is an OASIS standard messaging protocol for the Internet of
Things (IoT). It is designed as an extremely lightweight
publish/subscribe messaging transport that is ideal for connecting
remote devices with a small code footprint and minimal network bandwidth."
and Wikipedia (in https://en.wikipedia.org/wiki/MQTT) has a bit of the history
of MQTT.

There are a number of implementations of the the MQTT client libraries and
broker daemon. I use Mosquitto (https://mosquitto.org/) between my telephony
server and my other systems, but there are other open-source implementations
available (see https://mqtt.org/software/). It's reasonably lightweight;
there is even an implementation or two (of the client library) for Arduino.

--
Lew Pitcher
"In Skills We Trust"

Re: Anyone familiar with PICO Pi SDK and networking?

<ucp55o$33qdv$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7103&group=comp.sys.raspberry-pi#7103

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!rocksolid2!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Thu, 31 Aug 2023 05:32:56 +0100
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <ucp55o$33qdv$1@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<ucnngv$2pigp$1@dont-email.me> <ucnts4$2jpbo$2@dont-email.me>
<ucnv4v$2qs6v$1@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 31 Aug 2023 04:32:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="386108e866091826014df78f72e38894";
logging-data="3271103"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xu15ior4XBhM3XTvkgNHRh2x/yAkgh/Y="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:bO9R+2cT8GVgdTmsd2Zdt/b5ghc=
Content-Language: en-GB
In-Reply-To: <ucnv4v$2qs6v$1@dont-email.me>
 by: David Taylor - Thu, 31 Aug 2023 04:32 UTC

On 30/08/2023 18:43, The Natural Philosopher wrote:
> I wrote an utterly trivial daemon to run under Xinetd on the PI zero W
> that listens for the data, and just puts it in a file. Where the web
> server and the background daemon can read it.
>
> I am strictly old school. As few 3rd party tools as possible, because,
> as I found with the SDK and cmake, you spend longer learning how to use
> the darned things than writing a low level piece of code.
>
> I still cannot believe that with the TCP/IP, the code is 650kB+
>
> It's pushing towards the limit of the PICO.
>
> Oh and by the way for other people considering using the pico
>
> - the uf2 file vanishes once its booted,
> - placing a uf2 file in the pseudo usb drive causes it to reboot
> - but not always as cleanly as one would like. I have found strange
> things in the serial buffer unless its rebooted cleanly with a
> subsequent power down.
> - the only way to configure the damn thing is to patch the uf2 file, it
> seems. I haven't tried this yet. I hope they have not checksummed it.

Agreed on third-party tools and needing to learn and find bugs. I've also had
to work round the size limits on the Pico, and it would be nice if the 2041 (or
whatever) had greater limits.

BTW, I've not seen any issues with uf2 files when using MicroPython and Thonny.
Loading the uf2 is typically a one-off operation when you first get the Pico
(or the firmware is updated), and any changes are simply editing Python plain
text files and copying to/from the Pico to your host. Configuring can be just
editing an include file which is read by your program. The simplicity of this
over using C/C++ appealed to me.

--
Cheers,
David
Web: https://www.satsignal.eu

Re: Anyone familiar with PICO Pi SDK and networking?

<ucphvm$35m9f$4@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7104&group=comp.sys.raspberry-pi#7104

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Thu, 31 Aug 2023 09:11:34 +0100
Organization: A little, after lunch
Lines: 52
Message-ID: <ucphvm$35m9f$4@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<ucnngv$2pigp$1@dont-email.me> <ucnts4$2jpbo$2@dont-email.me>
<ucnv4v$2qs6v$1@dont-email.me> <ucp55o$33qdv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 31 Aug 2023 08:11:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="581b7f9f139e63d973088bbff562e852";
logging-data="3332399"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QpEVV80KEEh9ELy/j6PyJ/DIMF2kjMgQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:gg56j0hP/0N2koRfbg6Tz5bcFxM=
In-Reply-To: <ucp55o$33qdv$1@dont-email.me>
Content-Language: en-GB
 by: The Natural Philosop - Thu, 31 Aug 2023 08:11 UTC

On 31/08/2023 05:32, David Taylor wrote:
> On 30/08/2023 18:43, The Natural Philosopher wrote:
>> I wrote an utterly trivial daemon to run under Xinetd on the PI zero W
>> that listens for the data, and just puts it in a file. Where the web
>> server and the background daemon can read it.
>>
>> I am strictly old school. As few 3rd party tools as possible, because,
>> as I found with the SDK and cmake, you spend longer learning how to use
>> the darned things than writing a low level piece of code.
>>
>> I still cannot believe that with the TCP/IP, the code is 650kB+
>>
>> It's pushing towards the limit of the PICO.
>>
>> Oh and by the way for other people considering using the pico
>>
>> - the uf2 file vanishes once its booted,
>> - placing a uf2 file in the pseudo usb drive causes it to reboot
>> - but not always as cleanly as one would like. I have found strange
>> things in the serial buffer unless its rebooted cleanly with a
>> subsequent power down.
>> - the only way to configure the damn thing is to patch the uf2 file, it
>> seems. I haven't tried this yet. I hope they have not checksummed it.
>
> Agreed on third-party tools and needing to learn and find bugs.  I've
> also had to work round the size limits on the Pico, and it would be nice
> if the 2041 (or whatever) had greater limits.
>
> BTW, I've not seen any issues with uf2 files when using MicroPython and
> Thonny.  Loading the uf2 is typically a one-off operation when you first
> get the Pico (or the firmware is updated), and any changes are simply
> editing Python plain text files and copying to/from the Pico to your
> host.  Configuring can be just editing an include file which is read by
> your program.  The simplicity of this over using C/C++ appealed to me.
>

Mm. Thats ok for a hobbyists. It would be trivial to plug the PICO into
a USB port and generate a menu on the serial port. Execept do the
changes persist through a reboot?

I am still not clear where the code goes after the boot loader has
installed it.

No doubt I will find out, in time.

--
Canada is all right really, though not for the whole weekend.

"Saki"

Re: Anyone familiar with PICO Pi SDK and networking?

<ucpsjv$33qdv$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7105&group=comp.sys.raspberry-pi#7105

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david-ta...@blueyonder.co.uk.invalid (David Taylor)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Thu, 31 Aug 2023 12:13:03 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <ucpsjv$33qdv$2@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<ucnngv$2pigp$1@dont-email.me> <ucnts4$2jpbo$2@dont-email.me>
<ucnv4v$2qs6v$1@dont-email.me> <ucp55o$33qdv$1@dont-email.me>
<ucphvm$35m9f$4@dont-email.me>
Reply-To: david-taylor@blueyonder.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 31 Aug 2023 11:13:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="386108e866091826014df78f72e38894";
logging-data="3271103"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QOkVUhqURJ2P88Joz98gXRtGYHhji53Y="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:mCEEiZnA9TnwAVGofeY58oZydv0=
Content-Language: en-GB
In-Reply-To: <ucphvm$35m9f$4@dont-email.me>
 by: David Taylor - Thu, 31 Aug 2023 11:13 UTC

On 31/08/2023 09:11, The Natural Philosopher wrote:
> Mm. Thats ok for a hobbyists. It would be trivial to plug the PICO into
> a USB port and generate a menu on the serial port. Execept do the
> changes persist through a reboot?
>
>
> I am still not clear where the code goes after the boot loader has
> installed it.
>
> No doubt I will find out, in time.

The changes would persist if your program wrote them back to a configuration
file. Thonny displays a structure showing the files on the Pico, so that you
can have two windows, one looking at the PC, the other at the Pico.
--
Cheers,
David
Web: https://www.satsignal.eu

Re: Anyone familiar with PICO Pi SDK and networking?

<GO3KM.884750$mPI2.692136@fx15.iad>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7124&group=comp.sys.raspberry-pi#7124

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
Sender: Scott Alfter <salfter@linode.ip.linodeusercontent.com>
From: sco...@alfter.diespammersdie.us
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Newsgroups: comp.sys.raspberry-pi
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me> <ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
Organization: USS Voyager NCC-74656, Delta Quadrant
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.46-gentoo-x86_64 (x86_64))
Lines: 25
Message-ID: <GO3KM.884750$mPI2.692136@fx15.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 06 Sep 2023 18:47:02 UTC
Date: Wed, 06 Sep 2023 18:47:02 GMT
X-Received-Bytes: 2041
 by: sco...@alfter.diespammersdie.us - Wed, 6 Sep 2023 18:47 UTC

Theo <theom+news@chiark.greenend.org.uk> wrote:
> Every vendor has some degree of proprietary libraries and/or toolchain, and
> each vendor has a relatively small community of users. Some of whom have a
> hotline to the vendor's support staff which the rest of us don't.
>
> So the platform is much less well tested than the standard Linux/glibc/gcc
> flow. Troubles like this aren't unusual in this environment.
>
> Arduino on Atmega is probably the most beaten path in the embedded space -
> but less popular Arduino platforms suffer from similar creakiness.

I've had pretty good luck with VSCodium and PlatformIO. They manage to
abstract away most of the unpleasantness involved in dealing with yet
another toolchain. With it, I've been able to wrangle different bits of
code targeting microcontrollers with AVR, ARM, and RISC-V cores. Some have
been a little easier to set up than others (the programmer dongle for some
of the RISC-V dev boards I have needed its firmware updated with another
tool first), but once it's sorted, writing code for any of them isn't too
much different.

--
_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( https://alfter.us/ Top-posting!
\_^_/ >What's the most annoying thing on Usenet?

Re: Anyone familiar with PICO Pi SDK and networking?

<udcanu$2v3ge$5@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7133&group=comp.sys.raspberry-pi#7133

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Anyone familiar with PICO Pi SDK and networking?
Date: Thu, 7 Sep 2023 12:04:30 +0100
Organization: A little, after lunch
Lines: 49
Message-ID: <udcanu$2v3ge$5@dont-email.me>
References: <ucl72j$2b5m3$1@dont-email.me> <ucmcn9$2jpbn$1@dont-email.me>
<ucmpda$2l7ku$1@dont-email.me> <Ptj*Xm8oz@news.chiark.greenend.org.uk>
<GO3KM.884750$mPI2.692136@fx15.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 7 Sep 2023 11:04:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6431dc01080c1b11e4caf83c8af3f68c";
logging-data="3116558"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4W5P154/FLpia2mt8RIwlrC6M5aGRBUg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:7dg2xI+yYG9Bd57bIUrOheBrEmA=
Content-Language: en-GB
In-Reply-To: <GO3KM.884750$mPI2.692136@fx15.iad>
 by: The Natural Philosop - Thu, 7 Sep 2023 11:04 UTC

On 06/09/2023 19:47, scott@alfter.diespammersdie.us wrote:
> Theo <theom+news@chiark.greenend.org.uk> wrote:
>> Every vendor has some degree of proprietary libraries and/or toolchain, and
>> each vendor has a relatively small community of users. Some of whom have a
>> hotline to the vendor's support staff which the rest of us don't.
>>
>> So the platform is much less well tested than the standard Linux/glibc/gcc
>> flow. Troubles like this aren't unusual in this environment.
>>
>> Arduino on Atmega is probably the most beaten path in the embedded space -
>> but less popular Arduino platforms suffer from similar creakiness.
>
> I've had pretty good luck with VSCodium and PlatformIO. They manage to
> abstract away most of the unpleasantness involved in dealing with yet
> another toolchain. With it, I've been able to wrangle different bits of
> code targeting microcontrollers with AVR, ARM, and RISC-V cores. Some have
> been a little easier to set up than others (the programmer dongle for some
> of the RISC-V dev boards I have needed its firmware updated with another
> tool first), but once it's sorted, writing code for any of them isn't too
> much different.
>

As the OP on this thread, I can say that once the documentation has been
found, and its ambiguities tested against real life code, the code
itself appears to be robust, as does the hardware. Unlike the somewhat
flakiness of microPython, documented in other threads.

e.g. timeouts do not work reliably, but watchdog timers seem to, so I
implemented a 'i cant connect in 5 seconds, so abort and try again'
sequence to at least not brick the code if the server goes off line.

I have yet to test the wifi point going off line. That may requires some
further delving.

It's been uphill and a struggle all the way, but I now have some minimal
code that runs very well.

I have, in short, solid foundations on which to build any wifi connected
gadgets around the place.

I might well have done it with Arduinos etc. but faced with zero
knowledge of either platform software wise, I picked the Pi.

--
"First, find out who are the people you can not criticise. They are your
oppressors."
- George Orwell

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor