Hello. On 13/01/15 11:36, Rohit Kulkarni wrote:
Hi everyone, I'm trying to connect the at86rf212b to a raspberry pi model b+ using SPI. I'm using the raspberry kernel 3.18.1 from here. (My working snapshot is from a couple weeks ago)
Do you have special requirements to use the raspberry pi kernel? The mainline kernel should support the basic functionality and it would be easier to get help from kernel community.
To start with, I had trouble registering the at86rf212b device. I did a bit of troubleshooting and found that the at86rf230 driver and the bcm2708_spi driver do not use the same flags when getting the IRQ (IRQ_SPI / 80) and hence the driver would fail loading with the "genirq: Flags mismatch" error. I "fixed" this by changing the bcm2708_spi driver to also use IRQF_SHARED and IRQF_TRIGGER_RISING flags that the at86rf230 driver uses when requesting the IRQ_SPI. This causes the device to be successfully registered and the new phy shows up with "iz list". Even "iz add" seems to work well! Any attempt to query the newly registered wpan device after this step just hangs the kernel. Even a simple "ifconfig" gets stuck forever. I'm guessing that my changes to the bcm2708_spi driver are incorrect and hence the hung kernel. But I'm way out of my comfort zone here and I'd appreciate any help on how to proceed here. Btw, I tried using the wpan-tools instead of the linux-zigbee tools. I have been able to build the tools but trying to run any "iwpan cmd" only prints "nl802154 not found". Again, I'm only guessing that this has to do with me running raspberry pi's kernel instead of the recommended net-next kernel. Right now I don't care much about this as long as the linux-zigbee tools can get me started.
As you are using a 3.18 kernel it is missing the netlink changes that you would need for wpan-tools.
I would recommend to use the mainline kernel on your Pi to avoid dealing with the rpi kernel specifics. Maybe not what you want to hear.
regards Stefan Schmidt -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html