maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Accessories (https://talk.maemo.org/forumdisplay.php?f=17)
-   -   [Announce]N900 Intergrated Qi Wireless Charging, No Soldering Required. (https://talk.maemo.org/showthread.php?t=93412)

biketool 2014-08-14 09:57

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/software and hardware mod)
 
Need some help, the permissions for this are a little messed up I think, hand entered after sudo su they go into dumb charge mode, but when I run them as a script from the .desktop button or in console nothing happens.

biketool 2014-08-14 10:55

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Ideally there is probably a way to reload BME and grep from something similar to the old linux apm several times every hour of charging. So the script could exit when the battery state reads 80-90% rather than just doing a time based charge.

biketool 2014-08-14 13:34

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
I gave up, seems that wait 21600 gets ignored by busybox, I don't know how to get past that. First post has two scripts and .desktop files so you can turn dumb charge on and off for the cheap Qi chargers, other dumb chargers, or even some broken/repaired USB ports, that actually works.

This was the final script before I broke up the scripts into on and off toggles, it executed without error but without the wait lasting six hours(21600 sec) it was useless.
Code:

#!/bin/sh
stop bme
modprobe bq2415x_charger
# edit dumb mode charge mode time below in seconds
wait 21600
rmmod bq2415x_charger
start bme
exit

save the script name as qi_charge
make it executable
Code:

sudo chmod +x qi_charge
make your .desktop file so you get a charge button among your apps
Code:

sudo vi /usr/share/applications/hildon/qi_charge.desktop
now cut/paste this in after typing i for insert
Code:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=sudo /bin/sh /home/user/MyDocs/qi_charge
Icon=make a PNG and put the path here

now hit [Esc] and [shift] ZZ
This is how to get Maemo to find the file in order for it to show up among your other apps, by placing it in /usr/share/applications/hildon/ you can stick the app button on your desktop for convenience if you like.

Estel 2014-08-14 16:17

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
As said earlier, using BME replacement instead of vanilla BME should fix all your problem, + more.

biketool 2014-08-14 18:12

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Estel, for now my only issue seems to be with busybox and the wait command, I solved that by splitting up into two scripts so we are now at 100%.
What does BME replacement actually do, or do better in this application?
BME replacement is widely talked about but unclear what it does or how to get it to install. I tried Palis BME repo and ended up having to reinstall all of my BME stuff from the normal repos to get a working BME, very little documentation that I know about.
I suspect not all of the BME chips are 100% standard because for a long doing an upgrade to the BME from dev left me with no working BME on about 50% of my then current N900s.

aramburuyy 2014-08-15 08:17

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Quote:

Originally Posted by biketool (Post 1435731)
I gave up, seems that wait 21600 gets ignored by busybox, I don't know how to get past that...

First of all, thanks for your help and all your efforts with this, Biketool. I experienced the timing issue not working from the beginning. First I tried specified time in hours or minutes as detailed the first version of the script, but neither "h" or "m" units were recognized. Then I converted into seconds (without specifying the unit) as in your example code once edited, but was totally ignored. I did run them from xTerm, didn't build the executable.

Starting and ending BME (with 'CSSU testing' and KP52) definitively works. As soon as I lay my N900 on the Qi unit starts charging (with no clear evidence of it, as already commented). But there is something that worries me quite a lot. It went from almost 0% to about 70% in roughly half an hour. That's too much and too fast. It seems to me that something is wrong as Qi charging is supposed to be slower than standard charging due to current loss inherent to the wireless technology itself.

Apart of this, there are inconsistent readings of batteries levels whenever I apply the stop/start BME process, so I cannot assure which level my battery actually is in. When I refresh readings, figures jumps up and down by a considerable amount. Maybe it has to do with the Qi receiver I'm using, maybe with the Nokia battery (in fact it is four years old, although seem to keep surprising well for its age).

The fact is that I donŽt dare to leave the device in Qi charger in a timed controller because I'm risking a fried device. I would prefer (as you already pointed out) something based in a periodic checks of charge levels, with automatic final cut off, once a reasonable and secure level is achieved.

My coding skills are null (don't ask me why I own a N900, which I swear I love and want to keep alive despite it's no my main device any more). Therefore, maybe IŽll try take your original approach: that`s shortening data pins in the MicroUSB connector itself. Yesterday I bought an standard connector in an electronics shop. But, even when it seems workable, it appears too large and clumsy for keeping it permanently plugged in the phone. Nothing to do with the nice appearance of my first try. IŽm currently searching the eBay and other Internet sites for a compact alternative. As you suggested in one of your posts: "once you get used to wireless charging, it's very hard to go back to the cable mess".

If I find something, I will post back.

biketool 2014-08-15 09:10

Re: [Announce]N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
aramburuyy,
The secondary, or non pulsing non-BME charge mode is fine to use, the phone will charge to full and then stop the charge. I don't remember if the orange light turns off or turns green at full charge. Your BL-5J battery also has over-volt and overcharge protection circuitry in addition to the N900. The reading after your restart BME will read all over the place for a bit, much like after using USB host mode, but it will settle down after a while.
I am waiting to get Pali's BME replacement correctly installed, that might work better than this solution in that the data pin shorting wouldn't be required but the N900 (pali)BME would stay on allowing normal charge monitoring.

aramburuyy 2014-08-15 09:44

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Ok then, thanks for clarifying the 'overcharge' issue.

I shall wait for a while now, IŽm going to be busy during next days, anyway, and I would try any of the new codes that might appear in this thread.

Also, bearing in mind what you told me, IŽll try to monitor the charging rate in a proper way just to check whether is just reasonable or too fast as previously afraid.

As for the MicroUsb connector modding alternative, I have found a Qi receiver that seems to have the full FIVE pins in the MicroUSB head itself, but your never know with photos featured in those Chinese e-Shops. It seems that shortening pins 2 an three could be done somehow. Although the ribbon is placed in the center of the unit, it seems long enough to be folded in a sort of "Z" shape in order to clear the N900's camera area.
Another advantage of this unit, it's the fact that it provides an output current of 1000 mAh, which doubles the 500 mAh of my current Qi receiver. Should be that useful for a quicker charger process? (which I'm not sure of being diying for...)

Anyway, I'll leave by now, And IŽll wait in order to see whether you and Pali comes here with a nice code that allows me to keep what I've got.

Thanks again for your all your kind help.

biketool 2014-08-15 10:28

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Aramburuyy,
Nice find, I suspect the data pins if assembled unshorted could be shorted at the other end of the cable with a bit of scraped insulation and twisting the wires if you don't want to solder. This charger is also a great source for conformal USB cable to be used in a sleeve for host mode gadgets or hidden under the battery cover, like this http://talk.maemo.org/showthread.php?t=91182 with the plastic cover and connectors removed.

aramburuyy 2014-08-15 12:37

Re: N900 $6 Qi wireless plug-in universal wireless charging and USB breakage protection (w/charge driver script or USB pin short mod)
 
Quote:

Originally Posted by biketool (Post 1435866)
Aramburuyy,
...I suspect the data pins if assembled unshorted could be shorted at the other end of the cable with a bit of scraped insulation and twisting the wires...

I'm afraid that although the five pins might be there (and I insist that with a Chinese sites you not always get all what you see...), no all of them are wired inside the flat ribbon.
If you look into the last two big pictures of the item at the end of the webpage, you'll observe the black sleeve somehow divided in two. My present Qi charger looks more or less the same. In fact, I suspect that inside that black ribbon runs underneath two flat copper tapes instead of the common rounded wires. Flat styled wires provides the flexibility required to fold them without breaking them easily. Those tapes works for VCC 5v and GND pins, the other three, including Data (+/-), are left orphan going nowhere. So maybe "not other end of the cable", I am afraid.

There should be a way to let drop a tiny, very tiny indeed, bubble of soldering between data pins 2 and 3 at the connector's head to bridge them... eeer... without melting the plastic housing!
That should requiere to work looking through a magnifying glass like those used in clockworks shops... or, in my case, to hire a lilliputian gnome expert willing to do the job.


All times are GMT. The time now is 19:47.

vBulletin® Version 3.8.8