UART for GSM module

Third party OS images and hardware mods
Post Reply
mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

UART for GSM module

Post by mameise »

Hi together,

i plan to connect a GSM module to the go Advance. Seems the UART is the perfect Connection as it should provide
RX, TX, GND and 5V - but on the board, how are they arranged? Can someone help me? Tried to get Information from schematic
but i am too stupid to understand it :(

Edit: I assume the UART is a different Connection then the USB correct? (I know it are 2 different Points on the PCB but i am not sure if the UART is also used for USB)

Thanks

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

These users thanked the author mad_ady for the post:
mameise (Mon Mar 09, 2020 1:07 am)

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

Thanks :) But this is for the 10 pin port. Is there also more info for the UART connector (the one without plug where a plug can be soldered)?

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

Oh, it's the same as the uart on any other board. The same usb-uart works with it.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

Ok thank you. After lookimg closer it seems the uart port only provides 3V so maybe i will go with the 10pin connector to have 5V available.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

Can someone help me? I am not really a Linux expert :(

I have quickly soldered a SIM800 board to plug it into the 10pin connector.
I have used the RX and TX on the module to connect to RX and TX on the connector (RX->TX, TX-RX of Course)
The module already blinks and i can call the number and it rings. But somehow i have Troubles getting a Connection work
from Advance to the module.

How can i get a list of connected devices?

What i did:

Tried to get the address of the module connected via lsdev -> command not found :( ok, installed necessary pack and then
i got can't open /dev/dma at /usr/bin/lsdev line 32 -> no idea what that means, Google also did not help how to solve so i moved on
and installed minicom and tried: minicom -D /dev/ttyS1 -b 115200 (also tried 9600) -> minicom starts but i cannot enter anything…
Normally i should be able to enter AT now and get "OK" back :) But Nothing happens, i have to close the terminal window and open a new one…
If i try other addresses like /dev/ttyS2 etc i get device not found or something like that.
When i unplug the modem and try again minicom still starts, so i assume it is not the correct device Name.
But then we end up at the Question: how can i find out the correct device Name?

I should add i use debian buster image.

Thanks
Attachments
59C61E3C-75DC-4CA3-AF50-43EF9E2D99DF.jpeg
59C61E3C-75DC-4CA3-AF50-43EF9E2D99DF.jpeg (635.83 KiB) Viewed 3339 times

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

Not sure if the serial port is enabled by default in the dtb...

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

And is there a way to enable it? If yes, how?

Thanks :)

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »


mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

Oh no :( I have to build a kernel? Ok in this case the dream of a go Advance phone just died... I will not be able to do this and if there is no image supporting it (beside having a desktop/console) i cannot do anything...
Sad but ok :(

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

No. You need to recompile the kernel only if you want to use uart2 as a kernel debug port (which you don't). You need the enable uart2 section, which can be done just by modifying the dtb (install device-tree-compiler and play with fdtget, fdtdump and fdtset). Most likely you just need to set it to enabled.
Sorry I can't test the right command for you - I left my Go Advance at work and we're working from home over here.

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

Oh unlucky you… We also work from Home but my Advance is Always with me ;)

Ok i will have to look into it how to do this as i am really just a beginner in Linux. But Maybe i find a howto and can Interpret the correct changes. Thanks for the Startup hint ;)

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

Let's see if we can enable the other port via dtb editing. On your go advanve do:

Code: Select all

sudo apt-get install device-tree-builder
fdtdump /media/boot/*.dtb | less
Look for a section that resembles the on on the wiki and paste it here so we can have a look.
These users thanked the author mad_ady for the post:
mameise (Fri Mar 20, 2020 6:43 pm)

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

mad_ady wrote:
Fri Mar 20, 2020 1:34 am
Let's see if we can enable the other port via dtb editing. On your go advanve do:

Code: Select all

sudo apt-get install device-tree-builder
fdtdump /media/boot/*.dtb | less
Look for a section that resembles the on on the wiki and paste it here so we can have a look.
Thanks for your help :)
When i type the command to install the device-tree-builder i just get:
unable to locate package device-tree-builder

i did sudo apt-get upgate before…

Edit: device-tree-compiler did it.
But next issue:
When i enter the second command i get:

Couldn't open blob from '/media/boot/*.dtb': No such file or Directory
FATAL ERROR: cound not read: /media/boot/*.dtb

also tried with sudo but same result

Edit2:
using just /boot/ works.

Now i see a never ending list of Things... Would not know how to paste it here :(
But in between i found:

Serial@ff030000 {
compatible = "rockchip,px30-uart", "snps,dw-apb-uart";


status = "disabled";


So i assume you are Right and the UART is disabled. But how to enable it now?

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

Ok. The dtb entries are placed in a sort of a tree like structure. See who the parents of Serial@ff.. are and (make a backup of the dtb) try something like:

Code: Select all

fdtput /boot/file.dtb /parent-of-serial/Serial@ff-address status s=okay
These users thanked the author mad_ady for the post (total 2):
joy (Fri Mar 20, 2020 3:28 pm) • mameise (Fri Mar 20, 2020 6:43 pm)

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

mad_ady wrote:
Fri Mar 20, 2020 2:54 pm
Ok. The dtb entries are placed in a sort of a tree like structure. See who the parents of Serial@ff.. are and (make a backup of the dtb) try something like:

Code: Select all

fdtput /boot/file.dtb /parent-of-serial/Serial@ff-address status s=okay
I think we are getting closer :)
I did the command above and changed "file.dtb" with the file name and "/parent-of-serial/serial@ff-address" to "/serial@ff03000" and now the status in the file
shows " <0x0000007f> "
I assume not correct as there should be "okay" but not sure how to get that. I cannot simply nano into the file and change it i assume?

Thanks

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

Yes, it should say okay. Try:

Code: Select all

fdtput -s /boot/file.dtb  /serial@ff03000 status okay
These users thanked the author mad_ady for the post:
mameise (Fri Mar 20, 2020 10:31 pm)

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

mad_ady wrote:
Fri Mar 20, 2020 8:28 pm
Yes, it should say okay. Try:

Code: Select all

fdtput -s /boot/file.dtb  /serial@ff03000 status okay
tried this and get Error: unknown option

I found out that the Serial i try to manipulate is "uart0"... I Need uart1 and that seems to be Serial@ff158000

I also googled around and tried to get the correct command but had no luck… Seems the "s=" is not needed but still an option would be needed to update the entry correct. I tried without it but the value did not Change, so still this 0x00007f or so...

Edit: I found it out :) It is fdtput -t s /boot/file.dtb /serial@ff03000 status okay :) That worked. Now i Need to test if i can Access the modem (also Changed Serial@ff158000 to okay)


Edit again: Tried it but still not working.. Had to Change back the Serial@ff030000 as with this changed to okay the Advance did not boot up anymore.

I think the easiest will be to swith to UART2 (the one on the Right side) as it seems to be not so easy to use the 10PIN plug anymore :( Worked perfect on classic go

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

I spent today some time to build in the GSM module...
Not happy at all because i have still troubles talk to it.

Now i used the UART con3 on the right side but when i do:

minicom -D /dev/ttyS2 i still get not found error...

I thought using uart2 would solve my problems but seems not :(
Attachments
33CD7F62-DCF5-448A-BBF9-48FA99C6E208.jpeg
33CD7F62-DCF5-448A-BBF9-48FA99C6E208.jpeg (472.11 KiB) Viewed 2854 times
4E0282FC-094F-4813-B0A8-D8727C9091C0.jpeg
4E0282FC-094F-4813-B0A8-D8727C9091C0.jpeg (907.59 KiB) Viewed 2854 times
17CAD61E-996C-485F-81D7-67997361F7B7.jpeg
17CAD61E-996C-485F-81D7-67997361F7B7.jpeg (699.05 KiB) Viewed 2854 times

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

Using device-tree-compiler - how could i add a complete section like this:

&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2m1_xfer>;
status = "okay";
};


Seems this is needed to enable uart2 (and that seems to be the con3 on the right side)
When i know how to add this i hope it should work.

Thanks

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

I think the side uart is called ttyFIQ0 (don't ask what ig stands for). Note that you'll need to disable kernel (and maybe uboot as well) from talking to that port.
For the top uart I don't know what's missing. The dtb change should have been enough. Check that the name is correct (should appear in dmesg)

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

mad_ady wrote:
Sun Mar 22, 2020 1:56 am
I think the side uart is called ttyFIQ0 (don't ask what ig stands for). Note that you'll need to disable kernel (and maybe uboot as well) from talking to that port.
For the top uart I don't know what's missing. The dtb change should have been enough. Check that the name is correct (should appear in dmesg)
Ok thank you. When i use this device Name i get same result as for ttyS1 - no entry possible.

But what do you mean with "disable kernel" ?? Am i not able to Access that port in Debian buster?

Edit: I think i got what you mean. How can i disable kernel and uboot to talk to the port?

mad_ady
Posts: 8598
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 489 times
Contact:

Re: UART for GSM module

Post by mad_ady »

For kernel it should be easy, just remove the console=ttyFIQ0 entry from boot.ini.
For uboot you may need to recompile and flash the internal spi flash with a custom uboot version. But if your gsm module talks at adifferent baud rate than 115200, then it may be fine, since it hears gibberish on boot and hopefully ignores it...

mameise
Posts: 173
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO
Has thanked: 13 times
Been thanked: 27 times
Contact:

Re: UART for GSM module

Post by mameise »

mad_ady wrote:
Sun Mar 22, 2020 3:43 am
For kernel it should be easy, just remove the console=ttyFIQ0 entry from boot.ini.
For uboot you may need to recompile and flash the internal spi flash with a custom uboot version. But if your gsm module talks at adifferent baud rate than 115200, then it may be fine, since it hears gibberish on boot and hopefully ignores it...
Ok that entry is not there in boot.ini

The sim800l is set to Auto so it can talk on all baud rates. But i cannot get any answer from FIQ0
I also looked into dev and there is ttyACM0, ttyS1 beside the FIQ0 but on None i get an answer or can type anything.

As recompiling anything and Flash something is bejond my skill Level i think i am stuck again :(

notime2d8
Posts: 183
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 54 times
Been thanked: 85 times
Contact:

Re: UART for GSM module

Post by notime2d8 »

mameise wrote:
Wed Mar 18, 2020 11:52 pm
Can someone help me? I am not really a Linux expert :(

I have quickly soldered a SIM800 board to plug it into the 10pin connector.
I have used the RX and TX on the module to connect to RX and TX on the connector (RX->TX, TX-RX of Course)
The module already blinks and i can call the number and it rings. But somehow i have Troubles getting a Connection work
from Advance to the module.

How can i get a list of connected devices?

What i did:

Tried to get the address of the module connected via lsdev -> command not found :( ok, installed necessary pack and then
i got can't open /dev/dma at /usr/bin/lsdev line 32 -> no idea what that means, Google also did not help how to solve so i moved on
and installed minicom and tried: minicom -D /dev/ttyS1 -b 115200 (also tried 9600) -> minicom starts but i cannot enter anything…
Normally i should be able to enter AT now and get "OK" back :) But Nothing happens, i have to close the terminal window and open a new one…
If i try other addresses like /dev/ttyS2 etc i get device not found or something like that.
When i unplug the modem and try again minicom still starts, so i assume it is not the correct device Name.
But then we end up at the Question: how can i find out the correct device Name?

I should add i use debian buster image.

Thanks

So nobody is going to ask for details about this fancy keyboard???? :o
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

joy
Posts: 1448
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 158 times
Been thanked: 178 times
Contact:

Re: UART for GSM module

Post by joy »


Safarikniv
Posts: 4
Joined: Mon Mar 09, 2020 6:03 am
languages_spoken: english
ODROIDs: OGA
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: UART for GSM module

Post by Safarikniv »

notime2d8 wrote:
Mon Mar 23, 2020 1:53 pm
mameise wrote:
Wed Mar 18, 2020 11:52 pm
Can someone help me? I am not really a Linux expert :(

I have quickly soldered a SIM800 board to plug it into the 10pin connector.
I have used the RX and TX on the module to connect to RX and TX on the connector (RX->TX, TX-RX of Course)
The module already blinks and i can call the number and it rings. But somehow i have Troubles getting a Connection work
from Advance to the module.

How can i get a list of connected devices?

What i did:

Tried to get the address of the module connected via lsdev -> command not found :( ok, installed necessary pack and then
i got can't open /dev/dma at /usr/bin/lsdev line 32 -> no idea what that means, Google also did not help how to solve so i moved on
and installed minicom and tried: minicom -D /dev/ttyS1 -b 115200 (also tried 9600) -> minicom starts but i cannot enter anything…
Normally i should be able to enter AT now and get "OK" back :) But Nothing happens, i have to close the terminal window and open a new one…
If i try other addresses like /dev/ttyS2 etc i get device not found or something like that.
When i unplug the modem and try again minicom still starts, so i assume it is not the correct device Name.
But then we end up at the Question: how can i find out the correct device Name?

I should add i use debian buster image.

Thanks

So nobody is going to ask for details about this fancy keyboard???? :o
Yeah, please share info on the keyboard :)

hominoid
Posts: 447
Joined: Tue Feb 28, 2017 3:55 am
languages_spoken: english
ODROIDs: C2, C4, XU4, MC1, N1, N2, N2+, HC4
Location: Lake Superior Basin, USA
Has thanked: 43 times
Been thanked: 140 times
Contact:

Re: UART for GSM module

Post by hominoid »

Safarikniv wrote:
Tue Mar 31, 2020 9:49 pm
Yeah, please share info on the keyboard :)
It is in General Topics viewtopic.php?f=187&t=38047
These users thanked the author hominoid for the post:
Safarikniv (Wed Apr 01, 2020 5:22 am)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests