-
Notifications
You must be signed in to change notification settings - Fork 239
SoftwareBitBang troubleshooting
Study in detail your project's program because 99.9% of the times the problem is in there, specially if you are using supported hardware and doing legit stuff. If the issue is not solved donwload PJON's latest stable version from www.PJON.org or www.github.com/gioblu/PJON (very often issues are caused by an outdated or edited version of the library) and test your project's program.
If the problem is not solved go further testing the following examples:
- examples/ARDUINO/Local/SoftwareBitBang/NetworkAnalysis tests transmitter's side
- examples/ARDUINO/Local/SoftwareBitBang/SpeedTest tests receiver's side
NetworkAnalysis and SpeedTest are designed to benchmark connectivity performance and reliability using the following terms:
-
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 number of transmission failures occurred in the test window -
Busy
or how many times the channel is found busy -
Accuracy
or ratio between correct packets and packets that contain mistakes
The result can be interpreted as follows:
- Many
Fail
and orMistakes
may mean that the maximum communication range between devices has been reached - Many
Busy
and orMistakes
and or lowBandwidth
may mean that interference is present, see mitigate interference - Many
Fail
and orMistakes
and or lowBandwidth
may indicate a bad timing configuration, if you are porting a new MCU/architecture to SoftwareBitBang consider different timing configuration may be required because of system discrepancies. Try tweakingSWBB_BIT_WIDTH
,SWBB_BIT_SPACER
,SWBB_READ_DELAY
andSWBB_ACCEPTANCE
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 is 100% reliable. 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