-
Notifications
You must be signed in to change notification settings - Fork 241
SoftwareBitBang troubleshooting
The first thing to do when trying to troubleshoot a problem with SoftwareBitBang is to donwload PJON's latest stable version from www.PJON.org or www.github.com/gioblu/PJON from and test the following examples:
- examples/ARDUINO/Local/SoftwareBitBang/NetworkAnalysis tests transmitter's side
- examples/ARDUINO/Local/SoftwareBitBang/SpeedTest tests receiver's side
Very often the problem can be related to an outdated or modified version of the library, so this may solve your problem. NetworkAnalysis and SpeedTest are designed to benchmark connectivity performance and reliability using the following analysis:
-
Packet overhead
or how many bytes are added by PJON to data -
Bandwidth
or maximum amount of bytes transmitted in a second -
Data throughput
or how many data bytes are transmitted every second -
Packets sent
or number of packets transmitted in the test window -
Mistakes
or how many errors detected with CRC -
Fail
or how many times no acknowledgement was received -
Busy
or how many times the channel is found busy -
Accuracy
or ratio between correct packets and packets that contain mistakes
- Many
Fail
and orMistakes
may mean devices are near their maximum communication range - Many
Mistakes
and or lowBandwidth
may mean that interference is present, see mitigate interference - Many
Fail
and orMistakes
and or low speed may indicate Bad timing configuration, if you are porting a new device or architecture to SoftwareBitBang, AnalogSampling or OverSampling consider that each MCU can need a different timing configuration because of clock or system discrepancies. Try tweakingBIT_WIDTH
,BIT_SPACER
,READ_DELAY
andACCEPTANCE
inTiming.h
- Low performance also after painstaking timing tweaks may indicate that the new MCU/architecture may not be fast enough to run SoftwareBitBang at the mode you are working with, try using a faster clock or optimize digital I/O perfomance or choosing a slower mode.
examples/ARDUINO/Local/SoftwareBitBang/PacketSeparationTest can be used to verify that frame separation consistency is 100% reliable within your practical hardware or timing setup. This test has a transmitter device that sends a continuous random byte stream. The receiver device attempts to receive packets from pin 12, if an incoming packet is detected a false positive occurred. The receiver device prints the result of the test via serial. If any false positive is detected while testing a supported device, the system may dispatch corrupted data so please report this occurrence opening an issue in our github repository.
- Update PJON 12.x to 13.0
- Addressing
- Configuration
- Data reception
- Data transmission
- Error handling
- IO pins setup
- Routing
- ATtiny interfacing
- ESP8266 interfacing
- Nucleo interfacing
- Raspberry Pi interfacing
- WINX86 interfacing
- Troubleshooting