Secret Code - G1 Android Development

Here is what I found from the source code, anymore?
*#06# Display IMEI
*#*#8351#*#* Voice Dialer Logging Enabled
*#*#8350#*#* Voice Dialer Logging Disabled
*#*#4636#*#* Phone Setting
*#*#7262626#*#* FieldTest

android.provider.Telephony.SECRETE_CODE
Already know that 5 Secret Code but could not find any thing which can out it into Diagnostic Mode which was there in Windows Mobile.
Please Upload the Source code also so every body also start searching for something very usefull.

hetaldp said:
android.provider.Telephony.SECRETE_CODE
Already know that 5 Secret Code but could not find any thing which can out it into Diagnostic Mode which was there in Windows Mobile.
Please Upload the Source code also so every body also start searching for something very usefull.
Click to expand...
Click to collapse
The source code is online and available VIA git
And if you are trying to use the field test use anycut to make a shortcut on the desktop and it has a menu item to output diagnostics.
Of course if you have DDMS or Eclipse you can output diagnostics as well.. I believe they have a linux boot image on open handset alliance

those aren't that secret, and aren't anything special.
Any app can register a "secret code" and they are specified in the manifest.xml file.
most of the time those numbers are things like "INFO" and are a lot easier to remember if you think of them that way instead of the digits.

We talking abiut the Diagnostic Mode of Phone Radio so we can plug the Phone into USB and get QxDM (Qualcomm Extendible Diagnostic Mode) Software and look into Radio NVItem from 0 to 4000. DDMS is useless for that kinda Stuff. Radio Software is build using Some Different Core other then Linux, i have seen commnet of CMonex He said it the same as General other Radio, Remeber Radio and Android is connected with RIL (Radio Interface Layer) using Internally Exposed Serials Ports.

did somebody say exposed serial port?
Over my head a bit, but sounds cool, internally exposed serial ports sound useful, id assume you,d get i/o from both sides radio/droid. Back on the WIZ you could find a radio that works with the rom ver. and carrier to get best clarity, call handling, stability and battery life. This is cool reminds me of the early days of palm os rom hacking/cooking (we didn't call it that back then)
I'm glad I got it and I'm glad its an htc, so the homies at xda-dev will have this bad boy totally tricked out and custom...I love this plave, in a non homo way
Will we all be adding db9 ports on pur g1s
Bhang

no, i do not believe we will ever see a db9 on the G1. First of all, that connector went out of style in the late 90's and second, its rather huge (want do drill a hole in your screen to make room for it??). I would however like to see usb host, but someone commented that it is probably not enabled in the kernel and if it is, there are no drivers for it (hint hint driver g writers). cmonex (is a girl by the way) has been looking into methods to get root on RC30 and many other things so we hope to see some fun new hacks from that.

nice shrring,this is a good source where someone can learn something about their mobile secret functions,meantime i would like to share something which i found last week this is a site where it has network unlock code for all mobiles find further

Related

"Forknife" - the Android G1 controlled robot.

Since I got my G1 I have been thinking of interesting ways to talk with my arduino prototyping board since there is no USB support yet (my next software/hardware project?.. it would be handy to use a G1 as a serial console)
I ended up using DTMF tones and to see how well it worked, I quickly built a simple robot for testing. You can take a look at a video, pictures, overview of how it works, and the GPL-ed source code/schematics to build your own or improve it here:
http://macpod.net/misc/android_robot/android_robot.php
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Enjoy!
this is awesome man. fantastic work!
EDIT: Dude I got forknife on engadget!
http://www.engadget.com/2009/01/26/video-t-mobile-g1-powered-forknife-robot-goofs-off-eats-cupcak/
http://www.engadgetmobile.com/2009/...powered-forknife-robot-goofs-off-eats-cupcak/
If I just had your knowledge!
Awsome work !!!!!!!!
Awesome project!
Could someone make a quick program for the Dream to output all of its sensor data (GPS, Compass, accelerometer)?
It would save money from having to buy these parts for the arduino...
Yep, you could do this pretty easily. If you did it via dtmf you could send 1 nibble of data per tone without checksumming it. If you modified the kernel and made you own ttl level cable (I'm waiting on parts to make mine) you might be able to do two way communications up to 115Kbps!
I do not have a dtmf decoder to do this yet, so I am looking into alternate means to send the data.
It looks that I will have it set up opposite of the Forknife robot, with Android sending data over wifi (via a modified Gmote program) through the serial monitor in the Arduino Environment.
I'm also gonna try to grab the sensor data from the Tricorder app on my phone.
Time to see if I can get the Source code for these two.
-Brian
If you have wifi avaliable why would you need to reverse how this is done? I would just setup a server socket on the arduino, connect to it via the arduino and talk.
What wifi module will you use?
Oh, if you have a light sensor you could try sending out the G1's data by blinking the LED (you even have multiple colors so if you had a color sensor you could perform flow control!)
edit: check out bluetooth solutions too.
edit2: I guess it would make sense to reverse the flow.. I was thinking you were suggesting that there would be only one way communications from the arduino --> phone
My arduino doesnt have wifi, Android and my computer do.
At this point the Arduino isn't going anywhere, its plugged in with USB.
Would Android's Bluetooth API's allow for serial communication? as I was considering getting bluetooth modules for the Arduino.
Blinking the tricolor LED would be fun, but i have no experience coding Android, I am still working on setting up Eclipse for it.
Oh! Sorry, I didn't look at how the gmote setup worked.
If computer is in the picture this is really easy. You already have server code on the computer and client network code on the G1. All you would have to do is change what data is sent (and also send to the server as opposed to the server sending data to the client.. that's a trivial change).
On the server side you would need to forward the data you recieve from the G1 to your arduino.. and I'm sure the gmote code already shows how to work with serial ports.
On the client side, you would just need to rewrite the data in the thread to write out values from the sensors.
Edit: I'm not sure about bluetooth setups with the arduino as I have never worked with them. Something tells me that the communication protocols could be proprietary (i.e. both sender and recievers just work as serial ports.. they can't actually connect to other real bluetooth devices)
Hm, I cannot get the souce code for either the gmote.apk nor the server. I found a PICaxe based color sensor on sparkfun.com for $35, could that be used with the ardiuno to read the rgb notification LED on the G1? I would need a program to encode sensor data to the rgb.
I feel it would be easier to make a photo resistor read IO from the g1, and input directly into the RX on the arduino.
Using a photo sensor is a very hackish way to do this.. and would also cost more than just using wifi. It would also require significantly more code. Not to mention it only allows one way communication.
Just use the wifi method! It's the simplest method
I'm sure there is example code for how to read the sensors in android.
On the client side I'm sure there is code that discusses how to read sensor values
and on the computer side, all you need to do is implement code to talk to the serial port the arduino is associated with.. for linux/unix/os x it's just opening up a device in /dev/ for reading/writing!
Okay, i have eclipse set up for android, but still cannot get source code for the gmote.apk, I tried adb pulling it, but it is encrypted, so I cannot edit it's settings.
could i use "ghost" programs to control my input through these programs. I can easily place the cursor in the Serial Monitor for Arduino, but could I use a program to copy the serial data, then Paste the input into the gmote program to be sent to the serial monitor on the computer's side.
How easy would a code like this be? it would have to run on top (or underneath another program).
Now, I heard you say that a kernel patch could enable serial communication through the USB port. A friend of mine is really good in linux and modifying kernels.
Would you have any idea of what part of the kernel I should look for, and what it has to be changed to? I have to have an idea of what to ask him.
Thanks
-Brian
belding said:
Now, I heard you say that a kernel patch could enable serial communication through the USB port. A friend of mine is really good in linux and modifying kernels.
Would you have any idea of what part of the kernel I should look for, and what it has to be changed to? I have to have an idea of what to ask him.
Thanks
-Brian
Click to expand...
Click to collapse
It's actually supported in the kernel already, although I'm not sure if that particular configuration option is turned on in the default built. So at worst you would just have to recompile the kernel with a different configuration.
So I will have to ask my friend to find usb serial communicaton in the kernel, and enable it for program use?
If that is the case, how would I write programs to take advantage of this, wouldn't I need a new API?
Or since the kernel already has it, is there already an API for serial communication?
Thanks
belding said:
So I will have to ask my friend to find usb serial communicaton in the kernel, and enable it for program use?
If that is the case, how would I write programs to take advantage of this, wouldn't I need a new API?
Or since the kernel already has it, is there already an API for serial communication?
Thanks
Click to expand...
Click to collapse
I haven't played with it, but I assume it's just a device in /dev that you can read/write
belding, what is it about the wifi solution you don't like? It is a software only solution to your problem and alot of code is already written for you in the robot project.
Indeed the serial solution over the 11 pin connector would be best, but that requires you to buy hardware, solder tiny pins, and then modify your kernel which you don't seem to be comfortable doing. In addition, it is my understanding the modification requires you to disable adb support!
Perhaps if you told us your knowledge background I could explain it better? I kinda assumed you were computer science oriented, but I suppose if you are cpe or ee oriented I could have lost you. It would also help to know what your computer is runnng.
The wifi solution would work, but i cannot get source code to rewrite the gmote client or server.
I do not currently have the hardware (DTMF decoder) to implement your premade solution.
Okay, For my knowledge background: in Android, most things I can see are update.zip based, and I can change anything in the android system that is contained on the update. Looking through /system/usr I found the kernel config, but most options were enabled, and the two that were not do not seem to be related to Serial. I have basic knowledge of command prompt tools in Windows and the Android terminal.
Knowledge again, I am learning Arduino and processing, and am fairly good with electrical circuits, the ee you mentioned.
My computer is dual booting Windows XP and Windows 7.
PS, I talked to my friend, and we are looking into the Android Kernel, specifically where it is located, and where the terminal is located.
Where is the terminal in android located, inside or outside Dalvik VM?
belding said:
The wifi solution would work, but i cannot get source code to rewrite the gmote client or server.
I do not currently have the hardware (DTMF decoder) to implement your premade solution.
Okay, For my knowledge background: in Android, most things I can see are update.zip based, and I can change anything in the android system that is contained on the update. Looking through /system/usr I found the kernel config, but most options were enabled, and the two that were not do not seem to be related to Serial. I have basic knowledge of command prompt tools in Windows and the Android terminal.
Knowledge again, I am learning Arduino and processing, and am fairly good with electrical circuits, the ee you mentioned.
My computer is dual booting Windows XP and Windows 7.
PS, I talked to my friend, and we are looking into the Android Kernel, specifically where it is located, and where the terminal is located.
Where is the terminal in android located, inside or outside Dalvik VM?
Click to expand...
Click to collapse
Well, you can get to a terminal with the terminal emulator application of course, or through adb shell.
But if you want an actual console on the phone itself, try out the recovery image from JFv1.41. It boots into the normal recovery image, but it provides an alt+x option to exit the recovery program, and go to a console.
Also, the android kernel source is here. Make sure you grab the .25 branch if you want it to work with the current official builds. The .27 branch is only for cupcake.
To download the source, make sure you have git installed, and then:
git clone git://android.git.kernel.org/kernel/msm.git
cd msm
git checkout android-msm-htc-2.6.25
to build the kernel, you can use the pre-compiled gcc cross-compiler that is provided in the android source. make sure that it is in your path, and then invoke make with the arguments ARCH=arm CROSS_COMPILE=arm-eabi-
(or you can set those variables in the Makefile, so you can just do "make").
If you have any questions about getting everything set up to compile the kernel, feel free to ask. It seems a bit daunting the first time you do it, but it's actually fairly straight forward.

Serial port kernel and wlan.ko, ready to go

Find included a 2.6.27 kernel and corresponding wlan.ko with serial port enabled. This will work with JF, mikhael's build and so on that use the 2.6.27 kernel. Wifi works, bluetooth works, all that stuff works.
Serial port is /dev/ttyMSM2 with default at 9600 baud. I am turning my ADP into the brains of a UAV, so this should let me control servos with it.
Have fun! 2.6.29 (or whatever will be current) coming when I get off my lazy bum and move to it.
Installation is the usual "rename to update.zip, put in sdcard, start the phone in recovery mode" dealie.
BACK UP YOUR BOOT.IMG AND /SYSTEM/LIB/MODULES/WLAN.KO if you want to revert!
Here's a newer version with a terminal program (dterm, recompiled for g1/g2), or just the terminal by itself. If you flash the terminal ends up in /system/sbin and automatically goes to /dev/ttyMSM2 (see source), again it's just dterm with some cleanups.
By the way, does anyone care about this stuff at all?
I couldn't upload the kernel so here it is http://www.spirit-plumber.com/portfolio/robotics/kernel_serial_term.zip
It sounds very promising/interesting but I'm not exactly sure what it does. Does is it enable accessing the baseband via serial or something? This is something that was used on the original iPhone to try to unlock it.
I think if you explain more clearly what it does then more people will seem interested, & remember no contribution here is a bad one, someone will have a use for it.
It gives you a serial port that can be used as a device rather than just for debugging, as shown here
http://www.instructables.com/id/Android_G1_Serial_Cable/ (not by me btw) This software stuff makes it usable for general purpose IO. That allows a G1 and an inexpensive microcontroller, arduino/picaxe/etc to control servos, talk to a second GPS, and so on.
I develop autopilots for RC planes and the G1 would be a great platform for that since it has a gps, compass, accelerometer and camera already integrated in a relatively small/light package.
Also, ROBOTS! http://hackaday.com/2009/01/25/forknife-android-g1-controlled-robot/ This was done using the audio port, but having a serial port on board bypasses all the DTMF stuff and allows for a lot more bandwidth. (Also not by me, if you do want to see stuff by me, search spiritplumber on youtube!)
I'm also very interested in such a kernel as a friend and I are interested in interfacing a phone to a serial robot controller.
However, I am currently running Cyanogen 4.0.4 on a MyTouch and loading this kernel effectively breaks the phone. No radio, GPS, etc. and many apps are missing/broken. The serial port does work and we got it talking with our robot but otherwise it's not much use to me.
So atm it's either a phone or an overly expensive microcontroller but not both.
You could submit the patches to cyanogen to see if he'd be willing to incorporate it in his build.
this is kernel version 2.6.27 and i think the build you use has kernel 2.6.29 which is why everything'd break. i will build 2.6.29 at some point, for now use a build that still use .27? i useJF151 with good results.
Hi, I'm interested in this stuff, I just wonder how can I use this to interface G1 to Arduino? any idea/tips will be helpful. TIA.
You end up with a new device, /dev/ttyMSM2 which is a standard issue serial port that can be used to talk to microcontrollers. The voltage is 2.8V which means it will work with a 5V micro in the phone-->micro direction, but if you want to go the other way you'll need a divider.
(see the other thread i posted in for a schematic)
I should probably get cracking on a donut version
Wow
Interesting stuff. I just wish I had the ability to take advantage of this. I think this would bring it one step closer to being able to use the G1 as an OBD-II car scanner. But I'm afraid that will take way more technical ability than I have.
Not really...
http://www.suntekstore.com/OBD2-16Pin-to-DB9-Serial-Port-Adapter-Cable-.html
http://www.instructables.com/id/Android_G1_Serial_Cable/
+ my kernel
Nice work
spiritplumber said:
...
I develop autopilots for RC planes and the G1 would be a great platform for that since it has a gps, compass, accelerometer and camera already integrated in a relatively small/light package.
Click to expand...
Click to collapse
Genius! Well done for bringing this all together!!!!
I found your thread while trying to investigate the same project you've done already - making an autonomous drone using the G1 !!!
- I'd be very interested to see videos/info/photos of your drone.
I've seen all the bespoke UAV controllers on DIYdrone.com, but was more interested in the challenge of making my G1 with all it's sensors directly control a servo controller board via serial.
I'm a bit worried that the screen must stay on, which will burn through the G1's battery in no time! - is this still necessary?
I'm really impressed and thankful for what you have done, and making it public!!!
I'm currently on Cyanogen 4.0.4. so I guess the first step is to back track to an earlier Kernel version...
Unless you're close to rebuilding 2.6.29 ???
Thanks for the 'instructables' for the cable too, I've ordered the bits and hope to test in the next few days - ironically I found that before this thread!
Hmmm...
I've just studied your cable making instructions and have some questions!
The USB-Serial converter board... is that any use at all other than a PC interface?
I shouldnt actually need this to talk directly to another serial device from my G1?
- I got the impression the USB/Serial board was to convert the G1's USB to Serial...
Could I send a serial TX messages directly from the break-out board to a serial RX pin... (Servo controller) does that sounds correct?
Sorry for the torrent of questions...
If you want to talk to a different device you just need to flip pins 2 and 3 on the serial port and use a male rather than female connector so yes you can definitely do that!
In fact you can do two at the same time: Here's me using the G1 to relay data from a GPS to a servo controller. If you'd like the schematics for that let me know. If you have any sort of work related to this DEFINITELY let me know.
By the way, I'm using a 74HTC14 for doing the level shifting and inverting: it's a very cheap part and also has the advantage of cleaning up the waveform nicely. Or you can use some transistors.
EDIT: Attachment is being stupid so go here for photos: http://spirit-plumber.com/robotseverywhere/gallery/images/other/gphone/
spiritplumber said:
If you want to talk to a different device you just need to flip pins 2 and 3 on the serial port and use a male rather than female connector so yes you can definitely do that!
In fact you can do two at the same time: Here's me using the G1 to relay data from a GPS to a servo controller. If you'd like the schematics for that let me know. If you have any sort of work related to this DEFINITELY let me know.
By the way, I'm using a 74HTC14 for doing the level shifting and inverting: it's a very cheap part and also has the advantage of cleaning up the waveform nicely. Or you can use some transistors.
EDIT: Attachment is being stupid so go here for photos: http://spirit-plumber.com/robotseverywhere/gallery/images/other/gphone/
Click to expand...
Click to collapse
Hi Spiritp,
Thanks for your comments, I'll give that a whirl then!
I'll definitely keep you posted!
My basic plan is:
Use accelerometer for auto-leveling control, use pre-defined GPS routes so I know the take-off / landing site altitude above sea level, and eventually get the G1 to take photo's at GPS waypoints.
Probably ambitious considering my electronics knowledge, but I'll keep you posted with progress.
If you have any pointers of how to send Serial commands from within the Android App layer, I'd really appreciate it.
With so many 'rooted' applications doing kernel based tasks I'm pretty sure it'll be possible... but I'm also fairly green on linux & java, so this will be a challenge for sure. (Time to hack my way through other people's work and understand what's going on!!!)
Thanks for your response,
Andy
spiritplumber said:
By the way, I'm using a 74HTC14 for doing the level shifting and inverting: it's a very cheap part and also has the advantage of cleaning up the waveform nicely. Or you can use some transistors.
Click to expand...
Click to collapse
Question 1:
When you say 'level shifting' is this to bring the TX/RX voltage to the same level? (i.e. 5v --> 5v, rather than 2.8v --> 5v)
Question 2:
If I plugged a 5v serial device into the G1's RX connector, would this damage the G1?
Question 3:
Please help explain how non-printing byte-level data (Servo commands) can be sent from DTerm... I've had a poke around on the internet but with no success...
Question 4:
I have installed your Kernel/DTerm... which runs DTerm ok, but the commands 'ls' return the error 'not found'.
- which worked before adopting your kernel..
Is this normal? How can I fix this?
EDIT:
Ok, I think I'm half way there... I've now bought one of these:
http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=194
//
spiritplumber said:
If you want to talk to a different device you just need to flip pins 2 and 3 on the serial port and use a male rather than female connector so yes you can definitely do that!
Click to expand...
Click to collapse
Reminds me of the HP48 token ring networks. http://www.hpcalc.org/details.php?id=3603 In essence, device 1 would transmit data to device 2. Device 2 would see that the packet was meant for a different device and retransmit the packet to device 3, the intended recipient. If device 2 had been transmitting a packet to device 1, it would have passed through 3 on the way back around. Adding another device to the network was as simple as breaking the chain and adding a new one. Building the cables to do that wouldn't be too difficult.
Level shifting:
Internally the G1 uses 2.8 volts. This is nice if you've a 5V interface because:
On going G1--->other part, 2.8 is high enough to register as "high", you may need a pullup resistor (try 10k).
On going other part--->G1 you just need a voltage divider! That's two resistors of equal value, this makes the other part effectively output at 2.5v which the G1 will happily accept! (If this confuses you, see "voltage divider" on wikipedia..... it's literally just 2 parts). Here's a picture on page 5: http://forum.xda-developers.com/showthread.php?t=496976&page=2
If you need to do stuff in that sense I recommend just having the servo controller take in ascii stuff. Or you can modify dterm. Or I can give you a modified copy of dterm that has that functionality let me know!
If you use a 3.3V microcontroller such as the Parallax Propeller, just slap two 1KOhm resistors on the rx and tx lines and go do stuff: it works.
Controlling servos via G1 is very painless and easy, I already do that, let me know if you want tips.T
spiritplumber said:
Level shifting:
Internally the G1 uses 2.8 volts. This is nice if you've a 5V interface because:
On going G1--->other part, 2.8 is high enough to register as "high", you may need a pullup resistor (try 10k).
On going other part--->G1 you just need a voltage divider! That's two resistors of equal value, this makes the other part effectively output at 2.5v which the G1 will happily accept! (If this confuses you, see "voltage divider" on wikipedia..... it's literally just 2 parts). Here's a picture on page 5: http://forum.xda-developers.com/showthread.php?t=496976&page=2
Click to expand...
Click to collapse
That's excellent, I think I have a solution for the voltage, but thanks a lot for your electronics expertise!!!!!!!
spiritplumber said:
If you need to do stuff in that sense I recommend just having the servo controller take in ascii stuff. Or you can modify dterm. Or I can give you a modified copy of dterm that has that functionality let me know!
Click to expand...
Click to collapse
I'm actually using a Pololu micro serial servo controller (SSC) - I'm fairly sure it doesnt support ASCII characters, the manual only explains how to compile a '3 byte sequence' :
To set the servo position, send a sequence of three bytes. The first byte is a syncronization value that must always be 255. Byte 2 is the servo number, and it can be 0-254. Byte 3 is the position to which you want the servo to move, also 0-254. (sync= 0xFF,servo= 0x00-0xFE,position= 0x00-0xFE)
If you can help / let me know how to modify dterm I would really appreciate it!!
Although I'm still not sure how I'm going to access this from the Android Application layer - making calculations from accelerometer & GPS, then sending the calculated servo movement down to a kernel app?
Any help in this area would be greatly appreciated!
spiritplumber said:
Controlling servos via G1 is very painless and easy, I already do that, let me know if you want tips.T
Click to expand...
Click to collapse
I would find any tips interesting !!!
Thanks again for your comments & help, you're making this project far easier than I could have hoped!!!!! hopefully I will be able offer you help in my areas of expertise some day!
- I'm an application developer by day, using VB.net/Sybase Powerbuilder/Pocketbuilder/SQL/Microsoft-based network admin.
Just a quick final question (for today!!) - my Wlan seems to have been knocked out by your kernel image... the android manager can see AP's but always reports that it was unsuccessful when trying to connect.. and ideas?
- I'm on JF1.51 ADP1, no other mods or changes.
Andy

system call -> SOFTAP on -> infrastructure mode

Hello,
Has anyone taken a look at the bcm4329's kernel module? I've been looking around and trying to figure out how the Sprint Hotspot application works and I've found it calls the SIOCSIWPRIV system call on the interface to bring up this mode.
Does anyone have any experience on this matter? I'm looking to get infrastructure mode working.
My current approach is to write a native C app, do the ioctl with some sort of struct (I'm tempted just to memalloc and hand-write the first one), and see what happens.
The driver throws a bunch of debug info into the kernel log when you invoke the command so its dead easy to spot.
Any suggestions?
andrew500 said:
Hello,
Has anyone taken a look at the bcm4329's kernel module? I've been looking around and trying to figure out how the Sprint Hotspot application works and I've found it calls the SIOCSIWPRIV system call on the interface to bring up this mode.
Does anyone have any experience on this matter? I'm looking to get infrastructure mode working.
My current approach is to write a native C app, do the ioctl with some sort of struct (I'm tempted just to memalloc and hand-write the first one), and see what happens.
The driver throws a bunch of debug info into the kernel log when you invoke the command so its dead easy to spot.
Any suggestions?
Click to expand...
Click to collapse
im definitely not up to speed on this but if you wanna post some links to the source files you're referencing, it might help me and anybody else who is interested to get up to speed quicker and provide suggestions.
appreciate your work on troubleshooting and experimenting with wifi tether!
joeykrim,
I'm knee deep in it right now. I'm taking the source code to iwconfig and using it as a template to implement the system calls I need, using a hybrid of the structs in wireless.h and in the bcm4329 driver source, from the bravo kernel. Basically I create a big struct in memory and pass it into the driver using a pointer to a iw_point struct, which holds my big master struct, and then the driver copies it out of user-space into kernel space and acts upon it.
I'll put together all the details once they are a little more solid.
It looks like infrastructure-mode on the EVO is a very distinct possibility, this code will also translate into the workaround for built-in tether on Froyo, from what I've seen they are exclusively using this broadcom interface so far.
It's a hardware specific hack, but many of the phones that have come out lately are using the bcm4329 (and with good reason, chip has freakin everything).

[DEV] PSFreedom Port

As some of you probably know, the ps3 has recently been hacked, allowing us to run unsigned code. The source code for the exploit leaked and a dev called KaKaRoTo managed to get it to run from a Nokia N900. The other day, KaKaRoTo released his source code and someone already ported it to the Palm Pre. This quick port was possible because the N900 and Palm Pre both share the same USB controller(mUSB) which happens to be the controller used by the Droid/Milestone.
This has already been posted in the droid section, but I figured I would post this in here. Maybe some of you guys can get this working on our Samsung Galaxy Spica i5700!
thanks nicholasbgr for writing this up.
-------------------
Well, first, you need to figure out what controller your device uses, in the case of the N900, it’s ‘musb’.. (Luckily we have he same controller!)
Then go to the driver code for that controller (probably in drivers/usb/gadget) and look for ‘SET_ADDRESS’. In the case of musb, it was in drivers/usb/musb/musb_gadget_ep0.c. In there it was setting the address to the USB device, so just copy that code into the psfreedom_machine.c to allow setting the address, and add a similar function to be able to retreive the address.
Then add a function to return 0 or 1 depending on whether the controller supports HIGH, FULL or LOW speed mode (go to usb_gadget_register_driver for your controller, and in the first lines, it should validate the speed argument, it will tell you which ones are acceptable), set LOW speed mode to return TRUE only if FULL speed isn’t available .
Finally, add a function to return the endpoint names.. it will usually be something like ‘epXin’ and ‘epXout’ (where X is the endpoint number), or “epXin-bulk”, etc.. look at how the driver initializes its endpoints or grep for “->name” in the file to find where it sets it…
That should be enough!
-------------------
This doesn't look too hard to do either. We shouldn't need to do too many alterations to get it working on the milestone.
Here is what we apparently need to do to port it from the nokia.
And here's a link to the source code over at github:
PSFreedom
http://www.klutsh.com/
Thanks and good luck to anyone who gives this a try!

ADB interface for microcontrollers

After all the messing around with the serial port kernels (disadvantage: needs rooting, only works on some fones) and more recently the serial out using the headphone jacks (disadvantage: output only, and kinda slow at 24000bps max) I set out to do an ADB interface for a microcontroller, so as to allow for sensor and motor control from the phone from there. So far so good. If you want to see my results so far (and get the yummy software and schematics -- I sell kits, but it's all free-as-in-speech) check the instructions out.
http://robots-everywhere.com/re_wiki/index.php?title=PropBridge (only source for now)
http://robots-everywhere.com/re_wiki/index.php?title=Serial_on_Android_using_the_audio_port (also available on market, search "serial out" and it'll show up)
Heh, guess nobody cares. Anyway, the relevant apps are now on market, if anyone wants the source just message me.
Last bump...
It's on hackaday http://hackaday.com/2011/03/29/propeller-android-communications-using-debug-mode/ also a number of cool android hacks, usually hardware related.

Categories

Resources