Skip to contentSkip to conversation

AT86RF212 based USB-Stick (HUL)

DISCUSSION Stefan Schmidt 2 participants 4 messages Aug 29, 2017 – Sep 11, 2017 1 message not in the archive IEEE 802.15.4

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello.

Quoted 3 lines · Josef Filzmaier

No problems spotted so far. Good job! :)

Very good :) I am currently on vacation but will be available again late next week. I will then update my patches. Where can i find the net-next repository?

I meant bluetooth-next here. Sorry for giving the wrong name. The repo can be found here:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/

Quoted 10 lines

It arrived, thanks a lot. How would I go about flashing it? I build the firmware already but I'm a bit unsure how the flashing would go. Do I need JTAG or SPI or can it be done with the Atmel DFU variant (I think the tool is called dfu-programmer)?

What would be the commandline for the flashing? Would be nice if we could document that for others.

I used the following commands which worked for me:

Thanks.

Quoted 2 lines

avr-objcopy -O ihex -R .signature -R .fuse -R .eeprom hulusb.elf hulusb.hex

We should integrate that into the Makefile when building for hulusb.

Quoted 1 line

dfu-programmer at90usb1287 flash hulusb.hex

That worked and I was able to flash the device and bring it up with the patched driver. It showed up correctly as subHGz device in iwpan. I have no other device to test against but I can trust you on this. Please go ahead and send your final patches to the list so we can get them into the firmware and kernel.

I only have one odd thing related to the flashing process. The device you got me comes up in LUFA DFU bootloader mode with the green and red led blinking alternately. In this mode I can use the flash command you gave me above. After the flashing it will stay in this mode and I have to issue a

dfu-programmer at90usb1287 reset

to get into the firmware/application. After that the device enumerates and the atusb driver takes care of it.

That would be all fine if it only would be the case for the initial flashing. For me the device always comes up in the bootloader mode, though. I have to issue the reset command (not the flashing) each time I plug it in.

Did I miss something here? Any trick to have the device boot the firmware directly and only go into bootloader mode if the program button on the back side is pressed?

regards
Stefan Schmidt

#2 lore raw

Hello

Quoted 5 lines

That worked and I was able to flash the device and bring it up with the patched driver. It showed up correctly as subHGz device in iwpan. I have no other device to test against but I can trust you on this. Please go ahead and send your final patches to the list so we can get them into the firmware and kernel.

I have used git send-mail to do so. However, i have found a small bug within the firmware after i sent the patch. (Caused by moving code between commits) What is the procedure if i want to re-submit a patch(set) to the mailing list?

Also, how does the review process work?

Quoted 11 lines

I only have one odd thing related to the flashing process. The device you got me comes up in LUFA DFU bootloader mode with the green and red led blinking alternately. In this mode I can use the flash command you gave me above. After the flashing it will stay in this mode and I have to issue a

dfu-programmer at90usb1287 reset

to get into the firmware/application. After that the device enumerates and the atusb driver takes care of it.

Quoted 8 lines

That would be all fine if it only would be the case for the initial flashing. For me the device always comes up in the bootloader mode, though. I have to issue the reset command (not the flashing) each time I plug it in.

Did I miss something here? Any trick to have the device boot the firmware directly and only go into bootloader mode if the program button on the back side is pressed?

We did apply a custom bootloader here because this is the behaviour we need in order to deliver updates.

Greetings,
Josef

Signature · 1 line
Josef Filzmaier
#3 lore raw

Hello.

Quoted 11 lines · Josef Filzmaier

Hello

Quoted 5 lines

That worked and I was able to flash the device and bring it up with the patched driver. It showed up correctly as subHGz device in iwpan. I have no other device to test against but I can trust you on this. Please go ahead and send your final patches to the list so we can get them into the firmware and kernel.

I have used git send-mail to do so. However, i have found a small bug within the firmware after i sent the patch. (Caused by moving code between commits) What is the procedure if i want to re-submit a patch(set) to the mailing list?

You would re-send the updated patches with a v2 or similar in the subject prefix.

Quoted 1 line

Also, how does the review process work?

I will have a look at your patches again, review the code, run them through some scripts and build testing here and give you feedback.
Once I am happy with them I will give you my Acked-By line in a reply for the kernel patch and it should get picked up in a git tree and find its way to Linus tree from there.

The firmware patch I will take directly into the corresponding git repo. And once I do a new release of the frimware I will generate the binaries and make sure they are updated in linux-firmware.

Quoted 16 lines
Quoted 16 lines

I only have one odd thing related to the flashing process. The device you got me comes up in LUFA DFU bootloader mode with the green and red led blinking alternately. In this mode I can use the flash command you gave me above. After the flashing it will stay in this mode and I have to issue a

dfu-programmer at90usb1287 reset

to get into the firmware/application. After that the device enumerates and the atusb driver takes care of it.

That would be all fine if it only would be the case for the initial flashing. For me the device always comes up in the bootloader mode, though. I have to issue the reset command (not the flashing) each time I plug it in.

Quoted 6 lines
Quoted 3 lines

Did I miss something here? Any trick to have the device boot the firmware directly and only go into bootloader mode if the program button on the back side is pressed?

We did apply a custom bootloader here because this is the behaviour we need in order to deliver updates.

Oh, that explains it. :) For my use case of testing the driver against the hardware I can deal with it. Having a bootloader available to be flashed which jumps directly into the firmware might be nice for others though.

regards
Stefan Schmidt

#4 lore raw

Hello!

Quoted 2 lines

You would re-send the updated patches with a v2 or similar in the subject prefix.

I have corrected the firmware patch and sent it again with a v2 indicator.
The patch for the kernel is not affected and is now working fine for over a week on my system.

regards
Josef Filzmaier

Signature · 1 line
Josef Filzmaier