Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinecil v2 doesn't work after updating to v2.21 #1661

Closed
sorgelig opened this issue Apr 9, 2023 · 111 comments · Fixed by #1730 or #1756
Closed

Pinecil v2 doesn't work after updating to v2.21 #1661

sorgelig opened this issue Apr 9, 2023 · 111 comments · Fixed by #1730 or #1756
Assignees

Comments

@sorgelig
Copy link

sorgelig commented Apr 9, 2023

Describe the bug
After flashing by blisp to v2.21 my pinecil v2 looks completely dead.

To Reproduce

  1. Flash v2.21 (Pinecilv2_EN.bin)
  2. iron looks dead, no display on screen

Expected behavior
normal work

Details of your device:

  • Device: Pinecil v2 bought on pine64 site, so should be original one.
  • Release: i don't know how to see. in flash mode it doesn't show anything on screen.
  • Power adapter being used: tried both Type-C and 5525

Additional context
v2.21 it seems doesn't work on my Pinecil v2. Thankfully, flashing v2.20 brings iron back to life.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

Update: just passed authenticity test (just for sanity). Manufacture date: February 27, 2023.
Not sure if it's ok to post ID and SN here, but should be irrelevant to issue as long as it's original.

@gamelaster
Copy link
Collaborator

No need to post it here. This looks like software issue, as rollback to v2.20 helps.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

There is no sign of exactly software/updater issue. Broken firmware also can lead to such state. Ability to flash any version of firmware comes from bootloader, and has nothing to do with software.

@gamelaster
Copy link
Collaborator

@sorgelig by software I mean firmware, but I think it can be also flasher issue.
Older blisp version had issue with bigger firmwares (those with Bluetooth), so be sure you have latest blisp.

@River-Mochi
Copy link
Contributor

Older blisp version had issue with bigger firmwares (those with Bluetooth), so be sure you have latest blisp.

Thanks for this information, we already have bunch of people updating this morning with different issues. so far all resolved and Success in the end.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

I'm using blisp 0.0.3. Windows 11.
Yes, i've tried Pinecilv2_EN.bin and also tried multi-language version bin - both give non-working iron. Also i've tried dev version which i've downloaded several days ago - also black screen.
Only flashing v2.20 brings iron to life.

I don't know what else i'm missing...

@River-Mochi
Copy link
Contributor

do you mean you also tried the earlier Beta a few days ago and also got a black screen?

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

Log of flashing:

blisp.exe write -c bl70x --reset .\Pinecilv2_EN.bin
Sending a handshake...
Handshake successful!
Getting chip info...
BootROM version 1.0.2.7, ChipID: 00003DF5221017A8
0b / 59200b (0.00%)
4092b / 59200b (6.91%)
8184b / 59200b (13.82%)
12276b / 59200b (20.74%)
16368b / 59200b (27.65%)
20460b / 59200b (34.56%)
24552b / 59200b (41.47%)
28644b / 59200b (48.39%)
32736b / 59200b (55.30%)
36828b / 59200b (62.21%)
40920b / 59200b (69.12%)
45012b / 59200b (76.03%)
49104b / 59200b (82.95%)
53196b / 59200b (89.86%)
57288b / 59200b (96.77%)
59200b / 59200b (100.00%)
Sending a handshake...
Handshake with eflash_loader successful.
Erasing flash, this might take a while...
Flashing boot header...
Flashing the firmware...
0b / 189960b (0.00%)
2052b / 189960b (1.08%)
4104b / 189960b (2.16%)
6156b / 189960b (3.24%)
8208b / 189960b (4.32%)
10260b / 189960b (5.40%)
12312b / 189960b (6.48%)
14364b / 189960b (7.56%)
16416b / 189960b (8.64%)
18468b / 189960b (9.72%)
20520b / 189960b (10.80%)
22572b / 189960b (11.88%)
24624b / 189960b (12.96%)
26676b / 189960b (14.04%)
28728b / 189960b (15.12%)
30780b / 189960b (16.20%)
32832b / 189960b (17.28%)
34884b / 189960b (18.36%)
36936b / 189960b (19.44%)
38988b / 189960b (20.52%)
41040b / 189960b (21.60%)
43092b / 189960b (22.68%)
45144b / 189960b (23.77%)
47196b / 189960b (24.85%)
49248b / 189960b (25.93%)
51300b / 189960b (27.01%)
53352b / 189960b (28.09%)
55404b / 189960b (29.17%)
57456b / 189960b (30.25%)
59508b / 189960b (31.33%)
61560b / 189960b (32.41%)
63612b / 189960b (33.49%)
65664b / 189960b (34.57%)
67716b / 189960b (35.65%)
69768b / 189960b (36.73%)
71820b / 189960b (37.81%)
73872b / 189960b (38.89%)
75924b / 189960b (39.97%)
77976b / 189960b (41.05%)
80028b / 189960b (42.13%)
82080b / 189960b (43.21%)
84132b / 189960b (44.29%)
86184b / 189960b (45.37%)
88236b / 189960b (46.45%)
90288b / 189960b (47.53%)
92340b / 189960b (48.61%)
94392b / 189960b (49.69%)
96444b / 189960b (50.77%)
98496b / 189960b (51.85%)
100548b / 189960b (52.93%)
102600b / 189960b (54.01%)
104652b / 189960b (55.09%)
106704b / 189960b (56.17%)
108756b / 189960b (57.25%)
110808b / 189960b (58.33%)
112860b / 189960b (59.41%)
114912b / 189960b (60.49%)
116964b / 189960b (61.57%)
119016b / 189960b (62.65%)
121068b / 189960b (63.73%)
123120b / 189960b (64.81%)
125172b / 189960b (65.89%)
127224b / 189960b (66.97%)
129276b / 189960b (68.05%)
131328b / 189960b (69.13%)
133380b / 189960b (70.21%)
135432b / 189960b (71.30%)
137484b / 189960b (72.38%)
139536b / 189960b (73.46%)
141588b / 189960b (74.54%)
143640b / 189960b (75.62%)
145692b / 189960b (76.70%)
147744b / 189960b (77.78%)
149796b / 189960b (78.86%)
151848b / 189960b (79.94%)
153900b / 189960b (81.02%)
155952b / 189960b (82.10%)
158004b / 189960b (83.18%)
160056b / 189960b (84.26%)
162108b / 189960b (85.34%)
164160b / 189960b (86.42%)
166212b / 189960b (87.50%)
168264b / 189960b (88.58%)
170316b / 189960b (89.66%)
172368b / 189960b (90.74%)
174420b / 189960b (91.82%)
176472b / 189960b (92.90%)
178524b / 189960b (93.98%)
180576b / 189960b (95.06%)
182628b / 189960b (96.14%)
184680b / 189960b (97.22%)
186732b / 189960b (98.30%)
188784b / 189960b (99.38%)
189960b / 189960b (100.00%)
Checking program...
Program OK!
Resetting the chip.
Flash complete!

Then re-connect - screen is black.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

do you mean you also tried the earlier Beta a few days ago and also got a black screen?

yes

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

Could you try this old Beta BIN with Bluetooth from Nov 2022 that Joric still has on his website.
This is pre-2.20 stable but has bluetooth.

doesn't work too.

@River-Mochi
Copy link
Contributor

Now we know you tried Pre-2.20 with bluetooth(nov 2022 beta), some of the 2.20xxxx with bluetooth and 2.21 with bluetooth all cause black screen. And only 2.20 with No bluetooth on it works for you.

That is the extent of my knoweledge of what to try. need to wait for Ralim and Gamiee on this.

@River-Mochi
Copy link
Contributor

River-Mochi commented Apr 9, 2023

One more thing to Try...
I'm insterested if you install 2.21 black screen is fine. then open PineSAM on browser, do you see information and Debug stuff?

2.21 all all those beta's should have Bluetooth on by default

Pinesam here: https://github.com/builder555/PineSAM Download the Premade =binary for windows and follow instructions under Premade Binaries.

pinesam helped some people with black screen.
Other thing is if you can get Pinesam up, Reset all Settings to Defaults. do that in 2.20 also.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

btw, about Joric's pre-2.20 - it's not really pre.. it's pointed to releases/latest which currently is 2.21.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

I discovered, on v2.21, if i press button+ while connecting USB then sometimes iron starts (with debug screen) and then it works normally. It only happens sometimes, not every time. So i have to try several times to make it work. Without button, it never starts.
So, for me it looks like some booting process is buggy, it doesn't wait enough for HW to initialize and then get stuck.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

Other thing is if you can get Pinesam up, Reset all Settings to Defaults. do that in 2.20 also.

i've already tried resetting before. It doesn't help.
Not sure if i want to mess with pineSAM. It involves additional variables, i will need to find a working BT dongle, etc... I don't see how it may help.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

Partial success! Once i've got it working through button+ i've disabled BT. Now it starts without problems and without button.
Basically i don't need bluetooth but i think this bug should be fixed. I don't know if my iron has broken BT or startup time is too long to make booting process hang.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

Some more info (may be useful): if i enable BT and then after several tries able to boot into debug mode, then my phone sees Pinecil BT device, so BLE is working on my iron. Just startup process somewhere hangs (when it doesn't start).
P.S.: if iron doesn't start, then phone doesn't see pinecil as well.
P.P.S: i don't need to press the button actually. I just need to connect iron to USB, wait several seconds then quickly disconnect and connect again - and it will start.

@River-Mochi
Copy link
Contributor

River-Mochi commented Apr 9, 2023

The difference with PineSam is it shows you all of the Information all the Debug, allows all setting changes too. Even if your screen is buggy, it will let you control Pinecil.
if you press (+) to heat up, then you can see on pineSAM it heats up even if screen black for example.

the premade binaries, it's 1 min to execute it and get it going with ./start script. on some windows PC with extra security you have to do command in Powershell to allow Powershell to run scripts.

@River-Mochi
Copy link
Contributor

btw, about Joric's pre-2.20 - it's not really pre.. it's pointed to releases/latest which currently is 2.21.

you are right he updated it recently to 29-03-23 version.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

PineSAM won't help. Please read my posts above. Iron really stuck in booting somewhere in BT initialization, so BT doesn't work, buttons don't work (no heat-up on button press). Disabling BT make my iron boot and work normally.

@River-Mochi
Copy link
Contributor

River-Mochi commented Apr 9, 2023

oic you don't have any Bluetooth in your PC or laptop already then . Reason I like to use it for diagnosis is if people have a black screen it tells us if the rest of the Pinecil is still working. it helps to diagonose and get all data . Complete debug is shown with all numbers/data just as if we were inside pinecil.

we have one person who messed up his screen and is still using Pinecil completely from PineSAM on his phone.

@River-Mochi
Copy link
Contributor

PineSAM won't help. Please read my posts above. Iron really stuck in booting somewhere in BT initialization, so BT doesn't work, buttons don't work (no heat-up on button press). Disabling BT make my iron boot and work normally.

Since you are able to partially get 2.21 started by pressing the (+) button go to Advanced menu, and turn off BLuetooth. and then see if it boots normally.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

Since you are able to partially get 2.21 started by pressing the (+) button go to Advanced menu, and turn off BLuetooth. and then see if it boots normally.

please read my posts above. It's already done and working.

@sorgelig
Copy link
Author

sorgelig commented Apr 9, 2023

I think it's a bug in firmware. I'm also HW and SW developer, and for me it looks like initialization process doesn't wait for some states.

@River-Mochi
Copy link
Contributor

River-Mochi commented Apr 9, 2023

I'm on a small screen right now outside with doggies.

Hopefully Ralim has work around for this . first case I've seen in with beta bLE over months of people using the Beta BLE where screen is black or partially unstable when ble enabled. could poor soldering cold joint of some part internally caused this unstable behavior.

would be interesting to see over next few weeks if other people report on this or this is unique.

@chiefos
Copy link

chiefos commented Apr 9, 2023

Yeah, have the same issue, reconnecting the cable sometimes helps to start Pinecil , sometimes not. My opinion - it isn`t caused by BLE, maybe PPS/PD negotiating issue? Hmm..

@PSandro
Copy link

PSandro commented Apr 9, 2023

I can confirm this for my pinecil v2. I just upgraded to the latest firmware. Sometimes when I plug in the USB-C cable, a black screen is shown and nothing happens. After replugging the cable, everything works fine usually. Sometimes it needs another replug.

It also works in the opposite way: I plug in the usb-c cable - everything works fine; I replug the cable and the bug appears again.

@River-Mochi
Copy link
Contributor

I just had a weird issue.
Pinepower Portible charger PD20V/65w (newer model from ~Sept 2022). I plug in cable and screen is black. I unplug and plug in again and it's fine the full 20V. I don't know if it's the charger or the firmware.
The charger was plugged in the power strip for a couple hours and unused when I tried it, don't know if this gan II charger goes into a low energy mode so that it doesn't drain a lot of electricity while sitting unused.

  • however, trying to unplug and plug in again 10 times I can not repeat the black screen.

@chiefos
Copy link

chiefos commented Apr 9, 2023

I tried some betas with ble before. Had the same issue with them.
I`m using Baseus Blade Laptop Power Bank 100W and Baseus 100W GaN USB Charger Desktop Power Strip with Baseus E-marker chip cables and also with Pine cables from the pine64.com
btw v2.20 works like a charm (with temp spikes to over 400 C, but it is well-known issue, and different story)

@Ralim
Copy link
Owner

Ralim commented Jul 2, 2023

alrighty I pushed up a different solution that would be great for someone to test if they could

@PSandro
Copy link

PSandro commented Jul 3, 2023

Thanks for the updated, I can still reproduce the bug. But now it seems to happen less often.
sha256sum: 25d9058c6625103706aaf090d0ca2cc87c18521b1778ed5e4562a383b8e5553f Pinecilv2_EN.bin
version: v2.21.4EF3584

output:

dynamic memory init success,heap size = 48 Kbyte
show flash cfg:
jedec id   0x000000
mid            0xC2
iomode         0x11
clk delay      0x01
clk invert     0x01
read reg cmd0  0x05
read reg cmd1  0x00
write reg cmd0 0x01
write reg cmd1 0x00
qe write len   0x02
cread support  0x00
cread code     0x00
burst wrap cmd 0x77
-------------------
Enable IRQ's
Pine64 Pinecilv2 Starting
BLE Starting
            Trap_Handler
mcause=30000007
mepc:23024074
mtval:00000000
Store/AMO access fault

@sorgelig
Copy link
Author

sorgelig commented Jul 3, 2023

I wonder why Pine64 cannot help with nailing the issue. They have many pinecils and definitely can find those not working after update and then test it thoughtfully or even send to Ralim. Didn't Ralim advertise them as most responsive and community oriented team? 3 months have passed and source of problem is still unclear.

@Ralim
Copy link
Owner

Ralim commented Jul 3, 2023

Thank you @PSandro

That is excellent to hear, I suspect its still and out-of ram condition.
I might upload some extra firmware for you to test.
To answer a question I've been wondering, any chance you could scan and see how many ble devices are nearby to you?
I'm wondering if this is either it doing a scan and OOM'ing or some random device querying something it cant handle.


@sorgelig

So there are a few things that need to be set straight before we go into this and before anyone starts yelling at Pine.
(1)
BLE is not a Pine advertised feature and in all design work it is not a core function of the device. This is the reason its not on the store page (Which is run by Pine) but mostly only on community pages. This decision as far as I understand was because the BL70x is a young chip on an unstable platform, and trust is not yet built up with buffalo that its bug free (for reference it definitely has bugs).

The people who should be in question for helping here are buffalo but I'll get to them in a second.

(2)
Thus all BLE is down to me deciding to build it because of community asking for it. It took a while to take the very poor mcu_sdk release at the time and cull it down enough that (1) I could ship it and (2) it sort of worked. It was always going to be a second tier goal / priority as its not required for the operation of the device at its core. and coupled with (1) It not being an advertised fully supported feature.

(3)
One can note that Buffalo no longer supports BLE or even the radio at all in the bl70x in all of the newer revisions of the SDK.
I'm running on an older SDK just so we can have BLE, even though it means its a mess for support; and will eventually become its own nightmare.

(4)
Pine64 have been great for communication and support, and its not like they don't know about this.
But they cant really do anything here. Its down to Buffalo at this point.
There are lots of other aspects of Pinecil that they do help with often but this is not one they have any control over. Buffalo have decided on their current trajectory and as of present it doesn't look to include much for the BL70x. The vibe is that they are focused on other devices at this point in time.

(5)
Additionally its been quite hard to get reliable reproductions of it, as some tests factory side didn't show the issue, nor have any of the devices I have here or other Pine staff. And yes these are across multiple batches of devices. And I've already confirmed with pine its same BL702 part number being fitted etc.


So at the moment given the above, its a bit of a goose chase to debug what is OOM'ing and not handling itself correctly.

I have narrowed it down to likely areas. If anyone in this thread is comfortable editing the code and re-flashing a bunch to try and narrow down the code I'd love to pair up with you to gain more insight.. Otherwise I'll continue my slow binary search of potential causes. I've found ways to definitely cause this to occur but they still dont 1:1 match up so its slow.

Also keep in mind that yes "3 months have passed and source of problem is still unclear", but also in those 3 months I have not been around much to actually do anything. As this is a project of "when time is available", there are long stretches where I do not open it all. Ive only really spend a few hours on this fragmented over all of that time.

@sorgelig
Copy link
Author

sorgelig commented Jul 4, 2023

Since BLE is an unavoidable part of newer firmware i suggest to turn BLE off by default. More over, it would be wise to clear this flag with EVERY flash of firmware. In that case, if some pinecil has this problem then simply reflash will fix. Those, who have no such issue and would like to use BLE will simply re-enable it after flash. So, firmware can move forward fixing other bugs while this issue can live some time without distracting.

@gamelaster
Copy link
Collaborator

Since it is hard to remotely figure out why the crash happens, I can offer someone an fully working Pinecil V2, in exchange of Pinecil V2, which crashes on v2.21 . Shipment would go from/to Slovakia, I will cover the shipment fees. If you are interested, let me know by email on gamiee (at) pine64.org . Thanks!

@aguilaair
Copy link

aguilaair commented Jul 5, 2023

I'd happily ship mine, but it has a transparent case. Do you have one that also has it, @gamelaster?

@gamelaster
Copy link
Collaborator

@aguilaair yes, eventually I can swap it. Although I see you are from USA, so that would introduce customs hassle and issues ☹️ as it would ship to Europe, so it might not be good idea. Although, thank you for offer!

@aguilaair
Copy link

aguilaair commented Jul 5, 2023

I'm currently in Spain! I study in the USA but am back in Spain for the whole summer :D

@gamelaster
Copy link
Collaborator

@aguilaair ohhh, great! Can you please contact me on Discord (gamelaster), Telegram: ( gamiee ) or on email gamiee (at) pine64.org ? Thanks!

@aguilaair
Copy link

aguilaair commented Jul 5, 2023

Sent, @gamelaster! (email)

@gamelaster gamelaster reopened this Jul 20, 2023
@gamelaster
Copy link
Collaborator

Probably closed by accident. I received affected Pinecil V2 from @aguilaair (once again big thanks!), and I will try to look on it ASAP. Hopefully we can fix it soon.

@rcmurphy
Copy link

rcmurphy commented Jul 20, 2023 via email

@Ralim Ralim mentioned this issue Jul 23, 2023
2 tasks
@Ralim
Copy link
Owner

Ralim commented Jul 23, 2023

Hello 🙇🏼

Would like to update here that I've posted a PR which has some new build assets to test at #1756.
Would be amazing if we could get some more testing by anyone affected or not affected.
The hope is that this (1) resolves the crash, and (2) gets BLE working.
I'll take (1) but realllllllly hoping for (2).

@gamelaster
Copy link
Collaborator

@sorgelig pleaes can you try? Thanks!

@sorgelig
Copy link
Author

Sure, but where to get a ready to flash firmware?

@gamelaster
Copy link
Collaborator

gamelaster commented Jul 23, 2023

@sorgelig https://github.com/Ralim/IronOS/actions/runs/5635830175?pr=1756 , in PinecilV2.zip you should have pre-built binary for test. Or you can download EN version directly here:
Pinecilv2_EN.bin.zip

@sorgelig
Copy link
Author

flashed already. It seems booting fine with BT enabled!
Now i need to find that android app for testing.
Attempt for pairing from android BT settings says "An app is needed to use this device".

@gamelaster
Copy link
Collaborator

gamelaster commented Jul 23, 2023

@sorgelig yes, app is needed, there is one made by @aguilaair but not published yet. And amazing! very happy to see it works!

@sorgelig
Copy link
Author

Just tested on Windows with PineSAM from post above. It works fine!
I can close this issue, or keep it opened till official release?

@sorgelig
Copy link
Author

Great work @Ralim!

@vadimcreates
Copy link

Well done! Just flashed mine and tested. It works normal.

@gamelaster
Copy link
Collaborator

@vadimcreates yay! Amazing to hear.
@sorgelig Great to hear that PineSAM also works 🥳 . And no need to close it, we will do it when patch gets merged into PR.

Thank you all for tests! 👍

@hasheddan
Copy link

I found this thread very informative when I was looking at some of the internals of the Pinecil v2 support in IronOS. Since there was some discussion of getting access to the UART for logs on the Pinecil v2, which causes this thread to surface for various related search terms, I thought I would drop a link to the setup I've been using with a Raspberry Pi Pico. Hope its helpful for folks who might have a few Pico's lying around! https://danielmangum.com/posts/risc-v-bytes-accessing-pinecil-uart-picoprobe/

@gamelaster
Copy link
Collaborator

That's amazing! Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet