osd-contiki/examples/osd/arduino-settingsmanager/README.md

68 lines
2 KiB
Markdown
Raw Normal View History

2017-09-08 08:26:36 +02:00
Arduino shell example
=====================
This example start a shell on merkurboard serial0 line.
You can change the network parameters and store it in eeprom.
2017-08-31 11:23:55 +02:00
make clean TARGET=osd-merkur-256 flash
2017-09-08 08:26:36 +02:00
start a terminal programm
-------------------------
picocom -c -b 38400 --omap crcrlf /dev/ttyUSB0
? [ENTER]
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
Available commands:
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
?: shows this help
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
ccathresholds <threshold: change cca thresholds -91 to -61 dBm (default -77)
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
exit: exit shell
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
help: shows this help
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
kill <command>: stop a specific command
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
killall: stop all running commands
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
null: discard input
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
panid <0xabcd>: change panid (default 0xabcd)
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
ps: list all running processes
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
quit: exit shell
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
reboot: reboot the system
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
rfchannel <channel>: change radio channel (11 - 26)
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
saverfparam <> save radio parameters txpower, channel, panid to eeprom settingsmanager
2017-09-08 13:25:34 +02:00
2017-09-08 08:26:36 +02:00
txpower <power>: change transmission power 0 (3dbm, default) to 15 (-17.2dbm)
------------------------------------------------------------------------------
quit picocom, you need to press Ctrl-a , then Ctrl-q
2017-09-08 13:30:28 +02:00
------------------------------------------------------------------------------
2017-09-10 22:13:07 +02:00
Read eeprom to disk:
avrdude -p m256rfr2 -c stk500v2 -P /dev/ttyUSB0 -b 57600 -U eeprom:r:eeprom_img.hex:i
Write eeprom to Merkurboard:
avrdude -p m256rfr2 -c stk500v2 -P /dev/ttyUSB0 -b 57600 -U eeprom:w:eeprom_img.hex:i
2017-09-08 13:30:28 +02:00
todo:
2017-09-08 08:26:36 +02:00
2017-09-08 13:30:28 +02:00
bugfix: txpower <power>: change transmission power 0 (3dbm, default) to 15 (-17.2dbm)
make a contiki app for easier inegration in projects
2017-09-08 08:26:36 +02:00
2017-09-08 13:30:28 +02:00
------------------------------------------------------------------------------
2017-09-08 08:26:36 +02:00
2017-08-31 11:23:55 +02:00
This example shows that it is now possible to re-use arduino sketches in
Contiki. This example documents the necessary magic. Arduino specifies
two routines, `setup` and `loop`. Before `setup` is called, the
framework initializes hardware. In original Arduino, all this is done in
a `main` function (in C). For contiki we define a process that does the
same.
See the documentation file in apps/contiki-compat/README.md