programming serial port DTR and DSR pins - Windows Mobile Development and Hacking General

I have a XDA device and wish to use the serial port for something a little different. I want to use it as a means of input and output communication with a very simple device. Basically, I would like to set a pin high and stay high and until I set low. And, want to read a pin from the external device to determine if it has set the pin high or low.
I suppose I could use the DTR and DSR pins. From what I have read, it looks like I can control these pins individually, just curious if any one has done and all should work ok?
I currently do not have a serial cable to test with, want to make sure before I order one.
Any other suggestions besides the serial port, would this be the easiest to work with?
Thanks

I have done this and it worked on an XDA and XDA II, you just use the EscapeCommFunction function as detailed here http://msdn.microsoft.com/library/d...us/wcesdkr/html/wcesdkrescapecommfunction.asp
for Ouput, and for input use GetCommModemStatus as detailed here http://msdn.microsoft.com/library/en-us/wcesdkr/html/wcesdkrGetCommModemStatus.asp

have a look at http://www.opennetcf.org - they have extended the compact framework with several important APIs and serial I/O is just one topic.

Thanks for the reply. Curious, what COM port did you use? I finally got around to getting a connector and trying this out. I am using OpenNETCF and trying to set the DTR and RTS pins. I am using COM1. I can set the DTR pin, it shows 6 volts, but then unable to turn it off. The RTS pin does not seem to change at all. I am checking pins 11 for DTR and 9 for RTS. For ground, I have been using pin 2.
vangelderp said:
I have done this and it worked on an XDA and XDA II, you just use the EscapeCommFunction function as detailed here http://msdn.microsoft.com/library/d...us/wcesdkr/html/wcesdkrescapecommfunction.asp
for Ouput, and for input use GetCommModemStatus as detailed here http://msdn.microsoft.com/library/en-us/wcesdkr/html/wcesdkrGetCommModemStatus.asp
Click to expand...
Click to collapse

I have only controlled output DTR and checked input CTS. Also I did it not using .NET, I used the Win32 APIs I mentioned.
I used Comm1 and DTR went on/off OK.
Another thing Ground is on Pin 5.
If I get the chance I'll knock up a quick app Win32 in eVC that I can prove works and then post it on this thread for you to try too. That will prove if it is a .NET thing that it don't work.

Last night I did get RTS and CTS monitoring working ok. I am using OpenNETCF which is just a .NET wrapper around the WIN32 API methods, e.g. EscapeCommFunction, etc. There code seems to be ok, thinking it may have to do with my DCB settings. Looking at the DCB fDtrControl, you have ENABLE, HANDSHAKE, and DISABLE. I have it set to ENABLE, same with RTS. Docs say that this turns on the DTR during communication. But, the RTS on/off worked ok with the ENABLE setting also, so apparently in the ENABLE state you can control the single pin.
Don't go to any trouble, I am getting close. I am just needing 1 output pin and have RTS working, so I think I am ok. If you have any insight on the DCB settings that may help.
One problem I was having previously was the "Beam setting" in the System settings. I had to turn it off to open COM1.
Thanks for all your help.
vangelderp said:
I have only controlled output DTR and checked input CTS. Also I did it not using .NET, I used the Win32 APIs I mentioned.
I used Comm1 and DTR went on/off OK.
Another thing Ground is on Pin 5.
If I get the chance I'll knock up a quick app Win32 in eVC that I can prove works and then post it on this thread for you to try too. That will prove if it is a .NET thing that it don't work.
Click to expand...
Click to collapse

Yes Beam must be Un-Ticked to be able to open Comm1, this seems to be a problem on the XDA. I have had to work that problem out before and it has been written about on this forum a few times.
As to the DCB settings then :-
fOutxCtsFlow = FALSE;
fOutxDsrFlow = FALSE;
fDtrControl = DTR_CONTROL_DISABLE;
fRtsControl = RTS_CONTROL_DISABLE;
You probably have read in the help that those last 2 item must not be CONTROL_HANDSHAKE if you are using EscapeCommFunction to manually control those outputs. You have to set those to either Enable or Disable depending on your wanted starting state. I would of thought Disable is the better starting state and then you manually turn them on later in your code.
Set any other options to off that have anything to do with if the system needs to act on a serial control signal i.e. fDsrSensitivity, fTXContinueOnXoff, fOutX, fInX etc.

Related

[solved] How to prevent standby using VB.NET?

Hallo!
I'm working on an application called hTorch and although it is my first vb.net app I was quite successfull so far (at least I hope so ). But one think I'm just not able to achieve: Preventing the device from going into standby/suspend while the app is running.
In C++/C# there semes to be a system call "SystemIdleTimerReset()" but either there is no equivalent for vb.net or I was not able to find it.
Another thought was to modify the according registry key (HKLM\System\CurrentControlSet\Control\Power\Timeouts\BattSuspendTimeout) and to restore the original settings on program exit. This works fine except that WM does not apply the settings change immediately when it's done via registry. Again I did some research and again I only found a solution for C++/C# only. A system call named "NWUS_MAX_IDLE_TIME_CHANGED" tells the OS that the settings have changed and should be reread. I wasn't able to find something similar for vb.net though.
Does anybody know a solution for my needs?
Maybe someone could provide me with some sample code how he achieved this within vb.net?
Maybe some C++/C# programmer has build a library to access the power functions?
I would be really thankful for any help/hint you can give me!
Thanks in advance,
DeepThought
The standby mode is in the registry. Make a timer in VB.net and set it with an interval of about 5000 ms. Then make sure that ever time the timer ticks the standby mode will be disabled in the registry
Thank you for the quick response!
But the change via registry doesn't work. When I change the BattSuspendTimeout to 0 that does change the setting correctly. But they become not active. Only after a soft reset. It seems, that you somehow have to notify windows, that the settings have changed. Otherwise the will not be reread.
Any Idea how to achieve that?
I would also like to know if there is a way to prevent suspend.
I think only the pocket pc winmo versions do a real suspend where wifi and applications stop processing, and the smartphone winmo devices only kind of black the screen.
The only software I know is S2U2 which successfully can prevent "real suspend" and let e.g. my led notification work correctly.
Cause i cannot really use it on ks20 due to compatibilty issues i would be very interested in a reg hack, or (if there really is no reghack, i tried alot) some code snipets with which i could build a little app.
There's a pretty good article on CodeProject covering power.
*digs out link*
Here you go - http://www.codeproject.com/KB/mobile/WiMoPower1.aspx
It covers:
* Displaying the voltage, current, and temperature of your device's battery
* Changing the power state of hardware within the device
* Enumerating the hardware in a Windows Mobile Professional device
* Enumerating the power modes that a Windows Professional device supports
* Preventing a device from sleeping
* Toggling the state of the screen's backlight
* Waking up the machine to perform work without alerting the user or turning on the screen
[solution]
Thanks to AndyZap I can now answer the question myself
It is so simple, that I'm really ashamed now.
The magic word for me was PInvoke. Since I new the function I was searching for was an available win32 systemcall the missing link was how I can make this system call within vb.net.
So the actual solution are just two lines:
Code:
Declare Sub IdleTimerReset Lib "coredll.dll" Alias "SystemIdleTimerReset" ()
where "IdleTimerReset" is the name I've given the Sub. Which than just needs to be called like:
Code:
IdleTimerReset()
NOTE: This just resets the Idle timer once. So if you want to prevent the device from going into standby you have to reset this timer every time before it reaches the threshold. (The windows default setting is 60 seconds AFAIK).
THANK YOU AndyZap for your Help via PMail!
DeepThought
Thank you for your answer Northernmost!
I really love this community!

Bluetooth Audio Gateway Control

Application is designed to control BAG (Bluetooth Audio Control) service state on Windows Mobile systems. It can enable/disable audio/microphone routing to Bluetooth headset, set volume and microphone gain, enable/disable voice command launch application.
Writing this little piece of code was inspired by inability of AGEphone Mobile (ver 2.71) to collaborate with Bluetooth headset.
Really it can be used for other purposes as well. You can make some useful shortcuts or use it in some scripting language.
It is “command line” application (no GUI). Command line switches controls application behavior.
There are two working modes: “keep resident” (default: able to save and restore all settings) and “on fly” - for quick change.
Application itself and documentation with samples in attached file.
Thanks alot i'm downloading now!
gui in next ver?
Thank you very much for writing this! Your utility goes alone perfectly with AGEphone Mobile and is perfect for anyone who wants to use a BT headset AND voice command - highly recommended vs. the standard "BTAudioToggle" !
I'm trying to get this to launch via startup to see if it will work with my bt headset and voice command.
I'm just using "\Windows\bagctrl.exe /O"
as my shortcut link but it gives me an error the app isnt signed..I assume I'm probably just an idiot and not making my shortcut right..Can anyone help me please?
vidmabal said:
Application is designed to control BAG (Bluetooth Audio Control) service state on Windows Mobile systems. It can enable/disable audio/microphone routing to Bluetooth headset, set volume and microphone gain, enable/disable voice command launch application.
Writing this little piece of code was inspired by inability of AGEphone Mobile (ver 2.71) to collaborate with Bluetooth headset.
Really it can be used for other purposes as well. You can make some useful shortcuts or use it in some scripting language.
It is “command line” application (no GUI). Command line switches controls application behavior.
There are two working modes: “keep resident” (default: able to save and restore all settings) and “on fly” - for quick change.
Application itself and documentation with samples in attached file.
Click to expand...
Click to collapse
Many thanks, vidmabal - it works like a dream and does exactly what I was looking for!
MrDSL said:
I'm trying to get this to launch via startup to see if it will work with my bt headset and voice command.
I'm just using "\Windows\bagctrl.exe /O"
as my shortcut link but it gives me an error the app isnt signed..I assume I'm probably just an idiot and not making my shortcut right..Can anyone help me please?
Click to expand...
Click to collapse
Yes, application is not digitally signed.
If you want to use it you first must enable not signed applications (but there are plenty of them around).
To do this you can use "Advanced Config" or alternatively set registry value with some registry editor. "Total Commander" or "Resco explorer" can help you performing this task.
Registry key is "HKLM\Security\Policies\Policies" value name is "0000101a" (if not exists create new DWORD value) and must be set to 1.
P.s. I really don't know why you want to run it on startup and expecially with /O key
eazy2001x said:
gui in next ver?
Click to expand...
Click to collapse
Really not.
Application is designed to run without user intervention.
That’s why even all errors are silently ignored: no MessageBox for invalid keys or some other errors.
Even I don't see what GUI can be helpful. Except maybe for microphone gain changing. Volume normally has control keys on Bluetooth device itself.
Of course you can use it with Mortscript or some other scripting language and make some interface in here. Error codes returned (not present in attached document)
0 - No error (all OK)
128 (0x80) - Error redirecting audio (normally occurs if Bluetooth device is not connected)
129 (0x81) - BAG0: device not found
130 (0x82) - Invalid command line parameters
since u coded this, ive got a small question. do u think there is any chance to disable a remote microphone and use the internal one instead?
im asking this because the mic from my car radio totaly fails its job (JVC KD-BT11) and the internal from my phone (x1) is far supirior to it.
Nice work man, just find my bt headset behind the microwave oven (my girlfriend didn't know anything)
I'm going to write a small mortscript to controll the commnd line.
vidmabal said:
Yes, application is not digitally signed.
If you want to use it you first must enable not signed applications (but there are plenty of them around).
To do this you can use "Advanced Config" or alternatively set registry value with some registry editor. "Total Commander" or "Resco explorer" can help you performing this task.
Registry key is "HKLM\Security\Policies\Policies" value name is "0000101a" (if not exists create new DWORD value) and must be set to 1.
P.s. I really don't know why you want to run it on startup and expecially with /O key
Click to expand...
Click to collapse
I'll have to look into it more but I already have advanc config to run unsigned apps..
achmed20 said:
since u coded this, ive got a small question. do u think there is any chance to disable a remote microphone and use the internal one instead?
im asking this because the mic from my car radio totaly fails its job (JVC KD-BT11) and the internal from my phone (x1) is far supirior to it.
Click to expand...
Click to collapse
The application has nothing common with Bluetooth transport. Really it only send control codes to BAG service (Bluetooth Audio Gateway). This one is coded by Microsoft. I think other BT stack providers (for compatibility reasons) also supports such service.
According to documentation there is no such control code to enable only audio and leave microphone untouched. (Maybe there is, but undocumented, as M$ like to do).
Also it depends on BT profiles your device support. Maybe it has some "stereo headset" without mic?
Here i made a mortscript gui for this tool:
just extract to \Program Files\BTAGC
all files are included
Now make a shortcut of config.mscr in your start menu
vidmabal said:
The application has nothing common with Bluetooth transport. Really it only send control codes to BAG service (Bluetooth Audio Gateway). This one is coded by Microsoft. I think other BT stack providers (for compatibility reasons) also supports such service.
According to documentation there is no such control code to enable only audio and leave microphone untouched. (Maybe there is, but undocumented, as M$ like to do).
Also it depends on BT profiles your device support. Maybe it has some "stereo headset" without mic?
Click to expand...
Click to collapse
The radio itself offers "Bluetooth Headset" and "freespeech".
i tried to disable the freespeech (bluetooth settings in winmo) but somehow my phone still uses the radio as microphone.
guess i have to get my soldering iron and make some hardware mods to my radio. looks like disabling a bluetooth mic isnt going to work.
PS: but thx
old post i know, but do you know if there is a way to display the error msgs on screen somehow ? I think im getting errors.
Pytte said:
old post i know, but do you know if there is a way to display the error msgs on screen somehow ? I think im getting errors.
Click to expand...
Click to collapse
Really there is no much error processing here. But you can try to start app from say Mortscript and examine return code. See message #8 for return codes.
Thanks for your effort put into this.
Could you please confirm if/how is it possible to do just one thing:
1. Cyberon Voice Speed Dialer installed on phone.
2. BT button does not invoke it (audio route opened, and dialer screen opened, but no Speed Dialer. Reg Key exists)
3. Can this program help do it? (which mode resident/on fly, which extension to exe file and how to launch it (start-up or something else))
Many thanks in advance!
Thanks
Thanks a lot vidmabal, this is what I was looking for.
Cheers
Will this program work on an HD2 which i think uses a widcomm bluetooth stack??
dino_Donis said:
Will this program work on an HD2 which i think uses a widcomm bluetooth stack??
Click to expand...
Click to collapse
Really I don't know.
I am operating with service "BAG0:" ("Bluetooth Audio Gateway") - you can check if it is present in your system.
1. Launch Fdsoft Task Manager
2. Go into "Services" page.
3. Check that you have started service BAG0:
Alternatively you can check it in registry:
HKEY_LOCAL_MACHINE\Services\BTAGSVC
(Service name can differ, but "Prefix" value must be "BAG" and "Index" must be 0, "IsEnabled" value must be 1)

Developing Auto-DisableRefresh-When-Dragging App [New Video Added]

I know some people have already discussed this in the noRefresh App thread.
But I got a new idea
I don't wanna create a module and embed that to applications
Instead, I created a new Input Device in the kernel
After that, I set the device ( dev/input/event3 ) permission to allow read / write for others.
Then, write an app using JNI to catch the Input Device and set the mode of refreshing.
The prototype proved that this idea works, as i worked out it already, but not very perfect, still in experiment
I am just in some problems of threading, as I am not a professional programmer
This is wt i have now:
http://www.youtube.com/watch?v=GkFyvRR6In8
NEW!! : http://www.youtube.com/watch?v=cucG03rg3tg
I know that my method is a bit dirty,
but at least it works XD
I hope that someone would like to help
Upload those code soon
By the way, why can't i change content of init.rc ?
It removes my changes after reboot..... How to solve?
wheilitjohnny said:
By the way, why can't i change content of init.rc ?
It removes my changes after reboot..... How to solve?
Click to expand...
Click to collapse
You need to modify uRamdisk to change init.rc.
Would you like to tell me how to unpack the uRamdisk? I use both Windows and Ubuntu, any methods on these two platform is ok. Thanks!
Try the script from this post http://forum.xda-developers.com/showpost.php?p=24135886&postcount=72
This is simply amazing. Since you already have it working, polishing it shouldn't take too long (I think, I'm still a beginner programmer).
I don't think /dev/input is a good place to park that.
There are any number of things that could show up there and affect order.
Why not put it in its own directory?
Maybe I'm missing something, but if we use your method you still expect applications to have to be modified to read/write from event3 to control display mode?
As it is now, you only need a single function call to switch display modes. Yes, there is a little bit of housework to do before that, but what could be simpler than a single function?
I think no place else is more suitable than /dev/input.
As /dev/input is the linux kernel's input system.
In the driver, I would only use the input report system but not use the I/O system.
Maybe even setup a input/event searching function to solve the problem later.
The case now is that, the touch screen originally just provide event2,
but if we need to extract move and fingerup information on upper level, it may waste some time.
In order to make the whole algorithm easier and faster, I added 1 more event in the zForce driver,
to only output FingerMove and FingerUp state.
As the reporting system is starting from the kernel, this hack would need to change uImage + uRamdisk + Add an App. The project is quite huge.
My final target is to make the application remembering your choice on what mode u need for the focusing application.
AlwaysOn / OnlyWhenDragging / AlwaysOff, so on.
Of coz the click-to-call function still work.
Isn't it a better workflow and more intuitive, isn't it the thing that we would expect?
I already have an dev/input/event3 on my system and sometimes event4, 5, 6.
That's why I don't think that whatever it is you are doing belongs there.
Is the point to allow coders for user applications to interface with your driver?
Is this supposed to work without modifying user applications?
What information would be going in/out of event3?
Clearly I am missing something here.
Actually not necessary to be event3, the system will auto-ly create a new eventx, just in normal case, without any extra USB devices, a nook should only have up to event2. So, I use event3 as an example here.
We can later make the program auto-ly search back which is the needed eventx.
Yes, u r right, we no need to modify any other applications and this is exactly the point y i am creating this!
Anyone know how to call a FullScreen Refresh in a service?
always on?
Look really great. Since blinking after scrolling is incomfortable is it possible to have also "always on " mode using your new ideas?
My final target is to make the application remembering your choice on what mode u need for the focusing application.
AlwaysOn / OnlyWhenDragging / AlwaysOff, so on.
Of coz the click-to-call function still work.
Also an Over-Ride mode, for more flexible using.
But the most basic part need to be handled well now, as it is not very perfect now.
I still don't figure out how to call the e-ink driver to refresh the screen =-=
wheilitjohnny said:
I still don't figure out how to call the e-ink driver to refresh the screen =-=
Click to expand...
Click to collapse
Have you tried
Code:
echo 1 > /sys/class/graphics/fb0/epd_refresh
?
wheilitjohnny said:
Yes, u r right, we no need to modify any other applications and this is exactly the point y i am creating this!
Click to expand...
Click to collapse
Are you saying that your idea does not require modifying user applications?
If it doesn't, then there is no need to have a public interface.
It will be only your code talking to your code.
What is the point of this /dev/input/event3? You say that it will be writable. What's going in and out?
Some apps will be using gestures, some dragging. How are you going to keep track of that all?
I have one application that works perfectly fine now, one activity uses swipe gestures to page up/down while another activity uses drag with a user choice of A2 and display while dragging or else only panning at ACTION_UP.
All this requires less than 10 lines of code.
With multitouch, many applications don't even need A2. Even normal panning in Opera Mobile works much better now that Opera doesn't try to display while panning.
Maybe my english is too bad, cannot express the idea well.
I know, we can make such an application with noRefreshDrag working on its own well.
But how about other applications, it is impossible for us to change all applications.
So, my idea is making it system based.
My prototype is very good now, after several adjustment.
Not limited to only 1 application, but the whole system.
The approach is like this:
1. zForce driver provide extra information to InputEvent
2. A JNI catch the InputEvent
3. A service get the data and set the update mode
We only need to write 1 application to handle the setting of this chain.
This is what i mean, hope that u get what i mean now.
mali100 said:
Have you tried
Code:
echo 1 > /sys/class/graphics/fb0/epd_refresh
?
Click to expand...
Click to collapse
Let me try it now!
wow, it works great
wheilitjohnny said:
zForce driver provide extra information to InputEvent
Click to expand...
Click to collapse
I guess that this is the part that I don't understand.
What is this extra information?
Renate NST said:
I guess that this is the part that I don't understand.
What is this extra information?
Click to expand...
Click to collapse
It created an extra Event, l called it Event3 before.
Driver reports only move and finger_up to Event3.
Just providing a channel to pass an information from driver to user-space.
You may ask why not directly using the existing Event, need to create another one.
That is because, the original one only have touch and position information, parsing them back to move information need a bit of work. As the hardware provided the move information, then don't waste it.
Code:
public boolean dispatchTouchEvent(MotionEvent event)
{
switch(event.getAction())
{
case MotionEvent.ACTION_DOWN:
break;
case MotionEvent.ACTION_MOVE:
break;
case MotionEvent.ACTION_UP:
break;
}
return(true);
}
}
Isn't that everything that you could ask for?

Everything to know about Nokia Care Suite and Flashing Lumias

As there has been little progress made, I thought I could get the ball rolling myself. The purpose of this is to find a way to execute AT commands either on the device or via USB (for internet tethering purposes/general phone modification), and to discover how the bootloader works to devise a method to install a custom rom, or just installing unbranded/different roms for the same device, but different product code.
As a note before starting this, is my first device that's a Nokia, I'm taking this as a shot completely in the dark.
I haven't had any experience with Navifirm nor any of the Nokia utilities used in the past to flash either Symbian or WP7 devices, but I'm quickly learning.
PREREQUISITES:
http://www.seidea.com/2013/08/10/how-to-download-nokia-firmware-with-nokia-care-suite/ (the edited usergroupsconfiguration.cfg file)
http://www.seidea.com/2013/07/14/nokia-care-suite-pst-5-0-2013-27-1-3/ (the latest version of the Nokia Care Suite - 5.0 2013.27.1.3)
The USB drivers need to be installed first. The WinUSB drivers that were included are the only drivers that seem to apply to this device, but I went ahead and installed all the drivers in D:\Program Files (x86)\Nokia\Nokia Care Suite\Drivers
Driver Level Stuff
There are still a few devices shown without a driver. Here's the list
Code:
USB\VID_0421&PID_0660&REV_0100&MI_03 + USB\VID_0421&PID_0660&MI_03
USB\VID_0421&PID_0660&REV_0100&MI_06 + USB\VID_0421&PID_0660&MI_06
USB\VID_0421&PID_0660&REV_0100&MI_02 + USB\VID_0421&PID_0660&MI_02
USB\VID_0421&PID_0660&REV_0100&MI_01 + USB\VID_0421&PID_0660&MI_01
USB\VID_0421&PID_0660&REV_0100&MI_00 + USB\VID_0421&PID_0660&MI_00
I have no idea whats the purpose of these devices and using the driver update inside of Device Manager, it couldn't find anything.
Using my google-fu gave no results either.I could use some help in this department.
The following two are listed as Nokia USB Connectivity (which pst uses to run diagnostics)
Code:
USB\VID_0421&PID_0660&REV_0100&MI_04 + USB\VID_0421&PID_0660&MI_04
USB\VID_0421&PID_0660&REV_0100&MI_05 + USB\VID_0421&PID_0660&MI_05
which have the following files listed: winusb.sys WdfCoInstaller01009.dll and winusbcoinstaller2.dll
EDIT: found what the following devices functions are
ultrashot said:
Test mode devices:
MI_1 = MODEM
MI_2 = NMEA
MI_3 = TRACE
MI_4 = NOKIA_JSONRPC
MI_5 = NOKIA_ISI
MI_6 = DIAG
Click to expand...
Click to collapse
ultrashot said:
[Mi_4] uses a generic remote control protocol used by NCS (All the data shown in NCS is retrieved using JSONRPC). Contains functions like WriteNvData, WriteEfsFile, ReadManufacturerModelName, SetDeviceMode etc. Commands are in json form.
There is an old post with example of command: http://forum.xda-developers.com/showpost.php?p=35256188&postcount=8
Same protocol is supported in MainOS device mode. Some of operations have different names, but in general it is the same.
Click to expand...
Click to collapse
The following is a walk-through for initiating these protocols
ultrashot said:
How to Access a USB Device by Using WinUSB Functions
Click to expand...
Click to collapse
NOTE: The link above is not for the faint of heart. Its a link to a MSDN library. The walk-through assumes that you understand Windows already and have some background in programming.
The following process is the diagnostics TEST mode. It mostly relates to various hardware tests, like color pallets and tone generators.
So far, I have installed it on Win8Pro and started the Product Support Tool For Store. I then switched the product mode from Normal to Test and reboots into something that looks like a bootloader menu.
Since the text is blurry, It says:
NOKIA
ENOSW
RM680 1232.5957./9200.10211
181341 2013/02/28
RF INACTIVE​
When it has reconnected in the phone information tab, this is shown.
Code:
Software Version (Test) RM860 1232.5957.9200.10211 181341 2013/02/28 //alpha_engine/ENO_LASER_F3
Software Version (Normal) 1532.5957.1318.3021
Product Code 059R224
Software Status Up-to-date
NCSd Version (Normal) 1.24
Module Code 0205229
Basic Product Code 059N5M4
PSN Number CGQ790279
Hardware Version 1000
Bluetooth Id ************
Public Id ****************************************
Wlan Mac Address ************ ************ ************ ************
Label App Version (Test) Security LabelSW 4.24.0.55964
Hardware info
===========
MAIN ASIC
Main Asic Version 4.1
POWER ASIC
Pmic Model 1
Pmic Number 0
Pmic Revision 4
NFC
Firmware Version 1.26
Hardware Version 0.3
Model Id 0.1
DISPLAY
Manufacturer 0xFE
Display Type 0x90
Display Consecutive Number 0xBC
Display Horizontal Resolution In Pixels 768
Display Vertical Resolution In Pixels 1280
MAIN CAMERA
Model Id 18497
Revision 0.2
Serial Number 0A0101AE00000000
Manufacture Id 16
Sensor Id 10484100
FRONT CAMERA
Model Id 27184
Revision 3.0
Serial Number 0115323500000000
Manufacture Id 10
Sensor Id 0A6A3003
CAMERA FLASH
Hardware Design 18
Hardware Version 4
Flash Info 1 46
Flash Info 2 17
ACCELEROMETER
Manufacturer KIONIX
Model KXTNK-1000
ALS
Manufacturer AVAGO
Model QPDS-T900
PROXIMITY
Manufacturer AVAGO
Model QPDS-T900
Test Tab
When in this mode, the following options may be performed in NCS.
Self Test:
Test audio components, the accelerometer (gives positioning), gyroscope (same), the magnometer(gives positioning as well), the proximity sensor (pass/fail for if it works or not), nfc and its antenna, wlan, bt interface, temperatures (in Celsius) for Bluetooth, pa and osc (whatever those parts are), the display interface, the touch interface, camera interface and ois (idk what these are besides odd x,y values) and miscellaneous flash tests (which include a xenon charging time and its lifetime counter.
Touch Display Test:
Gives x and y coordinates for a single touch point.
Display Test:
Displays a white pattern, a black pattern, a checkerboard pattern, and different rgb shades with black.
Vibra Test:
Vibrates the phone based on percentage.
SIM Test:
Checks if a SIM card has been inserted. (fails with Verizon shipped sim EDIT: Now succeeds since PST update) It also is supposed to perform something else, but can't validate.
Mic Test:
Records and plays audio back through various inputs and outputs.
Accelerometer Test:
Gives "gravity" data in x,y,z format.
Audio Output Test:
Plays four tones through various outputs at three different volumes.
Another interesting thing: When powering off the phone and turning it back on, Windows attempts to find drivers for "Nokia BOOTMGR", but it occurs too quickly to install.
Can someone with experience with Nokia other phones contribute assistance? It seems like I'm just meddling with NCS and I could possibly brick my main phone. (I was told to only install the ffu it was designed for.)
Flashing ffus from the same device, but using a different product code
I haven't been around to know enough, and its unknown if the Lumia 928 will be launched on any different carrier or in a different country.
Anyways I'll quote snickler's post to summarize.
snickler said:
Hi All,
I've spent the past 4 days looking for a solution to get the Amber Update on my AT&T Branded Lumia 920 without installing a European ROM and changing to RM-821. After searching endlessly, I've found my solution that works!
Prerequisites
* Nokia WP8 Drivers
* Nokia Care Suite 2013.13.4.4
* WperHelper v1.2 Note: This is in Chinese. I don't know Chinese AT ALL, but I've been able to figure my way around the app
* Rogers Pre-Poritco ROM. Download the last group of files for Roger, not the AT&T ones.
Steps:
* DONT PLUG IN YOUR PHONE YET TO THE COMPUTER.
* Extract/Install Nokia Care Suite. Open Care Suite when it's done installing and just put it to the side
* Install WperHelper. It's all in chinese, but the buttons should be easy to navigate through
* Download the last group of files for the pre-portico ROM if you haven't done so already.
* Go to the Run menu on your system and go to "C:\programdata\nokia\Packages\Products". Create a new folder named "RM-820". If you already have files in here from a previous ROM installation, move them somewhere else. The group of files you downloaded for the Pre-Portico ROM will need to be moved inside of this folder.
* Rename the pre-portico files removing the checksum from beginning of the file name.
Here's what you should have as files
* RM820_1232.2109.1242.1002_RETAIL_nam_canada_200_02_100347_prd_signed.ffu
* RM-820_RM-821_RM-822_TypeLabel_Group1_DM_5.33x5.33_CoO_Eng__001.xml
* CustomerNvi_31019d17537fb461136cdf3481825681_12421_100343_8410.nvi
* RM820_059R2L8_1232.2109.1242.1002_039.vpl
* 112545v3.pcx
* RM820_059R2L8_1232.2109.1242.1002_039.dcp
* RM820_059R2L8_1232.2109.1242.1002_039_signature.bin
* RM820_059R2L8_ccc_v039.bin
* RM820_059R2L8_hwt_v039.bin
* NWP8_WP8_Rogers_Fido_simlock_crcFCB5.bin
* DC_template_development_v4.bin
* Go back to NCS and double click on the Product Support Tool. If you don't see the little menu with the choices of apps to install, go to "C:\Program Files (x86)\Nokia\Nokia Care Suite\Product Support Tool For Store 5.0" and click on ProductSupportToolForStore.exe (Make sure the icon is an arrow. We don't need to open the .MANIFEST file).
* When the Sign in popup comes on the screen. click Work offline.
Click File -> Open Product and type in RM-820 in the filter then press Open
* At the bottom left panel, click on Programming -> Recovery.
* In the Properties listing, you should see 059R2L8 RM-820_Rogers_Canada_VAR240202_V2_Yellow 1232.2109.1242.1002
* Click on that line that shows the data that I listed above then click the Start button.
* Plug in your phone to the USB now, hold the Vol-Down + Power buttons until the phone restarts and you hear a vibration.
* When you hear the vibration, press Retry.
* You should see a little menu saying that the Product Code doesn't match, press Okay to continue.
* Let it flash.
* After the phone has flashed, set it up, but don't login to your Microsoft account yet (It's pointless at this point). Configure Wi-Fi though.
* Go to Settings -> Phone update and check for updates. The first round of updates will put you on to Portico.
* After these updates go through (It will take forever for it to finish Preparing to Install), you'll have to check for updates two more times in order to install Nokia Updates.
* After these two extra updates, your phone will be up to date.
* Now comes the fun part. Open up the WperHelper that you installed earlier.
* On the Top group of text links(The bigger text), chose the second one from the left. It should bring up a screen with 4 drop downs.
* From left to right, choose the following as values: Nokia, Lumia 920, RM-820, 3047.0000.1326.2001.
* Click on the 059R2L5 button that is located under the first dropdown. At the bottom right part of the screen, you'll see a download icon (downward facing arrow with a line underneath of it). Click it.
* This will start to download the ROM. When complete, Click on the Top group of text links, click on the third one then click on the second smaller text link underneath of it.
* You should see bbs.wper.com_059R2L5.7z. Click on it then click the lightning bolt on the bottom left corner. This will extract the FFU package.
* After it's complete, you'll see a new screen with a picture of a Windows phone and a bunch of Chinese text (I wish I had a translation). At this point you'll want to click the button that is listed directly under ( Step ).
* This will automatically begin the ROM updating process. You'll be able to see a little log running at the bottom of the screen on whether the Flashing is working or not.
* The place where the Windows Phone is showing will display the actual progress of flashing as it appears on your phone. You should be seeing the red screen with the progress bar on your windows phone by now. If this happens for you, then you're on your way to having the Amber Update.
A few things to note
After fully flashed, it'll bring you back to the typical phone set up screen. After you get to the main homescreen, wait a minute or so because it will require a reboot. After you bring the phone back up, go to Settings -> Access Point and choose AT&T - LTE 2 - Lumia. This will set up the MMS and Data settings correctly.
Have fun!
Click to expand...
Click to collapse
Photos/Screenshots will be posted later.
Thanks for reading the long post!
Nokia Software Updater for Retail
This is a SIMPLE tool that will allow a user to reflash/update his device. It has a checkbox that can be unchecked to prevent it to erase user data.
It can be downloaded from seidea.com
To be covered:
Nokia Data Package Manager
Test mode itself isn't really interesting AFAIK. There are plenty of other bootloader modes which may sound more interesting.
ultrashot said:
Test mode itself isn't really interesting AFAIK. There are plenty of other bootloader modes which may sound more interesting.
Click to expand...
Click to collapse
Well, the purpose is a catch all tutorial, to access features of the phones not normally available to all. My first venture was the NCS, but as more is discovered, it will be covered in the things to do.
I updated the OP with the new Nokia Care Suite that's been available for a while. Also, I'm going to start to look into some of the Qualcomm MSM Mode soon. Hopefully someone has documented info how that whole process works. I'm looking at you AdvanceBox (the "first" external software/hardware that will flash the Lumia 928...)
Well, it isn't hard to trigger different USB modes. "Nokia USB Connectivity" device is WINUSB compatible. But Qualcomm Diagnostics Mode device available in Test mode (there are no drivers, but you may edit existing ones...) isn't working well since it is restricted. Although, SPC seems to be 000000, but it isn't enough.
Useful addon for you. Test mode devices:
MI_1 = MODEM
MI_2 = NMEA
MI_3 = TRACE
MI_4 = NOKIA_JSONRPC
MI_5 = NOKIA_ISI
MI_6 = DIAG
as for
Another interesting thing: When powering off the phone and turning it back on, Windows attempts to find drivers for "Nokia Bootloader", but it occurs too quickly to install.
Click to expand...
Click to collapse
you're definitely talking about Nokia BOOTMGR. It has commands to boot into different modes, and it is indeed possible to make phone stay in this mode. However, overall it isn't interesting.
ultrashot said:
MI_4 = NOKIA_JSONRPC
Click to expand...
Click to collapse
ultrashot, do you know what is that mode for? The mode name sounds interesting ("remote procedure call via JSON requests"?)
sensboston said:
ultrashot, do you know what is that mode for? The mode name sounds interesting ("remote procedure call via JSON requests"?)
Click to expand...
Click to collapse
It is generic remote control protocol used by NCS (All the data shown in NCS is retrieved using JSONRPC). Contains functions like WriteNvData, WriteEfsFile, ReadManufacturerModelName, SetDeviceMode etc. Commands are in json form.
There is an old post with example of command: http://forum.xda-developers.com/showpost.php?p=35256188&postcount=8
Same protocol is supported in MainOS device mode. Some of operations have different names, but in general it is the same.
ultrashot said:
It is generic remote control protocol used by NCS (All the data shown in NCS is retrieved using JSONRPC). Contains functions like WriteNvData, WriteEfsFile, ReadManufacturerModelName, SetDeviceMode etc. Commands are in json form.
There is an old post with example of command: http://forum.xda-developers.com/showpost.php?p=35256188&postcount=8
Same protocol is supported in MainOS device mode. Some of operations have different names, but in general it is the same.
Click to expand...
Click to collapse
How do we initiate these protocols? (Yes, epic noob question here, but you know your stuff)
snickler said:
How do we initiate these protocols? (Yes, epic noob question here, but you know your stuff)
Click to expand...
Click to collapse
Its not a noob question. If I asked, it would be a noob question (I can read code, but writing code is an uphill battle)
Sent from my RM-860 (Lumia 928) using the OFFICIAL Tapatalk app.
snickler said:
How do we initiate these protocols? (Yes, epic noob question here, but you know your stuff)
Click to expand...
Click to collapse
http://msdn.microsoft.com/en-us/library/windows/hardware/ff540174(v=vs.85).aspx
ultrashot said:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff540174(v=vs.85).aspx
Click to expand...
Click to collapse
You are a hero. This needs added to one of the main posts.
snickler said:
You are a hero. This needs added to one of the main posts.
Click to expand...
Click to collapse
Added. I wish I could understand the process a little better; I only had one course in programming and I hated to start with vanilla java. Trial by fire, I guess.:silly:
thals1992 said:
Added. I wish I could understand the process a little better; I only had one course in programming and I hated to start with vanilla java. Trial by fire, I guess.:silly:
Click to expand...
Click to collapse
I'm going to attempt to make a program that will kick the device into those multiple modes.
snickler said:
I'm going to attempt to make a program that will kick the device into those multiple modes.
Click to expand...
Click to collapse
http://goodmovieslist.com/movie-quotes/There is no try - Yoda.jpg
Code:
data = "Test", "Flash", "Normal", "PowerOff", "PowerOffImmediate";
strcpy(buffer, "{\"jsonrpc\":\"2.0\",\"id\":55,\"method\":\"SetDeviceMode\",\"params\":{\"MessageVersion\":0,\"DeviceMode\":\"");
strcat(buffer, data);
strcat(buffer, "\",\"ResetMethod\":\"HwReset\"}}");
+
WriteToBulkEndpoint
I'll check if anything from my research on this thread is worth sharing - i have lots of snippets, but it is not that useful atm.
ultrashot said:
http://goodmovieslist.com/movie-quotes/There is no try - Yoda.jpg
Code:
data = "Test", "Flash", "Normal", "PowerOff", "PowerOffImmediate";
strcpy(buffer, "{\"jsonrpc\":\"2.0\",\"id\":55,\"method\":\"SetDeviceMode\",\"params\":{\"MessageVersion\":0,\"DeviceMode\":\"");
strcat(buffer, data);
strcat(buffer, "\",\"ResetMethod\":\"HwReset\"}}");
+
WriteToBulkEndpoint
I'll check if anything from my research on this thread is worth sharing - i have lots of snippets, but it is not that useful atm.
Click to expand...
Click to collapse
You are way too awesome to be human.
ultrashot said:
http://goodmovieslist.com/movie-quotes/There is no try - Yoda.jpg
Code:
data = "Test", "Flash", "Normal", "PowerOff", "PowerOffImmediate";
strcpy(buffer, "{\"jsonrpc\":\"2.0\",\"id\":55,\"method\":\"SetDeviceMode\",\"params\":{\"MessageVersion\":0,\"DeviceMode\":\"");
strcat(buffer, data);
strcat(buffer, "\",\"ResetMethod\":\"HwReset\"}}");
+
WriteToBulkEndpoint
I'll check if anything from my research on this thread is worth sharing - i have lots of snippets, but it is not that useful atm.
Click to expand...
Click to collapse
Any research is good research. If the right people see it, they will come and possibly contribute.
Sent from my RM-860 (Lumia 928) using the OFFICIAL Tapatalk app.
Can anyone compile this? I'm having a hard time following the MSDN article... :crying:

Parsing serial data over bluetooth - Arduino to Android

Hello,
I have been transmitting values from my Arduino to my Android using the BlueSerial app. It's great so far, however, I'm only able to read values. Ideally, I want to read these values displayed, and convert them to a variable so I can use them for calculations. I have not altered the Blue Serial app, and the code can be found here (I'm unable to post links due to being a new member): github*com/plastygrove/BlueSerial
As I said, I would like to convert the strings to something useful in order to do calculations. Can anyone provide some guidance?
Thanks.
Isn't it easy enough to make Integer.parseInt(receivedMessageString); ??
panwrona said:
Isn't it easy enough to make Integer.parseInt(receivedMessageString); ??
Click to expand...
Click to collapse
Yeah! Actually, I managed to use that and got it working. But now I want to transmit multiple values and store them as a variable. How can I go about doing that? Over serial, I can transmit them any way (whichever way is easiest), such as:
HTML:
Voltage = 25
Current = 10
Speed = 5
Or without text if necessary like:
HTML:
25
10
5
Or on a line separated by commas, such as:
HTML:
25,10,5
How can I make my android app "know" that there are three separate values being sent, and store each of these into a variable?
Maybe send string values like 'speed: 25', then extract integer from string and turn into value? That's just first idea that came to my mind. What kind of device are you reading from?
panwrona said:
Maybe send string values like 'speed: 25', then extract integer from string and turn into value? That's just first idea that came to my mind. What kind of device are you reading from?
Click to expand...
Click to collapse
That's actually what I managed to do. I used integer.parseint() for the one value. However, wouldn't this change when I'm sending more than one value? I'm trying to figure out how I can individually read each of the three values and store them. The integer.parseint() is working for the one so far though, so that's a start.
I'm sending data from my Arduino Mega to a self-made Android App via bluetooth. The data sends perfectly. And using integer.parseint(), I was able to even do calculations with the incoming number. But when I try to transmit several values, it gets tricky.
Maybe a HashMap <String, Integer> could work?
Sent from my HTC One using Tapatalk

Categories

Resources