hello all.
This is latest status.
commit 74825dad9e56672051e0e1dc9386f618f057eb3a (HEAD -> dev, origin/dev)
Author: Edward Vidal Jr <develone@sbcglobal.net>
Date: Mon May 22 05:20:09 2023 -0600
ver 0.0.08
url = "">
7 FreeRTOS tasks are running on the pico_w
TEST_TASK connects to WiFi and mqtt tskIDLE_PRIORITY + 2UL
BLINK_TASK tskIDLE_PRIORITY + 3UL
WATCHDOG_TASK tskIDLE_PRIORITY + 1UL
SOCKET_TASK tcp socket to pico_w provides debug info tskIDLE_PRIORITY + 6UL
MQTT_TASK publish subscribe model tskIDLE_PRIORITY + 4UL
NTP_TASK tskIDLE_PRIORITY + 5UL
ADC_TASK tskIDLE_PRIORITY + 8UL reads onboard temperature sensor
Time is set on the pico_w using ntp
This is 6 of six remotes mosquitto_sub -t 'pico/status' -u 'testuser' -P 'password123'
Onboard temperature = 30.42 C remote3
Onboard temperature = 31.35 C remote2
Onboard temperature = 33.69 C remote5
Onboard temperature = 31.35 C remote4
Onboard temperature = 29.01 C remote6
Onboard temperature = 30.42 C remote1
Sending 10 characters provides several commands to the pico_w.
#first char 1, 2, 3, 4, 5, 6 or x all remotes
#2nd char 1 alarm pico-cmd-alarm, 2 led control pico-cmd, 3 reset pico-cmd-reset
#2nd char 6, 7, 8, 9 to to be defined.
#3rd & 4th are alarmhour when the 2nd char is 1
#6th & 7th are alarmmin when the 2nd char is 1
#8th & 9th are arlamsec when the 2nd char is 1
#2nd char 4 temperature
../pico-cmd-reset pi4-50 where pi4-50 broker
../pico-cmd-C pi4-50 where pi4-50 broker
#2nd char 5 temperature
../pico-cmd-reset pi4-50 where pi4-50 broker
../pico-cmd-F pi4-50 where pi4-50 broker
#2nd char 5 temperature
Onboard temperature = 86.75 F remote1
Onboard temperature = 85.91 F remote3
Onboard temperature = 87.59 F remote2
Onboard temperature = 92.65 F remote5
Onboard temperature = 89.28 F remote4
Onboard temperature = 84.22 F remote6
This command can not be done twice in a row ../pico-cmd pi4-50 requires ../pico-cmd-reset pi4-50 before the 2nd ../pico-cmd pi4-50
These are examples of how 4 leds are cpntrolled using the pico-cmd #2
/*These are are fix for bits[0] &bits[1] not being read correctly*/
if((bits[val]==0x746f6d65)&&(val==0)) mask = 0x3f << FIRST_GPIO;
if((bits[val]==0x3565)&&(val==1)) mask = 0x3e << FIRST_GPIO;
if(val>1) mask = bits[val] << FIRST_GPIO;
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '520820000a'
val 0 16515072 mask 0xFC0000
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '521820000a'
val 1 0x3565 mask 0xF80000 16252928 bits 0x3565
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '522820000a'
val 2 mask 15990784 bits 0x3d
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '523820000a'
val 3 mask 15728640 bits 0x3c
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '524820000a'
val 4 mask 15466496 bits 0x3b
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '525820000a'
val 5 mask 15204352 bits 0x3a
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '526820000a'
val 6 mask 14942208 bits 0x39
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '527820000a'
val 7 mask 14680064 bits 0x38
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '528820000a'
val 8 mask 14417920 bits 0x37
../pico-cmd-reset pi4-50
../pico-cmd pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m '529820000a'
This is an example of setting the alarm on all remotes.
../pico-cmd-reset pi4-50
../pico-cmd-alarm pi4-50
mosquitto_pub -h $1 -p 1883 -t 'pico/cmds' -u 'testuser' -P 'password123' -m 'x11141000a'
Alarm Fired At Sunday 18 May 11:41:00 2023
This is an example of iperf
devel@pi4-50:~/pico_w-mqtt/remote1 $ iperf -c remote1
------------------------------------------------------------
Client connecting to remote1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.212 port 49372 connected with 192.168.1.176 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0000-10.0461 sec 20.5 MBytes 17.1 Mbits/sec
devel@pi4-50:~/pico_w-mqtt/remote1 $ iperf -c remote2
------------------------------------------------------------
Client connecting to remote2, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.212 port 57622 connected with 192.168.1.160 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0000-10.0581 sec 20.0 MBytes 16.7 Mbits/sec
devel@pi4-50:~/pico_w-mqtt/remote1 $ iperf -c remote3
connect failed: Operation now in progress
------------------------------------------------------------
Client connecting to remote3, TCP port 5001
TCP window size: -1.000 Byte (default)
------------------------------------------------------------
devel@pi4-50:~/pico_w-mqtt/remote1 $ iperf -c remote4
------------------------------------------------------------
Client connecting to remote4, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.212 port 39430 connected with 192.168.1.177 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0000-10.0412 sec 20.1 MBytes 16.8 Mbits/sec
devel@pi4-50:~/pico_w-mqtt/remote1 $ iperf -c remote5
------------------------------------------------------------
Client connecting to remote5, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.212 port 55942 connected with 192.168.1.159 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0000-10.0525 sec 18.5 MBytes 15.4 Mbits/sec
devel@pi4-50:~/pico_w-mqtt/remote1 $ iperf -c remote6
------------------------------------------------------------
Client connecting to remote6, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.212 port 49772 connected with 192.168.1.175 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0000-10.0407 sec 20.4 MBytes 17.0 Mbits/sec
This is an example of sock_task for debug info.
devel@pi4-50:~/pico_w-mqtt/remote1 $ ../pi_tcp_tests/cli1
Socket created successfully
Connected with server successfully
5/2023 12:02:04 22/05/2023 12:02:35 22/05/2023 12:03:06 22/05/2023 12:03:37 22/05/2023 12:04:08 22/05/2023 12:04:39 t = 1883 22/05/2023 11:53:48 22/05/2023 11:54:19 Alarm Fired Sunday 22 May 11:54:48 2023 22/05/2023 11:54:50 22/05/2023 11:55:21 22/05/2023 11:55:52 22/05/2023 11:56:23 22/05/2023 11:56:54 22/05/2023 11:57:25 22/05/2023 11:57:56 22/05/2023 11:58:27 22�0s�
devel@pi4-50:~/pico_w-mqtt/remote1 $ ../pi_tcp_tests/cli2
Socket created successfully
Connected with server successfully
5/2023 12:03:42 22/05/2023 12:04:13 22/05/2023 12:04:44 iperf server 192.168.1.160 4001 mqtt_ip = 0xd401a8c0 mqtt_port = 1883 22/05/2023 11:55:26 22/05/2023 11:55:57 Alarm Fired Sunday 22 May 11:56:26 2023 22/05/2023 11:56:28 22/05/2023 11:56:59 22/05/2023 11:57:30 22/05/2023 11:58:01 22/05/2023 11:58:32 22/05/2023 11:59:03 22/05/2023 11:59:34 22/05/2023 12:00:05 22`.��
devel@pi4-50:~/pico_w-mqtt/remote1 $ ../pi_tcp_tests/cli3
Socket created successfully
Connected with server successfully
Starting FreeRTOS on core 0: ver 0.0.08 remote3 Connected. iperf server 192.168.1.178 4001 mqtt_ip = 0xd401a8c0 mqtt_port = 1883 22/05/2023 12:03:52 22/05/2023 12:04:23 Alarm Fired Sunday 22 May 12:04:52 2023 22/05/2023 12:04:54 234567890123456789012301234567890123456789012345678901234567890123456789012345678901230123456789012345678901234567890123456789012345678901234567890123
devel@pi4-50:~/pico_w-mqtt/remote1 $ ../pi_tcp_tests/cli4
Socket created successfully
Connected with server successfully
Starting FreeRTOS on core 0: ver 0.0.08 remote4 Connected. iperf server 192.168.1.177 4001 mqtt_ip = 0xd401a8c0 mqtt_port = 1883 22/05/2023 11:59:49 22/05/2023 12:00:20 22/05/2023 12:00:51 22/05/2023 12:01:22 22/05/2023 12:01:53 22/05/2023 12:02:24 22/05/2023 12:02:55 22/05/2023 12:03:26 22/05/2023 12:03:57 22/05/2023 12:04:28 22/05/2023 12:04:59 22/05/2023 12:05:30 30�<�
devel@pi4-50:~/pico_w-mqtt/remote1 $ ../pi_tcp_tests/cli5
Socket created successfully
Connected with server successfully
Starting FreeRTOS on core 0: ver 0.0.08 remote5 Connected. iperf server 192.168.1.159 4001 mqtt_ip = 0xd401a8c0 mqtt_port = 1883 22/05/2023 11:58:50 22/05/2023 11:59:21 Alarm Fired Sunday 22 May 11:59:50 2023 22/05/2023 11:59:52 22/05/2023 12:00:23 22/05/2023 12:00:54 22/05/2023 12:01:25 22/05/2023 12:01:56 22/05/2023 12:02:27 22/05/2023 12:02:58 22/05/2023 12:03:29 22���
devel@pi4-50:~/pico_w-mqtt/remote1 $ ../pi_tcp_tests/cli6
Socket created successfully
Connected with server successfully
Starting FreeRTOS on core 0: ver 0.0.08 remote6 Connected. iperf server 192.168.1.175 4001 mqtt_ip = 0xd401a8c0 mqtt_port = 1883 22/05/2023 12:01:43 22/05/2023 12:02:14 Alarm Fired Sunday 22 May 12:02:43 2023 22/05/2023 12:02:45 22/05/2023 12:03:16 22/05/2023 12:03:47 22/05/2023 12:04:18 22/05/2023 12:04:49 22/05/2023 12:05:20 22/05/2023 12:05:51 012345678901234567890123pƊ�
This is shortly after start
../pico-cmd-C pi4-50
remote255
data[2] 7 tbits25 7
rem 255 cc 4 remote1
cc=4
Onboard temperature = 31.35 C
default after boot.
Onboard temperature = 30.42 C remote3
Onboard temperature = 31.35 C remote2
Onboard temperature = 33.69 C remote5
Onboard temperature = 31.35 C remote4
Onboard temperature = 29.01 C remote6
Onboard temperature = 30.42 C remote1
remote255
data[2] 7 tbits25 7
rem 255 cc 5 remote1
cc=5
Onboard temperature = 86.75 F remote1
Onboard temperature = 85.91 F remote3
Onboard temperature = 87.59 F remote2
Onboard temperature = 92.65 F remote5
Onboard temperature = 89.28 F remote4
Onboard temperature = 84.22 F remote6
Edward Vidal Jr. e-mail develone@sbcglobal.net 915-595-1613