4G or LTE thoughts?

Moderators: mdrjr, odroid

4G or LTE thoughts?

Unread postby Amphagory » Thu Mar 10, 2016 8:32 am

I would like to add a sim card to my project.

Any hardware setup suggestions for Android or Linux?

Mike
Amphagory
 
Posts: 11
Joined: Wed Mar 02, 2016 6:53 am
languages_spoken: english

Re: 4G or LTE thoughts?

Unread postby mlinuxguy » Thu Mar 10, 2016 2:04 pm

Start here
http://elinux.org/RPi_VerifiedPeriphera ... 3G_Dongles
Ebay also has quite a few S900 and S800 GPRS Shield based on SIMCOM
mlinuxguy
 
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO

Re: 4G or LTE thoughts?

Unread postby Amphagory » Tue Mar 15, 2016 3:21 am

I see across USA, the carriers have different bands... I was hoping someone had tried a unlocked 4G/LTE USB dongle and would give me some insight on which one to buy for USA.
Amphagory
 
Posts: 11
Joined: Wed Mar 02, 2016 6:53 am
languages_spoken: english

Re: 4G or LTE thoughts?

Unread postby xymantec » Fri May 12, 2017 1:49 pm

This is actually something I was looking into for our project and found this video...

It looks like it's been done on Ubuntu/Debian and it works well, depending on your OS this should work.
User avatar
xymantec
 
Posts: 22
Joined: Fri Mar 24, 2017 5:00 am
Location: Vancouver, WA
languages_spoken: english, spanish, italian, portoguese
ODROIDs: C2

Re: 4G or LTE thoughts?

Unread postby dieselnutjob » Wed Apr 25, 2018 12:36 am

Is there a 4G modem which is known to work on the C2 with Android?
dieselnutjob
 
Posts: 10
Joined: Thu Sep 01, 2016 11:24 pm
languages_spoken: english
ODROIDs: C1

Re: 4G or LTE thoughts?

Unread postby joerg » Wed Apr 25, 2018 2:21 am

As I know, there is no ported RIL driver on C2 Android. There is no easy solution.
I use a Hilink modem that connects by itself to the mobile net and creates a ethernet device over usb. But to make it work, it need to modify the Android framework, as I posted here: https://forum.odroid.com/viewtopic.php?f=137&t=23776#p218661
@odroid: Have you thought about to overtake this solution I posted there to the official Android build?
joerg
 
Posts: 804
Joined: Tue Apr 01, 2014 2:14 am
Location: Germany
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2

Re: 4G or LTE thoughts?

Unread postby odroid » Wed Apr 25, 2018 11:11 am

@joerg,
We have no USB 3G/4G modem service in Korea. So we can't test your solution.
Can you test the functionality with your modem if we make a trial image?
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: 4G or LTE thoughts?

Unread postby joerg » Wed Apr 25, 2018 12:41 pm

Yes, of course I can.
joerg
 
Posts: 804
Joined: Tue Apr 01, 2014 2:14 am
Location: Germany
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2

Re: 4G or LTE thoughts?

Unread postby odroid » Wed Apr 25, 2018 1:21 pm

Great! We will try it.
If we have any issue, we will create a new topic in Android sub-forum.
User avatar
odroid
Site Admin
 
Posts: 28718
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: 4G or LTE thoughts?

Unread postby Luke.go » Wed Apr 25, 2018 2:27 pm

Hi there!
I updated test updatepackage files. - https://dn.odroid.com/S905/Android/test/marshmallow/
Files name are updatepackage-odroidc2-signed.zip & updatepackage-odroidc2-signed.zip.md5sum

I checked mIfaceMatch valeu that correct. :)

you can change the value from /system/init.odroidc2.rc, setprop net.eth.iface
Luke.go
 
Posts: 236
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english

Re: 4G or LTE thoughts?

Unread postby joerg » Wed Apr 25, 2018 3:11 pm

OK, thank you. Need to wait a few days because I am not at home.
joerg
 
Posts: 804
Joined: Tue Apr 01, 2014 2:14 am
Location: Germany
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2

Re: 4G or LTE thoughts?

Unread postby joerg » Tue May 01, 2018 8:42 pm

@Luke.go
Yes it connects to internet 3G/4G, but I have to initialize the modem with usb_modeswitch comand: /system/bin/usb_modeswitch -v 12d1 -p 1f01 -M '55534243123456780000000000000a11062000000000000100000000000000' to switch it to hilink mode.

Note that I have a custom kernel with this patch and therefore don't need the usb_modeswitch:
Code: Select all
diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c
index 5a8b5ff..a77d655 100644
--- a/drivers/usb/storage/initializers.c
+++ b/drivers/usb/storage/initializers.c
@@ -58,6 +58,26 @@ int usb_stor_euscsi_init(struct us_data *us)
    return 0;
 }
 
+int usb_stor_huawei_init(struct us_data *us)
+{
+    int result = 0;
+    int act_len = 0;
+    struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf;
+    char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00,
+                            0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+    bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN);
+    bcbw->Tag = 0;
+    bcbw->DataTransferLength = 0;
+    bcbw->Flags = bcbw->Lun = 0;
+    bcbw->Length = sizeof(rewind_cmd);
+    memset(bcbw->CDB, 0, sizeof(bcbw->CDB));
+    memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd));
+    result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw,
+                                         US_BULK_CB_WRAP_LEN, &act_len);
+    printk("transfer actual length=%d, result=%d\n", act_len, result);
+    return result;
+}
+
 /* This function is required to activate all four slots on the UCR-61S2B
  * flash reader */
 int usb_stor_ucr61s2b_init(struct us_data *us)
diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h
index 529327f..bf35dc4 100644
--- a/drivers/usb/storage/initializers.h
+++ b/drivers/usb/storage/initializers.h
@@ -48,3 +48,5 @@ int usb_stor_ucr61s2b_init(struct us_data *us);
 
 /* This places the HUAWEI E220 devices in multi-port mode */
 int usb_stor_huawei_e220_init(struct us_data *us);
+
+int usb_stor_huawei_init(struct us_data *us);
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 7f62530..77fbc6b 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1932,6 +1932,12 @@ UNUSUAL_DEV(  0x12d1, 0x143F, 0x0000, 0x0000,
       USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
       0),
 
+UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50,
+                 "HUAWEI MOBILE",
+                 "Mass Storage",
+                 USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init,
+                 0),
+
 /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
 UNUSUAL_DEV(  0x132b, 0x000b, 0x0001, 0x0001,
       "Minolta",
joerg
 
Posts: 804
Joined: Tue Apr 01, 2014 2:14 am
Location: Germany
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2

Re: 4G or LTE thoughts?

Unread postby Luke.go » Wed May 02, 2018 10:13 am

@joerg
Thanks!! :)
We will merge the patch and release a new version! :)
Luke.go
 
Posts: 236
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english

Re: 4G or LTE thoughts?

Unread postby codewalker » Wed May 02, 2018 5:40 pm

Hi, joerg.
Here is the version that includes the kernel patch. Please test.
https://wiki.odroid.com/odroid-c2/os_im ... allow_v4.1

n1
https://dn.odroid.com/RK3399/Android/ODROID-N1/

https://github.com/hardkernel/linux/com ... b2abfd1086

joerg wrote:@Luke.go
Yes it connects to internet 3G/4G, but I have to initialize the modem with usb_modeswitch comand: /system/bin/usb_modeswitch -v 12d1 -p 1f01 -M '55534243123456780000000000000a11062000000000000100000000000000' to switch it to hilink mode.

Note that I have a custom kernel with this patch and therefore don't need the usb_modeswitch:
Code: Select all
diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c
index 5a8b5ff..a77d655 100644
--- a/drivers/usb/storage/initializers.c
+++ b/drivers/usb/storage/initializers.c
@@ -58,6 +58,26 @@ int usb_stor_euscsi_init(struct us_data *us)
    return 0;
 }
 
+int usb_stor_huawei_init(struct us_data *us)
+{
+    int result = 0;
+    int act_len = 0;
+    struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf;
+    char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00,
+                            0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+    bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN);
+    bcbw->Tag = 0;
+    bcbw->DataTransferLength = 0;
+    bcbw->Flags = bcbw->Lun = 0;
+    bcbw->Length = sizeof(rewind_cmd);
+    memset(bcbw->CDB, 0, sizeof(bcbw->CDB));
+    memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd));
+    result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw,
+                                         US_BULK_CB_WRAP_LEN, &act_len);
+    printk("transfer actual length=%d, result=%d\n", act_len, result);
+    return result;
+}
+
 /* This function is required to activate all four slots on the UCR-61S2B
  * flash reader */
 int usb_stor_ucr61s2b_init(struct us_data *us)
diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h
index 529327f..bf35dc4 100644
--- a/drivers/usb/storage/initializers.h
+++ b/drivers/usb/storage/initializers.h
@@ -48,3 +48,5 @@ int usb_stor_ucr61s2b_init(struct us_data *us);
 
 /* This places the HUAWEI E220 devices in multi-port mode */
 int usb_stor_huawei_e220_init(struct us_data *us);
+
+int usb_stor_huawei_init(struct us_data *us);
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 7f62530..77fbc6b 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1932,6 +1932,12 @@ UNUSUAL_DEV(  0x12d1, 0x143F, 0x0000, 0x0000,
       USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
       0),
 
+UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50,
+                 "HUAWEI MOBILE",
+                 "Mass Storage",
+                 USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init,
+                 0),
+
 /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
 UNUSUAL_DEV(  0x132b, 0x000b, 0x0001, 0x0001,
       "Minolta",
User avatar
codewalker
 
Posts: 497
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all

Re: 4G or LTE thoughts?

Unread postby joerg » Sun May 06, 2018 8:53 pm

Hi Chris,
sorry, I cannot get it work with the 4.1 update package, also not with the selfinstall image. It takes the cable ethernet also when I have edited the net.eth.iface to usbnet0 in build.prop.
Is it sure that the patch in /java/com/android/server/ethernet/EthernetNetworkFactory.java is applied?
The kernel patch is there, as the modem is switched to hilink and there is usbnet0 interface. But the interface still stays down:
Code: Select all
9: usbnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
joerg
 
Posts: 804
Joined: Tue Apr 01, 2014 2:14 am
Location: Germany
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2

Re: 4G or LTE thoughts?

Unread postby codewalker » Tue May 08, 2018 10:31 am

Hi, joerg.
I made a mistake. I'm sorry.
I uploaded a new update-package.
https://dn.odroid.com/S905/Android/ODRO ... ter-94.zip

joerg wrote:Hi Chris,
sorry, I cannot get it work with the 4.1 update package, also not with the selfinstall image. It takes the cable ethernet also when I have edited the net.eth.iface to usbnet0 in build.prop.
Is it sure that the patch in /java/com/android/server/ethernet/EthernetNetworkFactory.java is applied?
The kernel patch is there, as the modem is switched to hilink and there is usbnet0 interface. But the interface still stays down:
Code: Select all
9: usbnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
User avatar
codewalker
 
Posts: 497
Joined: Mon Feb 25, 2013 11:03 am
languages_spoken: english
ODROIDs: all

Re: 4G or LTE thoughts?

Unread postby montaigne » Sun May 13, 2018 10:04 am

Any tutorial on how to get this to work with android.. perhaps I am not seeing the full solution.
montaigne
 
Posts: 58
Joined: Mon Mar 28, 2016 8:56 am
languages_spoken: english
ODROIDs: c1+,c2


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 2 guests