From younge.edward at yahoo.com Fri Feb 3 09:27:01 2012 From: younge.edward at yahoo.com (Edward Younge) Date: Fri, 3 Feb 2012 06:27:01 -0800 (PST) Subject: [mc1322x] How to make CoAP "#define SERVER_NODE(ipaddr) uip_ip6addr(ipaddr, 0xfe80, 0, 0, 0, 0x0250, 0xc2a8, 0xcffb, 0x1e1a)" dynamic on client side ? Message-ID: <1328279221.12659.YahooMailNeo@web125114.mail.ne1.yahoo.com> Hi All, Please how can I make CoAP "#define SERVER_NODE(ipaddr)?? uip_ip6addr(ipaddr, 0xfe80, 0, 0, 0, 0x0250, 0xc2a8, 0xcffb, 0x1e1a)" dynamic on client side so that I can access different servers in a sequence ? Thanks in advance. Br, Edward -------------- next part -------------- An HTML attachment was scrubbed... URL: From mar at devl.org Fri Feb 3 11:29:56 2012 From: mar at devl.org (Mariano Alvira) Date: Fri, 3 Feb 2012 11:29:56 -0500 Subject: [mc1322x] How to make CoAP "#define SERVER_NODE(ipaddr) uip_ip6addr(ipaddr, 0xfe80, 0, 0, 0, 0x0250, 0xc2a8, 0xcffb, 0x1e1a)" dynamic on client side ? In-Reply-To: <1328279221.12659.YahooMailNeo@web125114.mail.ne1.yahoo.com> References: <1328279221.12659.YahooMailNeo@web125114.mail.ne1.yahoo.com> Message-ID: <20120203162956.GA29200@devl.org> On Fri, Feb 03, 2012 at 06:27:01AM -0800, Edward Younge wrote: > Hi All, > > Please how can I make CoAP "#define SERVER_NODE(ipaddr) uip_ip6addr(ipaddr, > 0xfe80, 0, 0, 0, 0x0250, 0xc2a8, 0xcffb, 0x1e1a)" dynamic on client side so > that I can access different servers in a sequence ? > Thanks in advance. > > Br, > Edward Looks like you just need to have some uip_ipaddr_t variables. Then set them with uip_ip6addr (which takes a pointer to a uip_ipaddr_t and modifies it). Then you can do the coap calls by passing in that uip_ipaddr_t. I haven't tried this, but something like it should work. uip_ipaddr_t addr[4]; uip_ip6addr(&addr[0], 0xaaaa, 0, 0, 0, 0, 0, 0, 1) uip_ip6addr(&addr[1], 0xaaaa, 0, 0, 0, 0, 0, 0, 2) uip_ip6addr(&addr[2], 0xaaaa, 0, 0, 0, 0, 0, 0, 3) uip_ip6addr(&addr[3], 0xaaaa, 0, 0, 0, 0, 0, 0, 4) Then do do requests on those addresses: COAP_BLOCKING_REQUEST(&addr[0], REMOTE_PORT, request, client_chunk_handler); COAP_BLOCKING_REQUEST(&addr[1], REMOTE_PORT, request, client_chunk_handler); COAP_BLOCKING_REQUEST(&addr[2], REMOTE_PORT, request, client_chunk_handler); COAP_BLOCKING_REQUEST(&addr[3], REMOTE_PORT, request, client_chunk_handler); -Mar. From younge.edward at yahoo.com Fri Feb 3 11:37:57 2012 From: younge.edward at yahoo.com (Edward Younge) Date: Fri, 3 Feb 2012 08:37:57 -0800 (PST) Subject: [mc1322x] How to make CoAP "#define SERVER_NODE(ipaddr) uip_ip6addr(ipaddr, 0xfe80, 0, 0, 0, 0x0250, 0xc2a8, 0xcffb, 0x1e1a)" dynamic on client side ? In-Reply-To: <20120203162956.GA29200@devl.org> References: <1328279221.12659.YahooMailNeo@web125114.mail.ne1.yahoo.com> <20120203162956.GA29200@devl.org> Message-ID: <1328287077.70035.YahooMailNeo@web125119.mail.ne1.yahoo.com> Hi Mar, Thanks so much! I will test it right away. Thanks again. Cheers, Edward ________________________________ From: Mariano Alvira To: Edward Younge Cc: "mc1322x at devl.org" Sent: Friday, February 3, 2012 11:29 AM Subject: Re: [mc1322x] How to make CoAP "#define SERVER_NODE(ipaddr) uip_ip6addr(ipaddr, 0xfe80, 0, 0, 0, 0x0250, 0xc2a8, 0xcffb, 0x1e1a)" dynamic on client side ? On Fri, Feb 03, 2012 at 06:27:01AM -0800, Edward Younge wrote: > Hi All, > > Please how can I make CoAP "#define SERVER_NODE(ipaddr)? uip_ip6addr(ipaddr, > 0xfe80, 0, 0, 0, 0x0250, 0xc2a8, 0xcffb, 0x1e1a)" dynamic on client side so > that I can access different servers in a sequence ? > Thanks in advance. > > Br, > Edward Looks like you just need to have some uip_ipaddr_t variables. Then set them with uip_ip6addr (which takes a pointer to a uip_ipaddr_t and modifies it). Then you can do the coap calls by passing in that uip_ipaddr_t. I haven't tried this, but something like it should work. uip_ipaddr_t addr[4]; uip_ip6addr(&addr[0], 0xaaaa, 0, 0, 0, 0, 0, 0, 1) uip_ip6addr(&addr[1], 0xaaaa, 0, 0, 0, 0, 0, 0, 2) uip_ip6addr(&addr[2], 0xaaaa, 0, 0, 0, 0, 0, 0, 3) uip_ip6addr(&addr[3], 0xaaaa, 0, 0, 0, 0, 0, 0, 4) Then do do requests on those addresses: COAP_BLOCKING_REQUEST(&addr[0], REMOTE_PORT, request, client_chunk_handler); COAP_BLOCKING_REQUEST(&addr[1], REMOTE_PORT, request, client_chunk_handler); COAP_BLOCKING_REQUEST(&addr[2], REMOTE_PORT, request, client_chunk_handler); COAP_BLOCKING_REQUEST(&addr[3], REMOTE_PORT, request, client_chunk_handler); -Mar. -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.brabants at gmail.com Sun Feb 5 15:02:58 2012 From: michel.brabants at gmail.com (Michel Brabants) Date: Sun, 5 Feb 2012 21:02:58 +0100 Subject: [mc1322x] 868 Mhz-frequency Message-ID: Hello, I'm close to ordering some mc1322x to play with, but I would like to know whether they support the 868-Mhz-channel as this seems to be the one for real future use (as I would really to like to use it in my house). So, does the mc1322x support the 868-Mhz-band? Thank you and kind regards, Michel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonsmirl at gmail.com Sun Feb 5 15:10:04 2012 From: jonsmirl at gmail.com (jonsmirl at gmail.com) Date: Sun, 5 Feb 2012 15:10:04 -0500 Subject: [mc1322x] 868 Mhz-frequency In-Reply-To: References: Message-ID: On Sun, Feb 5, 2012 at 3:02 PM, Michel Brabants wrote: > Hello, > > I'm close to ordering some mc1322x to play with, but I would like to know > whether they support the 868-Mhz-channel as this seems to be the one for > real future use (as I would really to like to use it in my house). > > So, does the mc1322x support the 868-Mhz-band? 2.4Ghz only. The TI CC430 chips are sub 1Ghz. CC430 software is in good shape if you want to use the TI proprietary code. Contiki support for CC430 is no where near the level of work that has been done for the mc13224. Note that antennas get much larger at the lower frequencies. > > Thank you and kind regards, > > Michel > > _______________________________________________ > mc1322x mailing list > mc1322x at devl.org > http://devl.org/cgi-bin/mailman/listinfo/mc1322x > -- Jon Smirl jonsmirl at gmail.com From dak664 at embarqmail.com Sun Feb 5 15:22:00 2012 From: dak664 at embarqmail.com (David Kopf) Date: Sun, 5 Feb 2012 15:22:00 -0500 Subject: [mc1322x] 868 Mhz-frequency In-Reply-To: References: Message-ID: <5AC9AC4B97D64BD3BDD101A3D8F2ED1F@DIXIE> Nope. The atmel AT86RF212 radio seems to work with the contiki RF230 driver: http://busware.de/tiki-index.php?page=RF212USB Up/down converters are available, don't know how expensive they are, or how you would match to the lower data rates. http://www.shireeninc.com/frequency-converters-10w-24ghz-900.html -----Original Message----- From: Michel Brabants Sent: Sunday, February 05, 2012 3:02 PM To: mc1322x at devl.org Subject: [mc1322x] 868 Mhz-frequency Hello, I'm close to ordering some mc1322x to play with, but I would like to know whether they support the 868-Mhz-channel as this seems to be the one for real future use (as I would really to like to use it in my house). So, does the mc1322x support the 868-Mhz-band? Thank you and kind regards, Michel From olivier at aixmarseille.com Mon Feb 6 02:27:20 2012 From: olivier at aixmarseille.com (Olivier Fauchon) Date: Mon, 06 Feb 2012 08:27:20 +0100 Subject: [mc1322x] Sourcery G++ Lite releases Message-ID: <9c8753756d238e9fd25c6b9cdeb48c2b@tecnic.oflabs.com> Hi. Instructions at "http://mc1322x.devl.org/toolchain.md" say that supported compiler is : Sourcery G++ Lite 2008q3-66 for ARM EABI ... But I can see that there exists : Sourcery G++ Lite 2011.03-41 Are the instruction up-to-date ? Any reasons for (not) upgrading the compiler ? Thanks ! Olivier -- Olivier Fauchon www.oflabs.com From mar at devl.org Mon Feb 6 06:32:51 2012 From: mar at devl.org (Mariano Alvira) Date: Mon, 6 Feb 2012 06:32:51 -0500 Subject: [mc1322x] Sourcery G++ Lite releases In-Reply-To: <9c8753756d238e9fd25c6b9cdeb48c2b@tecnic.oflabs.com> References: <9c8753756d238e9fd25c6b9cdeb48c2b@tecnic.oflabs.com> Message-ID: <20120206113251.GB10872@devl.org> The toolchain listed is the latest one that works "as is". All the later ones have an issue in our code that needs to be fixed somewhere. The issue with the newest compliers is that the ABI is different than what is used in the ROM regarding thumb interworking. To use these compliers, a stub will be necessary to do the rom calls. It's on the list of things to do, but it's not at the top of my list. I'll help anyone working on this as best I can (and gladly test/accept patches) -Mar. On Mon, Feb 06, 2012 at 08:27:20AM +0100, Olivier Fauchon wrote: > > Hi. > > > Instructions at "http://mc1322x.devl.org/toolchain.md" say that > supported compiler is : > > > Sourcery G++ Lite 2008q3-66 for ARM EABI > > > ... But I can see that there exists : > > Sourcery G++ Lite 2011.03-41 > > > > Are the instruction up-to-date ? > Any reasons for (not) upgrading the compiler ? > > Thanks ! > > Olivier > > -- > Olivier Fauchon > www.oflabs.com > > _______________________________________________ > mc1322x mailing list > mc1322x at devl.org > http://devl.org/cgi-bin/mailman/listinfo/mc1322x From michel.brabants at gmail.com Tue Feb 7 12:57:34 2012 From: michel.brabants at gmail.com (Michel Brabants) Date: Tue, 07 Feb 2012 18:57:34 +0100 Subject: [mc1322x] 868 Mhz-frequency In-Reply-To: <5AC9AC4B97D64BD3BDD101A3D8F2ED1F@DIXIE> References: <5AC9AC4B97D64BD3BDD101A3D8F2ED1F@DIXIE> Message-ID: <4F31660E.1060902@gmail.com> Hello, thank you for the info. I'll see what do. Probably I'll still order some mc1322x's from the US (OFLAB don't sell them anymore apparently) as they have good support in contiki. I'll keep an eye on the atmell-part, but I don't see any gpio-pins, which I would probably like to have to play with sensors, ... I'm a beginner, so I need something simple. I'll see how the mc1322x's perform. Thank you and kind regards, Michel Op 05-02-12 21:22, David Kopf schreef: > Nope. The atmel AT86RF212 radio seems to work with the contiki RF230 > driver: > http://busware.de/tiki-index.php?page=RF212USB > > Up/down converters are available, don't know how expensive they are, > or how you would match to the lower data rates. > http://www.shireeninc.com/frequency-converters-10w-24ghz-900.html > > -----Original Message----- From: Michel Brabants > Sent: Sunday, February 05, 2012 3:02 PM > To: mc1322x at devl.org > Subject: [mc1322x] 868 Mhz-frequency > > Hello, > > I'm close to ordering some mc1322x to play with, but I would like to > know whether they support the 868-Mhz-channel as this seems to be the > one for real future use (as I would really to like to use it in my > house). > > So, does the mc1322x support the 868-Mhz-band? > > Thank you and kind regards, > > Michel > From olivier at aixmarseille.com Sat Feb 11 04:31:55 2012 From: olivier at aixmarseille.com (Olivier Fauchon) Date: Sat, 11 Feb 2012 10:31:55 +0100 Subject: [mc1322x] scanf not working Message-ID: <67ac15c4876a674ec4a26a26dc084416@tecnic.oflabs.com> Hi, The following use of scanf: scanf(cmd, "set radio-channel %02d", &chan) fires this errror : CC libmc1322x/src/default_lowlevel.o CC (isr) libmc1322x/src/isr.o CC (romvars) libmc1322x/src/start-romvars.o AR libmc1322x/src/src-romvars.a LINK (romvars) dongle_redbee-dev.elf /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text+0x18): undefined reference to `_sbrk' /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r': writer.c:(.text+0x20): undefined reference to `_write' /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r': closer.c:(.text+0x18): undefined reference to `_close' /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r': lseekr.c:(.text+0x20): undefined reference to `_lseek' /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r': readr.c:(.text+0x20): undefined reference to `_read' /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r': fstatr.c:(.text+0x1c): undefined reference to `_fstat' /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r': isattyr.c:(.text+0x18): undefined reference to `_isatty' collect2: ld returned 1 exit status make[1]: *** [dongle_redbee-dev.elf] Error 1 Is scanf available in libmc1322x ? -- Olivier Fauchon www.oflabs.com From mar at devl.org Sat Feb 11 07:36:32 2012 From: mar at devl.org (Mariano Alvira) Date: Sat, 11 Feb 2012 07:36:32 -0500 Subject: [mc1322x] scanf not working In-Reply-To: <67ac15c4876a674ec4a26a26dc084416@tecnic.oflabs.com> References: <67ac15c4876a674ec4a26a26dc084416@tecnic.oflabs.com> Message-ID: <20120211123632.GA25083@devl.org> On Sat, Feb 11, 2012 at 10:31:55AM +0100, Olivier Fauchon wrote: > > /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): > In function `_sbrk_r': > sbrkr.c:(.text+0x18): undefined reference to `_sbrk' > /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): > In function `_write_r': > writer.c:(.text+0x20): undefined reference to `_write' > /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): > In function `_close_r': > closer.c:(.text+0x18): undefined reference to `_close' > /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): > In function `_lseek_r': > lseekr.c:(.text+0x20): undefined reference to `_lseek' > /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): > In function `_read_r': > readr.c:(.text+0x20): undefined reference to `_read' > /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): > In function `_fstat_r': > fstatr.c:(.text+0x1c): undefined reference to `_fstat' > /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): > In function `_isatty_r': > isattyr.c:(.text+0x18): undefined reference to `_isatty' > collect2: ld returned 1 exit status > make[1]: *** [dongle_redbee-dev.elf] Error 1 > > Is scanf available in libmc1322x ? This is a good general explanation of the problem: http://stackoverflow.com/questions/6493122/missing-something-in-arm-g I have implemented _sbrk, which manages the heap, in contiki. You can find _sbrk in cpu/mc1322x/contiki-misc.c and the heap is allocated in cpu/mc1322x/mc1322x.lds But you'll probably still need the others: _write, _open, _lseek etc... In Contiki, I use the dbg-io under cpu/arm/common for many stdio calls. I looked but it doesn't have scanf. You could use the Contiki shell to do what you are doing, although you'll still have to manually parse strings. -Mar. From olivier at aixmarseille.com Sat Feb 11 13:43:57 2012 From: olivier at aixmarseille.com (Olivier Fauchon) Date: Sat, 11 Feb 2012 19:43:57 +0100 Subject: [mc1322x] scanf not working In-Reply-To: <20120211123632.GA25083@devl.org> References: <67ac15c4876a674ec4a26a26dc084416@tecnic.oflabs.com> <20120211123632.GA25083@devl.org> Message-ID: Thx for the explanation. I'll write my own parsing function. On Sat, 11 Feb 2012 07:36:32 -0500, Mariano Alvira wrote: > On Sat, Feb 11, 2012 at 10:31:55AM +0100, Olivier Fauchon wrote: >> >> >> /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): >> In function `_sbrk_r': >> sbrkr.c:(.text+0x18): undefined reference to `_sbrk' >> >> /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): >> In function `_write_r': >> writer.c:(.text+0x20): undefined reference to `_write' >> >> /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): >> In function `_close_r': >> closer.c:(.text+0x18): undefined reference to `_close' >> >> /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): >> In function `_lseek_r': >> lseekr.c:(.text+0x20): undefined reference to `_lseek' >> >> /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): >> In function `_read_r': >> readr.c:(.text+0x20): undefined reference to `_read' >> >> /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): >> In function `_fstat_r': >> fstatr.c:(.text+0x1c): undefined reference to `_fstat' >> >> /home/olivier/arm-2008q3/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): >> In function `_isatty_r': >> isattyr.c:(.text+0x18): undefined reference to `_isatty' >> collect2: ld returned 1 exit status >> make[1]: *** [dongle_redbee-dev.elf] Error 1 >> >> Is scanf available in libmc1322x ? > > This is a good general explanation of the problem: > > > http://stackoverflow.com/questions/6493122/missing-something-in-arm-g > > I have implemented _sbrk, which manages the heap, in contiki. You can > find _sbrk in cpu/mc1322x/contiki-misc.c and the heap is allocated in > cpu/mc1322x/mc1322x.lds > > But you'll probably still need the others: _write, _open, _lseek > etc... > > In Contiki, I use the dbg-io under cpu/arm/common for many stdio > calls. I looked but it doesn't have scanf. You could use the Contiki > shell to do what you are doing, although you'll still have to > manually > parse strings. > > -Mar. -- Olivier Fauchon www.oflabs.com From errordeveloper at gmail.com Fri Feb 17 12:22:05 2012 From: errordeveloper at gmail.com (Ilya Dmitrichenko) Date: Fri, 17 Feb 2012 17:22:05 +0000 Subject: [mc1322x] CS 2008q3 toolchain on Mac OS Message-ID: Hi Mariano and everyone! I have just managed to build the 2008q3 toolchain on Darwin (Lion), the notes are here: https://gist.github.com/1854389 It seems to be working fine, haven't tested the code on the target yet - need to sort out the tun/tap interface first. Mariano, may be you could file it under mc1322x.devl.org/mac.html so anyone can find it? This doc currently suggest to use ports, but I actually don't use ports and kind of felt that building this manually would be a good thing to do anyway! I could also tar it up, though someone will need to test whether binaries work on their system (what worry about is the linking with libraries). Who ever needs it should be able to follow my notes anyhow :) Hope this would be useful to someone :) I'll follow up with some more stuff - on how to get tun/tap working (I hope http://tuntaposx.sourceforge.net/ will do the job). Cheers, -- Ilya From mar at devl.org Fri Feb 17 13:30:01 2012 From: mar at devl.org (Mariano Alvira) Date: Fri, 17 Feb 2012 13:30:01 -0500 Subject: [mc1322x] CS 2008q3 toolchain on Mac OS In-Reply-To: References: Message-ID: <20120217183001.GA22852@devl.org> On Fri, Feb 17, 2012 at 05:22:05PM +0000, Ilya Dmitrichenko wrote: > > Mariano, may be you could file it under mc1322x.devl.org/mac.html so > anyone can find it? This doc currently suggest to use ports, but I > actually don't use ports and kind of felt that building this manually > would be a good thing to do anyway! I could also tar it up, though > someone will need to test whether binaries work on their system (what > worry about is the linking with libraries). Who ever needs it should > be able to follow my notes anyhow :) Ok done. Thank you! I have a Mac here that I barely know how to use. At somepoint I'm sure your guide will help me. -Mar. From olivier at aixmarseille.com Sun Feb 19 11:15:08 2012 From: olivier at aixmarseille.com (Olivier Fauchon) Date: Sun, 19 Feb 2012 17:15:08 +0100 Subject: [mc1322x] =?utf-8?q?fill=5Fpacket_=26_no-ack_bit?= Message-ID: Hi. I use MACA tx_packet and rx_packet for RAW communication between my boards. In the above fill_packet function, 3rd bit of data[0] is set. Does this mean the data[0] is a reserved byte, and should not be used as payload ? Thx . void fill_packet(volatile packet_t *p) { static volatile uint8_t count=0; volatile uint8_t i; p->length = PAYLOAD_LEN; p->offset = 0; for(i=0; idata[i] = count++; } /* acks get treated differently, even in promiscuous mode */ /* setting the third bit makes sure that we never send an ack */ /* or any valid 802.15.4-2006 packet */ p->data[0] |= (1 << 3); } -- Olivier Fauchon www.oflabs.com From dak664 at embarqmail.com Sun Feb 19 11:44:05 2012 From: dak664 at embarqmail.com (David Kopf) Date: Sun, 19 Feb 2012 11:44:05 -0500 Subject: [mc1322x] fill_packet & no-ack bit In-Reply-To: References: Message-ID: <67E24ECE92AE49958C1AA439DCA58D6F@DIXIE> That would appear to be the 802.15.4 security bit: Frame Control Field: Data (0xcc61) .... .... .... .001 = Frame Type: Data (0x0001) .... .... .... 0... = Security Enabled: False .... .... ...0 .... = Frame Pending: False .... .... ..1. .... = Acknowledge Request: True .... .... .1.. .... = Intra-PAN: True .... 11.. .... .... = Destination Addressing Mode: Long/64-bit (0x0003) ..00 .... .... .... = Frame Version: 0 11.. .... .... .... = Source Addressing Mode: Long/64-bit (0x0003) Not sure how the radio handles that, but if some some chance everything checked out it could wait for an ack? Seems that clearing bit 5 would guarantee that. -----Original Message----- From: Olivier Fauchon Sent: Sunday, February 19, 2012 11:15 AM To: mc1322x at devl.org Subject: [mc1322x] fill_packet & no-ack bit Hi. I use MACA tx_packet and rx_packet for RAW communication between my boards. In the above fill_packet function, 3rd bit of data[0] is set. Does this mean the data[0] is a reserved byte, and should not be used as payload ? Thx . void fill_packet(volatile packet_t *p) { static volatile uint8_t count=0; volatile uint8_t i; p->length = PAYLOAD_LEN; p->offset = 0; for(i=0; idata[i] = count++; } /* acks get treated differently, even in promiscuous mode */ /* setting the third bit makes sure that we never send an ack */ /* or any valid 802.15.4-2006 packet */ p->data[0] |= (1 << 3); } -- Olivier Fauchon www.oflabs.com _______________________________________________ mc1322x mailing list mc1322x at devl.org http://devl.org/cgi-bin/mailman/listinfo/mc1322x From mar at devl.org Sun Feb 19 12:40:54 2012 From: mar at devl.org (Mariano Alvira) Date: Sun, 19 Feb 2012 12:40:54 -0500 Subject: [mc1322x] fill_packet & no-ack bit In-Reply-To: References: Message-ID: <20120219174054.GA756@devl.org> Re: david's comment --- I thought I determined this was the ack bit.. but maybe I'm wrong. Re: Oliver, yes, that is correct. If you want to use these radios for raw bytes (i.e. no 802.15.4 framing) you need to avoid setting that bit however you see fit. In contiki, I added a "raw" mode that always sets that first byte to 0xff and strips in off on receive. -Mar. On Sun, Feb 19, 2012 at 05:15:08PM +0100, Olivier Fauchon wrote: > Hi. > > I use MACA tx_packet and rx_packet for RAW communication between my > boards. > > In the above fill_packet function, 3rd bit of data[0] is set. > > Does this mean the data[0] is a reserved byte, and should not be used > as payload ? > > > Thx . > > > > void fill_packet(volatile packet_t *p) { > static volatile uint8_t count=0; > volatile uint8_t i; > p->length = PAYLOAD_LEN; > p->offset = 0; > for(i=0; i p->data[i] = count++; > } > > /* acks get treated differently, even in promiscuous mode */ > /* setting the third bit makes sure that we never send an ack */ > /* or any valid 802.15.4-2006 packet */ > p->data[0] |= (1 << 3); > } > > -- > Olivier Fauchon > www.oflabs.com > > _______________________________________________ > mc1322x mailing list > mc1322x at devl.org > http://devl.org/cgi-bin/mailman/listinfo/mc1322x From serteckian at gmail.com Mon Feb 27 08:53:58 2012 From: serteckian at gmail.com (Sergio Valcarcel) Date: Mon, 27 Feb 2012 14:53:58 +0100 Subject: [mc1322x] How to interface econotag with leds or LCD Message-ID: Hi, I would like to interface some led first, and then a simple LDC (maybe 8 bit parallel interface, or even UART). I have been checking the layout but I would appreciate your advice. 1) For some led, which outputs would you recommend? How can I switch them on in Contiki? 2) For an LCD with* *8 bit parallel interface, which port (pins) should I use? Again, will it be as easy as to write in the GPIO under Contiki? 3) For an LCD with UART, could I use the UART2 in JP18 and JP19? Could I access the UART2 in Contiki? may I have to implement a printf2uart2 ? Thanks so much in advance!! Best regards, Sergio -------------- next part -------------- An HTML attachment was scrubbed... URL: From mar at devl.org Mon Feb 27 09:12:02 2012 From: mar at devl.org (Mariano Alvira) Date: Mon, 27 Feb 2012 09:12:02 -0500 Subject: [mc1322x] How to interface econotag with leds or LCD In-Reply-To: References: Message-ID: <20120227141202.GC1779@devl.org> On Mon, Feb 27, 2012 at 02:53:58PM +0100, Sergio Valcarcel wrote: > Hi, > > 1) For some led, which outputs would you recommend? How can I switch them on in > Contiki? Just about any of them will work --- they all have a GPIO mode. KBI0-7 behave differently in sleep mode. Contiki has a primitive "led driver" but I wouldn't bother with it. Just use the GPIO registers on the mc13224v directly. The top of gpio.h has a good example. Generally you need to set the function for a pin (to 3 for gpio). Set it as an output, then you can pull the pin high or low. E.g: #define MY_PIN GPIO_08 GPIO->FUNC_SEL.MY_PIN = 3; //set GPIO mode (3 works for every pin) GPIO->PAD_DIR_SET.MY_PIN = 1; //set as output GPIO->DATA.MY_PIN = 1; //go high GPIO->DATA.MY_PIN = 0; //low > > 2) For an LCD with 8 bit parallel interface, which port (pins) should I use? I'd use the 8 pins that are easiest to wire up. Think about your application and use pins that have functions you don't need. If you are making a sensor, you probably want to keep an ADC free. If you aren't using SPI or SSI or I2C you could use all those pins. > Again, will it be as easy as to write in the GPIO under Contiki? Yes. After you do the few lines of setup, then you just need a line here and there to set the pins. > > 3) For an LCD with UART, could I use the UART2 in JP18 and JP19? Could I access > the UART2 in Contiki? may I have to implement a printf2uart2 ? uart2 works just like uart1. printf used putc to write characters and this is set on uart1. Using printf for both uarts will be difficult. -Mar. k From jonsmirl at gmail.com Mon Feb 27 09:23:36 2012 From: jonsmirl at gmail.com (jonsmirl at gmail.com) Date: Mon, 27 Feb 2012 09:23:36 -0500 Subject: [mc1322x] How to interface econotag with leds or LCD In-Reply-To: References: Message-ID: There is likely to be a mc13224 board coming out in the future with a SPI display like this or similar... It is 128x64 graphics and was picked since the pins are easier to mount that a flex cable. http://www.newhavendisplay.com/index.php?main_page=product_info&cPath=3_114&products_id=4161 $15.50 is Q1 price, you can get them under $5.00 in volume. Project is about six month out so there is no code yet. Mar would love it if someone got the code ready before he finishes the board. -- Jon Smirl jonsmirl at gmail.com From dak664 at embarqmail.com Mon Feb 27 09:55:24 2012 From: dak664 at embarqmail.com (David Kopf) Date: Mon, 27 Feb 2012 09:55:24 -0500 Subject: [mc1322x] How to interface econotag with leds or LCD In-Reply-To: <20120227141202.GC1779@devl.org> References: <20120227141202.GC1779@devl.org> Message-ID: It appears putc is used only once in printf.c lib/printf.c:#define __putc(x) uart1_putc(x) lib/printf.c: __putc( (uint8_t)c ); So probably you could just fake the stdout calls with define __putc1(x) uart1_putc(x) define __putc2(x) uart2_putc(x) statuc uint8_t stdout_port; ... void rs232_redirect_stdout (uint8_t port) { stdout_port = port; } ... if (stdout_port == 0) { __putc1( (uint8_t)c ); } else if (stdout_port == 1) __putc2( (uint8_t)c ); } -----Original Message----- From: Mariano Alvira Sent: Monday, February 27, 2012 9:12 AM To: Sergio Valcarcel Cc: mc1322x Subject: Re: [mc1322x] How to interface econotag with leds or LCD uart2 works just like uart1. printf used putc to write characters and this is set on uart1. Using printf for both uarts will be difficult. From serteckian at gmail.com Mon Feb 27 10:35:24 2012 From: serteckian at gmail.com (Sergio Valcarcel) Date: Mon, 27 Feb 2012 16:35:24 +0100 Subject: [mc1322x] How to interface econotag with leds or LCD In-Reply-To: References: <20120227141202.GC1779@devl.org> Message-ID: Thank you very much for your great support!!! We will test them in the next days. That board would be great, I would buy a few of them right now... On Mon, Feb 27, 2012 at 3:55 PM, David Kopf wrote: > It appears putc is used only once in printf.c > lib/printf.c:#define __putc(x) uart1_putc(x) > lib/printf.c: __putc( (uint8_t)c ); > > So probably you could just fake the stdout calls with > > define __putc1(x) uart1_putc(x) > define __putc2(x) uart2_putc(x) > statuc uint8_t stdout_port; > ... > void rs232_redirect_stdout (uint8_t port) { > stdout_port = port; > } > ... > if (stdout_port == 0) { > __putc1( (uint8_t)c ); > } else if (stdout_port == 1) __putc2( (uint8_t)c ); > } > > -----Original Message----- From: Mariano Alvira Sent: Monday, February 27, > 2012 9:12 AM To: Sergio Valcarcel Cc: mc1322x Subject: Re: [mc1322x] How to > interface econotag with leds or LCD > uart2 works just like uart1. printf used putc to write characters and > this is set on uart1. Using printf for both uarts will be difficult. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivier at aixmarseille.com Tue Feb 28 11:21:41 2012 From: olivier at aixmarseille.com (Olivier Fauchon) Date: Tue, 28 Feb 2012 17:21:41 +0100 Subject: [mc1322x] Program redbee 802.15.4 module Message-ID: <9d8a8dc16bfef7045944c8d3adc14e7b@tecnic.oflabs.com> Hi. I can work with econotags, but now I'd like to load my code on the miniature redbee 802.15.4 module http://www.redwirellc.com/store/node/3 How would you interface to this board, and what tools you you use for loading your .bin ? Thx ! -- Olivier Fauchon www.oflabs.com From mar at devl.org Tue Feb 28 14:39:37 2012 From: mar at devl.org (Mariano Alvira) Date: Tue, 28 Feb 2012 14:39:37 -0500 Subject: [mc1322x] Program redbee 802.15.4 module In-Reply-To: <9d8a8dc16bfef7045944c8d3adc14e7b@tecnic.oflabs.com> References: <9d8a8dc16bfef7045944c8d3adc14e7b@tecnic.oflabs.com> Message-ID: <20120228193937.GB8857@devl.org> On Tue, Feb 28, 2012 at 05:21:41PM +0100, Olivier Fauchon wrote: > Hi. > > I can work with econotags, but now I'd like to load my code on the > miniature redbee 802.15.4 module This is the connector that is on the module: Mouser: 649-87024-625LF http://www.mouser.com/ProductDetail/FCI/87024-625LF/?qs=sGAEpiMZZMsuqxDVcGs5qFRtY4zpsJb3RgsCLRBYNjU%3d And this is the mating connector: Mouser: 649-87409-125LF http://www.mouser.com/ProductDetail/FCI/87409-125LF/?qs=sGAEpiMZZMtsLRyDR9nM17T5O64KcyU3Zr%252bjEpV7mrQ%3d The pinout can be found on the schematic here: http://mc1322x.devl.org/hardware.html#module Normally I interface with them over UART1 (like the econotag...) and use the same tools (mc1322x-load.pl and bbmc) -Mar. From dak664 at embarqmail.com Tue Feb 28 14:49:58 2012 From: dak664 at embarqmail.com (David Kopf) Date: Tue, 28 Feb 2012 14:49:58 -0500 Subject: [mc1322x] Program redbee 802.15.4 module In-Reply-To: <20120228193937.GB8857@devl.org> References: <9d8a8dc16bfef7045944c8d3adc14e7b@tecnic.oflabs.com> <20120228193937.GB8857@devl.org> Message-ID: <42EE9FA15BD64408A32ED4A5310FEEE5@DIXIE> NIce picture, I just spent an hour with a webcam on a stand to get one not half so good. Lighting to read the chip markings is *hard*. http://rpl.dakx.com shows it, with links to the econotag rpl-contikimac mesh. That is ipv6 only, but accessible from http://rpl.dakx.com.ipv4.sixxs.org (all but the ajax push pages). -----Original Message----- From: Mariano Alvira Sent: Tuesday, February 28, 2012 2:39 PM To: Olivier Fauchon Cc: mc1322x at devl.org Subject: Re: [mc1322x] Program redbee 802.15.4 module The pinout can be found on the schematic here: http://mc1322x.devl.org/hardware.html#module From olivier at aixmarseille.com Wed Feb 29 04:48:16 2012 From: olivier at aixmarseille.com (Olivier Fauchon) Date: Wed, 29 Feb 2012 10:48:16 +0100 Subject: [mc1322x] Program redbee 802.15.4 module In-Reply-To: <9d8a8dc16bfef7045944c8d3adc14e7b@tecnic.oflabs.com> References: <9d8a8dc16bfef7045944c8d3adc14e7b@tecnic.oflabs.com> Message-ID: <3dfc232d25daa65d46e5640b1835dc86@tecnic.oflabs.com> Hi. econotag-r2-sch.pdf circuit tells me that the FT2232HL is connect to MC1322X this way : * Serial Data : - BDBUS0 -> TX_ET_OUT - BDBUS1 -> RX_ET_OUT * Control data: - ACBUS2 -> SRST - ACBUS6 -> VREF2H - BDBUS2 -> RST_ET_OUT Is that enough ? On Tue, 28 Feb 2012 17:21:41 +0100, Olivier Fauchon wrote: > Hi. > > I can work with econotags, but now I'd like to load my code on the > miniature redbee 802.15.4 module > > http://www.redwirellc.com/store/node/3 > > > How would you interface to this board, and what tools you you use for > loading your .bin ? > > Thx ! -- Olivier Fauchon www.oflabs.com From mar at devl.org Wed Feb 29 07:47:33 2012 From: mar at devl.org (Mariano Alvira) Date: Wed, 29 Feb 2012 07:47:33 -0500 Subject: [mc1322x] Program redbee 802.15.4 module In-Reply-To: <3dfc232d25daa65d46e5640b1835dc86@tecnic.oflabs.com> References: <9d8a8dc16bfef7045944c8d3adc14e7b@tecnic.oflabs.com> <3dfc232d25daa65d46e5640b1835dc86@tecnic.oflabs.com> Message-ID: <20120229124733.GB22652@devl.org> The minimum connections I'd suggest are: 3v3 GND RTS: GND (needs to be gnd on reset to enter UART1 bootload) U1RX U1TX RESETB VREF2H VREF2L (you need both VREF2 pins to erase) -Mar. On Wed, Feb 29, 2012 at 10:48:16AM +0100, Olivier Fauchon wrote: > Hi. > > econotag-r2-sch.pdf circuit tells me that the FT2232HL is connect to > MC1322X this way : > > * Serial Data : > - BDBUS0 -> TX_ET_OUT > - BDBUS1 -> RX_ET_OUT > > * Control data: > - ACBUS2 -> SRST > - ACBUS6 -> VREF2H > - BDBUS2 -> RST_ET_OUT > > Is that enough ? > > > > > On Tue, 28 Feb 2012 17:21:41 +0100, Olivier Fauchon wrote: > >Hi. > > > >I can work with econotags, but now I'd like to load my code on the > >miniature redbee 802.15.4 module > > > >http://www.redwirellc.com/store/node/3 > > > > > >How would you interface to this board, and what tools you you use for > >loading your .bin ? > > > >Thx ! > > -- > Olivier Fauchon > www.oflabs.com > > _______________________________________________ > mc1322x mailing list > mc1322x at devl.org > http://devl.org/cgi-bin/mailman/listinfo/mc1322x