Hello, On Wed, Dec 21, 2011 at 12:06 PM, M Pouillot <m.pouil...@watteco.com> wrote: > Hello all, > > > > I need to implement a 6lowpan linux driver for the CC2530 from TI. This > transceiver purposes its own serial protocol to manage its Z-MAC (embedded > 802.15.4 Mac layer). I see Linux-Zigbee allows hardMAC (for transceiver > embedded Mac layer) or serial driver for which is necessary to have a > 802-15-4 linux implementation. So what is the best way for me to implement > my specific device (serial + hardMAC)? May be there is a near > implementation…
You should implement a HardMAC level driver. Basically it is a plain networking driver (as most other Linux networking drivers are). It should pass MAC-level frames to the kernel via netif_rx() interface. You will get frames MAC-level frames from upper layers via ndo_hard_xmit() callback as usual network devices do. On top of that you will have to implement wpan_phy interface to control 802.15.4 specific behaviour of your device (see fakehard.c). serial.c driver from linux-zigbee source tree should not be of real help for you, other than study how to implement a tty line discipline. You need to implement new tty linedisc that will handle your serial protocol. > > By the way for the HardMAC implementation, I don't understand in the > fakehard.c example how are received the data and how are sent to the higher > layer? fakehard.c is a simple example that provides no real data handling. Please follow other tutorials (statrting from Linux Device Drivers book) on how to implement network drivers. You will have to set fields correctly (ARPHDR_IEEE802154, etc.). Also you will have to fill in the control block correctly for the packet to be parsed by upper 802.15.4 layers. -- With best wishes Dmitry ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel