Comments (10)
DEBUG:pms:capture ? PMS5003T obs from /dev/ttyAMA0 every 60 secs
DEBUG:pms:open /dev/ttyAMA0
DEBUG:pms:wake PMS5003T
DEBUG:pms:buffer length: 47
DEBUG:pms:message hex: 1c000b00110011000b001100110742004d001c000a00100010000a0010001007bc024a0076000800d700e39a0004e0
ERROR:pms:Sensor is not PMS5003T
The buffer seems to be too long, as if your PMS5003T did not recognized the passive mode command.
Are you using the rpi's serial pins? Did you connect both RT and TX lines?
from pypms.
Yes I'm using both RX and TX (and nothing else, just the power is connected).
from pypms.
Maybe these help:
od /dev/ttyAMA0
0000000 000034 000012 000021 000023 000000 000000 000000 000000
0000020 000000 000000 000000 000000 000000 000000 000000 000000
*
0000100 000170 100200 000000 074370 100000 000200 100036 000170
0000120 174000 000170 100200 017000 074200 000000 074200 074000
0000140 100000 017000 074200 000000 074200 100000 000200 100036
0000160 000170 100000 000170 100200 100036 000170 174000 000170
0000200 100370 100036 000170 174000 000170 100200 100036 000170
0000220 174000 000170 100200 100036 000170 174000 000170 100200
0000240 100036 000170 174000 000170 100200 100036 000170 174000
od -Ax -tcx1 /dev/ttyAMA0
000000 034 \0 \f \0 022 \0 023 \0 \0 \0 \0 \0 \0 \0 \0 \0
1c 00 0c 00 12 00 13 00 00 00 00 00 00 00 00 00
000010 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
000040 \0 \0 \0 200 200 \0 200 200 \0 \0 200 \0 200 200 \0 \0
00 00 00 80 80 00 80 80 00 00 80 00 80 80 00 00
000050 200 x 340 \0 370 x 200 \0 036 200 x \0 \0 370 x \0
80 78 e0 00 f8 78 80 00 1e 80 78 00 00 f8 78 00
000060 x \0 200 \0 036 200 x \0 \0 370 x \0 200 200 \0 200
78 00 80 00 1e 80 78 00 00 f8 78 00 80 80 00 80
xxd /dev/ttyAMA0
00000000: 001e 8078 0000 78e0 0078 0042 004d 001c ...x..x..x.B.M..
00000010: 0009 0011 0012 0009 0011 0012 0768 021a .............h..
00000020: 007e 0006 00d9 00e3 9a00 0468 424d 001c .~.........hBM..
00000030: 0009 0011 0012 0009 0011 0012 0768 021a .............h..
00000040: 007e 0006 00d9 00e2 9a00 0467 424d 001c .~.........gBM..
00000050: 000a 0011 1200 0a00 1100 1207 0000 0000 ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000090: 7800 7800 8000 8078 0078 8000 1e80 7800 x.x....x.x....x.
from pypms.
Can you send me a few lines of xxd -g1 -c32 /dev/ttyAMA0
?
from pypms.
xxd -g1 -c32 /dev/ttyAMA0
00000000: 00 78 fe 80 78 00 00 78 e0 00 f8 00 78 00 e0 00 f8 00 78 00 f8 00 78 1e 80 78 00 00 78 e0 00 f8 .x..x..x....x.....x...x..x..x...
00000020: 00 00 1e 80 78 00 00 78 e0 00 f8 00 78 42 00 4d 00 1c 00 0a 00 10 00 11 00 0a 00 10 00 11 07 7a ....x..x....xB.M...............z
00000040: 02 42 00 7c 00 04 00 db 00 e4 9a 00 04 9f 42 4d 00 1c 00 0a 00 10 11 00 0a 00 10 00 11 07 00 00 .B.|..........BM................
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 80 80 00 1e 80 78 00 00 f8 ............................x...
000000a0: 78 00 00 1e 80 78 00 00 f8 78 00 78 00 80 00 1e 80 78 00 00 f8 78 00 78 00 80 00 1e 80 78 00 00 x....x...x.x.....x...x.x.....x..
000000c0: 00 80 00 80 80 80 00 1e 80 78 00 00 00 00 80 80 00 1e 80 78 00 00 00 00 80 00 1e 80 78 00 00 f8 .........x.........x........x...
from pypms.
I can not find a valid header/message on this hexdump.
Can you set the baud rate to 9600? I think the command is stty -F /dev/ttyAMA0 9600
from pypms.
Hmm, interesting...
stty -F /dev/ttyAMA0 9600
xxd -g1 -c32 /dev/ttyAMA0
00000000: 00 00 00 00 00 80 80 00 00 fe 00 80 80 00 00 fe 78 1e 80 78 00 00 80 80 00 00 1e 80 78 00 00 78 ................x..x........x..x
00000020: 00 00 00 00 1e 80 78 00 00 78 00 00 00 00 42 00 4d 00 1c 00 11 00 1c 00 1c 00 11 00 1c 00 1c 0b ......x..x....B.M...............
00000040: af 03 73 00 c4 00 08 00 ca 00 e3 9a 00 05 80 42 4d 00 1c 00 12 00 1d 00 1d 00 12 00 1d 00 1d c8 ..s............BM...............
00000060: 00 08 00 ca 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 80 00 78 fe 00 78 fe 00 80 80 00 78 fe 00 78 ...................x..x.....x..x
000000a0: fe 78 80 80 00 80 00 00 80 00 1e 80 78 00 00 80 80 00 00 00 1e 80 78 00 00 80 80 00 00 1e 80 78 .x..........x.........x........x
000000c0: 00 00 80 80 00 00 1e 80 78 00 00 80 80 00 f8 f8 1e 80 78 00 00 80 80 00 f8 f8 1e 80 78 00 00 80 ........x.........x.........x...
000000e0: 80 00 f8 f8 1e 80 78 00 00 80 80 00 80 f8 1e 80 78 00 00 80 80 00 80 f8 1e 80 78 00 00 80 80 00 ......x.........x.........x.....
00000100: 80 f8 1e 80 78 00 00 80 80 00 80 f8 1e 80 78 00 00 80 80 00 80 f8 1e 80 78 00 00 80 80 00 80 f8 ....x.........x.........x.......
from pypms.
I found the problem:
pms -m PMS5003T -s /dev/ttyAMA0 --debug serial
DEBUG:pms:capture ? PMS5003T obs from /dev/ttyAMA0 every 60 secs
DEBUG:pms:open /dev/ttyAMA0
DEBUG:pms:wake PMS5003T
DEBUG:pms:buffer length: 40
DEBUG:pms:message hex: 424d001c0012001e00200012001d00200c9903b300da001400d200ec9a0005eb424d0004e1000174
DEBUG:pms:message hex: 424d0004e1000174
DEBUG:pms:message payload: (57600,)
DEBUG:pms:message hex:
DEBUG:pms:message header: b''
DEBUG:pms:message hex: 424d001c000f00200023000f001f00230be203580104002000d200e99a000510
DEBUG:pms:message payload: (15, 32, 35, 15, 31, 35, 3042, 856, 260, 32, 210, 233, 39424)
2021-02-02 07:30:13: PM1 15.0, PM2.5 31.0, PM10 35.0 μg/m3
I had to remove the serial0 references from /boot/cmdline...
Thanks for your help.
from pypms.
Glad I was able to help.
Could you post the results of the following commannd line on #2?
pms -m PMS5003ST -n 10 -i 10 serial -f hexdump
I use sensor data captures on the project documentation and test suite
from pypms.
Of course, I edited the command (because of the different com port):
pms -m PMS5003T -n 10 -i 10 -s /dev/ttyAMA0 serial -f hexdump
00000000: 42 4d 00 1c 00 17 00 27 00 29 00 16 00 23 00 29 10 08 04 a9 01 16 00 0c 00 d4 00 e0 9a 00 04 aa BM.....'.)...#.)................
00000020: 42 4d 00 1c 00 15 00 24 00 24 00 14 00 21 00 24 0d c8 04 1f 00 e4 00 0e 00 d4 00 e0 9a 00 05 99 BM.....$.$...!.$................
00000040: 42 4d 00 1c 00 15 00 25 00 26 00 14 00 22 00 26 0f 00 04 66 00 fa 00 16 00 d4 00 e0 9a 00 05 3e BM.....%.&...".&...f...........>
00000060: 42 4d 00 1c 00 14 00 23 00 2a 00 13 00 20 00 2a 0e a6 04 37 01 06 00 1e 00 d4 00 df 9a 00 04 ca BM.....#.*... .*...7............
00000080: 42 4d 00 1c 00 17 00 26 00 26 00 16 00 23 00 26 0e e8 04 62 01 1e 00 0e 00 d4 00 e0 9a 00 05 44 BM.....&.&...#.&...b...........D
000000a0: 42 4d 00 1c 00 16 00 25 00 27 00 15 00 22 00 27 0e fd 04 5a 01 20 00 14 00 d4 00 df 9a 00 05 56 BM.....%.'...".'...Z. .........V
000000c0: 42 4d 00 1c 00 16 00 24 00 2a 00 15 00 21 00 2a 0e af 04 56 01 1a 00 16 00 d4 00 df 9a 00 05 04 BM.....$.*...!.*...V............
000000e0: 42 4d 00 1c 00 17 00 25 00 2d 00 16 00 22 00 2d 0e fd 04 6f 01 24 00 16 00 d5 00 de 9a 00 05 7f BM.....%.-...".-...o.$..........
00000100: 42 4d 00 1c 00 15 00 23 00 2c 00 14 00 20 00 2c 0e ca 04 5a 01 1e 00 18 00 d5 00 de 9a 00 05 29 BM.....#.,... .,...Z...........)
00000120: 42 4d 00 1c 00 14 00 22 00 2b 00 13 00 20 00 2b 0e 13 04 14 01 10 00 1e 00 d5 00 df 9a 00 04 20 BM.....".+... .+...............
from pypms.
Related Issues (20)
- Add to pypi HOT 2
- SDS198 wrong message header HOT 5
- List all possible reader attributes in the README HOT 7
- Add instructions on how to use this package within a script or application
- MCU680 obs.pres typo
- Consistent attribute names HOT 5
- pip3 module not found HOT 2
- Help to set up mqtt HOT 5
- unreliably identifying the SPS30 sensor HOT 12
- Cannot read HPMA115C0 HOT 9
- logging.basicConfig() conflicts with use as a library HOT 1
- SPS30 to mosquitto socket error HOT 8
- pms: Command not found HOT 4
- RPi zero with SDS198 reboots after running command HOT 1
- Stop after a number of readings and "one-shot" mode HOT 1
- Broken travis environment
- capture and decode raw-data
- PMS5003T/PMS5003ST signed temperature
- PMS5003S/PMS5003ST HCHO unit/format HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypms.