norayr has left #maemo-leste [Error from remote client]
Livio has quit [Ping timeout: 268 seconds]
Livio has joined #maemo-leste
Livio has quit [Changing host]
Livio has joined #maemo-leste
norayr has joined #maemo-leste
<Wizzup>
freemangordon: so there are several radio interfaces and what ended up happening is that it'd reset the tech to NULL when it iterated over the interfaces
<Wizzup>
iirc it was probably cdma or something (I'd have to check the logs)
<Wizzup>
so this simple checks if the radio tech is set to anything sensible
<Wizzup>
s/NULL/-1/
<Wizzup>
simple->simply
<uvos>
whats wrong with haveing those? they may work in some contires after all
<Wizzup>
uvos: huh?
<Wizzup>
the problem is that ofono will report no technology in dbus because it nukes the good one
<Wizzup>
if you're in a cdma place with no 2g then it will use the cdma tech
<uvos>
ok then i read that wrong
<uvos>
i sounded to me like you nixed them
<Wizzup>
freemangordon: so one of the ofono problems that I think are maybe at the root of the problems: on the d4, when you boot with a sim that has a pin, it just will not detect the sim until you issue some operation, like SetProperty Online true, or just restart ofono (and even then it won't always pick it up)
<Wizzup>
on the bionic this particular problem with pin doesn't exist
<Wizzup>
similarly there are other problems I think with messages to ofono "getting lost", or at least they don't make it all the way to the right handlers
<Wizzup>
for example when I set the context to active, it sometimes just times out, unless in the meantime I poke ofono in some other way, like by sending a sms to my other phone number
<Wizzup>
what might be worth trying it setting up the 'regular' qmi modem driver which uses usb only (and uses a lot of pm and doesn't idle well) to see if that shows any of these problems
<Wizzup>
I don't know how to do it anymore, but can try to help to figure it out
<freemangordon>
Wizzup: do you know a way to re-create the issue without rebooting the device?
<Wizzup>
no
<Wizzup>
there are definitely other issues, but not as reproducible as this one
<freemangordon>
did you try to re-plug the card?
<Wizzup>
I did not
<Wizzup>
like if you restart ofono, it will only pick up the modem some of the time
<freemangordon>
ok
<Wizzup>
and if you set Online to false and then back to true, I think it just aborts
<freemangordon>
hmm
<Wizzup>
but that's likely a separate problem
<uvos>
i think you can reboot the modem via the at interface
<uvos>
maybe tmlind remembers
<uvos>
that might simulate a system reboot (if you also restart ofono)
<Wizzup>
I suppose you can unload and reload the kernel module
<uvos>
i dont know if that reboots the modem
<Wizzup>
it definitely powers it, not sure about unload
<freemangordon>
which module?
<uvos>
motorolamodem
<freemangordon>
Wizzup: I see no issues here doing offline<->online
<freemangordon>
but sim has no pin
<Wizzup>
maybe it's powered false/true
<freemangordon>
ok
* freemangordon
tries
<Wizzup>
let me try now
<uvos>
i dont think powerd fals true dose anything
<uvos>
at least it dosent change power consumption
<Wizzup>
well it makes it abort iirc
<uvos>
(which cfun dose)
<uvos>
sure but i mean in terms of affecting the modem firmware
<tmlind>
that allows you to see the ts27010 serial mux packets to the modem
<freemangordon>
ok, but my concern is that maybe no irq is used from BP->AP
<tmlind>
freemangordon: not sure if we use the apwake gpio.. the gpios are in the dts file
<freemangordon>
perhaps that's why we need to send something in order to receive unsol events
* freemangordon
checks gpio number in android kernel
<tmlind>
yeah maybe
<tmlind>
see also what phy-cpcap-usb.c is already doing, maybe it already handles it
<tmlind>
no sorry, wrong phy driver.. the mdm6600 phy driver
<freemangordon>
ok
<tmlind>
phy-mapphone-mdm6600.c
<freemangordon>
ok
<tmlind>
freemangordon: some mdm6600 gpios need to be remuxed to input after initial bootup to use them
<freemangordon>
yep, I see the comments in phy driver
<freemangordon>
but I have to figure out what exactly gpio is needed
<tmlind>
maybe apwake remuxed to input after boot if not done already?
<tmlind>
that should be gpio_149
<freemangordon>
mdm6600-wake does not increase on SIM insert/remove
<tmlind>
i see /* Reconfigure mode1 GPIO as input for OOB wake */ so modem should already be waking up the soc
<freemangordon>
p, li { white-space: pre-wrap; } /* Reconfigure mode1 GPIO as input for OOB wake */
<freemangordon>
yep
<freemangordon>
that's exactly "mdm6600-wake"
<freemangordon>
what is "mode1"?
<tmlind>
it could be there's some handler missing in ofono and the message comes from uart just fine
<tmlind>
mode pins tell what usb mode to boot it to i think
<freemangordon>
I see nothing in n_gsm traces
<freemangordon>
(re missing handler)
<freemangordon>
shall I write a simple test program that opens /dev/gsmtty1 and reads?
<tmlind>
ok then maybe sim insert does not trigger anything? it takes really long time with android too to see the sim sometimes
<freemangordon>
ok, but sim remove?
<tmlind>
don't remember if that produces anything
<freemangordon>
in android?
<freemangordon>
hmm
<tmlind>
if you modprobe n_gsm debug=0xff, then you should see the raw packets in dmesg
<freemangordon>
that's why I did
<tmlind>
so probably no need to read /dev/gsmtty1
<freemangordon>
nothing comes
<freemangordon>
unless you "kick" it by sending some command
<tmlind>
weird
<freemangordon>
hmm, wait
<freemangordon>
see the note before phy_mdm6600_wakeirq_thread
<freemangordon>
"Just use it for debug info only..."
<tmlind>
yeah maybe that triggers and means check status
<freemangordon>
mhm
<freemangordon>
looks like
<tmlind>
oh so you see it trigger when inserting a sim then?
<freemangordon>
no, because it is dev_dbg
<freemangordon>
I am trying to find how to see dev_dbg messages
<tmlind>
#define DEBUG at the top, set loglevel to 8 or smaller i think
<tmlind>
or just change dev_dbg to dev_info temporarily..
<freemangordon>
what about "echo 'file phy-mapphone-mdm6600.c +p'>/sys/kernel/debug/dynamic_debug/control"?
<tmlind>
yeah that might work
<freemangordon>
ugh, no dynamic_debug it seems :(
<tmlind>
ok
<freemangordon>
but I see irqs increasing
<tmlind>
i need to go deal with feeding, let's hope the oob gpio works :) bbl
<freemangordon>
:)
<freemangordon>
hmm, seems inserting seems gets registered by ofono
<freemangordon>
it just takes lots of time
<freemangordon>
or, it could be because I enabled unsol messages
* freemangordon
checks
ikmaak2 has joined #maemo-leste
ikmaak has quit [Ping timeout: 252 seconds]
ikmaak2 is now known as ikmaak
* tmlind
waiting for a pizza
* uvos
intercepts pizza
<freemangordon>
tmlind: do you know, where in ofono I shall send 'U1234AT+UNSOL=1' command?
<freemangordon>
it seems this has to be send after every unsol even in order to receive the next one
<tmlind>
no idea, seems it needs a new handler in ofono
<freemangordon>
umm, why handler?
<freemangordon>
the handler is there
<freemangordon>
I just need to send that command when tty is opened
<tmlind>
but something needs to parse the unsol message, then kick the usb interface
<freemangordon>
the parser is already there
<tmlind>
ah
<tmlind>
ok then acking it is needed sounds like
<freemangordon>
see receive_notify in sim.c
<freemangordon>
but, I think before receiving the first notify, the ^^^ commend shall be send
<freemangordon>
to enable unsol events
<freemangordon>
hmm, maybe you are right and this is ACK, lemme try
<tmlind>
afc, only on d4 right now, can't grep
<freemangordon>
ok
dev has joined #maemo-leste
dev has left #maemo-leste [#maemo-leste]
<tmlind>
fyi to avoid implementing full modem support over serial at commands, we just kick the usb interface and let the existing code handle things..
<freemangordon>
umm... I am not sure I understand
<tmlind>
ofono has good qmi support over usb
<freemangordon>
ok
<tmlind>
bbl
<freemangordon>
lets first see that what I think is needed works
mardy_2nd has joined #maemo-leste
norayr has left #maemo-leste [Error from remote client]
Livio has quit [Ping timeout: 268 seconds]
Livio has joined #maemo-leste
Livio has quit [Changing host]
Livio has joined #maemo-leste
dev has joined #maemo-leste
Pali has joined #maemo-leste
dev has left #maemo-leste [Disconnected: Replaced by new connection]
dev has joined #maemo-leste
mardy_2nd has quit [Quit: WeeChat 3.5]
dev has left #maemo-leste [Disconnected: closed]
dev has joined #maemo-leste
<freemangordon>
ok, it seems AT+UNSOL=1 shall be send only once
<freemangordon>
ugh, why it needs 5 minut6es to report sim present?
<freemangordon>
hmm, not, this command must be send every time
<Wizzup>
freemangordon: modem startup time maybe
<freemangordon>
no
<freemangordon>
10 minutes after boot
<freemangordon>
if there is no AT+UNSOL=1, SIM insertion is not reported
<Wizzup>
not sure how that works
<Wizzup>
do you have a bionic as well?
<freemangordon>
if there is, it is reported maybe a minute after it is inserted
<freemangordon>
no
<Wizzup>
uvos suggested we could try older or newer fw
<freemangordon>
lemme first see if I can make it work properly on d4
<Wizzup>
:)
<freemangordon>
I just have to find the proper place to put it
<freemangordon>
(command)
<freemangordon>
and I am sure it will work
<freemangordon>
well, sure(tm) :)
Livio has quit [Ping timeout: 260 seconds]
<Wizzup>
:)
<freemangordon>
ugh, callback in ofono was not called :(
<freemangordon>
oh, PEBCAK
<tmlind>
freemangordon: so are you seeing AT+UNSOL=1 do anything?
<freemangordon>
still hard to say
<tmlind>
heh
<freemangordon>
yeah, seems ofono has bug so callback does not get called when sim insert is reported
<freemangordon>
investigation ATM
<tmlind>
usually if the modem has something it produces several WAKEUP on the dlci1
<tmlind>
freemangordon: maybe enable status notifications on dlci1 with AT+SCRN=1, then insert sim and see you that produces any new messages?
<tmlind>
most likely it will just enable network status notfications though
<freemangordon>
lemme first fix ofono bug
<tmlind>
oh ok
<freemangordon>
tmlind: hmm, why g_at_chat_register() in sim.c is called with expect_pdu set to true?
<tmlind>
just a sec.. hmm maybe the sim detection i added only works with bionic firmware? there's a difference in the line break characters between bionic and d4..
<tmlind>
forgot the details on the expect_pdu, may be related to the different line breaks too
<tmlind>
or could be bug :)
<Wizzup>
it works in bionic I can confirm
<tmlind>
oh ok, might be the line break issue then
<tmlind>
freemangordon: hmm maybe i used the pdu to strip out the moto U1234 packet id's
<tmlind>
some more info on the varying line breaks in "gatsyntax: Allow '\n' to terminate line"
<tmlind>
if d4 produces ~+MSIM= but ofono is not parsing it and bionic is, chances are it's somehow related to the packet line breaks
<tmlind>
hmm or i guess d4 may produce ~+MSIM on a different dlci rather than /dev/gsmtty10 on bionic, seems unlikely though
<Wizzup>
Does n_gsm debug where the command goes?
<freemangordon>
no, it is there
<freemangordon>
tmlind: ^^^
<freemangordon>
maybe ofono cannot parse the pdu
<freemangordon>
pasring results in G_AT_SYNTAX_RESULT_LINE:
Twig has quit [Ping timeout: 260 seconds]
<freemangordon>
not G_AT_SYNTAX_RESULT_PDU
<tmlind>
ok
<tmlind>
btw, i've noticed that doing ifdown wlan0 can hang the device at some point
<freemangordon>
I guess a0000000871002ff47f00189000001ff is the PDU in question?
<tmlind>
not sure why the firmware sends it in multiple pieces, but it's packet data with a size and checksum so should not matter from ts27010 point of view
<freemangordon>
you mean from n_gsm POV guess
<freemangordon>
right, and it seems to process it correctly
<tmlind>
yeah
<tmlind>
so does ofono see the middle \n there too?
<freemangordon>
only ofono sees it
<freemangordon>
and that's why it fails to parese
<freemangordon>
*parse
<tmlind>
hmm
<freemangordon>
hmm ONOCR
<tmlind>
so doing ngsm 10 AT+MSIM? shows the sim with no line break in the middle
<freemangordon>
cfmakeraw does not set that flag
<tmlind>
where 10 is dlci10
<freemangordon>
so it seems tty outputs \n at col 0 for some reason
<tmlind>
so also with ngsm 10 AT+MSIM? the dmesg shows the data returned in two pieces
<tmlind>
ngsm is my script for doing the commands fyi that adds the U1234
<freemangordon>
tmlind: lemme try to set ONOCR
<tmlind>
if ngsm 10 AT+MSIM? returns sim data to the terminal with no line break, why would ofono see the line break?