[mc1322x] Radio demos

Jon Smirl jonsmirl at gmail.com
Wed Oct 7 12:01:40 EDT 2009


On Wed, Oct 7, 2009 at 11:57 AM, Jon Smirl <jonsmirl at gmail.com> wrote:
> On Wed, Oct 7, 2009 at 11:53 AM, Jon Smirl <jonsmirl at gmail.com> wrote:
>> On Wed, Oct 7, 2009 at 9:30 AM, Mariano Alvira <mar at devl.org> wrote:
>>> On Wed, Oct 07, 2009 at 08:59:19AM -0400, Jon Smirl wrote:
>>>> I can compile now using the OE toolchain. I don't know what is wrong
>>>> with the Phytec one.
>>>>
>>>> Which radio demos work?
>>>
>>> rftest-tx and rftest-rx in mc1322x-tests are the "standard" radio test
>>> programs. You can use rftest-rx and rftestrx2pcap.pl to make pcaps
>>> that you can load into wireshark to examine (this is only helpful if
>>> you are sending packets in an 802.15.4 frame).
>>
>> rftest-tx works. I am sniffing it live using a Raven stick. Wireshark
>> says a lot of the packets are malformed beacons.
>>
>>
>>> As for contiki, I've used nullmac and sicslowmac with success. xmac
>>> and lpp seem to have problems, but it's difficult to separate issues
>>> in contiki with issues in my radio driver. I believe the root of the
>>> problem is that there are assumptions in xmac and lpp regarding the
>>> radio driver blocking until the bytes are transmitted (since that's
>>> how a lot of the radio's contiki uses work). With the mc1322x radio
>>> you fill a buffer and DMA takes care of the rest and so it often
>>> returns before the bytes are transmitted. What I would like to do is
>>> change the radio driver from a contiki process over to an interrupt
>>> driven thing, but I haven't had a chance to work on that yet...
>>>
>>> I'd use sicslowmac (which is what is currently used in my repo). I've
>>> had success with example-mesh and with example-collect. Both of these
>>
>> PRINTF isn't getting defined. Do you have some updates you need to
>> push out into the repo?
>
> I get the same error with TARGET=mc1322x.
> savetarget is not working right in that directory.

Fixed the PRINTF

diff --git a/core/net/rime/route-discovery.c b/core/net/rime/route-discovery.c
index 3d81606..521d483 100644
--- a/core/net/rime/route-discovery.c
+++ b/core/net/rime/route-discovery.c
@@ -72,7 +72,7 @@ struct rrep_hdr {
 #define DEBUG 1
 #if DEBUG
 #include <stdio.h>
-#define PRINTF(...) PRINTF(__VA_ARGS__)
+#define PRINTF(...) printf(__VA_ARGS__)
 #else
 #define PRINTF(...)
 #endif

Now I'm looking at this....

n.o obj_mc1322x/startup.o obj_mc1322x/symbols.o contiki-mc1322x.a
contiki-mc1322x.a
example-rudolph0.co: In function `process_thread_example_rudolph0_process':
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:135:
undefined reference to `cfs_open'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:138:
undefined reference to `cfs_write'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:140:
undefined reference to `cfs_close'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:150:
undefined reference to `button_sensor'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:150:
undefined reference to `sensors_event'
example-rudolph0.co: In function `read_chunk':
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:103:
undefined reference to `cfs_open'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:105:
undefined reference to `cfs_seek'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:106:
undefined reference to `cfs_read'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:108:
undefined reference to `cfs_close'
example-rudolph0.co: In function `write_chunk':
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:65:
undefined reference to `leds_on'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:68:
undefined reference to `cfs_open'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:73:
undefined reference to `cfs_seek'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:74:
undefined reference to `cfs_write'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:78:
undefined reference to `cfs_close'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:83:
undefined reference to `leds_off'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:84:
undefined reference to `leds_on'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:85:
undefined reference to `cfs_open'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:88:
undefined reference to `cfs_read'
/home/apps/contiki-mc1322x/examples/rime/example-rudolph0.c:94:
undefined reference to `cfs_close'



>
>>
>> gcc -Wl,-Map=contiki-netsim.map,-export-dynamic  example-abc.co
>> contiki-netsim.a -L/usr/lib -lgtk -lgdk -rdynamic -lgmodule -lglib
>> -ldl -lXi -lXext -lX11 -lm -o example-abc.netsim
>> contiki-netsim.a(route-discovery): In function `timeout_handler':
>> /home/apps/contiki-mc1322x/examples/rime/../../core/net/rime/route-discovery.c:287:
>> undefined reference to `PRINTF'
>> contiki-netsim.a(route-discovery): In function `route_discovery_discover':
>> /home/apps/contiki-mc1322x/examples/rime/../../core/net/rime/route-discovery.c:297:
>> undefined reference to `PRINTF'
>> contiki-netsim.a(route-discovery): In function `insert_route':
>> /home/apps/contiki-mc1322x/examples/rime/../../core/net/rime/route-discovery.c:135:
>> undefined reference to `PRINTF'
>> contiki-netsim.a(route-discovery): In function `rrep_packet_received':
>> /home/apps/contiki-mc1322x/examples/rime/../../core/net/rime/route-discovery.c:169:
>> undefined reference to `PRINTF'
>> /home/apps/contiki-mc1322x/examples/rime/../../core/net/rime/route-discovery.c:175:
>> undefined reference to `PRINTF'
>> contiki-netsim.a(route-discovery):/home/apps/contiki-mc1322x/examples/rime/../../core/net/rime/route-discovery.c:184:
>> more undefined references to `PRINTF' follow
>> collect2: ld returned 1 exit status
>> make: *** [example-abc.netsim] Error 1
>> rm example-abc.co
>> jonsmirl at terra:/home/apps/contiki-mc1322x/examples/rime$
>>
>>
>>> are higher level RIME protocols and test a lot of the RIME
>>> primitives. example-abc is the most basic RIME test. I program the
>>> RIME address into NVRAM at 0x1E000, as in the example on the website:
>>>
>>> ./mc1322x-load.pl -f flasher.bin -s example-mesh.bin -t /dev/ttyUSB0
>>> 0x1e000,0x01020304,0x05060708
>>>
>>>
>>>> What's needed to get IPV6 going?
>>>
>>> That is a good question. I haven't gotten into that yet. I do plan to
>>> work on that soon though (over the next few months).
>>>
>>> -Mar.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Jon Smirl
>> jonsmirl at gmail.com
>>
>
>
>
> --
> Jon Smirl
> jonsmirl at gmail.com
>



-- 
Jon Smirl
jonsmirl at gmail.com



More information about the mc1322x mailing list