Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    fanoush
    @fanoush
    if you checkout this https://github.com/fanoush/nrf52-legacy-bootloader and let it download SDK11 then you have both parts of the puzzle, the app part is in SDK11/components/libraries/bootloader_dfu/dfu_app_handler.c and bootloader part in https://github.com/fanoush/nrf52-legacy-bootloader/blob/master/dfu_ble_svc.c For espruino I stripped it to not pass any connection info as that is also possible. Because if anything goes wrong and peer data is not correctly passed the bootloader starts in normal mode (=adds 1 to mac address and shows as DFUTarg). Not sure why ID130 bootloader hangs instead.
    Anyway, it looks quite fragile, erasing bootloader settings page at 0x7f000 is safer and will work for sure so this is not worth it if it may hang the device.
    fanoush
    @fanoush
    the whole idea is described in SDK11 docs here and the flow is here, for IDxxx they changed how it starts (writing 0101 to 0x0AF6) but the rest is same.
    ffxx68
    @ffxx68
    hi @fanoush - I'm following this interesting discussion and owning an ID130HR I'm tempted to make the update. But, has anyone saved a backup of the stock firmware? Or is there a way to dump it? Sorry for the very basic questions... but I'm a beginner here. Thanks.
    fanoush
    @fanoush
    @ffxx68 is it the color version? I've seen there is ID130 HR which is monochrome oled. The backup for mine version is there, if you have android phone and veryfit pro app installed you can find link to your firmware by using file manager on the phone, somewhere in Android folder on your storage is folder of veryfit app and there it is in some log file (will check exact path, don't have it here now)
    @ffxx68 I do have multiple versions of firmware for ID130 color with different device id, not sure if the hardware may be different or it is only different branding. these same devices are sold by many names
    fanoush
    @fanoush
    @ffxx68 you should better check the logs before flashing to be sure you have the same version and have the link to the firmware. on the other hand I think the bootloader will refuse package for different model so if you try and the DFU procedure fails with error it means you have different device id (the espruino zip is built specifically for device with id 616). Then it will reboot back to firmware alone or the veryfit pro app will even check for such devices around and recover it for you.
    androidonis
    @androidonis
    @fanoush Hi, I received the two B5 from AE on Sat. Fortunately one seems to have a working GPS. But with the other one I (again) had bad luck. Battery was dead and when I connect it immediately says 99% and is dead again after disconnect. When I try to switch it on while connected it says 'D09D', what ever that means. I think I need to go through another dispute. @atc1441 Is there a teardown available, how to open with minimal damage?
    fanoush
    @fanoush
    @androidonis oh, bad luck, on the other hand you will have one for development for free if you win the dispute. Then maybe you don't need to open it, if erased and reflashed via SWD you may workaround bad hardware. well unless you want to replace the battery. if it shows something on screen then at least screen and CPU works.
    androidonis
    @androidonis
    From the picture @atc1441 posted it looks battery is 190624 which indicates 6mm thick, 19x24mm wide. So far this is a little exotic, would be better if 03x20x30 format would fit, as this is cheap. Still searching AE.... Any sources for cheap batteries in small format welcome!.
    atc1441
    @atc1441
    @androidonis got no teardown available, mine has a bit of damage but totally useable. Will maybe make one with the new ones from Fanoush later
    fanoush
    @fanoush
    oh, I knew you will tear them apart immediately :-)
    ffxx68
    @ffxx68
    @fanoush thanks - yes, it's the colour version. How to check for logs?
    fanoush
    @fanoush
    there are many file managers for android, I used ghost commander or there is total commander, you shoud navigate to Android folder and find some xxxxveryfitxxx folder inside and again somewhere inside in multiple folders are text files ending with .log some have device ids, some have even http link to firmware, don't have exact paths now here
    ffxx68
    @ffxx68
    will check it out
    abhigkar
    @abhigkar
    How fast I can get a B5 in UK?
    abhigkar
    @abhigkar
    Any purchase link ebay uk?
    fanoush
    @fanoush
    @ffxx68 it is /storage/emulated/0/Android/data/com.veryfit2hr.second/files/VeryfitPro/log/device_update , in first log file I see link to firmware upgrade and also device id
    fanoush
    @fanoush
    today I received another two ID130 color and one is different version 598 instead of 616 like first two, and the other is device 645, both are updated to latest firmware, each have different version as latest, first two 616 have V56 latest, the other two have version 58 and version 46, what a mess, they look otherwise identical
    fanoush
    @fanoush
    With http proxy I can see the requests the veryfit app makes and I can get links for fw update for devices 616,649 but not for 598, for that any version I send gets me response 'already the latest'
    fanoush
    @fanoush
    oh, I really need to send correct previous version, if asking for device 616 with version 54 i get nothing but with 55 I get link to v56
    fanoush
    @fanoush
    example request curl -A okhttp/3.8.0 -X POST -H "Content-Type: application/json" http://veryfitproapi.veryfitplus.com/firmware/getLatestV2 -d '{"age":99,"appVersionCode":397,"firmwareId":616,"gender":1,"mac":"FA:FB:FC:12:34:56","mobileBrand":"GT-XXXX","os":1,"version":55}'
    fanoush
    @fanoush
    oh, very funny, just flashed espruino to ID130Color with device ID 645 and the SPI pinout of all 3 SPI devices is a lot different, e.g. where button was now there is SCK. instead of [31,29,30] [19,20,-1] [26,25,27] for sck,mosi,miso there is [7,2,4] [30,29,-1] [26,25,28] so they moved almost everything around :-)
    fanoush
    @fanoush
    @ffxx68 did you figure out what your device id is? My 4 ID130s have 3 different IDs :-) And I have firmware links to yet another two different ID130 so that is at least 5 different device variants. I hope they didn't rework the board layout 5 times? That would be a mess to manage for 'same' device.
    fanoush
    @fanoush
    was testing the insanely small BLE DFU bootloader https://github.com/aykevl/nrf-dfu and was porting it to older versions of softdevice (it needs S132 6.x) and now it works for me with SDK11/S132 2.0. It completely fits into MBR = first flash page and works and provides service with 3 characteristics that can read stuff and write to flash. It may be useful as such but it is also very small example of BLE service that fits into 4KB including interrupt vectors (which normally occupy first 4KB alone)
    fanoush
    @fanoush
    was debugging it yesterday for few hours and it was always crashing into hard fault when starting advertising. was thinking I forgot something in softdevice api (as it changes a lot across SD versions) but that was OK and in the end it was caused by change of reserved interrupt vectors in SoftDevice, older SD versions used also SWI4_EGU4_IRQHandler which became free to use for application later but needs to be redirected to softdevice in my case
    fanoush
    @fanoush
    it can be hopefully used to mostly backup original firmware when there is no update available. first 4KB page has just interrupt vectors so if this fits there, it can be flashed over the original firmware and rest of FW can be recovered over bluetooth. too bad original interrupt vectors are lost and would be hard to guess but all the code to decompile would be there. An maybe those interrupt vectors could be guessed by looking into other similar FW versions and seeing where they point and how the code looks there.
    Also I hope nordic bootloader does not erase more pages than needed. Didn't try this but think the rest after flashing smaller application is not erased (for SDK11 at least).
    fanoush
    @fanoush
    anyway I couldn't believe one could fit full connectable app into such size, there is basically no code linked from Nordic SDK, just using softdevice calls directly, most of the BLE code is in this file
    androidonis
    @androidonis
    Hi, finally dispute is finished and B5 is open. But I made a bloody beginner mistake,cutting too deep and disconnected the HRS sensor. This will be a lot of work to reconnect the 6 wires. Maybe I should use the hot air gun and remove the sensor and directly connect to the pads... While removing the front glas I managed to enter a GPS test menu with 4x long press in the home screen. The battery is indeed 130mAh, same type as the replacement I had.
    grafik.png
    fanoush
    @fanoush
    @androidonis so it can be opened from both sides? not only top but also bottom? so you can replace battery while keeping the top undamaged?
    androidonis
    @androidonis
    @fanoush Yes, if you be careful and not cut the sensor connection. Cheapest I found (but you will get 10 batteries) https://m.de.aliexpress.com/item/32906239977.html
    androidonis
    @androidonis
    @fanoush What is the status with B5 alternative firmware? (https://github.com/fanoush/ds-d6/tree/master/espruino/DFU/B5) What is already supported? (Display ST7735 80x160 LCD / HR-sensor HX3313 / GPS AT6558 /Accl ??) I can add a better picture to help identify components.
    grafik.png
    fanoush
    @fanoush
    well, you get whole pinout so everything is accessible over i2c/spi and works
    fanoush
    @fanoush
    got another of those ID13x Color devices and this time it is the firmware version 630. it is some rebranded Yamay SW350 fitness tracker and on bluetooth it advertises itself as ID133Color HR. has its own FCC ID https://fccid.io/2AHFT646 the board looks like the ID130, even some FCC photos says ID130 but other show ID133. Anyway, this one was for $2 plus $2 shipping :-)
    fanoush
    @fanoush
    could not download firmware, app said it was the latest, so I switched it to DFU mode and then started veryfit app and it detected it is 'in middle of the update' and downloaded latest firmware again :-)
    fanoush
    @fanoush
    so now I get the URL to firmware zip but it is interesting that it downloaded older version then I previously had (37), updated the device and now again it says I have the latest 35 :-)
    fanoush
    @fanoush
    uploaded espruino to this Yamay/ID133, dumped SPI registers and looks like it has exactly same pinout as ID130 id 645, at least all three SPI devices and button is the same EDIT: yes same, uploaded espruino demo code for 645 and everything works
    atc1441
    @atc1441
    Cool that this dfu way worked
    fanoush
    @fanoush
    well at least this time with this device. And I got older firmware, will retry at home with http proxy to see what requests it makes to get the FW, hopefully it will work second time again
    true that the bootloader does not know/report what firmware is installed, it only knows device id, so if they want recover they need to download latest for this device
    fanoush
    @fanoush
    when compared to ID130 the ID133 is quite a bit wider while the display is same size so bigger borders around, however according to FCC photos the battery is 115mAh vs 70mAh in ID130
    scientistnobee
    @scientistnobee
    That's cool. Do you have a link for this $2 ID133
    fanoush
    @fanoush
    no, it is local auction site which is not selling abroad, seller sells it one by one. got one, then there was another same one I missed yesterday, now there is third one ending next week, asked seller if he has more to sell directly, didn't get answer yet
    came in original box with no sign of wear but no sticker on display so was probably used
    fanoush
    @fanoush
    checked his history and he is selling this since at least July this year one by one, some sold for $5 some for $3 so I was more lucky , the one I missed yesterday was sold for $4
    fanoush
    @fanoush
    he also regularly sells "VeryfitPro SW021 smartwatch" which is ID205, sells around $10. this is 52840 watch but cannot be reflashed without taking apart, I wonder where he gets them from, the Yamay SW350 box has some barcode sticker in german, probably was sold in some supermarket sale
    scientistnobee
    @scientistnobee
    Thanks for letting me know